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() |