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

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

Issue 302213002: Convert page-level classes to handle RemoteFrames from FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: bug fix Created 6 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
« no previous file with comments | « no previous file | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Chrome.cpp
diff --git a/Source/core/page/Chrome.cpp b/Source/core/page/Chrome.cpp
index 8b07313692f9ae99e5b932560c23fd76b0be13c1..dbbe26f9708c3233c41ab632d2666a39cae260c5 100644
--- a/Source/core/page/Chrome.cpp
+++ b/Source/core/page/Chrome.cpp
@@ -141,8 +141,10 @@ bool Chrome::canRunModal() const
static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogType dialog, const String& message)
{
- for (LocalFrame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- Document::PageDismissalType dismissal = frame->document()->pageDismissalEventBeingDispatched();
+ for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (!frame->isLocalFrame())
+ continue;
+ Document::PageDismissalType dismissal = toLocalFrame(frame)->document()->pageDismissalEventBeingDispatched();
if (dismissal != Document::NoDismissal)
return page->chrome().client().shouldRunModalDialogDuringPageDismissal(dialog, message, dismissal);
}
« no previous file with comments | « no previous file | Source/core/page/CreateWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698