Bug 815591. Don't build nsDisplayBackgroundColor if there is no background color and we're not going to do hit-testing. r=mattwoodrow

--HG--
extra : rebase_source : 1e7055649266621e72cbd669949c3d30a32980a2
This commit is contained in:
Robert O'Callahan 2012-11-28 01:50:09 +13:00
parent 518d6183da
commit 5d01e9b871
2 changed files with 9 additions and 6 deletions

View File

@ -1605,11 +1605,14 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
drawBackgroundImage, drawBackgroundColor);
}
// Even if we don't actually have a background color to paint, we still need
// to create the item because it's used for hit testing.
aList->AppendNewToTop(
new (aBuilder) nsDisplayBackgroundColor(aBuilder, aFrame, bg,
drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0)));
// Even if we don't actually have a background color to paint, we may still need
// to create an item for hit testing.
if ((drawBackgroundColor && color != NS_RGBA(0,0,0,0)) ||
aBuilder->IsForEventDelivery()) {
aList->AppendNewToTop(
new (aBuilder) nsDisplayBackgroundColor(aBuilder, aFrame, bg,
drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0)));
}
if (isThemed) {
nsDisplayBackgroundImage* bgItem =

View File

@ -124,7 +124,7 @@ fuzzy-if(!contentSameGfxBackendAsCanvas,2,20000) fails-if(Android) == aja-linear
fuzzy-if(!contentSameGfxBackendAsCanvas,2,16477) fails-if(Android) == aja-linear-6a.html aja-linear-6-ref.html # bug 526708
fails == aja-linear-6b.html aja-linear-6-ref.html # bug 522607
skip-if(B2G) == height-dependence-1.html height-dependence-1-ref.html
skip-if(B2G) == height-dependence-2.html height-dependence-2-ref.html
skip-if(B2G) fuzzy-if(cocoaWidget,1,4000) == height-dependence-2.html height-dependence-2-ref.html
skip-if(B2G) == height-dependence-3.html height-dependence-3-ref.html
fails-if(d2d) == linear-onestopposition-1.html linear-onestopposition-1-ref.html # bug 638664