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

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

Issue 1458353004: Revert of Clip scrollbars to box bounds when they don't fit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp b/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp
index 3c24bdec0dd4bcd70de4315b3b468d5a75154c2d..4f2c16d8db14990328fa04fd28dc44dfda081ac8 100644
--- a/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/GraphicsLayerTreeBuilder.cpp
@@ -97,10 +97,30 @@
if (hasCompositedLayerMapping) {
bool parented = false;
if (layer.layoutObject()->isLayoutPart())
- parented = PaintLayerCompositor::attachFrameContentLayersToIframeLayer(toLayoutPart(layer.layoutObject()));
+ parented = PaintLayerCompositor::parentFrameContentLayers(toLayoutPart(layer.layoutObject()));
if (!parented)
- currentCompositedLayerMapping->setSublayers(layerChildren);
+ currentCompositedLayerMapping->parentForSublayers()->setChildren(layerChildren);
+
+ // If the layer has a clipping layer the overflow controls layers will be siblings of the clipping layer.
+ // Otherwise, the overflow control layers are normal children.
+ // FIXME: Why isn't this handled in CLM updateInternalHierarchy?
+ if (!currentCompositedLayerMapping->hasClippingLayer() && !currentCompositedLayerMapping->hasScrollingLayer()) {
+ if (GraphicsLayer* overflowControlLayer = currentCompositedLayerMapping->layerForHorizontalScrollbar()) {
+ overflowControlLayer->removeFromParent();
+ currentCompositedLayerMapping->parentForSublayers()->addChild(overflowControlLayer);
+ }
+
+ if (GraphicsLayer* overflowControlLayer = currentCompositedLayerMapping->layerForVerticalScrollbar()) {
+ overflowControlLayer->removeFromParent();
+ currentCompositedLayerMapping->parentForSublayers()->addChild(overflowControlLayer);
+ }
+
+ if (GraphicsLayer* overflowControlLayer = currentCompositedLayerMapping->layerForScrollCorner()) {
+ overflowControlLayer->removeFromParent();
+ currentCompositedLayerMapping->parentForSublayers()->addChild(overflowControlLayer);
+ }
+ }
if (shouldAppendLayer(layer))
info.childLayersOfEnclosingCompositedLayer->append(currentCompositedLayerMapping->childForSuperlayers());

Powered by Google App Engine
This is Rietveld 408576698