diff options
Diffstat (limited to 'embed')
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 12 | ||||
-rw-r--r-- | embed/mozilla/MozRegisterComponents.cpp | 8 |
2 files changed, 14 insertions, 6 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 91bfca09d..0372fc13c 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -525,6 +525,13 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed) NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); #ifdef HAVE_MOZILLA_PSM +#ifdef HAVE_GECKO_1_8 + nsCOMPtr<nsIDocShell> docShell (do_GetInterface (mWebBrowser, &rv)); + NS_ENSURE_SUCCESS (rv, rv); + + rv = docShell->GetSecurityUI (getter_AddRefs (mSecurityInfo)); + NS_ENSURE_SUCCESS (rv, rv); +#else /* FIXME: mozilla sucks! nsWebBrowser already has an instance of this, * but we cannot get to it! * See https://bugzilla.mozilla.org/show_bug.cgi?id=94974 @@ -561,11 +568,12 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed) NS_ENSURE_SUCCESS (rv, rv); } } +#endif /* HAVE_GECKO_1_8 */ if (!mSecurityInfo) { - g_warning ("Failed to instantiate nsISecureBrowserUI!\n"); + g_warning ("Failed to get nsISecureBrowserUI!\n"); } -#endif +#endif /* HAVE_MOZILLA_PSM */ mInitialized = PR_TRUE; diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp index 4a8f8243f..d6f83da95 100644 --- a/embed/mozilla/MozRegisterComponents.cpp +++ b/embed/mozilla/MozRegisterComponents.cpp @@ -199,7 +199,7 @@ static const nsModuleComponentInfo sAppComps[] = { }, }; -#ifdef HAVE_MOZILLA_PSM +#if defined(HAVE_MOZILLA_PSM) && !defined(HAVE_GECKO_1_8) /* 5999dfd3-571f-4fcf-964b-386879f5cded */ #define NEW_CID { 0x5999dfd3, 0x571f, 0x4fcf, { 0x96, 0x4b, 0x38, 0x68, 0x79, 0xf5, 0xcd, 0xed } } @@ -234,7 +234,7 @@ reregister_secure_browser_ui (nsIComponentManager *cm, return rv; } -#endif /* HAVE_MOZILLA_PSM */ +#endif /* defined(HAVE_MOZILLA_PSM) && !defined(HAVE_GECKO_1_8) */ gboolean mozilla_register_components (void) @@ -286,14 +286,14 @@ mozilla_register_components (void) } } -#ifdef HAVE_MOZILLA_PSM +#if defined(HAVE_MOZILLA_PSM) && !defined(HAVE_GECKO_1_8) /* Workaround for http://bugzilla.gnome.org/show_bug.cgi?id=164670 */ rv = reregister_secure_browser_ui (cm, cr); if (NS_FAILED (rv)) { g_warning ("Failed to divert the nsISecureBrowserUI implementation!\n"); } -#endif /* HAVE_MOZILLA_PSM */ +#endif /* defined(HAVE_MOZILLA_PSM) && !defined(HAVE_GECKO_1_8) */ return ret; } |