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

Unified Diff: Source/WebCore/loader/FrameLoader.cpp

Issue 7401011: Merge 91044 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 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 | « LayoutTests/http/tests/security/resources/post-done.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/loader/FrameLoader.cpp
===================================================================
--- Source/WebCore/loader/FrameLoader.cpp (revision 91140)
+++ Source/WebCore/loader/FrameLoader.cpp (working copy)
@@ -1573,7 +1573,13 @@
loader->setTriggeringAction(NavigationAction(newURL, policyChecker()->loadType(), isFormSubmission));
if (Element* ownerElement = m_frame->ownerElement()) {
- if (!ownerElement->dispatchBeforeLoadEvent(loader->request().url().string())) {
+ // We skip dispatching the beforeload event if we've already
+ // committed a real document load because the event would leak
+ // subsequent activity by the frame which the parent frame isn't
+ // supposed to learn. For example, if the child frame navigated to
+ // a new URL, the parent frame shouldn't learn the URL.
+ if (!m_stateMachine.committedFirstRealDocumentLoad()
+ && !ownerElement->dispatchBeforeLoadEvent(loader->request().url().string())) {
continueLoadAfterNavigationPolicy(loader->request(), formState, false);
return;
}
« no previous file with comments | « LayoutTests/http/tests/security/resources/post-done.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698