Bug 1415152 - No need for AdjustAppendForAfter, since ::after is handled in FindNextSibling

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 07:20:50 -04:00 committed by Roy Tam
commit 40ada5fa00

View file

@ -6881,8 +6881,7 @@ nsCSSFrameConstructor::GetInsertionPrevSibling(InsertionPoint* aInsertion,
iter.Seek(aEndSkipChild);
iter.GetPreviousChild();
}
nsIFrame* nextSibling = FindNextSibling(iter, childDisplay);
if (nextSibling) {
if (nsIFrame* nextSibling = FindNextSibling(iter, childDisplay)) {
aInsertion->mParentFrame = nextSibling->GetParent()->GetContentInsertionFrame();
} else {
// No previous or next sibling, so treat this like an appended frame.
@ -6894,8 +6893,7 @@ nsCSSFrameConstructor::GetInsertionPrevSibling(InsertionPoint* aInsertion,
aInsertion->mParentFrame =
GetLastIBSplitSibling(aInsertion->mParentFrame, false);
}
// Get continuation that parents the last child. This MUST be done
// before the AdjustAppendParentForAfterContent call.
// Get continuation that parents the last child.
aInsertion->mParentFrame =
nsLayoutUtils::LastContinuationWithChild(aInsertion->mParentFrame);
// Deal with fieldsets
@ -6903,12 +6901,7 @@ nsCSSFrameConstructor::GetInsertionPrevSibling(InsertionPoint* aInsertion,
::GetAdjustedParentFrame(aInsertion->mParentFrame,
aInsertion->mParentFrame->GetType(),
aChild);
nsIFrame* appendAfterFrame;
aInsertion->mParentFrame =
::AdjustAppendParentForAfterContent(this, aInsertion->mContainer,
aInsertion->mParentFrame,
aChild, &appendAfterFrame);
prevSibling = ::FindAppendPrevSibling(aInsertion->mParentFrame, appendAfterFrame);
prevSibling = ::FindAppendPrevSibling(aInsertion->mParentFrame, nullptr);
}
}