summaryrefslogtreecommitdiffstats
path: root/layout/base/nsDisplayList.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-12-01 06:20:05 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-12-01 06:20:05 +0100
commit0f001155aa004f1a6679f386d49f64306fb54ab1 (patch)
tree9d57fa8af755a84698e9ca6cef7e9b0cc21341ae /layout/base/nsDisplayList.cpp
parenta2a84fcb26e04d8d4280b0f9144fb8359e99b49e (diff)
downloadUXP-0f001155aa004f1a6679f386d49f64306fb54ab1.tar
UXP-0f001155aa004f1a6679f386d49f64306fb54ab1.tar.gz
UXP-0f001155aa004f1a6679f386d49f64306fb54ab1.tar.lz
UXP-0f001155aa004f1a6679f386d49f64306fb54ab1.tar.xz
UXP-0f001155aa004f1a6679f386d49f64306fb54ab1.zip
Issue #1308 - Create nsDisplayTableBackgroundColor to avoid display
list collisions when processing the background color of a table. This is effectively #146 Part 3c to go along with the other 2 there. This resolves #1308.
Diffstat (limited to 'layout/base/nsDisplayList.cpp')
-rw-r--r--layout/base/nsDisplayList.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp
index 1579e6970..8a34d108f 100644
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -2703,9 +2703,22 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
bg->BottomLayer(), bgRect,
useWillPaintBorderOptimization);
}
- bgItemList.AppendNewToTop(
- new (aBuilder) nsDisplayBackgroundColor(aBuilder, aFrame, bgRect, bg,
- drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0)));
+ if (aSecondaryReferenceFrame) {
+ bgItemList.AppendNewToTop(
+ new (aBuilder) nsDisplayTableBackgroundColor(aBuilder,
+ aSecondaryReferenceFrame,
+ bgRect,
+ bg,
+ drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0),
+ aFrame));
+ } else {
+ bgItemList.AppendNewToTop(
+ new (aBuilder) nsDisplayBackgroundColor(aBuilder,
+ aFrame,
+ bgRect,
+ bg,
+ drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0)));
+ }
}
if (isThemed) {