OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. |
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 { | 89 { |
90 if (!frame) | 90 if (!frame) |
91 return 1; | 91 return 1; |
92 Page* page = frame->page(); | 92 Page* page = frame->page(); |
93 if (!page) | 93 if (!page) |
94 return 1; | 94 return 1; |
95 return page->deviceScaleFactor(); | 95 return page->deviceScaleFactor(); |
96 } | 96 } |
97 | 97 |
98 Page::Page(PageClients& pageClients) | 98 Page::Page(PageClients& pageClients) |
99 : m_autoscrollController(AutoscrollController::create()) | 99 : m_autoscrollController(AutoscrollController::create(this)) |
eseidel
2013/11/01 19:43:23
I wonder why this isn't lazily created. I guess i
| |
100 , m_chrome(Chrome::create(this, pageClients.chromeClient)) | 100 , m_chrome(Chrome::create(this, pageClients.chromeClient)) |
101 , m_dragCaretController(DragCaretController::create()) | 101 , m_dragCaretController(DragCaretController::create()) |
102 , m_dragController(DragController::create(this, pageClients.dragClient)) | 102 , m_dragController(DragController::create(this, pageClients.dragClient)) |
103 , m_focusController(FocusController::create(this)) | 103 , m_focusController(FocusController::create(this)) |
104 , m_contextMenuController(ContextMenuController::create(this, pageClients.co ntextMenuClient)) | 104 , m_contextMenuController(ContextMenuController::create(this, pageClients.co ntextMenuClient)) |
105 , m_inspectorController(InspectorController::create(this, pageClients.inspec torClient)) | 105 , m_inspectorController(InspectorController::create(this, pageClients.inspec torClient)) |
106 , m_pointerLockController(PointerLockController::create(this)) | 106 , m_pointerLockController(PointerLockController::create(this)) |
107 , m_settings(Settings::create(this)) | 107 , m_settings(Settings::create(this)) |
108 , m_progress(ProgressTracker::create()) | 108 , m_progress(ProgressTracker::create()) |
109 , m_backForwardClient(pageClients.backForwardClient) | 109 , m_backForwardClient(pageClients.backForwardClient) |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 #ifndef NDEBUG | 158 #ifndef NDEBUG |
159 pageCounter.decrement(); | 159 pageCounter.decrement(); |
160 #endif | 160 #endif |
161 } | 161 } |
162 | 162 |
163 ViewportDescription Page::viewportDescription() const | 163 ViewportDescription Page::viewportDescription() const |
164 { | 164 { |
165 return mainFrame() && mainFrame()->document() ? mainFrame()->document()->vie wportDescription() : ViewportDescription(); | 165 return mainFrame() && mainFrame()->document() ? mainFrame()->document()->vie wportDescription() : ViewportDescription(); |
166 } | 166 } |
167 | 167 |
168 bool Page::autoscrollInProgress() const | |
169 { | |
170 return m_autoscrollController->autoscrollInProgress(); | |
171 } | |
172 | |
173 bool Page::autoscrollInProgress(const RenderBox* renderer) const | |
174 { | |
175 return m_autoscrollController->autoscrollInProgress(renderer); | |
176 } | |
177 | |
178 bool Page::panScrollInProgress() const | |
179 { | |
180 return m_autoscrollController->panScrollInProgress(); | |
181 } | |
182 | |
183 void Page::startAutoscrollForSelection(RenderObject* renderer) | |
184 { | |
185 return m_autoscrollController->startAutoscrollForSelection(renderer); | |
186 } | |
187 | |
188 void Page::stopAutoscrollIfNeeded(RenderObject* renderer) | |
189 { | |
190 m_autoscrollController->stopAutoscrollIfNeeded(renderer); | |
191 } | |
192 | |
193 | |
194 void Page::stopAutoscrollTimer() | |
195 { | |
196 m_autoscrollController->stopAutoscrollTimer(); | |
197 } | |
198 | |
199 void Page::updateAutoscrollRenderer() | |
200 { | |
201 m_autoscrollController->updateAutoscrollRenderer(); | |
202 } | |
203 | |
204 void Page::updateDragAndDrop(Node* dropTargetNode, const IntPoint& eventPosition , double eventTime) | |
205 { | |
206 m_autoscrollController->updateDragAndDrop(dropTargetNode, eventPosition, eve ntTime); | |
207 } | |
208 | |
209 #if OS(WIN) | |
210 void Page::handleMouseReleaseForPanScrolling(Frame* frame, const PlatformMouseEv ent& point) | |
211 { | |
212 m_autoscrollController->handleMouseReleaseForPanScrolling(frame, point); | |
213 } | |
214 | |
215 void Page::startPanScrolling(RenderBox* renderer, const IntPoint& point) | |
216 { | |
217 m_autoscrollController->startPanScrolling(renderer, point); | |
218 } | |
219 #endif | |
220 | |
221 | |
222 ScrollingCoordinator* Page::scrollingCoordinator() | 168 ScrollingCoordinator* Page::scrollingCoordinator() |
223 { | 169 { |
224 if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) | 170 if (!m_scrollingCoordinator && m_settings->scrollingCoordinatorEnabled()) |
225 m_scrollingCoordinator = ScrollingCoordinator::create(this); | 171 m_scrollingCoordinator = ScrollingCoordinator::create(this); |
226 | 172 |
227 return m_scrollingCoordinator.get(); | 173 return m_scrollingCoordinator.get(); |
228 } | 174 } |
229 | 175 |
230 String Page::mainThreadScrollingReasonsAsText() | 176 String Page::mainThreadScrollingReasonsAsText() |
231 { | 177 { |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
617 , inspectorClient(0) | 563 , inspectorClient(0) |
618 , backForwardClient(0) | 564 , backForwardClient(0) |
619 { | 565 { |
620 } | 566 } |
621 | 567 |
622 Page::PageClients::~PageClients() | 568 Page::PageClients::~PageClients() |
623 { | 569 { |
624 } | 570 } |
625 | 571 |
626 } // namespace WebCore | 572 } // namespace WebCore |
OLD | NEW |