Bug 1394226 - Correct z-ordering for some table parts. r=dbaron

MozReview-Commit-ID: IdLhMGDmQag
This commit is contained in:
Morris Tseng 2017-09-21 14:42:44 +08:00
Родитель b233faee80
Коммит 88f5bda1d6
2 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -1605,6 +1605,8 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
}
}
aFrame->DisplayOutline(aBuilder, aLists);
aTraversal(aBuilder, aFrame, aLists);
if (isVisible) {
@ -1625,8 +1627,6 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
}
}
}
aFrame->DisplayOutline(aBuilder, aLists);
}
// table paint code is concerned primarily with borders and bg color

Просмотреть файл

@ -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());