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

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

Issue 1448253002: Clip scrollbars to box bounds when they don't fit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assertion in clipTypeAsDebugString 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 e460ecc4b0fffcdc670f46ac81b099aee53d8577..ad6b112dc84a7d4248018aad7ea0a053f6f38598 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -645,8 +645,7 @@ PaintLayerCompositor* PaintLayerCompositor::frameContentsCompositor(LayoutPart*
return nullptr;
}
-// FIXME: What does this function do? It needs a clearer name.
-bool PaintLayerCompositor::parentFrameContentLayers(LayoutPart* layoutObject)
+bool PaintLayerCompositor::attachFrameContentLayersToIframeLayer(LayoutPart* layoutObject)
{
PaintLayerCompositor* innerCompositor = frameContentsCompositor(layoutObject);
if (!innerCompositor || !innerCompositor->staleInCompositingMode() || innerCompositor->rootLayerAttachment() != RootLayerAttachedViaEnclosingFrame)
@@ -656,13 +655,7 @@ bool PaintLayerCompositor::parentFrameContentLayers(LayoutPart* layoutObject)
if (!layer->hasCompositedLayerMapping())
return false;
- 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);
- }
+ layer->compositedLayerMapping()->setSublayers(GraphicsLayerVector(1, innerCompositor->rootGraphicsLayer()));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698