X-Git-Url: https://git.decadent.org.uk/gitweb/?p=videolink.git;a=blobdiff_plain;f=style_sheets.cpp;h=4b00ce49d7bcb328df50b109e381f82f5b9c2131;hp=568c8e8228216a7f067d8c9f350d3030336eee55;hb=194f5f8a53d16a8a07c61df2311a13b3cd3994bf;hpb=5746a18015788678b85907421f91adf249ea71d3 diff --git a/style_sheets.cpp b/style_sheets.cpp index 568c8e8..4b00ce4 100644 --- a/style_sheets.cpp +++ b/style_sheets.cpp @@ -7,7 +7,11 @@ #include #include #include -#include +#if MOZ_VERSION_MAJOR > 1 || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8) +# include +#else +# include +#endif #include #include @@ -41,10 +45,18 @@ void apply_style_sheet(nsIStyleSheet * style_sheet, nsIPresShell * pres_shell) check(style_sheets.InsertObjectAt(style_sheet, 0)); check(pres_shell->SetAgentStyleSheets(style_sheets)); - check(pres_shell->EnablePrefStyleRules(false)); + // FIXME: We need to find an alternative that works in Mozilla 1.8. +# if MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR < 8 + check(pres_shell->EnablePrefStyleRules(false)); +# endif // Update the display - check(pres_shell->ReconstructStyleData()); - check(pres_shell->FlushPendingNotifications(true)); +# if MOZ_VERSION_MAJOR > 1 \ + || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8) + pres_shell->ReconstructStyleData(); + check(pres_shell->FlushPendingNotifications(Flush_Display)); +# else + check(pres_shell->ReconstructStyleData()); + check(pres_shell->FlushPendingNotifications(true)); +# endif } -