| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "platform/PluginScriptForbiddenScope.h" | 72 #include "platform/PluginScriptForbiddenScope.h" |
| 73 #include "platform/RuntimeEnabledFeatures.h" | 73 #include "platform/RuntimeEnabledFeatures.h" |
| 74 #include "platform/ScriptForbiddenScope.h" | 74 #include "platform/ScriptForbiddenScope.h" |
| 75 #include "platform/graphics/GraphicsContext.h" | 75 #include "platform/graphics/GraphicsContext.h" |
| 76 #include "platform/graphics/StaticBitmapImage.h" | 76 #include "platform/graphics/StaticBitmapImage.h" |
| 77 #include "platform/graphics/paint/ClipRecorder.h" | 77 #include "platform/graphics/paint/ClipRecorder.h" |
| 78 #include "platform/graphics/paint/PaintController.h" | 78 #include "platform/graphics/paint/PaintController.h" |
| 79 #include "platform/graphics/paint/SkPictureBuilder.h" | 79 #include "platform/graphics/paint/SkPictureBuilder.h" |
| 80 #include "platform/graphics/paint/TransformDisplayItem.h" | 80 #include "platform/graphics/paint/TransformDisplayItem.h" |
| 81 #include "platform/text/TextStream.h" | 81 #include "platform/text/TextStream.h" |
| 82 #include "public/platform/ServiceRegistry.h" |
| 82 #include "public/platform/WebFrameScheduler.h" | 83 #include "public/platform/WebFrameScheduler.h" |
| 83 #include "public/platform/WebScreenInfo.h" | 84 #include "public/platform/WebScreenInfo.h" |
| 84 #include "public/platform/WebViewScheduler.h" | 85 #include "public/platform/WebViewScheduler.h" |
| 85 #include "third_party/skia/include/core/SkImage.h" | 86 #include "third_party/skia/include/core/SkImage.h" |
| 86 #include "wtf/PassOwnPtr.h" | 87 #include "wtf/PassOwnPtr.h" |
| 87 #include "wtf/StdLibExtras.h" | 88 #include "wtf/StdLibExtras.h" |
| 88 | 89 |
| 89 namespace blink { | 90 namespace blink { |
| 90 | 91 |
| 91 using namespace HTMLNames; | 92 using namespace HTMLNames; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 inline float parentTextZoomFactor(LocalFrame* frame) | 159 inline float parentTextZoomFactor(LocalFrame* frame) |
| 159 { | 160 { |
| 160 Frame* parent = frame->tree().parent(); | 161 Frame* parent = frame->tree().parent(); |
| 161 if (!parent || !parent->isLocalFrame()) | 162 if (!parent || !parent->isLocalFrame()) |
| 162 return 1; | 163 return 1; |
| 163 return toLocalFrame(parent)->textZoomFactor(); | 164 return toLocalFrame(parent)->textZoomFactor(); |
| 164 } | 165 } |
| 165 | 166 |
| 166 } // namespace | 167 } // namespace |
| 167 | 168 |
| 168 LocalFrame* LocalFrame::create(FrameLoaderClient* client, FrameHost* host, Frame
Owner* owner) | 169 LocalFrame* LocalFrame::create(FrameLoaderClient* client, FrameHost* host, Frame
Owner* owner, ServiceRegistry* serviceRegistry) |
| 169 { | 170 { |
| 170 LocalFrame* frame = new LocalFrame(client, host, owner); | 171 LocalFrame* frame = new LocalFrame(client, host, owner, serviceRegistry ? se
rviceRegistry : ServiceRegistry::getEmptyServiceRegistry()); |
| 171 InspectorInstrumentation::frameAttachedToParent(frame); | 172 InspectorInstrumentation::frameAttachedToParent(frame); |
| 172 return frame; | 173 return frame; |
| 173 } | 174 } |
| 174 | 175 |
| 175 void LocalFrame::setView(FrameView* view) | 176 void LocalFrame::setView(FrameView* view) |
| 176 { | 177 { |
| 177 ASSERT(!m_view || m_view != view); | 178 ASSERT(!m_view || m_view != view); |
| 178 ASSERT(!document() || !document()->isActive()); | 179 ASSERT(!document() || !document()->isActive()); |
| 179 | 180 |
| 180 eventHandler().clear(); | 181 eventHandler().clear(); |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 return String(); | 810 return String(); |
| 810 | 811 |
| 811 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye
rTreeFlags>(flags)); | 812 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye
rTreeFlags>(flags)); |
| 812 } | 813 } |
| 813 | 814 |
| 814 bool LocalFrame::shouldThrottleRendering() const | 815 bool LocalFrame::shouldThrottleRendering() const |
| 815 { | 816 { |
| 816 return view() && view()->shouldThrottleRendering(); | 817 return view() && view()->shouldThrottleRendering(); |
| 817 } | 818 } |
| 818 | 819 |
| 819 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
wner* owner) | 820 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
wner* owner, ServiceRegistry* serviceRegistry) |
| 820 : Frame(client, host, owner) | 821 : Frame(client, host, owner) |
| 821 , m_loader(this) | 822 , m_loader(this) |
| 822 , m_navigationScheduler(NavigationScheduler::create(this)) | 823 , m_navigationScheduler(NavigationScheduler::create(this)) |
| 823 , m_script(ScriptController::create(this)) | 824 , m_script(ScriptController::create(this)) |
| 824 , m_editor(Editor::create(*this)) | 825 , m_editor(Editor::create(*this)) |
| 825 , m_spellChecker(SpellChecker::create(*this)) | 826 , m_spellChecker(SpellChecker::create(*this)) |
| 826 , m_selection(FrameSelection::create(this)) | 827 , m_selection(FrameSelection::create(this)) |
| 827 , m_eventHandler(new EventHandler(this)) | 828 , m_eventHandler(new EventHandler(this)) |
| 828 , m_console(FrameConsole::create(*this)) | 829 , m_console(FrameConsole::create(*this)) |
| 829 , m_inputMethodController(InputMethodController::create(*this)) | 830 , m_inputMethodController(InputMethodController::create(*this)) |
| 830 , m_navigationDisableCount(0) | 831 , m_navigationDisableCount(0) |
| 831 , m_pageZoomFactor(parentPageZoomFactor(this)) | 832 , m_pageZoomFactor(parentPageZoomFactor(this)) |
| 832 , m_textZoomFactor(parentTextZoomFactor(this)) | 833 , m_textZoomFactor(parentTextZoomFactor(this)) |
| 833 , m_inViewSourceMode(false) | 834 , m_inViewSourceMode(false) |
| 835 , m_serviceRegistry(serviceRegistry) |
| 834 { | 836 { |
| 835 if (isLocalRoot()) | 837 if (isLocalRoot()) |
| 836 m_instrumentingAgents = InstrumentingAgents::create(); | 838 m_instrumentingAgents = InstrumentingAgents::create(); |
| 837 else | 839 else |
| 838 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 840 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
| 839 } | 841 } |
| 840 | 842 |
| 841 WebFrameScheduler* LocalFrame::frameScheduler() | 843 WebFrameScheduler* LocalFrame::frameScheduler() |
| 842 { | 844 { |
| 843 if (!m_frameScheduler.get()) | 845 if (!m_frameScheduler.get()) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 866 { | 868 { |
| 867 m_frame->disableNavigation(); | 869 m_frame->disableNavigation(); |
| 868 } | 870 } |
| 869 | 871 |
| 870 FrameNavigationDisabler::~FrameNavigationDisabler() | 872 FrameNavigationDisabler::~FrameNavigationDisabler() |
| 871 { | 873 { |
| 872 m_frame->enableNavigation(); | 874 m_frame->enableNavigation(); |
| 873 } | 875 } |
| 874 | 876 |
| 875 } // namespace blink | 877 } // namespace blink |
| OLD | NEW |