Bug 828146. Ensure nsDisplayBackgroundImage::ComputeInvalidationRegion invalidates something for nsDisplayBackgroundImages which are themed. r=mattwoodrow

--HG--
extra : rebase_source : 1050ffe991aed624958b9cb63f142a76a34fc67d
This commit is contained in:
Robert O'Callahan 2013-02-01 17:09:32 +13:00
Родитель 7880070173
Коммит 5e332dc349
3 изменённых файлов: 24 добавлений и 1 удалений

Просмотреть файл

@ -2065,6 +2065,9 @@ nsDisplayBackgroundImage::IsVaryingRelativeToMovingFrame(nsDisplayListBuilder* a
nsRect
nsDisplayBackgroundImage::GetPositioningArea()
{
if (mIsThemed) {
return nsRect(ToReferenceFrame(), mFrame->GetSize());
}
if (!mBackgroundStyle) {
return nsRect();
}
@ -2138,7 +2141,7 @@ void nsDisplayBackgroundImage::ComputeInvalidationRegion(nsDisplayListBuilder* a
const nsDisplayItemGeometry* aGeometry,
nsRegion* aInvalidRegion)
{
if (!mBackgroundStyle) {
if (!mIsThemed && !mBackgroundStyle) {
return;
}

Просмотреть файл

@ -0,0 +1,6 @@
<!DOCTYPE HTML>
<html>
<body>
<div style="width:100px; height:100px; position:relative; top:60px; -moz-appearance:button"></div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,14 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<body>
<div id="b" style="width:100px; height:100px; position:relative; top:50px; -moz-appearance:button"></div>
<script>
var b = document.getElementById("b");
function doTest() {
b.style.top = "60px";
document.documentElement.removeAttribute("class");
}
window.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</body>
</html>