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

Unified Diff: Source/core/page/ScopedPageLoadDeferrer.cpp

Issue 336553003: Change Page::m_mainFrame to be a Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 6 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
« no previous file with comments | « Source/core/page/PageSerializer.cpp ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/ScopedPageLoadDeferrer.cpp
diff --git a/Source/core/page/ScopedPageLoadDeferrer.cpp b/Source/core/page/ScopedPageLoadDeferrer.cpp
index 1387aef793672fcdcf376fd39504212cb4b80322..9c606ca8d4f93f05ade20f420de7e02e050b0e4d 100644
--- a/Source/core/page/ScopedPageLoadDeferrer.cpp
+++ b/Source/core/page/ScopedPageLoadDeferrer.cpp
@@ -41,11 +41,13 @@ ScopedPageLoadDeferrer::ScopedPageLoadDeferrer(Page* exclusion)
if (page == exclusion || page->defersLoading())
continue;
- m_deferredFrames.append(page->mainFrame());
+ if (page->mainFrame()->isLocalFrame()) {
+ m_deferredFrames.append(page->deprecatedLocalMainFrame());
- // Ensure that we notify the client if the initial empty document is accessed before
- // showing anything modal, to prevent spoofs while the modal window or sheet is visible.
- page->mainFrame()->loader().notifyIfInitialDocumentAccessed();
+ // Ensure that we notify the client if the initial empty document is accessed before
+ // showing anything modal, to prevent spoofs while the modal window or sheet is visible.
+ page->deprecatedLocalMainFrame()->loader().notifyIfInitialDocumentAccessed();
+ }
// This code is not logically part of load deferring, but we do not want JS code executed
// beneath modal windows or sheets, which is exactly when ScopedPageLoadDeferrer is used.
« no previous file with comments | « Source/core/page/PageSerializer.cpp ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698