summaryrefslogtreecommitdiffstats
path: root/layout/tables
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-05-15 15:24:42 +0200
committerGitHub <noreply@github.com>2020-05-15 15:24:42 +0200
commit9cf4eca9a895de24c58a3f309bfc5869e4649ff4 (patch)
tree3f3a2dcc96001e389ec6e3d9f9a1d04e0287ebea /layout/tables
parentf38ebb5f44a7f95bc61db5d7ce050e6d30ab72bf (diff)
parentca50a57545a3ef3a9aded85a9dc17f6a4ee1ebb9 (diff)
downloadUXP-9cf4eca9a895de24c58a3f309bfc5869e4649ff4.tar
UXP-9cf4eca9a895de24c58a3f309bfc5869e4649ff4.tar.gz
UXP-9cf4eca9a895de24c58a3f309bfc5869e4649ff4.tar.lz
UXP-9cf4eca9a895de24c58a3f309bfc5869e4649ff4.tar.xz
UXP-9cf4eca9a895de24c58a3f309bfc5869e4649ff4.zip
Merge pull request #1548 from win7-7/1394226-pr
Correct z-ordering for some table parts
Diffstat (limited to 'layout/tables')
-rw-r--r--layout/tables/nsTableWrapperFrame.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/layout/tables/nsTableWrapperFrame.cpp b/layout/tables/nsTableWrapperFrame.cpp
index 476024e96..86f032218 100644
--- a/layout/tables/nsTableWrapperFrame.cpp
+++ b/layout/tables/nsTableWrapperFrame.cpp
@@ -187,8 +187,11 @@ nsTableWrapperFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
BuildDisplayListForChild(aBuilder, mCaptionFrames.FirstChild(), captionSet);
// Now we have to sort everything by content order, since the caption
- // may be somewhere inside the table
- set.BlockBorderBackgrounds()->SortByContentOrder(GetContent());
+ // may be somewhere inside the table.
+ // We don't sort BlockBorderBackgrounds and BorderBackgrounds because the
+ // display items in those lists should stay out of content order in order to
+ // follow the rules in https://www.w3.org/TR/CSS21/zindex.html#painting-order
+ // and paint the caption background after all of the rest.
set.Floats()->SortByContentOrder(GetContent());
set.Content()->SortByContentOrder(GetContent());
set.PositionedDescendants()->SortByContentOrder(GetContent());