Bug 1964200 - Fix comments and assertion messages to reflect the removal of table caption list. r=dholbert
The caption child list is removed in bug 242829. Differential Revision: https://phabricator.services.mozilla.com/D247678
This commit is contained in:
committed by
aethanyc@gmail.com
parent
1324c3e46d
commit
90a4d3085e
@@ -2131,11 +2131,11 @@ nsIFrame* nsCSSFrameConstructor::ConstructTable(nsFrameConstructorState& aState,
|
||||
nsFrameList captionList;
|
||||
PullOutCaptionFrames(childList, captionList);
|
||||
|
||||
// Set the inner table frame's initial primary list
|
||||
// Set the inner table frame's principal child list.
|
||||
innerFrame->SetInitialChildList(FrameChildListID::Principal,
|
||||
std::move(childList));
|
||||
|
||||
// Set the table wrapper frame's secondary childlist lists
|
||||
// Append caption frames to the table wrapper frame's principal child list.
|
||||
if (captionList.NotEmpty()) {
|
||||
captionList.ApplySetParent(newFrame);
|
||||
newFrame->AppendFrames(FrameChildListID::Principal, std::move(captionList));
|
||||
@@ -6701,11 +6701,12 @@ void nsCSSFrameConstructor::ContentInserted(nsIContent* aChild,
|
||||
// pass the first node in the range to GetInsertionPrevSibling, and if
|
||||
// IsValidSibling (the only place GetInsertionPrevSibling might look at the
|
||||
// passed in node itself) needs to resolve style on the node we record this and
|
||||
// return that this range needs to be split up and inserted separately. Table
|
||||
// captions need extra attention as we need to determine where to insert them
|
||||
// in the caption list, while skipping any nodes in the range being inserted
|
||||
// (because when we treat the caption frames the other nodes have had their
|
||||
// frames constructed but not yet inserted into the frame tree).
|
||||
// return that this range needs to be split up and inserted separately.
|
||||
// Table captions require special handling, as we need to determine where to
|
||||
// insert them in the table wrapper frame's principal child list while skipping
|
||||
// any nodes in the range being inserted. This is because when we process the
|
||||
// caption frames, the other nodes have already had their frames constructed,
|
||||
// but those frames have not yet been inserted into the frame tree.
|
||||
void nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aStartChild,
|
||||
nsIContent* aEndChild,
|
||||
InsertionKind aInsertionKind) {
|
||||
@@ -7111,8 +7112,8 @@ void nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aStartChild,
|
||||
CheckForFirstLineInsertion(insertion.mParentFrame, captionList);
|
||||
}
|
||||
|
||||
// We might have captions; put them into the caption list of the
|
||||
// table wrapper frame.
|
||||
// We might have captions; put them into the principal child list of the table
|
||||
// wrapper frame.
|
||||
if (captionList.NotEmpty()) {
|
||||
NS_ASSERTION(LayoutFrameType::Table == frameType ||
|
||||
LayoutFrameType::TableWrapper == frameType,
|
||||
|
||||
@@ -1859,7 +1859,7 @@ nsIFrame* nsContainerFrame::GetFirstNonAnonBoxInSubtree(nsIFrame* aFrame) {
|
||||
// Otherwise, descend to its first child and repeat.
|
||||
|
||||
// SPECIAL CASE: if we're dealing with an anonymous table, then it might
|
||||
// be wrapping something non-anonymous in its caption or col-group lists
|
||||
// be wrapping something non-anonymous in its col-group list
|
||||
// (instead of its principal child list), so we have to look there.
|
||||
// (Note: For anonymous tables that have a non-anon cell *and* a non-anon
|
||||
// column, we'll always return the column. This is fine; we're really just
|
||||
|
||||
@@ -94,7 +94,7 @@ void nsTableWrapperFrame::AppendFrames(ChildListID aListID,
|
||||
// The inner frame is provided when we're initialized, and it cannot change
|
||||
MOZ_ASSERT(FrameChildListID::Principal == aListID, "unexpected child list");
|
||||
MOZ_ASSERT(aFrameList.IsEmpty() || aFrameList.FirstChild()->IsTableCaption(),
|
||||
"appending non-caption frame to captionList");
|
||||
"Why are we appending non-caption frames?");
|
||||
nsContainerFrame::AppendFrames(aListID, std::move(aFrameList));
|
||||
// The presence of caption frames makes us sort our display list differently,
|
||||
// so mark us as changed for the new ordering.
|
||||
@@ -106,7 +106,7 @@ void nsTableWrapperFrame::InsertFrames(
|
||||
const nsLineList::iterator* aPrevFrameLine, nsFrameList&& aFrameList) {
|
||||
MOZ_ASSERT(FrameChildListID::Principal == aListID, "unexpected child list");
|
||||
MOZ_ASSERT(aFrameList.IsEmpty() || aFrameList.FirstChild()->IsTableCaption(),
|
||||
"inserting non-caption frame");
|
||||
"Why are we inserting non-caption frames?");
|
||||
MOZ_ASSERT(!aPrevFrame || aPrevFrame->GetParent() == this,
|
||||
"inserting after sibling frame with different parent");
|
||||
nsContainerFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine,
|
||||
|
||||
Reference in New Issue
Block a user