OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 #include "core/page/DragController.h" | 81 #include "core/page/DragController.h" |
82 #include "core/page/DragData.h" | 82 #include "core/page/DragData.h" |
83 #include "core/page/DragSession.h" | 83 #include "core/page/DragSession.h" |
84 #include "core/page/FocusController.h" | 84 #include "core/page/FocusController.h" |
85 #include "core/page/FrameTree.h" | 85 #include "core/page/FrameTree.h" |
86 #include "core/page/Page.h" | 86 #include "core/page/Page.h" |
87 #include "core/page/PagePopupClient.h" | 87 #include "core/page/PagePopupClient.h" |
88 #include "core/page/PointerLockController.h" | 88 #include "core/page/PointerLockController.h" |
89 #include "core/page/ScopedPageLoadDeferrer.h" | 89 #include "core/page/ScopedPageLoadDeferrer.h" |
90 #include "core/page/TouchDisambiguation.h" | 90 #include "core/page/TouchDisambiguation.h" |
| 91 #include "core/page/scrolling/RootScrollerController.h" |
91 #include "core/paint/PaintLayer.h" | 92 #include "core/paint/PaintLayer.h" |
92 #include "core/timing/DOMWindowPerformance.h" | 93 #include "core/timing/DOMWindowPerformance.h" |
93 #include "core/timing/Performance.h" | 94 #include "core/timing/Performance.h" |
94 #include "modules/accessibility/AXObject.h" | 95 #include "modules/accessibility/AXObject.h" |
95 #include "modules/accessibility/AXObjectCacheImpl.h" | 96 #include "modules/accessibility/AXObjectCacheImpl.h" |
96 #include "modules/credentialmanager/CredentialManagerClient.h" | 97 #include "modules/credentialmanager/CredentialManagerClient.h" |
97 #include "modules/encryptedmedia/MediaKeysController.h" | 98 #include "modules/encryptedmedia/MediaKeysController.h" |
98 #include "modules/storage/StorageNamespaceController.h" | 99 #include "modules/storage/StorageNamespaceController.h" |
99 #include "modules/webgl/WebGLRenderingContext.h" | 100 #include "modules/webgl/WebGLRenderingContext.h" |
100 #include "platform/ContextMenu.h" | 101 #include "platform/ContextMenu.h" |
(...skipping 4083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4184 } | 4185 } |
4185 | 4186 |
4186 bool WebViewImpl::tabsToLinks() const | 4187 bool WebViewImpl::tabsToLinks() const |
4187 { | 4188 { |
4188 return m_tabsToLinks; | 4189 return m_tabsToLinks; |
4189 } | 4190 } |
4190 | 4191 |
4191 void WebViewImpl::registerViewportLayersWithCompositor() | 4192 void WebViewImpl::registerViewportLayersWithCompositor() |
4192 { | 4193 { |
4193 DCHECK(m_layerTreeView); | 4194 DCHECK(m_layerTreeView); |
4194 DCHECK(!page()->deprecatedLocalMainFrame()->contentLayoutItem().isNull()); | 4195 DCHECK(page()->deprecatedLocalMainFrame()); |
4195 | 4196 |
4196 PaintLayerCompositor* compositor = | 4197 Document* document = page()->deprecatedLocalMainFrame()->document(); |
4197 page()->deprecatedLocalMainFrame()->contentLayoutItem().compositor(); | |
4198 | 4198 |
4199 DCHECK(compositor); | 4199 DCHECK(document); |
4200 | 4200 |
4201 // Get the outer viewport scroll layer. | 4201 // Get the outer viewport scroll layer. |
4202 WebLayer* scrollLayer = | 4202 GraphicsLayer* layoutViewportScrollLayer = |
4203 compositor->scrollLayer() | 4203 document->rootScrollerController()->rootScrollerLayer(); |
4204 ? compositor->scrollLayer()->platformLayer() | 4204 WebLayer* layoutViewportWebLayer = layoutViewportScrollLayer |
4205 : nullptr; | 4205 ? layoutViewportScrollLayer->platformLayer() |
| 4206 : nullptr; |
4206 | 4207 |
4207 VisualViewport& visualViewport = page()->frameHost().visualViewport(); | 4208 VisualViewport& visualViewport = page()->frameHost().visualViewport(); |
4208 | 4209 |
4209 // TODO(bokan): This was moved here from when registerViewportLayers was a | 4210 // TODO(bokan): This was moved here from when registerViewportLayers was a |
4210 // part of VisualViewport and maybe doesn't belong here. See comment inside | 4211 // part of VisualViewport and maybe doesn't belong here. See comment inside |
4211 // the mehtod. | 4212 // the mehtod. |
4212 visualViewport.setScrollLayerOnScrollbars(scrollLayer); | 4213 visualViewport.setScrollLayerOnScrollbars(layoutViewportWebLayer); |
4213 | 4214 |
4214 m_layerTreeView->registerViewportLayers( | 4215 m_layerTreeView->registerViewportLayers( |
4215 visualViewport.overscrollElasticityLayer()->platformLayer(), | 4216 visualViewport.overscrollElasticityLayer()->platformLayer(), |
4216 visualViewport.pageScaleLayer()->platformLayer(), | 4217 visualViewport.pageScaleLayer()->platformLayer(), |
4217 visualViewport.scrollLayer()->platformLayer(), | 4218 visualViewport.scrollLayer()->platformLayer(), |
4218 scrollLayer); | 4219 layoutViewportWebLayer); |
4219 } | 4220 } |
4220 | 4221 |
4221 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) | 4222 void WebViewImpl::setRootGraphicsLayer(GraphicsLayer* layer) |
4222 { | 4223 { |
4223 if (!m_layerTreeView) | 4224 if (!m_layerTreeView) |
4224 return; | 4225 return; |
4225 | 4226 |
4226 // In SPv2, we attach layers via PaintArtifactCompositor, rather than | 4227 // In SPv2, we attach layers via PaintArtifactCompositor, rather than |
4227 // supplying a root GraphicsLayer from PaintLayerCompositor. | 4228 // supplying a root GraphicsLayer from PaintLayerCompositor. |
4228 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 4229 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4569 { | 4570 { |
4570 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4571 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4571 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4572 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4572 if (!page()) | 4573 if (!page()) |
4573 return 1; | 4574 return 1; |
4574 | 4575 |
4575 return page()->deviceScaleFactor(); | 4576 return page()->deviceScaleFactor(); |
4576 } | 4577 } |
4577 | 4578 |
4578 } // namespace blink | 4579 } // namespace blink |
OLD | NEW |