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

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

Issue 1858833003: Move isNavigationAllowed() check to main entry point for loads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 FrameLoadRequest request(&originDocument, url); 285 FrameLoadRequest request(&originDocument, url);
286 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active); 286 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active);
287 navigate(request); 287 navigate(request);
288 } else { 288 } else {
289 m_navigationScheduler->scheduleLocationChange(&originDocument, url.getSt ring(), replaceCurrentItem); 289 m_navigationScheduler->scheduleLocationChange(&originDocument, url.getSt ring(), replaceCurrentItem);
290 } 290 }
291 } 291 }
292 292
293 void LocalFrame::navigate(const FrameLoadRequest& request) 293 void LocalFrame::navigate(const FrameLoadRequest& request)
294 { 294 {
295 if (!isNavigationAllowed())
296 return;
297 m_loader.load(request); 295 m_loader.load(request);
298 } 296 }
299 297
300 void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir ectPolicy) 298 void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir ectPolicy)
301 { 299 {
302 ASSERT(loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadByp assingCache); 300 ASSERT(loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadByp assingCache);
303 ASSERT(clientRedirectPolicy == ClientRedirectPolicy::NotClientRedirect || lo adType == FrameLoadTypeReload); 301 ASSERT(clientRedirectPolicy == ClientRedirectPolicy::NotClientRedirect || lo adType == FrameLoadTypeReload);
304 if (clientRedirectPolicy == ClientRedirectPolicy::NotClientRedirect) { 302 if (clientRedirectPolicy == ClientRedirectPolicy::NotClientRedirect) {
305 if (!m_loader.currentItem()) 303 if (!m_loader.currentItem())
306 return; 304 return;
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 { 866 {
869 m_frame->disableNavigation(); 867 m_frame->disableNavigation();
870 } 868 }
871 869
872 FrameNavigationDisabler::~FrameNavigationDisabler() 870 FrameNavigationDisabler::~FrameNavigationDisabler()
873 { 871 {
874 m_frame->enableNavigation(); 872 m_frame->enableNavigation();
875 } 873 }
876 874
877 } // namespace blink 875 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698