aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyBrowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyBrowser.cpp')
-rw-r--r--embed/mozilla/EphyBrowser.cpp38
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);