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

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

Issue 205523003: Remove beforeload events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove more tests 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/core/html/forms/ImageInputType.cpp ('k') | Source/core/loader/ImageLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 436ca2d9a43464cac5b8030d4ce4129efdad9a47..20c00570ebc7addae341661781e22fc6813983d1 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -730,7 +730,6 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest)
{
ASSERT(m_frame->document());
- // Protect frame from getting blown away inside dispatchBeforeLoadEvent in loadWithDocumentLoader.
RefPtr<LocalFrame> protect(m_frame);
if (m_inStopAllLoaders)
@@ -1282,17 +1281,7 @@ void FrameLoader::loadWithNavigationAction(const NavigationAction& action, Frame
if (m_frame->document()->pageDismissalEventBeingDispatched() != Document::NoDismissal)
return;
- // We skip dispatching the beforeload event on the frame owner 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.
const ResourceRequest& request = action.resourceRequest();
- if (!m_stateMachine.committedFirstRealDocumentLoad() && m_frame->ownerElement() && !m_frame->ownerElement()->dispatchBeforeLoadEvent(request.url().string()))
- return;
-
- // Dispatching the beforeload event could have blown away the frame.
- if (!m_client)
- return;
if (!m_stateMachine.startedFirstRealLoad())
m_stateMachine.advanceTo(FrameLoaderStateMachine::StartedFirstRealLoad);
« no previous file with comments | « Source/core/html/forms/ImageInputType.cpp ('k') | Source/core/loader/ImageLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698