From ce547cd6f50879c6dcdbff19a28f96944ec753ff Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Wed, 17 Jul 2019 23:34:45 +0000 Subject: [PATCH] Bug 1566945 - Add a parameter to nsContainerFrame::InsertFrames for aPrevFrame's line box. r=dholbert For now, always pass null, except when passing it through from one overload to another. Differential Revision: https://phabricator.services.mozilla.com/D38389 --HG-- extra : moz-landing-system : lando --- layout/base/nsBidiPresUtils.cpp | 8 +++++--- layout/base/nsCSSFrameConstructor.cpp | 5 +++-- layout/base/nsFrameManager.cpp | 2 +- layout/forms/nsFieldSetFrame.cpp | 1 + layout/forms/nsFieldSetFrame.h | 1 + layout/forms/nsHTMLButtonControlFrame.cpp | 6 +++--- layout/forms/nsHTMLButtonControlFrame.h | 1 + layout/generic/ColumnSetWrapperFrame.cpp | 8 ++++---- layout/generic/ColumnSetWrapperFrame.h | 1 + layout/generic/ViewportFrame.cpp | 4 +++- layout/generic/ViewportFrame.h | 1 + layout/generic/moz.build | 1 + layout/generic/nsBlockFrame.cpp | 1 + layout/generic/nsBlockFrame.h | 1 + layout/generic/nsCanvasFrame.cpp | 1 + layout/generic/nsCanvasFrame.h | 1 + layout/generic/nsColumnSetFrame.cpp | 1 + layout/generic/nsColumnSetFrame.h | 1 + layout/generic/nsContainerFrame.cpp | 1 + layout/generic/nsContainerFrame.h | 4 ++++ layout/generic/nsFirstLetterFrame.cpp | 2 +- layout/generic/nsGfxScrollFrame.cpp | 4 +++- layout/generic/nsGfxScrollFrame.h | 2 ++ layout/generic/nsGridContainerFrame.cpp | 9 +++++---- layout/generic/nsGridContainerFrame.h | 1 + layout/generic/nsRubyTextContainerFrame.cpp | 9 +++++---- layout/generic/nsRubyTextContainerFrame.h | 1 + layout/generic/nsTextFrame.cpp | 2 +- layout/mathml/nsMathMLContainerFrame.cpp | 6 +++--- layout/mathml/nsMathMLContainerFrame.h | 8 ++++++-- layout/mathml/nsMathMLTokenFrame.cpp | 8 +++++--- layout/mathml/nsMathMLTokenFrame.h | 1 + layout/mathml/nsMathMLmtableFrame.h | 7 +++++-- layout/svg/nsSVGContainerFrame.cpp | 17 +++++++++-------- layout/svg/nsSVGContainerFrame.h | 2 ++ layout/tables/nsTableCellFrame.cpp | 1 + layout/tables/nsTableCellFrame.h | 1 + layout/tables/nsTableColGroupFrame.cpp | 6 +++--- layout/tables/nsTableColGroupFrame.h | 1 + layout/tables/nsTableFrame.cpp | 1 + layout/tables/nsTableFrame.h | 1 + layout/tables/nsTableRowFrame.cpp | 1 + layout/tables/nsTableRowFrame.h | 1 + layout/tables/nsTableRowGroupFrame.cpp | 6 +++--- layout/tables/nsTableRowGroupFrame.h | 1 + layout/tables/nsTableWrapperFrame.cpp | 6 +++--- layout/tables/nsTableWrapperFrame.h | 1 + layout/xul/nsBoxFrame.cpp | 1 + layout/xul/nsBoxFrame.h | 1 + layout/xul/nsMenuFrame.cpp | 3 ++- layout/xul/nsMenuFrame.h | 1 + layout/xul/nsPopupSetFrame.cpp | 3 ++- layout/xul/nsPopupSetFrame.h | 1 + layout/xul/nsRootBoxFrame.cpp | 2 ++ layout/xul/nsSliderFrame.cpp | 3 ++- layout/xul/nsSliderFrame.h | 1 + 56 files changed, 117 insertions(+), 55 deletions(-) diff --git a/layout/base/nsBidiPresUtils.cpp b/layout/base/nsBidiPresUtils.cpp index 34a1f7eee11a..d5ea959db677 100644 --- a/layout/base/nsBidiPresUtils.cpp +++ b/layout/base/nsBidiPresUtils.cpp @@ -512,12 +512,14 @@ static nsresult SplitInlineAncestors(nsContainerFrame* aParent, } // The parent's continuation adopts the siblings after the split. - newParent->InsertFrames(nsIFrame::kNoReflowPrincipalList, nullptr, tail); + newParent->InsertFrames(nsIFrame::kNoReflowPrincipalList, nullptr, + nullptr, tail); // The list name kNoReflowPrincipalList would indicate we don't want // reflow nsFrameList temp(newParent, newParent); - grandparent->InsertFrames(nsIFrame::kNoReflowPrincipalList, parent, temp); + grandparent->InsertFrames(nsIFrame::kNoReflowPrincipalList, parent, + nullptr, temp); } frame = parent; @@ -603,7 +605,7 @@ static nsresult CreateContinuation(nsIFrame* aFrame, nsIFrame** aNewFrame, // The list name kNoReflowPrincipalList would indicate we don't want reflow // XXXbz this needs higher-level framelist love nsFrameList temp(*aNewFrame, *aNewFrame); - parent->InsertFrames(nsIFrame::kNoReflowPrincipalList, aFrame, temp); + parent->InsertFrames(nsIFrame::kNoReflowPrincipalList, aFrame, nullptr, temp); if (!aIsFluid) { // Split inline ancestor frames diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index eb907507b576..bd2a9e4fc81b 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -10229,7 +10229,8 @@ void nsCSSFrameConstructor::WrapFramesInFirstLetterFrame( RemoveFrame(kPrincipalList, textFrame); // Insert in the letter frame(s) - parentFrame->InsertFrames(kPrincipalList, prevFrame, letterFrames); + parentFrame->InsertFrames(kPrincipalList, prevFrame, nullptr, + letterFrames); } } } @@ -10518,7 +10519,7 @@ void nsCSSFrameConstructor::RecoverLetterFrames(nsContainerFrame* aBlockFrame) { RemoveFrame(kPrincipalList, textFrame); // Insert in the letter frame(s) - parentFrame->InsertFrames(kPrincipalList, prevFrame, letterFrames); + parentFrame->InsertFrames(kPrincipalList, prevFrame, nullptr, letterFrames); } } diff --git a/layout/base/nsFrameManager.cpp b/layout/base/nsFrameManager.cpp index c5c08bc8f14d..623d95de5d69 100644 --- a/layout/base/nsFrameManager.cpp +++ b/layout/base/nsFrameManager.cpp @@ -86,7 +86,7 @@ void nsFrameManager::InsertFrames(nsContainerFrame* aParentFrame, aParentFrame->GetAbsoluteContainingBlock()->InsertFrames( aParentFrame, aListID, aPrevFrame, aFrameList); } else { - aParentFrame->InsertFrames(aListID, aPrevFrame, aFrameList); + aParentFrame->InsertFrames(aListID, aPrevFrame, nullptr, aFrameList); } } diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index c4ab90288a6e..96baf8be500c 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -672,6 +672,7 @@ void nsFieldSetFrame::AppendFrames(ChildListID aListID, } void nsFieldSetFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { MOZ_CRASH("nsFieldSetFrame::InsertFrames not supported"); } diff --git a/layout/forms/nsFieldSetFrame.h b/layout/forms/nsFieldSetFrame.h index 03fb6606e69f..5485c10ed5c5 100644 --- a/layout/forms/nsFieldSetFrame.h +++ b/layout/forms/nsFieldSetFrame.h @@ -54,6 +54,7 @@ class nsFieldSetFrame final : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; #endif diff --git a/layout/forms/nsHTMLButtonControlFrame.cpp b/layout/forms/nsHTMLButtonControlFrame.cpp index a1e9401b2179..af7bef25e247 100644 --- a/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/layout/forms/nsHTMLButtonControlFrame.cpp @@ -393,9 +393,9 @@ void nsHTMLButtonControlFrame::AppendFrames(ChildListID aListID, MOZ_CRASH("unsupported operation"); } -void nsHTMLButtonControlFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void nsHTMLButtonControlFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { MOZ_CRASH("unsupported operation"); } diff --git a/layout/forms/nsHTMLButtonControlFrame.h b/layout/forms/nsHTMLButtonControlFrame.h index 189a4a2e8632..b8ce1d9081a4 100644 --- a/layout/forms/nsHTMLButtonControlFrame.h +++ b/layout/forms/nsHTMLButtonControlFrame.h @@ -63,6 +63,7 @@ class nsHTMLButtonControlFrame : public nsContainerFrame, virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; #endif diff --git a/layout/generic/ColumnSetWrapperFrame.cpp b/layout/generic/ColumnSetWrapperFrame.cpp index cb9945974384..9a7735f74b71 100644 --- a/layout/generic/ColumnSetWrapperFrame.cpp +++ b/layout/generic/ColumnSetWrapperFrame.cpp @@ -127,11 +127,11 @@ void ColumnSetWrapperFrame::AppendFrames(ChildListID aListID, #endif } -void ColumnSetWrapperFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void ColumnSetWrapperFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { MOZ_ASSERT_UNREACHABLE("Unsupported operation!"); - nsBlockFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsBlockFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, aFrameList); } void ColumnSetWrapperFrame::RemoveFrame(ChildListID aListID, diff --git a/layout/generic/ColumnSetWrapperFrame.h b/layout/generic/ColumnSetWrapperFrame.h index fac29e838af1..599ec2d462f1 100644 --- a/layout/generic/ColumnSetWrapperFrame.h +++ b/layout/generic/ColumnSetWrapperFrame.h @@ -48,6 +48,7 @@ class ColumnSetWrapperFrame final : public nsBlockFrame { void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/generic/ViewportFrame.cpp b/layout/generic/ViewportFrame.cpp index 8fa89f02d022..e883d9330416 100644 --- a/layout/generic/ViewportFrame.cpp +++ b/layout/generic/ViewportFrame.cpp @@ -179,10 +179,12 @@ void ViewportFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { } void ViewportFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); NS_ASSERTION(GetChildList(aListID).IsEmpty(), "Shouldn't have any kids!"); - nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsContainerFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, + aFrameList); } void ViewportFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { diff --git a/layout/generic/ViewportFrame.h b/layout/generic/ViewportFrame.h index 0c85adcc49f6..0ecbf3e88ceb 100644 --- a/layout/generic/ViewportFrame.h +++ b/layout/generic/ViewportFrame.h @@ -43,6 +43,7 @@ class ViewportFrame : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; #endif diff --git a/layout/generic/moz.build b/layout/generic/moz.build index 9635e02955cc..dbdbe32a7486 100644 --- a/layout/generic/moz.build +++ b/layout/generic/moz.build @@ -110,6 +110,7 @@ EXPORTS += [ 'nsIScrollableFrame.h', 'nsIScrollPositionListener.h', 'nsIStatefulFrame.h', + 'nsLineBox.h', 'nsPageSequenceFrame.h', 'nsPluginFrame.h', 'nsQueryFrame.h', diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index eac7105a078f..c5172d046354 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -5348,6 +5348,7 @@ void nsBlockFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { } void nsBlockFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, "inserting after sibling frame with different parent"); diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h index cd3ebdf7abd1..6511fd018d2c 100644 --- a/layout/generic/nsBlockFrame.h +++ b/layout/generic/nsBlockFrame.h @@ -115,6 +115,7 @@ class nsBlockFrame : public nsContainerFrame { nsFrameList& aChildList) override; void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; const nsFrameList& GetChildList(ChildListID aListID) const override; diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp index 361d7e79a408..3a31708ff16d 100644 --- a/layout/generic/nsCanvasFrame.cpp +++ b/layout/generic/nsCanvasFrame.cpp @@ -268,6 +268,7 @@ void nsCanvasFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { } void nsCanvasFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { // Because we only support a single child frame inserting is the same // as appending diff --git a/layout/generic/nsCanvasFrame.h b/layout/generic/nsCanvasFrame.h index 6f023d269584..3198657941ec 100644 --- a/layout/generic/nsCanvasFrame.h +++ b/layout/generic/nsCanvasFrame.h @@ -57,6 +57,7 @@ class nsCanvasFrame final : public nsContainerFrame, virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; #ifdef DEBUG virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index 7b3ec034d70a..a6458a275f21 100644 --- a/layout/generic/nsColumnSetFrame.cpp +++ b/layout/generic/nsColumnSetFrame.cpp @@ -1302,6 +1302,7 @@ void nsColumnSetFrame::AppendFrames(ChildListID aListID, } void nsColumnSetFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { MOZ_CRASH("unsupported operation"); } diff --git a/layout/generic/nsColumnSetFrame.h b/layout/generic/nsColumnSetFrame.h index 1aed01ea4447..e94615e102ff 100644 --- a/layout/generic/nsColumnSetFrame.h +++ b/layout/generic/nsColumnSetFrame.h @@ -33,6 +33,7 @@ class nsColumnSetFrame final : public nsContainerFrame { nsFrameList& aChildList) override; void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; #endif diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index 6871e891a922..837f8d3e7659 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -118,6 +118,7 @@ void nsContainerFrame::AppendFrames(ChildListID aListID, } void nsContainerFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { MOZ_ASSERT(aListID == kPrincipalList || aListID == kNoReflowPrincipalList, "unexpected child list"); diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index f2ef0a86dbeb..334343855672 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -13,6 +13,7 @@ #include "nsSplittableFrame.h" #include "nsFrameList.h" #include "nsLayoutUtils.h" +#include "nsLineBox.h" // Option flags for ReflowChild() and FinishReflowChild() // member functions @@ -114,10 +115,13 @@ class nsContainerFrame : public nsSplittableFrame { * * @param aListID the child list identifier. * @param aPrevFrame the frame to insert frames after + * @param aPrevFrameLine (optional) if present (i.e., not null), the line + * box that aPrevFrame is part of. * @param aFrameList list of child frames to insert after aPrevFrame. * Each of the frames has its NS_FRAME_IS_DIRTY bit set */ virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList); /** diff --git a/layout/generic/nsFirstLetterFrame.cpp b/layout/generic/nsFirstLetterFrame.cpp index a22046c8c5ef..59addec49d11 100644 --- a/layout/generic/nsFirstLetterFrame.cpp +++ b/layout/generic/nsFirstLetterFrame.cpp @@ -319,7 +319,7 @@ nsresult nsFirstLetterFrame::CreateContinuationForFloatingParent( // except we have to insert it in a different place and we don't want a // reflow command to try to be issued. nsFrameList temp(continuation, continuation); - parent->InsertFrames(kNoReflowPrincipalList, placeholderFrame, temp); + parent->InsertFrames(kNoReflowPrincipalList, placeholderFrame, nullptr, temp); *aContinuation = continuation; return NS_OK; diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 9133154b297f..7591963196be 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -229,6 +229,7 @@ void nsHTMLScrollFrame::AppendFrames(ChildListID aListID, } void nsHTMLScrollFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NS_ASSERTION(aListID == kPrincipalList, "Only main list supported"); NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, @@ -1576,8 +1577,9 @@ void nsXULScrollFrame::AppendFrames(ChildListID aListID, } void nsXULScrollFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { - nsBoxFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsBoxFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, aFrameList); mHelper.ReloadChildFrames(); } diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index 475a5bf1e7fe..37ee4f1b6f0b 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -845,6 +845,7 @@ class nsHTMLScrollFrame : public nsContainerFrame, virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; @@ -1300,6 +1301,7 @@ class nsXULScrollFrame final : public nsBoxFrame, virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index 4592aac530c8..defd3db68add 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -7658,11 +7658,12 @@ void nsGridContainerFrame::AppendFrames(ChildListID aListID, nsContainerFrame::AppendFrames(aListID, aFrameList); } -void nsGridContainerFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void nsGridContainerFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NoteNewChildren(aListID, aFrameList); - nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsContainerFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, + aFrameList); } void nsGridContainerFrame::RemoveFrame(ChildListID aListID, diff --git a/layout/generic/nsGridContainerFrame.h b/layout/generic/nsGridContainerFrame.h index 027ba2a6aa78..ff2966dbdf61 100644 --- a/layout/generic/nsGridContainerFrame.h +++ b/layout/generic/nsGridContainerFrame.h @@ -151,6 +151,7 @@ class nsGridContainerFrame final : public nsContainerFrame { bool DrainSelfOverflowList() override; void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; uint16_t CSSAlignmentForAbsPosChild(const ReflowInput& aChildRI, diff --git a/layout/generic/nsRubyTextContainerFrame.cpp b/layout/generic/nsRubyTextContainerFrame.cpp index bb7483ac17b7..fd528fc7309e 100644 --- a/layout/generic/nsRubyTextContainerFrame.cpp +++ b/layout/generic/nsRubyTextContainerFrame.cpp @@ -70,10 +70,11 @@ void nsRubyTextContainerFrame::AppendFrames(ChildListID aListID, } /* virtual */ -void nsRubyTextContainerFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { - nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList); +void nsRubyTextContainerFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { + nsContainerFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, + aFrameList); UpdateSpanFlag(); } diff --git a/layout/generic/nsRubyTextContainerFrame.h b/layout/generic/nsRubyTextContainerFrame.h index 959116edb67a..9f467037eb2a 100644 --- a/layout/generic/nsRubyTextContainerFrame.h +++ b/layout/generic/nsRubyTextContainerFrame.h @@ -43,6 +43,7 @@ class nsRubyTextContainerFrame final : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp index a3d6c394488b..a5dd6fe4d037 100644 --- a/layout/generic/nsTextFrame.cpp +++ b/layout/generic/nsTextFrame.cpp @@ -8695,7 +8695,7 @@ void nsTextFrame::SetLength(int32_t aLength, nsLineLayout* aLineLayout, presContext, this, GetParent()); nsTextFrame* next = static_cast(newFrame); nsFrameList temp(next, next); - GetParent()->InsertFrames(kNoReflowPrincipalList, this, temp); + GetParent()->InsertFrames(kNoReflowPrincipalList, this, nullptr, temp); f = next; } diff --git a/layout/mathml/nsMathMLContainerFrame.cpp b/layout/mathml/nsMathMLContainerFrame.cpp index ca0ca7e62f4e..726846eaa2ed 100644 --- a/layout/mathml/nsMathMLContainerFrame.cpp +++ b/layout/mathml/nsMathMLContainerFrame.cpp @@ -706,9 +706,9 @@ void nsMathMLContainerFrame::AppendFrames(ChildListID aListID, ChildListChanged(dom::MutationEvent_Binding::ADDITION); } -void nsMathMLContainerFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void nsMathMLContainerFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { MOZ_ASSERT(aListID == kPrincipalList); mFrames.InsertFrames(this, aPrevFrame, aFrameList); ChildListChanged(dom::MutationEvent_Binding::ADDITION); diff --git a/layout/mathml/nsMathMLContainerFrame.h b/layout/mathml/nsMathMLContainerFrame.h index 8944219f42ea..464f1833c782 100644 --- a/layout/mathml/nsMathMLContainerFrame.h +++ b/layout/mathml/nsMathMLContainerFrame.h @@ -79,6 +79,7 @@ class nsMathMLContainerFrame : public nsContainerFrame, public nsMathMLFrame { nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; @@ -400,10 +401,11 @@ class nsMathMLmathBlockFrame final : public nsBlockFrame { } virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override { NS_ASSERTION(aListID == kPrincipalList || aListID == kNoReflowPrincipalList, "unexpected frame list"); - nsBlockFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsBlockFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, aFrameList); if (MOZ_LIKELY(aListID == kPrincipalList)) nsMathMLContainerFrame::ReLayoutChildren(this); } @@ -467,10 +469,12 @@ class nsMathMLmathInlineFrame final : public nsInlineFrame, } virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override { NS_ASSERTION(aListID == kPrincipalList || aListID == kNoReflowPrincipalList, "unexpected frame list"); - nsInlineFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsInlineFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, + aFrameList); if (MOZ_LIKELY(aListID == kPrincipalList)) nsMathMLContainerFrame::ReLayoutChildren(this); } diff --git a/layout/mathml/nsMathMLTokenFrame.cpp b/layout/mathml/nsMathMLTokenFrame.cpp index 2274d4fe4802..31573c55e376 100644 --- a/layout/mathml/nsMathMLTokenFrame.cpp +++ b/layout/mathml/nsMathMLTokenFrame.cpp @@ -99,9 +99,11 @@ void nsMathMLTokenFrame::AppendFrames(ChildListID aListID, MarkTextFramesAsTokenMathML(); } -void nsMathMLTokenFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, - nsFrameList& aChildList) { - nsMathMLContainerFrame::InsertFrames(aListID, aPrevFrame, aChildList); +void nsMathMLTokenFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aChildList) { + nsMathMLContainerFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, + aChildList); MarkTextFramesAsTokenMathML(); } diff --git a/layout/mathml/nsMathMLTokenFrame.h b/layout/mathml/nsMathMLTokenFrame.h index 14e854eea32a..aa2cad65774d 100644 --- a/layout/mathml/nsMathMLTokenFrame.h +++ b/layout/mathml/nsMathMLTokenFrame.h @@ -47,6 +47,7 @@ class nsMathMLTokenFrame : public nsMathMLContainerFrame { nsFrameList& aChildList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aChildList) override; virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize, diff --git a/layout/mathml/nsMathMLmtableFrame.h b/layout/mathml/nsMathMLmtableFrame.h index 069f8215c371..e4308f0b9159 100644 --- a/layout/mathml/nsMathMLmtableFrame.h +++ b/layout/mathml/nsMathMLmtableFrame.h @@ -80,8 +80,9 @@ class nsMathMLmtableFrame final : public nsTableFrame { } virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override { - nsTableFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsTableFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, aFrameList); RestyleTable(); } @@ -175,8 +176,10 @@ class nsMathMLmtrFrame final : public nsTableRowFrame { } virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override { - nsTableRowFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsTableRowFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, + aFrameList); RestyleTable(); } diff --git a/layout/svg/nsSVGContainerFrame.cpp b/layout/svg/nsSVGContainerFrame.cpp index b230c7af9ba9..7ab801bce994 100644 --- a/layout/svg/nsSVGContainerFrame.cpp +++ b/layout/svg/nsSVGContainerFrame.cpp @@ -45,12 +45,12 @@ NS_IMPL_FRAMEARENA_HELPERS(nsSVGContainerFrame) void nsSVGContainerFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { - InsertFrames(aListID, mFrames.LastChild(), aFrameList); + InsertFrames(aListID, mFrames.LastChild(), nullptr, aFrameList); } -void nsSVGContainerFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void nsSVGContainerFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, "inserting after sibling frame with different parent"); @@ -141,9 +141,9 @@ void nsSVGDisplayContainerFrame::BuildDisplayList( return BuildDisplayListForNonBlockChildren(aBuilder, aLists); } -void nsSVGDisplayContainerFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void nsSVGDisplayContainerFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { // memorize first old frame after insertion point // XXXbz once again, this would work a lot better if the nsIFrame // methods returned framelist iterators.... @@ -152,7 +152,8 @@ void nsSVGDisplayContainerFrame::InsertFrames(ChildListID aListID, nsIFrame* firstNewFrame = aFrameList.FirstChild(); // Insert the new frames - nsSVGContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsSVGContainerFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, + aFrameList); // If we are not a non-display SVG frame and we do not have a bounds update // pending, then we need to schedule one for our new children: diff --git a/layout/svg/nsSVGContainerFrame.h b/layout/svg/nsSVGContainerFrame.h index 80993d42fe0a..738555d5f134 100644 --- a/layout/svg/nsSVGContainerFrame.h +++ b/layout/svg/nsSVGContainerFrame.h @@ -71,6 +71,7 @@ class nsSVGContainerFrame : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; @@ -123,6 +124,7 @@ class nsSVGDisplayContainerFrame : public nsSVGContainerFrame, // nsIFrame: virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; virtual void Init(nsIContent* aContent, nsContainerFrame* aParent, diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index dde3a7936957..430cbfe6db28 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -238,6 +238,7 @@ void nsTableCellFrame::AppendFrames(ChildListID aListID, } void nsTableCellFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { MOZ_CRASH("unsupported operation"); } diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index fa8e16ac8edf..410b35d7992d 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -85,6 +85,7 @@ class nsTableCellFrame : public nsContainerFrame, virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; #endif diff --git a/layout/tables/nsTableColGroupFrame.cpp b/layout/tables/nsTableColGroupFrame.cpp index 9017fc1f921d..ee39a6043995 100644 --- a/layout/tables/nsTableColGroupFrame.cpp +++ b/layout/tables/nsTableColGroupFrame.cpp @@ -175,9 +175,9 @@ void nsTableColGroupFrame::AppendFrames(ChildListID aListID, InsertColsReflow(GetStartColumnIndex() + mColCount, newFrames); } -void nsTableColGroupFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void nsTableColGroupFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, "inserting after sibling frame with different parent"); diff --git a/layout/tables/nsTableColGroupFrame.h b/layout/tables/nsTableColGroupFrame.h index dcd569f0f29e..ea5918ed044b 100644 --- a/layout/tables/nsTableColGroupFrame.h +++ b/layout/tables/nsTableColGroupFrame.h @@ -89,6 +89,7 @@ class nsTableColGroupFrame final : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 1816e5500d8b..11ed629022fa 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -2272,6 +2272,7 @@ struct ChildListInsertions { }; void nsTableFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { // The frames in aFrameList can be a mix of row group frames and col group // frames. The problem is that they should go in separate child lists so diff --git a/layout/tables/nsTableFrame.h b/layout/tables/nsTableFrame.h index 02ef9888d07f..ad4f20db49b1 100644 --- a/layout/tables/nsTableFrame.h +++ b/layout/tables/nsTableFrame.h @@ -219,6 +219,7 @@ class nsTableFrame : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index a97bb4b33337..ac937a472f2a 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -205,6 +205,7 @@ void nsTableRowFrame::AppendFrames(ChildListID aListID, } void nsTableRowFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, diff --git a/layout/tables/nsTableRowFrame.h b/layout/tables/nsTableRowFrame.h index 85b328bc8065..e622a81cfb70 100644 --- a/layout/tables/nsTableRowFrame.h +++ b/layout/tables/nsTableRowFrame.h @@ -48,6 +48,7 @@ class nsTableRowFrame : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index fd8afdc048f9..066a7375a205 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -1503,9 +1503,9 @@ void nsTableRowGroupFrame::AppendFrames(ChildListID aListID, } } -void nsTableRowGroupFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void nsTableRowGroupFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, "inserting after sibling frame with different parent"); diff --git a/layout/tables/nsTableRowGroupFrame.h b/layout/tables/nsTableRowGroupFrame.h index a63bba192f75..ba989cb32246 100644 --- a/layout/tables/nsTableRowGroupFrame.h +++ b/layout/tables/nsTableRowGroupFrame.h @@ -66,6 +66,7 @@ class nsTableRowGroupFrame final : public nsContainerFrame, virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/tables/nsTableWrapperFrame.cpp b/layout/tables/nsTableWrapperFrame.cpp index 2708cd5a7980..e9f70f3380cf 100644 --- a/layout/tables/nsTableWrapperFrame.cpp +++ b/layout/tables/nsTableWrapperFrame.cpp @@ -127,9 +127,9 @@ void nsTableWrapperFrame::AppendFrames(ChildListID aListID, MarkNeedsDisplayItemRebuild(); } -void nsTableWrapperFrame::InsertFrames(ChildListID aListID, - nsIFrame* aPrevFrame, - nsFrameList& aFrameList) { +void nsTableWrapperFrame::InsertFrames( + ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { MOZ_ASSERT(kCaptionList == aListID, "unexpected child list"); MOZ_ASSERT(aFrameList.IsEmpty() || aFrameList.FirstChild()->IsTableCaption(), "inserting non-caption frame into captionList"); diff --git a/layout/tables/nsTableWrapperFrame.h b/layout/tables/nsTableWrapperFrame.h index a6569b1733f6..e42b5ce2d40b 100644 --- a/layout/tables/nsTableWrapperFrame.h +++ b/layout/tables/nsTableWrapperFrame.h @@ -47,6 +47,7 @@ class nsTableWrapperFrame : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/xul/nsBoxFrame.cpp b/layout/xul/nsBoxFrame.cpp index b8b981ca56cf..a1669e07674d 100644 --- a/layout/xul/nsBoxFrame.cpp +++ b/layout/xul/nsBoxFrame.cpp @@ -884,6 +884,7 @@ void nsBoxFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { } void nsBoxFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, "inserting after sibling frame with different parent"); diff --git a/layout/xul/nsBoxFrame.h b/layout/xul/nsBoxFrame.h index 25acb8d05a06..af11b31d2ec0 100644 --- a/layout/xul/nsBoxFrame.h +++ b/layout/xul/nsBoxFrame.h @@ -96,6 +96,7 @@ class nsBoxFrame : public nsContainerFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/xul/nsMenuFrame.cpp b/layout/xul/nsMenuFrame.cpp index 8583a1e3361b..e837ab400432 100644 --- a/layout/xul/nsMenuFrame.cpp +++ b/layout/xul/nsMenuFrame.cpp @@ -1145,6 +1145,7 @@ void nsMenuFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { } void nsMenuFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { if (!HasPopup() && (aListID == kPrincipalList || aListID == kPopupList)) { SetPopupFrame(aFrameList); @@ -1160,7 +1161,7 @@ void nsMenuFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, aPrevFrame = nullptr; } - nsBoxFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsBoxFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, aFrameList); } void nsMenuFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { diff --git a/layout/xul/nsMenuFrame.h b/layout/xul/nsMenuFrame.h index 0238772c31bb..67f118c2d25f 100644 --- a/layout/xul/nsMenuFrame.h +++ b/layout/xul/nsMenuFrame.h @@ -116,6 +116,7 @@ class nsMenuFrame final : public nsBoxFrame, public nsIReflowCallback { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; diff --git a/layout/xul/nsPopupSetFrame.cpp b/layout/xul/nsPopupSetFrame.cpp index 60b1fbd8a66f..f06e6115edb2 100644 --- a/layout/xul/nsPopupSetFrame.cpp +++ b/layout/xul/nsPopupSetFrame.cpp @@ -55,12 +55,13 @@ void nsPopupSetFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { } void nsPopupSetFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { if (aListID == kPopupList) { AddPopupFrameList(aFrameList); return; } - nsBoxFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsBoxFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, aFrameList); } void nsPopupSetFrame::SetInitialChildList(ChildListID aListID, diff --git a/layout/xul/nsPopupSetFrame.h b/layout/xul/nsPopupSetFrame.h index b3d10e9f4965..60baf14d0719 100644 --- a/layout/xul/nsPopupSetFrame.h +++ b/layout/xul/nsPopupSetFrame.h @@ -36,6 +36,7 @@ class nsPopupSetFrame final : public nsBoxFrame { nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual const nsFrameList& GetChildList(ChildListID aList) const override; diff --git a/layout/xul/nsRootBoxFrame.cpp b/layout/xul/nsRootBoxFrame.cpp index 49f19517a4cf..79b53e995441 100644 --- a/layout/xul/nsRootBoxFrame.cpp +++ b/layout/xul/nsRootBoxFrame.cpp @@ -67,6 +67,7 @@ class nsRootBoxFrame final : public nsBoxFrame, public nsIPopupContainer { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override; @@ -124,6 +125,7 @@ void nsRootBoxFrame::AppendFrames(ChildListID aListID, } void nsRootBoxFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { // Because we only support a single child frame inserting is the same // as appending. diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp index d1ca8c6cb89d..962fe059d63d 100644 --- a/layout/xul/nsSliderFrame.cpp +++ b/layout/xul/nsSliderFrame.cpp @@ -119,9 +119,10 @@ void nsSliderFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { } void nsSliderFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) { bool wasEmpty = mFrames.IsEmpty(); - nsBoxFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + nsBoxFrame::InsertFrames(aListID, aPrevFrame, aPrevFrameLine, aFrameList); if (wasEmpty) AddListener(); } diff --git a/layout/xul/nsSliderFrame.h b/layout/xul/nsSliderFrame.h index d41bcaf127f5..081f079f902b 100644 --- a/layout/xul/nsSliderFrame.h +++ b/layout/xul/nsSliderFrame.h @@ -88,6 +88,7 @@ class nsSliderFrame final : public nsBoxFrame { virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) override; virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, + const nsLineList::iterator* aPrevFrameLine, nsFrameList& aFrameList) override; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) override;