Diff
Modified: trunk/LayoutTests/ChangeLog (91113 => 91114)
--- trunk/LayoutTests/ChangeLog 2011-07-15 21:24:32 UTC (rev 91113)
+++ trunk/LayoutTests/ChangeLog 2011-07-15 21:54:20 UTC (rev 91114)
@@ -1,3 +1,21 @@
+2011-06-27 Adrienne Walker <[email protected]>
+
+ Reviewed by Simon Fraser.
+
+ Overlap map for compositing needs to consider clipping
+ https://bugs.webkit.org/show_bug.cgi?id=63493
+
+ Added new test. limit-layer-bounds-clipping-ancestor had changed
+ behavior because some layers no longer needed to become composited.
+ Adjusted that test to be less platform-specific as well.
+
+ * compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt:
+ * compositing/geometry/limit-layer-bounds-clipping-ancestor.html:
+ * compositing/layer-creation/overlap-clipping-expected.txt: Added.
+ * compositing/layer-creation/overlap-clipping.html: Added.
+ * platform/chromium-gpu-mac/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: Removed.
+ * platform/chromium-gpu/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt: Removed.
+
2011-07-15 Kenneth Russell <[email protected]>
Don't restore WebGL context if it was guilty of a graphics reset
Modified: trunk/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt (91113 => 91114)
--- trunk/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt 2011-07-15 21:24:32 UTC (rev 91113)
+++ trunk/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt 2011-07-15 21:54:20 UTC (rev 91114)
@@ -9,7 +9,7 @@
(children 1
(GraphicsLayer
(bounds 785.00 2618.00)
- (children 9
+ (children 6
(GraphicsLayer
(position 21.00 21.00)
(bounds 100.00 100.00)
@@ -35,27 +35,12 @@
(children 1
(GraphicsLayer
(position 5.00 145.00)
- (bounds 68.00 28.00)
+ (bounds 144.00 24.00)
(drawsContent 1)
)
)
)
(GraphicsLayer
- (position 28.00 20.00)
- (bounds 200.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 2058.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 18.00 240.00)
- (bounds 220.00 220.00)
- (drawsContent 1)
- )
- (GraphicsLayer
(position 28.00 250.00)
(bounds 185.00 200.00)
(children 1
@@ -71,21 +56,11 @@
(children 1
(GraphicsLayer
(position 5.00 145.00)
- (bounds 68.00 28.00)
+ (bounds 144.00 24.00)
(drawsContent 1)
)
)
)
- (GraphicsLayer
- (position 28.00 250.00)
- (bounds 185.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 2058.00)
- (drawsContent 1)
- )
- )
- )
)
)
)
Modified: trunk/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor.html (91113 => 91114)
--- trunk/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor.html 2011-07-15 21:24:32 UTC (rev 91113)
+++ trunk/LayoutTests/compositing/geometry/limit-layer-bounds-clipping-ancestor.html 2011-07-15 21:54:20 UTC (rev 91114)
@@ -30,6 +30,10 @@
width: 100px;
height: 100px;
}
+
+ p {
+ font: 1em/1 Ahem, sans-serif;
+ }
p.middle {
position: absolute;
Added: trunk/LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt (0 => 91114)
--- trunk/LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt 2011-07-15 21:54:20 UTC (rev 91114)
@@ -0,0 +1,31 @@
+(GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (children 3
+ (GraphicsLayer
+ (position 50.00 50.00)
+ (bounds 100.00 100.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 500.00 100.00)
+ (drawsContent 1)
+ )
+ )
+ )
+ (GraphicsLayer
+ (position 50.00 200.00)
+ (bounds 500.00 100.00)
+ (drawsContent 1)
+ )
+ (GraphicsLayer
+ (position 450.00 200.00)
+ (bounds 100.00 100.00)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+)
+
Property changes on: trunk/LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/layer-creation/overlap-clipping.html (0 => 91114)
--- trunk/LayoutTests/compositing/layer-creation/overlap-clipping.html (rev 0)
+++ trunk/LayoutTests/compositing/layer-creation/overlap-clipping.html 2011-07-15 21:54:20 UTC (rev 91114)
@@ -0,0 +1,71 @@
+<html>
+<head>
+<style>
+
+ #clipped {
+ position: absolute;
+ left: 0px;
+ right: 0px;
+ width: 100px;
+ height: 100px;
+ overflow: hidden;
+ }
+
+ #child {
+ width: 500px;
+ height: 100px;
+ background-color: green;
+ -webkit-transform:translateZ(0);
+ }
+
+ #overlap {
+ position: absolute;
+ left: 400px;
+ top: 0px;
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+ }
+
+ #row1 {
+ position: absolute;
+ left: 50px;
+ top: 50px;
+ }
+
+ #row2 {
+ position: absolute;
+ left: 50px;
+ top: 200px;
+ }
+</style>
+<script>
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText(false);
+ window.addEventListener('load', function() {
+ document.getElementById("layertree").innerText = layoutTestController.layerTreeAsText();
+ }, false);
+ }
+</script>
+</head>
+<body>
+ <div id="row1">
+ <div id="clipped">
+ <div id="child"></div>
+ </div>
+
+ <!-- this element should not get its own layer -->
+ <div id="overlap"></div>
+ </div>
+
+ <div id="row2">
+ <div id="clipped"></div>
+ <div id="child"></div>
+
+ <!-- this element should get its own layer -->
+ <div id="overlap"></div>
+ </div>
+
+ <pre id="layertree"></pre>
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/layer-creation/overlap-clipping.html
___________________________________________________________________
Added: svn:eol-style
Deleted: trunk/LayoutTests/platform/chromium-gpu/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt (91113 => 91114)
--- trunk/LayoutTests/platform/chromium-gpu/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt 2011-07-15 21:24:32 UTC (rev 91113)
+++ trunk/LayoutTests/platform/chromium-gpu/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt 2011-07-15 21:54:20 UTC (rev 91114)
@@ -1,97 +0,0 @@
-top
-
-middlebottom
-top
-
-middlebottom
-(GraphicsLayer
- (bounds 785.00 2618.00)
- (children 1
- (GraphicsLayer
- (bounds 785.00 2618.00)
- (children 9
- (GraphicsLayer
- (position 21.00 21.00)
- (bounds 100.00 100.00)
- )
- (GraphicsLayer
- (position 18.00 10.00)
- (bounds 220.00 220.00)
- (drawsContent 1)
- )
- (GraphicsLayer
- (position 28.00 20.00)
- (bounds 200.00 200.00)
- (children 1
- (GraphicsLayer
- (bounds 110.00 200.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 28.00 20.00)
- (bounds 200.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 145.00)
- (bounds 65.00 28.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 28.00 20.00)
- (bounds 200.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 2058.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 18.00 240.00)
- (bounds 220.00 220.00)
- (drawsContent 1)
- (children 1
- (GraphicsLayer
- )
- )
- )
- (GraphicsLayer
- (position 28.00 250.00)
- (bounds 185.00 200.00)
- (children 1
- (GraphicsLayer
- (bounds 110.00 200.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 28.00 250.00)
- (bounds 185.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 145.00)
- (bounds 65.00 28.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 28.00 250.00)
- (bounds 185.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 2058.00)
- (drawsContent 1)
- )
- )
- )
- )
- )
- )
-)
-
Deleted: trunk/LayoutTests/platform/chromium-gpu-mac/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt (91113 => 91114)
--- trunk/LayoutTests/platform/chromium-gpu-mac/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt 2011-07-15 21:24:32 UTC (rev 91113)
+++ trunk/LayoutTests/platform/chromium-gpu-mac/compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt 2011-07-15 21:54:20 UTC (rev 91114)
@@ -1,97 +0,0 @@
-top
-
-middlebottom
-top
-
-middlebottom
-(GraphicsLayer
- (bounds 785.00 2618.00)
- (children 1
- (GraphicsLayer
- (bounds 785.00 2618.00)
- (children 9
- (GraphicsLayer
- (position 21.00 21.00)
- (bounds 100.00 100.00)
- )
- (GraphicsLayer
- (position 18.00 10.00)
- (bounds 220.00 220.00)
- (drawsContent 1)
- )
- (GraphicsLayer
- (position 28.00 20.00)
- (bounds 200.00 200.00)
- (children 1
- (GraphicsLayer
- (bounds 110.00 200.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 28.00 20.00)
- (bounds 200.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 145.00)
- (bounds 68.00 28.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 28.00 20.00)
- (bounds 200.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 2058.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 18.00 240.00)
- (bounds 220.00 220.00)
- (drawsContent 1)
- (children 1
- (GraphicsLayer
- )
- )
- )
- (GraphicsLayer
- (position 28.00 250.00)
- (bounds 185.00 200.00)
- (children 1
- (GraphicsLayer
- (bounds 110.00 200.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 28.00 250.00)
- (bounds 185.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 145.00)
- (bounds 68.00 28.00)
- (drawsContent 1)
- )
- )
- )
- (GraphicsLayer
- (position 28.00 250.00)
- (bounds 185.00 200.00)
- (children 1
- (GraphicsLayer
- (position 5.00 2058.00)
- (drawsContent 1)
- )
- )
- )
- )
- )
- )
-)
-
Modified: trunk/Source/WebCore/ChangeLog (91113 => 91114)
--- trunk/Source/WebCore/ChangeLog 2011-07-15 21:24:32 UTC (rev 91113)
+++ trunk/Source/WebCore/ChangeLog 2011-07-15 21:54:20 UTC (rev 91114)
@@ -1,3 +1,16 @@
+2011-06-27 Adrienne Walker <[email protected]>
+
+ Reviewed by Simon Fraser.
+
+ Overlap map for compositing needs to consider clipping
+ https://bugs.webkit.org/show_bug.cgi?id=63493
+
+ Test: compositing/layer-creation/overlap-clipping.html
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::addToOverlapMap):
+ * rendering/RenderLayerCompositor.h:
+
2011-07-15 Sheriff Bot <[email protected]>
Unreviewed, rolling out r90592.
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (91113 => 91114)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2011-07-15 21:24:32 UTC (rev 91113)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2011-07-15 21:54:20 UTC (rev 91114)
@@ -566,7 +566,9 @@
boundsComputed = true;
}
- overlapMap.add(layer, layerBounds);
+ IntRect clipRect = layer->backgroundClipRect(rootRenderLayer(), true);
+ clipRect.intersect(layerBounds);
+ overlapMap.add(layer, clipRect);
}
void RenderLayerCompositor::addToOverlapMapRecursive(OverlapMap& overlapMap, RenderLayer* layer)
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (91113 => 91114)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2011-07-15 21:24:32 UTC (rev 91113)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2011-07-15 21:54:20 UTC (rev 91114)
@@ -217,7 +217,7 @@
void recursiveRepaintLayerRect(RenderLayer* layer, const IntRect& rect);
typedef HashMap<RenderLayer*, IntRect> OverlapMap;
- static void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed);
+ void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed);
void addToOverlapMapRecursive(OverlapMap&, RenderLayer*);
static bool overlapsCompositedLayers(OverlapMap&, const IntRect& layerBounds);