| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "core/html/HTMLPlugInElement.h" | 50 #include "core/html/HTMLPlugInElement.h" |
| 51 #include "core/input/EventHandler.h" | 51 #include "core/input/EventHandler.h" |
| 52 #include "core/inspector/ConsoleMessageStorage.h" | 52 #include "core/inspector/ConsoleMessageStorage.h" |
| 53 #include "core/inspector/InspectorInstrumentation.h" | 53 #include "core/inspector/InspectorInstrumentation.h" |
| 54 #include "core/inspector/InstrumentingAgents.h" | 54 #include "core/inspector/InstrumentingAgents.h" |
| 55 #include "core/layout/HitTestResult.h" | 55 #include "core/layout/HitTestResult.h" |
| 56 #include "core/layout/LayoutView.h" | 56 #include "core/layout/LayoutView.h" |
| 57 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" | 57 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" |
| 58 #include "core/loader/FrameLoadRequest.h" | 58 #include "core/loader/FrameLoadRequest.h" |
| 59 #include "core/loader/FrameLoaderClient.h" | 59 #include "core/loader/FrameLoaderClient.h" |
| 60 #include "core/loader/NavigationScheduler.h" |
| 60 #include "core/page/FocusController.h" | 61 #include "core/page/FocusController.h" |
| 61 #include "core/page/Page.h" | 62 #include "core/page/Page.h" |
| 62 #include "core/page/scrolling/ScrollingCoordinator.h" | 63 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 63 #include "core/paint/DeprecatedPaintLayer.h" | 64 #include "core/paint/DeprecatedPaintLayer.h" |
| 64 #include "core/paint/TransformRecorder.h" | 65 #include "core/paint/TransformRecorder.h" |
| 65 #include "core/svg/SVGDocumentExtensions.h" | 66 #include "core/svg/SVGDocumentExtensions.h" |
| 66 #include "platform/DragImage.h" | 67 #include "platform/DragImage.h" |
| 67 #include "platform/PluginScriptForbiddenScope.h" | 68 #include "platform/PluginScriptForbiddenScope.h" |
| 68 #include "platform/RuntimeEnabledFeatures.h" | 69 #include "platform/RuntimeEnabledFeatures.h" |
| 69 #include "platform/ScriptForbiddenScope.h" | 70 #include "platform/ScriptForbiddenScope.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // a new iframe with src="about:blank". Perhaps we could get rid of this if
we started reporting | 241 // a new iframe with src="about:blank". Perhaps we could get rid of this if
we started reporting |
| 241 // the initial empty document's url as about:blank? See crbug.com/471239. | 242 // the initial empty document's url as about:blank? See crbug.com/471239. |
| 242 // TODO(japhet): This special case is also necessary for behavior asserted b
y some extensions tests. | 243 // TODO(japhet): This special case is also necessary for behavior asserted b
y some extensions tests. |
| 243 // Using NavigationScheduler::scheduleNavigationChange causes the navigation
to be flagged as a | 244 // Using NavigationScheduler::scheduleNavigationChange causes the navigation
to be flagged as a |
| 244 // client redirect, which is observable via the webNavigation extension api. | 245 // client redirect, which is observable via the webNavigation extension api. |
| 245 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa
d()) { | 246 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa
d()) { |
| 246 FrameLoadRequest request(&originDocument, url); | 247 FrameLoadRequest request(&originDocument, url); |
| 247 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes
tureStatus::Active); | 248 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes
tureStatus::Active); |
| 248 m_loader.load(request); | 249 m_loader.load(request); |
| 249 } else { | 250 } else { |
| 250 m_navigationScheduler.scheduleLocationChange(&originDocument, url.string
(), replaceCurrentItem); | 251 m_navigationScheduler->scheduleLocationChange(&originDocument, url.strin
g(), replaceCurrentItem); |
| 251 } | 252 } |
| 252 } | 253 } |
| 253 | 254 |
| 254 void LocalFrame::navigate(const FrameLoadRequest& request) | 255 void LocalFrame::navigate(const FrameLoadRequest& request) |
| 255 { | 256 { |
| 256 m_loader.load(request); | 257 m_loader.load(request); |
| 257 } | 258 } |
| 258 | 259 |
| 259 void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir
ectPolicy) | 260 void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir
ectPolicy) |
| 260 { | 261 { |
| 261 ASSERT(loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadFro
mOrigin); | 262 ASSERT(loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadFro
mOrigin); |
| 262 ASSERT(clientRedirectPolicy == NotClientRedirect || loadType == FrameLoadTyp
eReload); | 263 ASSERT(clientRedirectPolicy == NotClientRedirect || loadType == FrameLoadTyp
eReload); |
| 263 if (clientRedirectPolicy == NotClientRedirect) { | 264 if (clientRedirectPolicy == NotClientRedirect) { |
| 264 if (!m_loader.currentItem()) | 265 if (!m_loader.currentItem()) |
| 265 return; | 266 return; |
| 266 FrameLoadRequest request = FrameLoadRequest( | 267 FrameLoadRequest request = FrameLoadRequest( |
| 267 nullptr, m_loader.resourceRequestForReload(loadType, KURL(), clientR
edirectPolicy)); | 268 nullptr, m_loader.resourceRequestForReload(loadType, KURL(), clientR
edirectPolicy)); |
| 268 request.setClientRedirect(clientRedirectPolicy); | 269 request.setClientRedirect(clientRedirectPolicy); |
| 269 m_loader.load(request, loadType); | 270 m_loader.load(request, loadType); |
| 270 } else { | 271 } else { |
| 271 m_navigationScheduler.scheduleReload(); | 272 m_navigationScheduler->scheduleReload(); |
| 272 } | 273 } |
| 273 } | 274 } |
| 274 | 275 |
| 275 void LocalFrame::detach(FrameDetachType type) | 276 void LocalFrame::detach(FrameDetachType type) |
| 276 { | 277 { |
| 277 PluginScriptForbiddenScope forbidPluginDestructorScripting; | 278 PluginScriptForbiddenScope forbidPluginDestructorScripting; |
| 278 // A lot of the following steps can result in the current frame being | 279 // A lot of the following steps can result in the current frame being |
| 279 // detached, so protect a reference to it. | 280 // detached, so protect a reference to it. |
| 280 RefPtrWillBeRawPtr<LocalFrame> protect(this); | 281 RefPtrWillBeRawPtr<LocalFrame> protect(this); |
| 281 m_loader.stopAllLoaders(); | 282 m_loader.stopAllLoaders(); |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 { | 833 { |
| 833 if (!contentLayoutObject()) | 834 if (!contentLayoutObject()) |
| 834 return String(); | 835 return String(); |
| 835 | 836 |
| 836 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye
rTreeFlags>(flags)); | 837 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye
rTreeFlags>(flags)); |
| 837 } | 838 } |
| 838 | 839 |
| 839 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
wner* owner) | 840 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
wner* owner) |
| 840 : Frame(client, host, owner) | 841 : Frame(client, host, owner) |
| 841 , m_loader(this) | 842 , m_loader(this) |
| 842 , m_navigationScheduler(this) | 843 , m_navigationScheduler(NavigationScheduler::create(this)) |
| 843 , m_script(ScriptController::create(this)) | 844 , m_script(ScriptController::create(this)) |
| 844 , m_editor(Editor::create(*this)) | 845 , m_editor(Editor::create(*this)) |
| 845 , m_spellChecker(SpellChecker::create(*this)) | 846 , m_spellChecker(SpellChecker::create(*this)) |
| 846 , m_selection(FrameSelection::create(this)) | 847 , m_selection(FrameSelection::create(this)) |
| 847 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) | 848 , m_eventHandler(adoptPtrWillBeNoop(new EventHandler(this))) |
| 848 , m_console(FrameConsole::create(*this)) | 849 , m_console(FrameConsole::create(*this)) |
| 849 , m_inputMethodController(InputMethodController::create(*this)) | 850 , m_inputMethodController(InputMethodController::create(*this)) |
| 850 , m_pageZoomFactor(parentPageZoomFactor(this)) | 851 , m_pageZoomFactor(parentPageZoomFactor(this)) |
| 851 , m_textZoomFactor(parentTextZoomFactor(this)) | 852 , m_textZoomFactor(parentTextZoomFactor(this)) |
| 852 , m_inViewSourceMode(false) | 853 , m_inViewSourceMode(false) |
| 853 { | 854 { |
| 854 if (isLocalRoot()) | 855 if (isLocalRoot()) |
| 855 m_instrumentingAgents = InstrumentingAgents::create(); | 856 m_instrumentingAgents = InstrumentingAgents::create(); |
| 856 else | 857 else |
| 857 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 858 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
| 858 } | 859 } |
| 859 | 860 |
| 860 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); | 861 DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame); |
| 861 | 862 |
| 862 } // namespace blink | 863 } // namespace blink |
| OLD | NEW |