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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 217543005: Move dispatchBeforeUnloadEvent to WebFrame, part 1/3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix Created 6 years, 9 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/web/WebFrameImpl.cpp ('k') | public/web/WebFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 9bbc57e15937f157cf554080c4cbd57548f8581a..410083a0c3d523508eb90790c49dc100604fba44 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2428,14 +2428,11 @@ void WebViewImpl::setPageEncoding(const WebString& encodingName)
bool WebViewImpl::dispatchBeforeUnloadEvent()
{
- // FIXME: This should really cause a recursive depth-first walk of all
- // frames in the tree, calling each frame's onbeforeunload. At the moment,
- // we're consistent with Safari 3.1, not IE/FF.
- LocalFrame* frame = m_page->mainFrame();
+ WebFrame* frame = mainFrame();
if (!frame)
return true;
- return frame->loader().shouldClose();
+ return frame->dispatchBeforeUnloadEvent();
}
void WebViewImpl::dispatchUnloadEvent()
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | public/web/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698