diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-06-15 06:34:43 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-06-15 06:34:43 +0800 |
commit | c41a8f5a1e551116d8a1d82e0aa3246e636cc175 (patch) | |
tree | 9737a41f6c78c8fcdd4bc036b3153b628b893b19 /embed/mozilla/EphyBrowser.cpp | |
parent | 367e685ae5c06b9394607c98bca9e726b63e034c (diff) | |
download | gsoc2013-epiphany-c41a8f5a1e551116d8a1d82e0aa3246e636cc175.tar gsoc2013-epiphany-c41a8f5a1e551116d8a1d82e0aa3246e636cc175.tar.gz gsoc2013-epiphany-c41a8f5a1e551116d8a1d82e0aa3246e636cc175.tar.bz2 gsoc2013-epiphany-c41a8f5a1e551116d8a1d82e0aa3246e636cc175.tar.lz gsoc2013-epiphany-c41a8f5a1e551116d8a1d82e0aa3246e636cc175.tar.xz gsoc2013-epiphany-c41a8f5a1e551116d8a1d82e0aa3246e636cc175.tar.zst gsoc2013-epiphany-c41a8f5a1e551116d8a1d82e0aa3246e636cc175.zip |
Work around mozilla bug #246392 which goes back to the original urls when
2004-06-15 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyBrowser.h:
* embed/mozilla/mozilla-embed.cpp:
Work around mozilla bug #246392 which goes back to the original urls
when reloading a frameset. Fixes bug #115800.
Diffstat (limited to 'embed/mozilla/EphyBrowser.cpp')
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 2ca36a9bb..eb86d5fd4 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -371,6 +371,44 @@ nsresult EphyBrowser::GoToHistoryIndex (PRInt16 index) return ContentNav->GotoIndex (index); } +/* Workaround for broken reload with frames, see mozilla bug + * http://bugzilla.mozilla.org/show_bug.cgi?id=246392 + */ +nsresult EphyBrowser::Reload (PRUint32 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); +} + nsresult EphyBrowser::SetZoom (float aZoom) { NS_ENSURE_TRUE (mWebBrowser, NS_ERROR_FAILURE); |