Bug 581317. DoApplyRenderingChangeToTree needs to invalidate the ThebesLayer contents of descendants. r=tnikkel

This commit is contained in:
Robert O'Callahan 2010-08-02 15:06:58 +12:00
parent 1524120859
commit 5286b29597
4 changed files with 63 additions and 0 deletions

View File

@ -7622,6 +7622,11 @@ UpdateViewsForTree(nsIFrame* aFrame, nsIViewManager* aViewManager,
DoApplyRenderingChangeToTree(child, aViewManager,
aFrameManager, aChange);
} else { // regular frame
if ((child->GetStateBits() & NS_FRAME_HAS_CONTAINER_LAYER) &&
(aChange & nsChangeHint_RepaintFrame)) {
FrameLayerBuilder::InvalidateThebesLayerContents(child,
child->GetOverflowRectRelativeToSelf());
}
UpdateViewsForTree(child, aViewManager, aFrameManager, aChange);
}
}

View File

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<html>
<head>
<style>
#d { width:200px; border:10px solid rgba(200,200,200,0.99); }
#e { width:200px; height:200px; opacity:0.99; background-color:rgb(200,200,200); }
#f { width:200px; height:10px; opacity:0.8; }
</style>
</head>
<body>
<div id="d">
<div id="e">
<div style="width:10px; height:10px; background:yellow;"></div>
<div id="f">
<div style="width:10px; height:10px; background:blue;"></div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,37 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<style>
#d { width:200px; }
#e { width:200px; height:200px; opacity:0.99; }
#f { width:200px; height:10px; }
</style>
</head>
<body onload="step()">
<div id="d">
<div id="e">
<div style="width:10px; height:10px; background:yellow;"></div>
<div id="f">
<div style="width:10px; height:10px; background:blue;"></div>
</div>
</div>
</div>
<script>
var d = document.getElementById("d");
var e = document.getElementById("e");
var f = document.getElementById("f");
var v = 0;
function step() {
v += 40;
d.style.border = "10px solid rgba(" + v + "," + v + "," + v + ", 0.99)";
e.style.backgroundColor = "rgb(" + v + "," + v + "," + v + ")";
f.style.opacity = v/250.0;
if (v < 200) {
setTimeout(step, 50);
} else {
document.documentElement.removeAttribute("class");
}
}
</script>
</body>
</html>

View File

@ -1460,3 +1460,4 @@ random-if(!haveTestPlugin) == 546071-1.html 546071-1-ref.html
== 572598-1.html 572598-ref.html
== 574898-1.html 574898-ref.html
== 579349-1.html 579349-1-ref.html
== 581317-1.html 581317-1-ref.html