Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 2638223003: Root layer scrolling: fix element ID collision. (Closed)
Patch Set: update comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
index 9dbafbcef58aea71f605089362398865e3535e64..0938032a6e575dd7c782e5cc1f0dd80e253342ae 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -1128,15 +1128,21 @@ void PaintLayerCompositor::ensureRootLayer() {
m_overflowControlsHostLayer = GraphicsLayer::create(this);
m_containerLayer = GraphicsLayer::create(this);
+ // TODO(skobes): When root layer scrolling is enabled, we should not even
+ // create m_scrollLayer or most of the layers in PLC.
m_scrollLayer = GraphicsLayer::create(this);
if (ScrollingCoordinator* scrollingCoordinator =
this->scrollingCoordinator())
scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(
m_scrollLayer.get(), true);
- m_scrollLayer->setElementId(createCompositorElementId(
- DOMNodeIds::idForNode(&m_layoutView.document()),
- CompositorSubElementId::Scroll));
+ // In RLS mode, LayoutView scrolling contents layer gets this element ID (in
+ // CompositedLayerMapping::updateElementIdAndCompositorMutableProperties).
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ m_scrollLayer->setElementId(createCompositorElementId(
+ DOMNodeIds::idForNode(&m_layoutView.document()),
+ CompositorSubElementId::Scroll));
+ }
// Hook them up
m_overflowControlsHostLayer->addChild(m_containerLayer.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698