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::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe
directPolicy) | 254 void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir
ectPolicy) |
255 { | 255 { |
256 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe
load); | 256 ASSERT(loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadFro
mOrigin); |
257 if (clientRedirectPolicy == NotClientRedirect) | 257 ASSERT(clientRedirectPolicy == NotClientRedirect || loadType == FrameLoadTyp
eReload); |
258 m_loader.reload(reloadPolicy); | 258 if (clientRedirectPolicy == NotClientRedirect) { |
259 else | 259 if (!m_loader.currentItem()) |
| 260 return; |
| 261 FrameLoadRequest request = FrameLoadRequest( |
| 262 nullptr, m_loader.resourceRequestForReload(loadType, KURL(), clientR
edirectPolicy)); |
| 263 request.setClientRedirect(clientRedirectPolicy); |
| 264 m_loader.load(request, loadType); |
| 265 } else { |
260 m_navigationScheduler.scheduleReload(); | 266 m_navigationScheduler.scheduleReload(); |
| 267 } |
261 } | 268 } |
262 | 269 |
263 void LocalFrame::detach() | 270 void LocalFrame::detach() |
264 { | 271 { |
265 // A lot of the following steps can result in the current frame being | 272 // A lot of the following steps can result in the current frame being |
266 // detached, so protect a reference to it. | 273 // detached, so protect a reference to it. |
267 RefPtrWillBeRawPtr<LocalFrame> protect(this); | 274 RefPtrWillBeRawPtr<LocalFrame> protect(this); |
268 m_loader.stopAllLoaders(); | 275 m_loader.stopAllLoaders(); |
269 m_loader.dispatchUnloadEvent(); | 276 m_loader.dispatchUnloadEvent(); |
270 detachChildren(); | 277 detachChildren(); |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 , m_textZoomFactor(parentTextZoomFactor(this)) | 819 , m_textZoomFactor(parentTextZoomFactor(this)) |
813 , m_inViewSourceMode(false) | 820 , m_inViewSourceMode(false) |
814 { | 821 { |
815 if (isLocalRoot()) | 822 if (isLocalRoot()) |
816 m_instrumentingAgents = InstrumentingAgents::create(); | 823 m_instrumentingAgents = InstrumentingAgents::create(); |
817 else | 824 else |
818 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 825 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
819 } | 826 } |
820 | 827 |
821 } // namespace blink | 828 } // namespace blink |
OLD | NEW |