From 5e332dc34989d74183360cee539a77153c3ba08a Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Fri, 1 Feb 2013 17:09:32 +1300 Subject: [PATCH] Bug 828146. Ensure nsDisplayBackgroundImage::ComputeInvalidationRegion invalidates something for nsDisplayBackgroundImages which are themed. r=mattwoodrow --HG-- extra : rebase_source : 1050ffe991aed624958b9cb63f142a76a34fc67d --- layout/base/nsDisplayList.cpp | 5 ++++- layout/reftests/bugs/828146-1-ref.html | 6 ++++++ layout/reftests/bugs/828146-1.html | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 layout/reftests/bugs/828146-1-ref.html create mode 100644 layout/reftests/bugs/828146-1.html diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index d3c7ffbe6261..6e4d05c67885 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -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; } diff --git a/layout/reftests/bugs/828146-1-ref.html b/layout/reftests/bugs/828146-1-ref.html new file mode 100644 index 000000000000..f5ec280a992b --- /dev/null +++ b/layout/reftests/bugs/828146-1-ref.html @@ -0,0 +1,6 @@ + + + +
+ + diff --git a/layout/reftests/bugs/828146-1.html b/layout/reftests/bugs/828146-1.html new file mode 100644 index 000000000000..e196c5f8c88e --- /dev/null +++ b/layout/reftests/bugs/828146-1.html @@ -0,0 +1,14 @@ + + + +
+ + +