Skip to content

Commit

Permalink
Bug 1363483 - Add nsDisplayTableBackgroundColor to avoid display item…
Browse files Browse the repository at this point in the history
… collision when processing background color of table. r=mattwoodrow

MozReview-Commit-ID: JlYqyRGvtq3

UltraBlame original commit: efdda23fd13d44093c45cf8eabfc67eeab608f18
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent 8e28499 commit f4e6676
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 0 deletions.
38 changes: 38 additions & 0 deletions layout/painting/nsDisplayList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16713,6 +16713,43 @@ useWillPaintBorderOptimization
)
;
}
if
(
aSecondaryReferenceFrame
)
{
bgItemList
.
AppendNewToTop
(
new
(
aBuilder
)
nsDisplayTableBackgroundColor
(
aBuilder
aSecondaryReferenceFrame
bgRect
bg
drawBackgroundColor
?
color
:
NS_RGBA
(
0
0
0
0
)
aFrame
)
)
;
}
else
{
bgItemList
.
AppendNewToTop
Expand Down Expand Up @@ -16742,6 +16779,7 @@ NS_RGBA
)
;
}
}
if
(
isThemed
Expand Down
87 changes: 87 additions & 0 deletions layout/painting/nsDisplayList.h
Original file line number Diff line number Diff line change
Expand Up @@ -10230,6 +10230,93 @@ 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
Expand Down

0 comments on commit f4e6676

Please sign in to comment.