Commit c0fc313a authored by simon.fraser@apple.com's avatar simon.fraser@apple.com
Browse files

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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a2d33a01
2012-04-18 Simon Fraser <simon.fraser@apple.com>
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 <spena@igalia.com>
 
[GTK] r114021 triggered media flakyness
<!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>
2012-04-18 Simon Fraser <simon.fraser@apple.com>
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 <yurys@chromium.org>
 
Web Inspector: DataGrid should use explicit root node
......@@ -606,7 +606,12 @@ void RenderLayerBacking::updateInternalHierarchy()
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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment