☠☠ backed out by 66eaee2d8885 ☠ ☠ | |
author | Robert O'Callahan <robert@ocallahan.org> |
Wed, 28 Nov 2012 01:50:09 +1300 | |
changeset 114456 | 7aceff7124d9fed368c636dcdf7f4a99a5160611 |
parent 114455 | 12c06dee84cb27eb12ca7266ef598d0e95b73ca1 |
child 114457 | c94aecc61d74bef4029dd0b80746742ac22813a4 |
push id | 23917 |
push user | emorley@mozilla.com |
push date | Thu, 29 Nov 2012 14:20:29 +0000 |
treeherder | mozilla-central@c72d38e7a212 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mattwoodrow |
bugs | 815591 |
milestone | 20.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -1560,21 +1560,23 @@ nsDisplayBackgroundImage::AppendBackgrou nscolor color; if (!nsCSSRendering::IsCanvasFrame(aFrame) && bg) { bool drawBackgroundImage; color = nsCSSRendering::DetermineBackgroundColor(presContext, bgSC, aFrame, 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. bool backgroundSet = !aBackground; NS_FOR_VISIBLE_BACKGROUND_LAYERS_BACK_TO_FRONT(i, bg) { nsDisplayBackgroundImage* bgItem = new (aBuilder) nsDisplayBackgroundImage(aBuilder, aFrame, i, isThemed, bg); nsresult rv = aList->AppendNewToTop(bgItem);