Title: [114509] trunk
- Revision
- 114509
- Author
- [email protected]
- Date
- 2012-04-18 09:17:04 -0700 (Wed, 18 Apr 2012)
Log Message
ASSERT when a layer with a foreground layer is in 'paint into ancestor' mode
https://bugs.webkit.org/show_bug.cgi?id=84221
Source/WebCore:
Reviewed by Dean Jackson.
When a RenderLayerBacking doesn't require its own backing store, and is
in "paintIntoCompositingAncestor" mode, we would assert when trying to
paint its m_foregroundLayer if it had one (because of a negative z-index child).
The fix is to set the 'drawsContent' state on the m_foregroundLayer
as well as m_graphicsLayer.
Test: compositing/backing/no-backing-foreground-layer.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDrawsContent):
LayoutTests:
Reviewed by Dean Jackson.
New testcase.
* compositing/backing/no-backing-foreground-layer-expected.txt: Added.
* compositing/backing/no-backing-foreground-layer.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (114508 => 114509)
--- trunk/LayoutTests/ChangeLog 2012-04-18 16:14:03 UTC (rev 114508)
+++ trunk/LayoutTests/ChangeLog 2012-04-18 16:17:04 UTC (rev 114509)
@@ -1,3 +1,15 @@
+2012-04-18 Simon Fraser <[email protected]>
+
+ ASSERT when a layer with a foreground layer is in 'paint into ancestor' mode
+ https://bugs.webkit.org/show_bug.cgi?id=84221
+
+ Reviewed by Dean Jackson.
+
+ New testcase.
+
+ * compositing/backing/no-backing-foreground-layer-expected.txt: Added.
+ * compositing/backing/no-backing-foreground-layer.html: Added.
+
2012-04-18 Simon Pena <[email protected]>
[GTK] r114021 triggered media flakyness
Added: trunk/LayoutTests/compositing/backing/no-backing-foreground-layer-expected.txt (0 => 114509)
--- trunk/LayoutTests/compositing/backing/no-backing-foreground-layer-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/backing/no-backing-foreground-layer-expected.txt 2012-04-18 16:17:04 UTC (rev 114509)
@@ -0,0 +1,3 @@
+This test should not ASSERT in debug builds.
+
+
Added: trunk/LayoutTests/compositing/backing/no-backing-foreground-layer.html (0 => 114509)
--- trunk/LayoutTests/compositing/backing/no-backing-foreground-layer.html (rev 0)
+++ trunk/LayoutTests/compositing/backing/no-backing-foreground-layer.html 2012-04-18 16:17:04 UTC (rev 114509)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .container {
+ position: relative;
+ overflow: hidden;
+ height: 190px;
+ width: 200px;
+ border: 1px solid black;
+ z-index: 0;
+ }
+
+ .box {
+ height: 100px;
+ width: 100px;
+ margin: -10px;
+ background-color: blue;
+ }
+
+ .behind {
+ position: absolute;
+ top: 0;
+ z-index: -1;
+ }
+
+ .composited {
+ position: absolute;
+ top: 50px;
+ -webkit-transform: translateZ(0);
+ background-color: green;
+ }
+ </style>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ </script>
+</head>
+<body>
+ <p>This test should not ASSERT in debug builds.</p>
+ <div class="container">
+ <div class="behind box"></div>
+ <div class="composited box"></div>
+ </div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (114508 => 114509)
--- trunk/Source/WebCore/ChangeLog 2012-04-18 16:14:03 UTC (rev 114508)
+++ trunk/Source/WebCore/ChangeLog 2012-04-18 16:17:04 UTC (rev 114509)
@@ -1,3 +1,22 @@
+2012-04-18 Simon Fraser <[email protected]>
+
+ ASSERT when a layer with a foreground layer is in 'paint into ancestor' mode
+ https://bugs.webkit.org/show_bug.cgi?id=84221
+
+ Reviewed by Dean Jackson.
+
+ When a RenderLayerBacking doesn't require its own backing store, and is
+ in "paintIntoCompositingAncestor" mode, we would assert when trying to
+ paint its m_foregroundLayer if it had one (because of a negative z-index child).
+
+ The fix is to set the 'drawsContent' state on the m_foregroundLayer
+ as well as m_graphicsLayer.
+
+ Test: compositing/backing/no-backing-foreground-layer.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateDrawsContent):
+
2012-04-18 Yury Semikhatsky <[email protected]>
Web Inspector: DataGrid should use explicit root node
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (114508 => 114509)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-04-18 16:14:03 UTC (rev 114508)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-04-18 16:17:04 UTC (rev 114509)
@@ -606,7 +606,12 @@
void RenderLayerBacking::updateDrawsContent()
{
- m_graphicsLayer->setDrawsContent(containsPaintedContent());
+ bool hasPaintedContent = containsPaintedContent();
+
+ // FIXME: we could refine this to only allocate backing for one of these layers if possible.
+ m_graphicsLayer->setDrawsContent(hasPaintedContent);
+ if (m_foregroundLayer)
+ m_foregroundLayer->setDrawsContent(hasPaintedContent);
}
// Return true if the layers changed.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes