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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 inline float parentTextZoomFactor(LocalFrame* frame) | 158 inline float parentTextZoomFactor(LocalFrame* frame) |
159 { | 159 { |
160 Frame* parent = frame->tree().parent(); | 160 Frame* parent = frame->tree().parent(); |
161 if (!parent || !parent->isLocalFrame()) | 161 if (!parent || !parent->isLocalFrame()) |
162 return 1; | 162 return 1; |
163 return toLocalFrame(parent)->textZoomFactor(); | 163 return toLocalFrame(parent)->textZoomFactor(); |
164 } | 164 } |
165 | 165 |
166 } // namespace | 166 } // namespace |
167 | 167 |
168 RawPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost* host
, FrameOwner* owner) | 168 RawPtr<LocalFrame> LocalFrame::create(FrameLoaderClient* client, FrameHost* host
, FrameOwner* owner, ServiceRegistry* serviceRegistry) |
169 { | 169 { |
170 RawPtr<LocalFrame> frame = new LocalFrame(client, host, owner); | 170 RawPtr<LocalFrame> frame = new LocalFrame(client, host, owner, serviceRegist
ry); |
171 InspectorInstrumentation::frameAttachedToParent(frame.get()); | 171 InspectorInstrumentation::frameAttachedToParent(frame.get()); |
172 return frame.release(); | 172 return frame.release(); |
173 } | 173 } |
174 | 174 |
175 void LocalFrame::setView(RawPtr<FrameView> view) | 175 void LocalFrame::setView(RawPtr<FrameView> view) |
176 { | 176 { |
177 ASSERT(!m_view || m_view != view); | 177 ASSERT(!m_view || m_view != view); |
178 ASSERT(!document() || !document()->isActive()); | 178 ASSERT(!document() || !document()->isActive()); |
179 | 179 |
180 eventHandler().clear(); | 180 eventHandler().clear(); |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 return String(); | 814 return String(); |
815 | 815 |
816 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye
rTreeFlags>(flags)); | 816 return contentLayoutObject()->compositor()->layerTreeAsText(static_cast<Laye
rTreeFlags>(flags)); |
817 } | 817 } |
818 | 818 |
819 bool LocalFrame::shouldThrottleRendering() const | 819 bool LocalFrame::shouldThrottleRendering() const |
820 { | 820 { |
821 return view() && view()->shouldThrottleRendering(); | 821 return view() && view()->shouldThrottleRendering(); |
822 } | 822 } |
823 | 823 |
824 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
wner* owner) | 824 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host, FrameO
wner* owner, ServiceRegistry* serviceRegistry) |
825 : Frame(client, host, owner) | 825 : Frame(client, host, owner) |
826 , m_loader(this) | 826 , m_loader(this) |
827 , m_navigationScheduler(NavigationScheduler::create(this)) | 827 , m_navigationScheduler(NavigationScheduler::create(this)) |
828 , m_script(ScriptController::create(this)) | 828 , m_script(ScriptController::create(this)) |
829 , m_editor(Editor::create(*this)) | 829 , m_editor(Editor::create(*this)) |
830 , m_spellChecker(SpellChecker::create(*this)) | 830 , m_spellChecker(SpellChecker::create(*this)) |
831 , m_selection(FrameSelection::create(this)) | 831 , m_selection(FrameSelection::create(this)) |
832 , m_eventHandler(new EventHandler(this)) | 832 , m_eventHandler(new EventHandler(this)) |
833 , m_console(FrameConsole::create(*this)) | 833 , m_console(FrameConsole::create(*this)) |
834 , m_inputMethodController(InputMethodController::create(*this)) | 834 , m_inputMethodController(InputMethodController::create(*this)) |
835 , m_navigationDisableCount(0) | 835 , m_navigationDisableCount(0) |
836 , m_pageZoomFactor(parentPageZoomFactor(this)) | 836 , m_pageZoomFactor(parentPageZoomFactor(this)) |
837 , m_textZoomFactor(parentTextZoomFactor(this)) | 837 , m_textZoomFactor(parentTextZoomFactor(this)) |
838 , m_inViewSourceMode(false) | 838 , m_inViewSourceMode(false) |
| 839 , m_serviceRegistry(serviceRegistry) |
839 { | 840 { |
840 if (isLocalRoot()) | 841 if (isLocalRoot()) |
841 m_instrumentingAgents = InstrumentingAgents::create(); | 842 m_instrumentingAgents = InstrumentingAgents::create(); |
842 else | 843 else |
843 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; | 844 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; |
844 } | 845 } |
845 | 846 |
846 WebFrameScheduler* LocalFrame::frameScheduler() | 847 WebFrameScheduler* LocalFrame::frameScheduler() |
847 { | 848 { |
848 if (!m_frameScheduler.get()) | 849 if (!m_frameScheduler.get()) |
(...skipping 22 matching lines...) Expand all Loading... |
871 { | 872 { |
872 m_frame->disableNavigation(); | 873 m_frame->disableNavigation(); |
873 } | 874 } |
874 | 875 |
875 FrameNavigationDisabler::~FrameNavigationDisabler() | 876 FrameNavigationDisabler::~FrameNavigationDisabler() |
876 { | 877 { |
877 m_frame->enableNavigation(); | 878 m_frame->enableNavigation(); |
878 } | 879 } |
879 | 880 |
880 } // namespace blink | 881 } // namespace blink |
OLD | NEW |