diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-07-13 04:47:21 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-07-13 04:47:21 +0800 |
commit | 40cd4d7a1f61926cf9e84664491b3236e9084201 (patch) | |
tree | 59947423032e111c797b689962d338f8cf2480d7 /embed/mozilla | |
parent | cccabbcbbe25e8496f6e2bdcc77c235fe3eb3857 (diff) | |
download | gsoc2013-epiphany-40cd4d7a1f61926cf9e84664491b3236e9084201.tar gsoc2013-epiphany-40cd4d7a1f61926cf9e84664491b3236e9084201.tar.gz gsoc2013-epiphany-40cd4d7a1f61926cf9e84664491b3236e9084201.tar.bz2 gsoc2013-epiphany-40cd4d7a1f61926cf9e84664491b3236e9084201.tar.lz gsoc2013-epiphany-40cd4d7a1f61926cf9e84664491b3236e9084201.tar.xz gsoc2013-epiphany-40cd4d7a1f61926cf9e84664491b3236e9084201.tar.zst gsoc2013-epiphany-40cd4d7a1f61926cf9e84664491b3236e9084201.zip |
Remove the reload workaround, since the mozilla bug is fixed on all
2005-07-12 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyBrowser.h:
* embed/mozilla/mozilla-embed.cpp:
Remove the reload workaround, since the mozilla bug
is fixed on all supported mozilla version.
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 40 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.h | 8 | ||||
-rw-r--r-- | embed/mozilla/EphyProtocolHandler.cpp | 10 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 21 |
4 files changed, 11 insertions, 68 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 023350fce..ba295ef7c 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -803,46 +803,6 @@ nsresult EphyBrowser::GoToHistoryIndex (PRInt16 index) return ContentNav->GotoIndex (index); } -#ifndef HAVE_GECKO_1_8 -/* Workaround for broken reload with frames, see mozilla bug - * http://bugzilla.mozilla.org/show_bug.cgi?id=246392 - */ -nsresult EphyBrowser::Reload (ReloadType flags) -{ - NS_ENSURE_TRUE (mWebBrowser, NS_ERROR_FAILURE); - - nsCOMPtr<nsISHistory> sessionHistory; - GetSHistory (getter_AddRefs (sessionHistory)); - - nsCOMPtr<nsIWebNavigation> webNavigation; - webNavigation = do_QueryInterface (sessionHistory); - - if (!webNavigation) - { - webNavigation = do_QueryInterface (mWebBrowser); - } - NS_ENSURE_TRUE (webNavigation, NS_ERROR_FAILURE); - - PRUint32 reloadFlags; - switch (flags) - { - case RELOAD_FORCE: - reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE | - nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY; - break; - case RELOAD_ENCODING_CHANGE: - reloadFlags = nsIWebNavigation::LOAD_FLAGS_CHARSET_CHANGE; - break; - case RELOAD_NORMAL: - default: - reloadFlags = 0; - break; - } - - return webNavigation->Reload (reloadFlags); -} -#endif /* !HAVE_GECKO_1_8 */ - nsresult EphyBrowser::SetZoom (float aZoom) { NS_ENSURE_TRUE (mWebBrowser, NS_ERROR_FAILURE); diff --git a/embed/mozilla/EphyBrowser.h b/embed/mozilla/EphyBrowser.h index 77f2923a6..279578e02 100644 --- a/embed/mozilla/EphyBrowser.h +++ b/embed/mozilla/EphyBrowser.h @@ -158,14 +158,6 @@ public: nsresult GetSHUrlAtIndex (PRInt32 index, nsACString &url); nsresult GoToHistoryIndex (PRInt16 index); -#ifndef HAVE_GECKO_1_8 - enum ReloadType { RELOAD_NORMAL = 0, - RELOAD_FORCE = 1, - RELOAD_ENCODING_CHANGE = 2 }; - - nsresult Reload (ReloadType flags); -#endif - nsresult ForceEncoding (const char *encoding); nsresult GetEncoding (nsACString &encoding); nsresult GetForcedEncoding (nsACString &encoding); diff --git a/embed/mozilla/EphyProtocolHandler.cpp b/embed/mozilla/EphyProtocolHandler.cpp index c91b6f4db..50854ee2e 100644 --- a/embed/mozilla/EphyProtocolHandler.cpp +++ b/embed/mozilla/EphyProtocolHandler.cpp @@ -235,6 +235,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString scheme; aURI->GetScheme (scheme); + /* Translators: %s is the name of a protocol, like "http" etc. */ *aPrimary = g_strdup_printf (_("“%s” protocol is not supported."), scheme.get()); /* FIXME: get the list of supported protocols from necko */ *aSecondary = _("Supported protocols are “http”, “https”, “ftp”, “file” “smb” " @@ -245,6 +246,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString path; aURI->GetPath (path); + /* Translators: %s is the path and filename, for example "/home/user/test.html" */ *aPrimary = g_markup_printf_escaped (_("File “%s” not found."), path.get()); *aSecondary = _("Check the location of the file and try again."); } @@ -253,6 +255,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString host; aURI->GetHost (host); + /* Translators: %s is the hostname, like "www.example.com" */ *aPrimary = g_markup_printf_escaped (_("“%s” could not be found."), host.get()); *aSecondary = _("Check that you are connected to the internet, and " @@ -264,6 +267,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString host; aURI->GetHost (host); + /* Translators: %s is the hostname, like "www.example.com" */ *aPrimary = g_markup_printf_escaped (_("“%s” refused the connection."), host.get()); @@ -276,6 +280,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString host; aURI->GetHost (host); + /* Translators: %s is the hostname, like "www.example.com" */ *aPrimary = g_markup_printf_escaped (_("“%s” interrupted the connection."), host.get()); @@ -288,6 +293,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString host; aURI->GetHost (host); + /* Translators: %s is the hostname, like "www.example.com" */ *aPrimary = g_markup_printf_escaped (_("“%s” is not responding."), host.get()); @@ -307,6 +313,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString host; aURI->GetHost (host); + /* Translators: %s is the hostname, like "www.example.com" */ *aPrimary = g_markup_printf_escaped (_("“%s” redirected too many times."), host.get()); @@ -318,6 +325,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString host; aURI->GetHost (host); + /* Translators: %s is the hostname, like "www.example.com" */ *aPrimary = g_markup_printf_escaped (_("“%s” requires an encrypted connection."), host.get()); @@ -330,6 +338,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, nsCAutoString host; aURI->GetHost (host); + /* Translators: %s is the hostname, like "www.example.com" */ *aPrimary = g_markup_printf_escaped (_("“%s” dropped the connection."), host.get()); @@ -354,6 +363,7 @@ EphyProtocolHandler::GetErrorMessage(nsIURI *aURI, PRInt32 port = -1; aURI->GetPort (&port); + /* Translators: %s is the hostname, like "www.example.com" */ *aPrimary = g_markup_printf_escaped (_("“%s” denied access to port “%d”."), host.get(), port > 0 ? port : 80); diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 1a8e31b55..1029b5c05 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -490,10 +490,7 @@ static void impl_reload (EphyEmbed *embed, gboolean force) { -#ifdef HAVE_GECKO_1_8 - guint32 mflags; - - mflags = GTK_MOZ_EMBED_FLAG_RELOADNORMAL; + guint32 mflags = GTK_MOZ_EMBED_FLAG_RELOADNORMAL; if (force) { @@ -501,15 +498,6 @@ impl_reload (EphyEmbed *embed, } gtk_moz_embed_reload (GTK_MOZ_EMBED(embed), mflags); -#else - /* Workaround for broken reload with frames, see mozilla bug - * http://bugzilla.mozilla.org/show_bug.cgi?id=246392 - */ - MozillaEmbedPrivate *mpriv = MOZILLA_EMBED (embed)->priv; - - mpriv->browser->Reload (force ? EphyBrowser::RELOAD_FORCE : - EphyBrowser::RELOAD_NORMAL); -#endif } static void @@ -705,15 +693,8 @@ impl_set_encoding (EphyEmbed *embed, if (NS_FAILED (rv)) return; } -#ifdef HAVE_GECKO_1_8 gtk_moz_embed_reload (GTK_MOZ_EMBED (embed), GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE); -#else - /* Workaround for broken reload with frames, see mozilla bug - * http://bugzilla.mozilla.org/show_bug.cgi?id=246392 - */ - mpriv->browser->Reload (EphyBrowser::RELOAD_ENCODING_CHANGE); -#endif } static char * |