mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 12:15:33 +00:00
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 : ce6fbf882f00d7c3ceb7f149bb6e9cb21ed6f74d
This commit is contained in:
parent
8868e9761e
commit
f12ff30dc6
@ -1565,11 +1565,13 @@ 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 (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)));
|
||||
}
|
||||
|
||||
// Passing bg == nullptr in this macro will result in one iteration with
|
||||
// i = 0.
|
||||
|
Loading…
Reference in New Issue
Block a user