| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All |
| 3 * Rights Reserved. | 3 * Rights Reserved. |
| 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| 5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "core/dom/StyleChangeReason.h" | 27 #include "core/dom/StyleChangeReason.h" |
| 28 #include "core/dom/StyleEngine.h" | 28 #include "core/dom/StyleEngine.h" |
| 29 #include "core/dom/VisitedLinkState.h" | 29 #include "core/dom/VisitedLinkState.h" |
| 30 #include "core/editing/DragCaret.h" | 30 #include "core/editing/DragCaret.h" |
| 31 #include "core/editing/markers/DocumentMarkerController.h" | 31 #include "core/editing/markers/DocumentMarkerController.h" |
| 32 #include "core/events/Event.h" | 32 #include "core/events/Event.h" |
| 33 #include "core/frame/DOMTimer.h" | 33 #include "core/frame/DOMTimer.h" |
| 34 #include "core/frame/FrameConsole.h" | 34 #include "core/frame/FrameConsole.h" |
| 35 #include "core/frame/FrameHost.h" | 35 #include "core/frame/FrameHost.h" |
| 36 #include "core/frame/FrameView.h" | 36 #include "core/frame/FrameView.h" |
| 37 #include "core/frame/PageScaleConstraintsSet.h" |
| 37 #include "core/frame/RemoteFrame.h" | 38 #include "core/frame/RemoteFrame.h" |
| 38 #include "core/frame/RemoteFrameView.h" | 39 #include "core/frame/RemoteFrameView.h" |
| 39 #include "core/frame/Settings.h" | 40 #include "core/frame/Settings.h" |
| 40 #include "core/frame/VisualViewport.h" | 41 #include "core/frame/VisualViewport.h" |
| 41 #include "core/html/HTMLMediaElement.h" | 42 #include "core/html/HTMLMediaElement.h" |
| 42 #include "core/inspector/ConsoleMessageStorage.h" | 43 #include "core/inspector/ConsoleMessageStorage.h" |
| 43 #include "core/inspector/InspectorInstrumentation.h" | 44 #include "core/inspector/InspectorInstrumentation.h" |
| 44 #include "core/layout/TextAutosizer.h" | 45 #include "core/layout/TextAutosizer.h" |
| 45 #include "core/page/AutoscrollController.h" | 46 #include "core/page/AutoscrollController.h" |
| 46 #include "core/page/ChromeClient.h" | 47 #include "core/page/ChromeClient.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 Page::Page(PageClients& pageClients) | 93 Page::Page(PageClients& pageClients) |
| 93 : SettingsDelegate(Settings::create()), | 94 : SettingsDelegate(Settings::create()), |
| 94 m_animator(PageAnimator::create(*this)), | 95 m_animator(PageAnimator::create(*this)), |
| 95 m_autoscrollController(AutoscrollController::create(*this)), | 96 m_autoscrollController(AutoscrollController::create(*this)), |
| 96 m_chromeClient(pageClients.chromeClient), | 97 m_chromeClient(pageClients.chromeClient), |
| 97 m_dragCaret(DragCaret::create()), | 98 m_dragCaret(DragCaret::create()), |
| 98 m_dragController(DragController::create(this)), | 99 m_dragController(DragController::create(this)), |
| 99 m_focusController(FocusController::create(this)), | 100 m_focusController(FocusController::create(this)), |
| 100 m_contextMenuController( | 101 m_contextMenuController( |
| 101 ContextMenuController::create(this, pageClients.contextMenuClient)), | 102 ContextMenuController::create(this, pageClients.contextMenuClient)), |
| 103 m_pageScaleConstraintsSet(PageScaleConstraintsSet::create()), |
| 102 m_pointerLockController(PointerLockController::create(this)), | 104 m_pointerLockController(PointerLockController::create(this)), |
| 103 m_mainFrame(nullptr), | 105 m_mainFrame(nullptr), |
| 104 m_editorClient(pageClients.editorClient), | 106 m_editorClient(pageClients.editorClient), |
| 105 m_spellCheckerClient(pageClients.spellCheckerClient), | 107 m_spellCheckerClient(pageClients.spellCheckerClient), |
| 106 m_useCounter(pageClients.chromeClient && | 108 m_useCounter(pageClients.chromeClient && |
| 107 pageClients.chromeClient->isSVGImageChromeClient() | 109 pageClients.chromeClient->isSVGImageChromeClient() |
| 108 ? UseCounter::SVGImageContext | 110 ? UseCounter::SVGImageContext |
| 109 : UseCounter::DefaultContext), | 111 : UseCounter::DefaultContext), |
| 110 m_openedByDOM(false), | 112 m_openedByDOM(false), |
| 111 m_tabKeyCyclesThroughElements(true), | 113 m_tabKeyCyclesThroughElements(true), |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 : ViewportDescription(); | 145 : ViewportDescription(); |
| 144 } | 146 } |
| 145 | 147 |
| 146 ScrollingCoordinator* Page::scrollingCoordinator() { | 148 ScrollingCoordinator* Page::scrollingCoordinator() { |
| 147 if (!m_scrollingCoordinator && m_settings->getAcceleratedCompositingEnabled()) | 149 if (!m_scrollingCoordinator && m_settings->getAcceleratedCompositingEnabled()) |
| 148 m_scrollingCoordinator = ScrollingCoordinator::create(this); | 150 m_scrollingCoordinator = ScrollingCoordinator::create(this); |
| 149 | 151 |
| 150 return m_scrollingCoordinator.get(); | 152 return m_scrollingCoordinator.get(); |
| 151 } | 153 } |
| 152 | 154 |
| 155 PageScaleConstraintsSet& Page::pageScaleConstraintsSet() { |
| 156 return *m_pageScaleConstraintsSet; |
| 157 } |
| 158 |
| 159 const PageScaleConstraintsSet& Page::pageScaleConstraintsSet() const { |
| 160 return *m_pageScaleConstraintsSet; |
| 161 } |
| 162 |
| 153 ClientRectList* Page::nonFastScrollableRects(const LocalFrame* frame) { | 163 ClientRectList* Page::nonFastScrollableRects(const LocalFrame* frame) { |
| 154 DisableCompositingQueryAsserts disabler; | 164 DisableCompositingQueryAsserts disabler; |
| 155 if (ScrollingCoordinator* scrollingCoordinator = | 165 if (ScrollingCoordinator* scrollingCoordinator = |
| 156 this->scrollingCoordinator()) { | 166 this->scrollingCoordinator()) { |
| 157 // Hits in compositing/iframes/iframe-composited-scrolling.html | 167 // Hits in compositing/iframes/iframe-composited-scrolling.html |
| 158 scrollingCoordinator->updateAfterCompositingChangeIfNeeded(); | 168 scrollingCoordinator->updateAfterCompositingChangeIfNeeded(); |
| 159 } | 169 } |
| 160 | 170 |
| 161 GraphicsLayer* layer = | 171 GraphicsLayer* layer = |
| 162 frame->view()->layoutViewportScrollableArea()->layerForScrolling(); | 172 frame->view()->layoutViewportScrollableArea()->layerForScrolling(); |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 : chromeClient(nullptr), | 540 : chromeClient(nullptr), |
| 531 contextMenuClient(nullptr), | 541 contextMenuClient(nullptr), |
| 532 editorClient(nullptr), | 542 editorClient(nullptr), |
| 533 spellCheckerClient(nullptr) {} | 543 spellCheckerClient(nullptr) {} |
| 534 | 544 |
| 535 Page::PageClients::~PageClients() {} | 545 Page::PageClients::~PageClients() {} |
| 536 | 546 |
| 537 template class CORE_TEMPLATE_EXPORT Supplement<Page>; | 547 template class CORE_TEMPLATE_EXPORT Supplement<Page>; |
| 538 | 548 |
| 539 } // namespace blink | 549 } // namespace blink |
| OLD | NEW |