Reviewed by Simon Fraser.
GraphicsLayers for overflow controls on iframe without clipping layer left out of layer tree
https://bugs.webkit.org/show_bug.cgi?id=61590
* compositing/iframes/resizer-expected.txt: Added.
* compositing/iframes/resizer.html: Added.
2011-05-27 James Robinson <jamesr@chromium.org>
Reviewed by Simon Fraser.
GraphicsLayers for overflow controls on iframe without clipping layer left out of layer tree
https://bugs.webkit.org/show_bug.cgi?id=61590
Adds overflow control layers to the compositor tree for layers without clipping layers regardless of whether the
backing is parented. This ensures that the scroll corner layer for an iframe without a clipping layer ends up
in the final layer tree. We don't currently render resizers for iframes, but we will soon and this keeps the
graphics layer tree consistent.
Test: compositing/iframes/resizer.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87547
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-05-27 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ GraphicsLayers for overflow controls on iframe without clipping layer left out of layer tree
+ https://bugs.webkit.org/show_bug.cgi?id=61590
+
+ * compositing/iframes/resizer-expected.txt: Added.
+ * compositing/iframes/resizer.html: Added.
+
2011-05-27 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed.
--- /dev/null
+<!DOCTYPE html>
+<style>
+.container {
+ -webkit-transform: translateZ(0);
+ resize: both;
+}
+</style>
+<script>
+function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ document.getElementById('layers').innerHTML = layoutTestController.layerTreeAsText();
+ }
+}
+</script>
+<!-- There should be a layer for the iframe's scroll corner alongside the iframe's content's layer tree -->
+<body onload="test()">
+<iframe class="container" src="resources/composited-subframe.html"></iframe>
+<pre id="layers">Layer tree appears here in DRT.</pre>
--- /dev/null
+
+(GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 304.00 154.00)
+ (drawsContent 1)
+ (children 2
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (children 2
+ (GraphicsLayer
+ (bounds 285.00 150.00)
+ (children 1
+ (GraphicsLayer
+ (children 1
+ (GraphicsLayer
+ (bounds 285.00 230.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 285.00 230.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 18.00 10.00)
+ (bounds 210.00 210.00)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 285.00 0.00)
+ (bounds 15.00 150.00)
+ (drawsContent 1)
+ )
+ )
+ )
+ (GraphicsLayer
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
--- /dev/null
+
+(GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 304.00 154.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 2.00 2.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 285.00 150.00)
+ (children 1
+ (GraphicsLayer
+ (children 1
+ (GraphicsLayer
+ (bounds 285.00 230.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 285.00 230.00)
+ (drawsContent 1)
+ (children 1
+ (GraphicsLayer
+ (position 18.00 10.00)
+ (bounds 210.00 210.00)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+)
+
+2011-05-27 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ GraphicsLayers for overflow controls on iframe without clipping layer left out of layer tree
+ https://bugs.webkit.org/show_bug.cgi?id=61590
+
+ Adds overflow control layers to the compositor tree for layers without clipping layers regardless of whether the
+ backing is parented. This ensures that the scroll corner layer for an iframe without a clipping layer ends up
+ in the final layer tree. We don't currently render resizers for iframes, but we will soon and this keeps the
+ graphics layer tree consistent.
+
+ Test: compositing/iframes/resizer.html
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+
2011-05-27 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
if (layer->renderer()->isRenderPart())
parented = parentFrameContentLayers(toRenderPart(layer->renderer()));
+ if (!parented)
+ layerBacking->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.
if (!layerBacking->hasClippingLayer()) {
if (GraphicsLayer* overflowControlLayer = layerBacking->layerForHorizontalScrollbar()) {
overflowControlLayer->removeFromParent();
- layerChildren.append(overflowControlLayer);
+ layerBacking->parentForSublayers()->addChild(overflowControlLayer);
}
if (GraphicsLayer* overflowControlLayer = layerBacking->layerForVerticalScrollbar()) {
overflowControlLayer->removeFromParent();
- layerChildren.append(overflowControlLayer);
+ layerBacking->parentForSublayers()->addChild(overflowControlLayer);
}
if (GraphicsLayer* overflowControlLayer = layerBacking->layerForScrollCorner()) {
overflowControlLayer->removeFromParent();
- layerChildren.append(overflowControlLayer);
+ layerBacking->parentForSublayers()->addChild(overflowControlLayer);
}
}
- if (!parented)
- layerBacking->parentForSublayers()->setChildren(layerChildren);
-
#if ENABLE(FULLSCREEN_API)
// For the sake of clients of the full screen renderer, don't reparent
// the full screen layer out from under them if they're in the middle of