diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-01 06:20:05 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-01 06:20:05 +0100 |
commit | 0f001155aa004f1a6679f386d49f64306fb54ab1 (patch) | |
tree | 9d57fa8af755a84698e9ca6cef7e9b0cc21341ae /layout/base/nsDisplayList.h | |
parent | a2a84fcb26e04d8d4280b0f9144fb8359e99b49e (diff) | |
download | UXP-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.h')
-rw-r--r-- | layout/base/nsDisplayList.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index e9047b113..9cee7b517 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -3015,6 +3015,27 @@ protected: 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 { public: |