From 21348b56d992e48d7a18259f95fc82edf53239d7 Mon Sep 17 00:00:00 2001 From: win7-7 Date: Wed, 13 May 2020 19:57:18 +0300 Subject: issue #1547 - Correct z-ordering for some table parts and add reftests --- layout/tables/nsTableWrapperFrame.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'layout/tables') 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()); -- cgit v1.2.3