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
This commit is contained in:
L. David Baron 2019-07-17 23:34:45 +00:00
Родитель 298dd3b769
Коммит ce547cd6f5
56 изменённых файлов: 117 добавлений и 55 удалений

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

@ -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

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

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

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

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

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

@ -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");
}

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

@ -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

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

@ -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");
}

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

@ -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

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

@ -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,

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

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

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

@ -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) {

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

@ -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

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

@ -110,6 +110,7 @@ EXPORTS += [
'nsIScrollableFrame.h',
'nsIScrollPositionListener.h',
'nsIStatefulFrame.h',
'nsLineBox.h',
'nsPageSequenceFrame.h',
'nsPluginFrame.h',
'nsQueryFrame.h',

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

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

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

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

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

@ -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

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

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

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

@ -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");
}

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

@ -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

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

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

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

@ -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 <b>after</b>
* @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 <b>after</b> 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);
/**

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

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

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

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

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

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

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

@ -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,

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

@ -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,

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

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

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

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

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

@ -8695,7 +8695,7 @@ void nsTextFrame::SetLength(int32_t aLength, nsLineLayout* aLineLayout,
presContext, this, GetParent());
nsTextFrame* next = static_cast<nsTextFrame*>(newFrame);
nsFrameList temp(next, next);
GetParent()->InsertFrames(kNoReflowPrincipalList, this, temp);
GetParent()->InsertFrames(kNoReflowPrincipalList, this, nullptr, temp);
f = next;
}

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

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

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

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

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

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

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

@ -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,

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

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

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

@ -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:

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

@ -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,

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

@ -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");
}

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

@ -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

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

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

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

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

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

@ -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

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

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

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

@ -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,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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) {

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

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

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

@ -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,

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

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

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

@ -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.

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

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

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

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