| 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;
|
| }
|
|
|