Create nsDisplayTableBackgroundColor...
parent
ec60efd232
commit
d34f19407a
|
@ -2703,9 +2703,22 @@ nsDisplayBackgroundImage::AppendBackgroundItemsToTop(nsDisplayListBuilder* aBuil
|
||||||
bg->BottomLayer(), bgRect,
|
bg->BottomLayer(), bgRect,
|
||||||
useWillPaintBorderOptimization);
|
useWillPaintBorderOptimization);
|
||||||
}
|
}
|
||||||
bgItemList.AppendNewToTop(
|
if (aSecondaryReferenceFrame) {
|
||||||
new (aBuilder) nsDisplayBackgroundColor(aBuilder, aFrame, bgRect, bg,
|
bgItemList.AppendNewToTop(
|
||||||
drawBackgroundColor ? color : NS_RGBA(0, 0, 0, 0)));
|
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) {
|
if (isThemed) {
|
||||||
|
|
|
@ -3015,6 +3015,27 @@ protected:
|
||||||
mozilla::gfx::Color mColor;
|
mozilla::gfx::Color mColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class nsDisplayTableBackgroundColor : public nsDisplayBackgroundColor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
nsDisplayTableBackgroundColor(nsDisplayListBuilder* aBuilder,
|
||||||
|
nsIFrame* aFrame,
|
||||||
|
const nsRect& aBackgroundRect,
|
||||||
|
const nsStyleBackground* aBackgroundStyle,
|
||||||
|
nscolor aColor,
|
||||||
|
nsIFrame* aAncestorFrame)
|
||||||
|
: nsDisplayBackgroundColor(aBuilder, aFrame, aBackgroundRect, aBackgroundStyle, aColor)
|
||||||
|
, mTableType(GetTableTypeFromFrame(aAncestorFrame))
|
||||||
|
{ }
|
||||||
|
|
||||||
|
virtual uint32_t GetPerFrameKey() override {
|
||||||
|
return (static_cast<uint8_t>(mTableType) << nsDisplayItem::TYPE_BITS) |
|
||||||
|
nsDisplayItem::GetPerFrameKey();
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
TableType mTableType;
|
||||||
|
};
|
||||||
|
|
||||||
class nsDisplayClearBackground : public nsDisplayItem
|
class nsDisplayClearBackground : public nsDisplayItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue