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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 1840813002: Always ignore navigation in Document::detach() in LocalFrame::navigate() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // TODO(dcheng): Special case for window.open("about:blank") to ensure it lo ads synchronously into 278 // TODO(dcheng): Special case for window.open("about:blank") to ensure it lo ads synchronously into
279 // a new window. This is our historical behavior, and it's consistent with t he creation of 279 // a new window. This is our historical behavior, and it's consistent with t he creation of
280 // a new iframe with src="about:blank". Perhaps we could get rid of this if we started reporting 280 // a new iframe with src="about:blank". Perhaps we could get rid of this if we started reporting
281 // the initial empty document's url as about:blank? See crbug.com/471239. 281 // the initial empty document's url as about:blank? See crbug.com/471239.
282 // TODO(japhet): This special case is also necessary for behavior asserted b y some extensions tests. 282 // TODO(japhet): This special case is also necessary for behavior asserted b y some extensions tests.
283 // Using NavigationScheduler::scheduleNavigationChange causes the navigation to be flagged as a 283 // Using NavigationScheduler::scheduleNavigationChange causes the navigation to be flagged as a
284 // client redirect, which is observable via the webNavigation extension api. 284 // client redirect, which is observable via the webNavigation extension api.
285 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa d()) { 285 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa d()) {
286 FrameLoadRequest request(&originDocument, url); 286 FrameLoadRequest request(&originDocument, url);
287 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active); 287 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active);
288 m_loader.load(request); 288 navigate(request);
289 } else { 289 } else {
290 m_navigationScheduler->scheduleLocationChange(&originDocument, url.getSt ring(), replaceCurrentItem); 290 m_navigationScheduler->scheduleLocationChange(&originDocument, url.getSt ring(), replaceCurrentItem);
291 } 291 }
292 } 292 }
293 293
294 void LocalFrame::navigate(const FrameLoadRequest& request) 294 void LocalFrame::navigate(const FrameLoadRequest& request)
295 { 295 {
296 if (!isNavigationAllowed()) 296 if (!isNavigationAllowed())
297 return; 297 return;
298 m_loader.load(request); 298 m_loader.load(request);
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 { 869 {
870 m_frame->disableNavigation(); 870 m_frame->disableNavigation();
871 } 871 }
872 872
873 FrameNavigationDisabler::~FrameNavigationDisabler() 873 FrameNavigationDisabler::~FrameNavigationDisabler()
874 { 874 {
875 m_frame->enableNavigation(); 875 m_frame->enableNavigation();
876 } 876 }
877 877
878 } // namespace blink 878 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698