OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "core/frame/VisualViewport.h" | 31 #include "core/frame/VisualViewport.h" |
32 | 32 |
| 33 #include <memory> |
33 #include "core/dom/DOMNodeIds.h" | 34 #include "core/dom/DOMNodeIds.h" |
34 #include "core/dom/TaskRunnerHelper.h" | 35 #include "core/dom/TaskRunnerHelper.h" |
35 #include "core/frame/FrameHost.h" | 36 #include "core/frame/FrameHost.h" |
36 #include "core/frame/FrameView.h" | 37 #include "core/frame/FrameView.h" |
37 #include "core/frame/LocalFrame.h" | 38 #include "core/frame/LocalFrame.h" |
38 #include "core/frame/PageScaleConstraints.h" | 39 #include "core/frame/PageScaleConstraints.h" |
39 #include "core/frame/PageScaleConstraintsSet.h" | 40 #include "core/frame/PageScaleConstraintsSet.h" |
40 #include "core/frame/RootFrameViewport.h" | 41 #include "core/frame/RootFrameViewport.h" |
41 #include "core/frame/Settings.h" | 42 #include "core/frame/Settings.h" |
42 #include "core/inspector/InspectorInstrumentation.h" | 43 #include "core/inspector/InspectorInstrumentation.h" |
43 #include "core/layout/TextAutosizer.h" | 44 #include "core/layout/TextAutosizer.h" |
44 #include "core/layout/compositing/PaintLayerCompositor.h" | 45 #include "core/layout/compositing/PaintLayerCompositor.h" |
45 #include "core/loader/FrameLoaderClient.h" | 46 #include "core/loader/FrameLoaderClient.h" |
46 #include "core/page/ChromeClient.h" | 47 #include "core/page/ChromeClient.h" |
47 #include "core/page/Page.h" | 48 #include "core/page/Page.h" |
48 #include "core/page/scrolling/ScrollingCoordinator.h" | 49 #include "core/page/scrolling/ScrollingCoordinator.h" |
49 #include "platform/Histogram.h" | 50 #include "platform/Histogram.h" |
50 #include "platform/geometry/DoubleRect.h" | 51 #include "platform/geometry/DoubleRect.h" |
51 #include "platform/geometry/FloatSize.h" | 52 #include "platform/geometry/FloatSize.h" |
52 #include "platform/graphics/CompositorMutableProperties.h" | 53 #include "platform/graphics/CompositorMutableProperties.h" |
53 #include "platform/graphics/GraphicsLayer.h" | 54 #include "platform/graphics/GraphicsLayer.h" |
54 #include "platform/instrumentation/tracing/TraceEvent.h" | 55 #include "platform/instrumentation/tracing/TraceEvent.h" |
55 #include "platform/scroll/Scrollbar.h" | 56 #include "platform/scroll/Scrollbar.h" |
56 #include "platform/scroll/ScrollbarThemeOverlay.h" | 57 #include "platform/scroll/ScrollbarThemeOverlay.h" |
57 #include "public/platform/WebCompositorSupport.h" | 58 #include "public/platform/WebCompositorSupport.h" |
58 #include "public/platform/WebScrollbar.h" | 59 #include "public/platform/WebScrollbar.h" |
59 #include "public/platform/WebScrollbarLayer.h" | 60 #include "public/platform/WebScrollbarLayer.h" |
60 #include <memory> | |
61 | 61 |
62 namespace blink { | 62 namespace blink { |
63 | 63 |
64 VisualViewport::VisualViewport(FrameHost& owner) | 64 VisualViewport::VisualViewport(FrameHost& owner) |
65 : m_frameHost(&owner), | 65 : m_frameHost(&owner), |
66 m_scale(1), | 66 m_scale(1), |
67 m_browserControlsAdjustment(0), | 67 m_browserControlsAdjustment(0), |
68 m_maxPageScale(-1), | 68 m_maxPageScale(-1), |
69 m_trackPinchZoomStatsForPage(false) { | 69 m_trackPinchZoomStatsForPage(false) { |
70 reset(); | 70 reset(); |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 } else if (graphicsLayer == m_rootTransformLayer.get()) { | 855 } else if (graphicsLayer == m_rootTransformLayer.get()) { |
856 name = "Root Transform Layer"; | 856 name = "Root Transform Layer"; |
857 } else { | 857 } else { |
858 ASSERT_NOT_REACHED(); | 858 ASSERT_NOT_REACHED(); |
859 } | 859 } |
860 | 860 |
861 return name; | 861 return name; |
862 } | 862 } |
863 | 863 |
864 } // namespace blink | 864 } // namespace blink |
OLD | NEW |