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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active); | 248 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active); |
| 249 m_loader.load(request); | 249 m_loader.load(request); |
| 250 } else { | 250 } else { |
| 251 m_navigationScheduler.scheduleLocationChange(&originDocument, url.string (), lockBackForwardList); | 251 m_navigationScheduler.scheduleLocationChange(&originDocument, url.string (), lockBackForwardList); |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 | 254 |
| 255 void LocalFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy) | 255 void LocalFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy) |
| 256 { | 256 { |
| 257 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load); | 257 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load); |
| 258 if (clientRedirectPolicy == NotClientRedirect) | 258 if (clientRedirectPolicy == NotClientRedirect) { |
| 259 m_loader.reload(reloadPolicy); | 259 if (!m_loader.currentItem()) |
| 260 else | 260 return; |
| 261 FrameLoadType loadType = reloadPolicy == NormalReload ? | |
|
Nate Chapin
2015/05/27 16:54:33
We should probably just get rid of the ReloadPolic
clamy
2015/05/29 14:41:50
Should we change it to a FrameLoadType instead?
Nate Chapin
2015/06/02 17:19:35
Yeah, that was my thought.
| |
| 262 FrameLoadTypeReload : FrameLoadTypeReloadFromOrigin; | |
| 263 FrameLoadRequest request = FrameLoader::frameRequestForReload( | |
| 264 FrameLoader::resourceRequestForReload( | |
| 265 m_loader.currentItem(), *this, loadType, KURL(), clientRedirectP olicy), | |
| 266 clientRedirectPolicy); | |
| 267 m_loader.load(request, loadType); | |
| 268 } else { | |
| 261 m_navigationScheduler.scheduleReload(); | 269 m_navigationScheduler.scheduleReload(); |
| 270 } | |
| 262 } | 271 } |
| 263 | 272 |
| 264 void LocalFrame::detach() | 273 void LocalFrame::detach() |
| 265 { | 274 { |
| 266 // A lot of the following steps can result in the current frame being | 275 // A lot of the following steps can result in the current frame being |
| 267 // detached, so protect a reference to it. | 276 // detached, so protect a reference to it. |
| 268 RefPtrWillBeRawPtr<LocalFrame> protect(this); | 277 RefPtrWillBeRawPtr<LocalFrame> protect(this); |
| 269 m_loader.stopAllLoaders(); | 278 m_loader.stopAllLoaders(); |
| 270 m_loader.dispatchUnloadEvent(); | 279 m_loader.dispatchUnloadEvent(); |
| 271 detachChildren(); | 280 detachChildren(); |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 813 , m_textZoomFactor(parentTextZoomFactor(this)) | 822 , m_textZoomFactor(parentTextZoomFactor(this)) |
| 814 , m_inViewSourceMode(false) | 823 , m_inViewSourceMode(false) |
| 815 { | 824 { |
| 816 if (isLocalRoot()) | 825 if (isLocalRoot()) |
| 817 m_instrumentingAgents = InstrumentingAgents::create(); | 826 m_instrumentingAgents = InstrumentingAgents::create(); |
| 818 else | 827 else |
| 819 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 828 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
| 820 } | 829 } |
| 821 | 830 |
| 822 } // namespace blink | 831 } // namespace blink |
| OLD | NEW |