Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 1156473002: Refactor FrameLoader loading interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed issue with inital history navigation in child frames Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index dcfbd0aa20221c191454e21706336f561e2ad99e..54c46321b7037f7d9ed596c994e6b3ea18334b46 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -71,6 +71,7 @@
#include "core/layout/TextAutosizer.h"
#include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
#include "core/loader/DocumentLoader.h"
+#include "core/loader/FrameLoadRequest.h"
#include "core/loader/FrameLoader.h"
#include "core/page/Chrome.h"
#include "core/page/ContextMenuController.h"
@@ -2854,8 +2855,16 @@ void WebViewImpl::setPageEncoding(const WebString& encodingName)
newEncodingName = encodingName;
m_page->frameHost().setOverrideEncoding(newEncodingName);
- if (m_page->mainFrame()->isLocalFrame())
- m_page->deprecatedLocalMainFrame()->loader().reload(NormalReload);
+ if (m_page->mainFrame()->isLocalFrame()) {
+ if (!m_page->deprecatedLocalMainFrame()->loader().currentItem())
+ return;
+ FrameLoadRequest request = FrameLoader::frameRequestForReload(
+ FrameLoader::resourceRequestForReload(
+ m_page->deprecatedLocalMainFrame()->loader().currentItem(),
+ *m_page->deprecatedLocalMainFrame(), FrameLoadTypeReload, KURL(), ClientRedirect),
+ ClientRedirect);
+ m_page->deprecatedLocalMainFrame()->loader().load(request, FrameLoadTypeReload);
+ }
}
WebFrame* WebViewImpl::mainFrame()

Powered by Google App Engine
This is Rietveld 408576698