Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 // client redirect, which is observable via the webNavigation extension api. | 244 // client redirect, which is observable via the webNavigation extension api. |
| 245 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa d()) { | 245 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa d()) { |
| 246 FrameLoadRequest request(&originDocument, url); | 246 FrameLoadRequest request(&originDocument, url); |
| 247 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active); | 247 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active); |
| 248 m_loader.load(request); | 248 m_loader.load(request); |
| 249 } else { | 249 } else { |
| 250 m_navigationScheduler.scheduleLocationChange(&originDocument, url.string (), lockBackForwardList); | 250 m_navigationScheduler.scheduleLocationChange(&originDocument, url.string (), lockBackForwardList); |
| 251 } | 251 } |
| 252 } | 252 } |
| 253 | 253 |
| 254 void LocalFrame::navigate(const FrameLoadRequest& request) | |
| 255 { | |
| 256 // TODO(dcheng): Special case for window.open("about:blank") to ensure it lo ads synchronously into | |
|
Nate Chapin
2015/06/08 16:56:22
I don't love the duplication here. Perhaps we shou
nasko
2015/06/08 17:27:04
Yeah, not a big fan either. I've modified it as su
| |
| 257 // a new window. This is our historical behavior, and it's consistent with t he creation of | |
| 258 // a new iframe with src="about:blank". Perhaps we could get rid of this if we started reporting | |
| 259 // the initial empty document's url as about:blank? See crbug.com/471239. | |
| 260 // TODO(japhet): This special case is also necessary for behavior asserted b y some extensions tests. | |
| 261 // Using NavigationScheduler::scheduleNavigationChange causes the navigation to be flagged as a | |
| 262 // client redirect, which is observable via the webNavigation extension api. | |
| 263 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa d()) { | |
| 264 m_loader.load(request); | |
| 265 } else { | |
| 266 m_navigationScheduler.scheduleLocationChange(request.originDocument(), r equest.resourceRequest().url(), request.lockBackForwardList()); | |
| 267 } | |
| 268 } | |
| 269 | |
| 254 void LocalFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy) | 270 void LocalFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy) |
| 255 { | 271 { |
| 256 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load); | 272 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load); |
| 257 if (clientRedirectPolicy == NotClientRedirect) | 273 if (clientRedirectPolicy == NotClientRedirect) |
| 258 m_loader.reload(reloadPolicy); | 274 m_loader.reload(reloadPolicy); |
| 259 else | 275 else |
| 260 m_navigationScheduler.scheduleReload(); | 276 m_navigationScheduler.scheduleReload(); |
| 261 } | 277 } |
| 262 | 278 |
| 263 void LocalFrame::detach() | 279 void LocalFrame::detach() |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 812 , m_textZoomFactor(parentTextZoomFactor(this)) | 828 , m_textZoomFactor(parentTextZoomFactor(this)) |
| 813 , m_inViewSourceMode(false) | 829 , m_inViewSourceMode(false) |
| 814 { | 830 { |
| 815 if (isLocalRoot()) | 831 if (isLocalRoot()) |
| 816 m_instrumentingAgents = InstrumentingAgents::create(); | 832 m_instrumentingAgents = InstrumentingAgents::create(); |
| 817 else | 833 else |
| 818 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 834 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
| 819 } | 835 } |
| 820 | 836 |
| 821 } // namespace blink | 837 } // namespace blink |
| OLD | NEW |