]> git.decadent.org.uk Git - videolink.git/blobdiff - videolink.cpp
Use new version of GetHrefURI on XULRunner 2.0
[videolink.git] / videolink.cpp
index 2a1295b20235818230f887f992398b0ece82420d..a15bbea1bfe125a2cf9c67e152935203a1e3e2a3 100644 (file)
@@ -423,7 +423,9 @@ namespace
        {
            // Check whether the load was successful, ignoring this
            // pseudo-error.
+#ifdef NS_IMAGELIB_ERROR_LOAD_ABORTED
            if (status != NS_IMAGELIB_ERROR_LOAD_ABORTED)
+#endif
                check(status);
 
            pending_window_update_ = false;
@@ -615,10 +617,17 @@ namespace
            nsCOMPtr<nsIDOMNode> node(*state->links_it);
 
            // Find the link URI and separate any fragment from it.
+           nsCOMPtr<nsIURI> uri_iface;
+#if MOZ_VERSION_GE(2,0,-1)
+           nsCOMPtr<nsIContent> content(do_QueryInterface(node));
+           assert(content);
+           uri_iface = content->GetHrefURI();
+           assert(uri_iface);
+#else
            nsCOMPtr<nsILink> link(do_QueryInterface(node));
            assert(link);
-           nsCOMPtr<nsIURI> uri_iface;
            check(link->GetHrefURI(getter_AddRefs(uri_iface)));
+#endif
            std::string uri, fragment;
            {
                nsCString link_target_ns;