X-Git-Url: https://git.decadent.org.uk/gitweb/?p=videolink.git;a=blobdiff_plain;f=videolink.cpp;h=f26bd5d2809a7a1dbf7d050a792f6c1d71efb1b4;hp=030aece0e3bfc447029126c50b06256643e2cac8;hb=194f5f8a53d16a8a07c61df2311a13b3cd3994bf;hpb=5746a18015788678b85907421f91adf249ea71d3 diff --git a/videolink.cpp b/videolink.cpp index 030aece..f26bd5d 100644 --- a/videolink.cpp +++ b/videolink.cpp @@ -43,10 +43,19 @@ #include // required before nsILink.h #include #include +#if MOZ_VERSION_MAJOR > 1 || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8) +# include +#else +# include + typedef nsIPresContext nsPresContext; // ugh +#endif #include -#include #include -#include +#if MOZ_VERSION_MAJOR > 1 || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8) +# include +#else +# include +#endif #include #include @@ -178,7 +187,7 @@ namespace bool process_page(); void save_screenshot(); void process_links(nsIPresShell * pres_shell, - nsIPresContext * pres_context, + nsPresContext * pres_context, nsIDOMWindow * dom_window); video::frame_params frame_params_; @@ -422,7 +431,7 @@ namespace assert(doc_shell); nsCOMPtr pres_shell; check(doc_shell->GetPresShell(getter_AddRefs(pres_shell))); - nsCOMPtr pres_context; + nsCOMPtr pres_context; check(doc_shell->GetPresContext(getter_AddRefs(pres_context))); nsCOMPtr dom_window; check(browser->GetContentDOMWindow(getter_AddRefs(dom_window))); @@ -526,7 +535,7 @@ namespace }; void videolink_window::process_links(nsIPresShell * pres_shell, - nsIPresContext * pres_context, + nsPresContext * pres_context, nsIDOMWindow * dom_window) { Glib::RefPtr window(get_window()); @@ -703,7 +712,12 @@ namespace check(event_state_man->SetContentState(content, NS_EVENT_STATE_HOVER)); - pres_shell->FlushPendingNotifications(true); +# if MOZ_VERSION_MAJOR > 1 \ + || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8) + pres_shell->FlushPendingNotifications(Flush_Display); +# else + pres_shell->FlushPendingNotifications(true); +# endif // We may have to exit and wait for image loading // to complete, at which point we will be called