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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.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/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 ad6b112dc84a7d4248018aad7ea0a053f6f38598..e460ecc4b0fffcdc670f46ac81b099aee53d8577 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -645,7 +645,8 @@
return nullptr;
}
-bool PaintLayerCompositor::attachFrameContentLayersToIframeLayer(LayoutPart* layoutObject)
+// FIXME: What does this function do? It needs a clearer name.
+bool PaintLayerCompositor::parentFrameContentLayers(LayoutPart* layoutObject)
{
PaintLayerCompositor* innerCompositor = frameContentsCompositor(layoutObject);
if (!innerCompositor || !innerCompositor->staleInCompositingMode() || innerCompositor->rootLayerAttachment() != RootLayerAttachedViaEnclosingFrame)
@@ -655,7 +656,13 @@
if (!layer->hasCompositedLayerMapping())
return false;
- layer->compositedLayerMapping()->setSublayers(GraphicsLayerVector(1, innerCompositor->rootGraphicsLayer()));
+ CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMapping();
+ GraphicsLayer* hostingLayer = compositedLayerMapping->parentForSublayers();
+ GraphicsLayer* rootLayer = innerCompositor->rootGraphicsLayer();
+ if (hostingLayer->children().size() != 1 || hostingLayer->children()[0] != rootLayer) {
+ hostingLayer->removeAllChildren();
+ hostingLayer->addChild(rootLayer);
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698