Bug 1794035 Part 1 - Rename nsFrameList::ExtractHead to TakeFramesBefore. r=emilio

I feel it's hard to understand the purpose of ExtractHead(), especially where
aFrame is going after the call. Therefore, I rename it to TakeFramesBefore(),
and have it complement the existing RemoveFramesAfter(), which will be rename
later. No behavioral change intended.

Also, slightly reword the method's documentation to reflect the its new
name. (Remove the "sibling" wording from the comment since it's an
implementation details that frames are actually a doubly linked list.)

Differential Revision: https://phabricator.services.mozilla.com/D158806
This commit is contained in:
Ting-Yu Lin
2022-10-07 01:41:40 +00:00
parent 297569544b
commit 03f14da806
4 changed files with 15 additions and 14 deletions

View File

@@ -11036,7 +11036,7 @@ nsIFrame* nsCSSFrameConstructor::ConstructInline(
// has to be chopped into several pieces, as described above.
// Grab the first inline's kids
nsFrameList firstInlineKids = childList.ExtractHead(firstBlock);
nsFrameList firstInlineKids = childList.TakeFramesBefore(firstBlock);
newFrame->SetInitialChildList(kPrincipalList, firstInlineKids);
aFrameList.AppendFrame(nullptr, newFrame);