Bug 919318 - Drop the Get prefix on the frame methods GetFirstContinuation, GetLastContinuation, GetFirstInFlow, GetLastInFlow and also on nsLayoutUtils::GetLastContinuationWithChild, because they never return null. r=dholbert

This commit is contained in:
Mats Palmgren 2013-09-25 11:42:34 +00:00
parent 5ccc866f98
commit ae50ca5ce4
26 changed files with 123 additions and 123 deletions

View File

@ -775,7 +775,7 @@ HyperTextAccessible::FindOffset(int32_t aOffset, nsDirection aDirection,
return -1;
// We're on the last continuation since we're on the last character.
frameAtOffset = frameAtOffset->GetLastContinuation();
frameAtOffset = frameAtOffset->LastContinuation();
}
// Return hypertext offset of the boundary of the found word.

View File

@ -1309,7 +1309,7 @@ nsBidiPresUtils::IsLeftOrRightMost(nsIFrame* aFrame,
// For ib splits, don't treat anything except the last part as
// endmost or anything except the first part as startmost.
// As an optimization, only get the first continuation once.
nsIFrame* firstContinuation = aFrame->GetFirstContinuation();
nsIFrame* firstContinuation = aFrame->FirstContinuation();
if (nsLayoutUtils::FrameIsNonLastInIBSplit(firstContinuation)) {
// We are not endmost
if (isLTR) {

View File

@ -430,7 +430,7 @@ static nsIFrame* GetSpecialSibling(nsIFrame* aFrame)
// We only store the "special sibling" annotation with the first
// frame in the continuation chain. Walk back to find that frame now.
return static_cast<nsIFrame*>
(aFrame->GetFirstContinuation()->
(aFrame->FirstContinuation()->
Properties().Get(nsIFrame::IBSplitSpecialSibling()));
}
@ -441,7 +441,7 @@ static nsIFrame* GetSpecialPrevSibling(nsIFrame* aFrame)
// We only store the "special sibling" annotation with the first
// frame in the continuation chain. Walk back to find that frame now.
return static_cast<nsIFrame*>
(aFrame->GetFirstContinuation()->
(aFrame->FirstContinuation()->
Properties().Get(nsIFrame::IBSplitSpecialPrevSibling()));
}
@ -989,7 +989,7 @@ AdjustAbsoluteContainingBlock(nsIFrame* aContainingBlockIn)
// Always use the container's first continuation. (Inline frames can have
// non-fluid bidi continuations...)
return aContainingBlockIn->GetFirstContinuation();
return aContainingBlockIn->FirstContinuation();
}
void
@ -5560,7 +5560,7 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame,
absPosCBCandidate = scrollFrame->GetScrolledFrame();
} else {
// Only first continuations can be containing blocks.
absPosCBCandidate = frame->GetFirstContinuation();
absPosCBCandidate = frame->FirstContinuation();
}
// Is the frame really an absolute container?
if (!absPosCBCandidate || !absPosCBCandidate->IsAbsoluteContainer()) {
@ -5652,7 +5652,7 @@ AdjustAppendParentForAfterContent(nsPresContext* aPresContext,
// other cases appending to the last nonempty continuation is fine
// and in fact not doing that can confuse code that doesn't know
// to pull kids from continuations other than its next one.
aParentFrame = aParentFrame->GetLastContinuation();
aParentFrame = aParentFrame->LastContinuation();
}
return aParentFrame;
@ -5740,7 +5740,7 @@ nsCSSFrameConstructor::AppendFramesToParent(nsFrameConstructorState& aStat
// to do this little fixup here instead.
if (aFrameList.NotEmpty() && !aFrameList.FirstChild()->IsInlineOutside()) {
// See whether our trailing inline is empty
nsIFrame* firstContinuation = aParentFrame->GetFirstContinuation();
nsIFrame* firstContinuation = aParentFrame->FirstContinuation();
if (firstContinuation->PrincipalChildList().IsEmpty()) {
// Our trailing inline is empty. Collect our starting blocks from
// aFrameList, get the right parent frame for them, and put them in.
@ -5750,7 +5750,7 @@ nsCSSFrameConstructor::AppendFramesToParent(nsFrameConstructorState& aStat
NS_ASSERTION(blockKids.NotEmpty(), "No blocks?");
nsIFrame* prevBlock =
GetSpecialPrevSibling(firstContinuation)->GetLastContinuation();
GetSpecialPrevSibling(firstContinuation)->LastContinuation();
NS_ASSERTION(prevBlock, "Should have previous block here");
MoveChildrenTo(aState.mPresContext, aParentFrame, prevBlock, blockKids);
@ -6060,7 +6060,7 @@ nsCSSFrameConstructor::GetInsertionPrevSibling(nsIFrame*& aParentFrame,
}
// Get continuation that parents the last child. This MUST be done
// before the AdjustAppendParentForAfterContent call.
aParentFrame = nsLayoutUtils::GetLastContinuationWithChild(aParentFrame);
aParentFrame = nsLayoutUtils::LastContinuationWithChild(aParentFrame);
// Deal with fieldsets
aParentFrame = ::GetAdjustedParentFrame(aParentFrame,
aParentFrame->GetType(),
@ -6547,7 +6547,7 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
// Get continuation that parents the last child. This MUST be done
// before the AdjustAppendParentForAfterContent call.
parentFrame = nsLayoutUtils::GetLastContinuationWithChild(parentFrame);
parentFrame = nsLayoutUtils::LastContinuationWithChild(parentFrame);
// We should never get here with fieldsets, since they have multiple
// insertion points.
@ -8276,7 +8276,7 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
NS_PRECONDITION(aFrame, "Must have a frame");
NS_PRECONDITION(aFrame->GetParent(), "Frame shouldn't be root");
NS_PRECONDITION(aResult, "Null out param?");
NS_PRECONDITION(aFrame == aFrame->GetFirstContinuation(),
NS_PRECONDITION(aFrame == aFrame->FirstContinuation(),
"aFrame not the result of GetPrimaryFrame()?");
if (IsFrameSpecial(aFrame)) {
@ -8308,12 +8308,12 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
(aFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) ?
GetPlaceholderFrameFor(aFrame) : aFrame;
MOZ_ASSERT(inFlowFrame, "How did that happen?");
MOZ_ASSERT(inFlowFrame == inFlowFrame->GetFirstContinuation(),
MOZ_ASSERT(inFlowFrame == inFlowFrame->FirstContinuation(),
"placeholder for primary frame has previous continuations?");
nsIFrame* parent = inFlowFrame->GetParent();
if (IsTablePseudo(parent)) {
if (FindFirstNonWhitespaceChild(parent) == inFlowFrame ||
!FindNextNonWhitespaceSibling(inFlowFrame->GetLastContinuation()) ||
!FindNextNonWhitespaceSibling(inFlowFrame->LastContinuation()) ||
// If we're a table-column-group, then the GetFirstChild check above is
// not going to catch cases when we're the first child.
(inFlowFrame->GetType() == nsGkAtoms::tableColGroupFrame &&
@ -8332,7 +8332,7 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
// pseudo, since removal of this frame might mean that this pseudo needs to
// get merged with the frame's prevSibling if that's also a table pseudo.
nsIFrame* nextSibling =
FindNextNonWhitespaceSibling(inFlowFrame->GetLastContinuation());
FindNextNonWhitespaceSibling(inFlowFrame->LastContinuation());
NS_ASSERTION(!IsTablePseudo(inFlowFrame), "Shouldn't happen here");
if (nextSibling && IsTablePseudo(nextSibling)) {
nsIFrame* prevSibling = FindPreviousNonWhitespaceSibling(inFlowFrame);
@ -8430,14 +8430,14 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
// If inFlowFrame is not the only in-flow child of |parent|, then removing
// it will change nothing about the {ib} split.
if (inFlowFrame != parent->GetFirstPrincipalChild() ||
inFlowFrame->GetLastContinuation()->GetNextSibling()) {
inFlowFrame->LastContinuation()->GetNextSibling()) {
return false;
}
// If the parent is the first or last part of the {ib} split, then
// removing one of its kids will have no effect on the splitting.
// Get the first continuation up front so we don't have to do it twice.
nsIFrame* parentFirstContinuation = parent->GetFirstContinuation();
nsIFrame* parentFirstContinuation = parent->FirstContinuation();
if (!GetSpecialSibling(parentFirstContinuation) ||
!GetSpecialPrevSibling(parentFirstContinuation)) {
return false;
@ -9882,7 +9882,7 @@ nsCSSFrameConstructor::RemoveFloatingFirstLetterFrames(
// Destroy the old text frame's continuations (the old text frame
// will be destroyed when its letter frame is destroyed).
nsIFrame* frameToDelete = textFrame->GetLastContinuation();
nsIFrame* frameToDelete = textFrame->LastContinuation();
while (frameToDelete != textFrame) {
nsIFrame* nextFrameToDelete = frameToDelete->GetPrevContinuation();
RemoveFrame(kPrincipalList, frameToDelete);
@ -9990,7 +9990,7 @@ nsCSSFrameConstructor::RemoveLetterFrames(nsPresContext* aPresContext,
nsIPresShell* aPresShell,
nsIFrame* aBlockFrame)
{
aBlockFrame = aBlockFrame->GetFirstContinuation();
aBlockFrame = aBlockFrame->FirstContinuation();
nsIFrame* continuation = aBlockFrame;
bool stopLooking = false;
@ -10014,7 +10014,7 @@ nsCSSFrameConstructor::RemoveLetterFrames(nsPresContext* aPresContext,
void
nsCSSFrameConstructor::RecoverLetterFrames(nsIFrame* aBlockFrame)
{
aBlockFrame = aBlockFrame->GetFirstContinuation();
aBlockFrame = aBlockFrame->FirstContinuation();
nsIFrame* continuation = aBlockFrame;
nsIFrame* parentFrame = nullptr;
@ -10342,7 +10342,7 @@ nsCSSFrameConstructor::CreateIBSiblings(nsFrameConstructorState& aState,
nsCSSAnonBoxes::mozAnonymousBlock,
styleContext);
nsIFrame* lastNewInline = aInitialInline->GetFirstContinuation();
nsIFrame* lastNewInline = aInitialInline->FirstContinuation();
do {
// On entry to this loop aChildItems is not empty and the first frame in it
// is block-level.

View File

@ -216,7 +216,7 @@ protected:
nsIFrame* nextCont = aFrame->GetNextContinuation();
if (!nextCont && (aFrame->GetStateBits() & NS_FRAME_IS_SPECIAL)) {
// The {ib} properties are only stored on first continuations
aFrame = aFrame->GetFirstContinuation();
aFrame = aFrame->FirstContinuation();
nsIFrame* block = static_cast<nsIFrame*>
(aFrame->Properties().Get(nsIFrame::IBSplitSpecialSibling()));
if (block) {
@ -4473,7 +4473,7 @@ nsImageRenderer::PrepareImage()
nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(targetURI), elementId,
mForFrame->GetContent()->GetCurrentDoc(), base);
nsSVGPaintingProperty* property = nsSVGEffects::GetPaintingPropertyForURI(
targetURI, mForFrame->GetFirstContinuation(),
targetURI, mForFrame->FirstContinuation(),
nsSVGEffects::BackgroundImageProperty());
if (!property)
return false;

View File

@ -3842,7 +3842,7 @@ nsDisplayTransform::GetFrameBoundsForTransform(const nsIFrame* aFrame)
/* Iterate through the continuation list, unioning together all the
* bounding rects.
*/
for (const nsIFrame *currFrame = aFrame->GetFirstContinuation();
for (const nsIFrame *currFrame = aFrame->FirstContinuation();
currFrame != nullptr;
currFrame = currFrame->GetNextContinuation())
{
@ -4753,7 +4753,7 @@ nsDisplaySVGEffects::BuildLayer(nsDisplayListBuilder* aBuilder,
return nullptr;
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(mFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(mFrame);
nsSVGEffects::EffectProperties effectProperties =
nsSVGEffects::GetEffectProperties(firstFrame);
@ -4813,7 +4813,7 @@ void
nsDisplaySVGEffects::PrintEffects(FILE* aOutput)
{
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(mFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(mFrame);
nsSVGEffects::EffectProperties effectProperties =
nsSVGEffects::GetEffectProperties(firstFrame);
bool isOK = true;

View File

@ -552,10 +552,10 @@ nsLayoutUtils::GetCriticalDisplayPort(nsIContent* aContent, nsRect* aResult)
}
nsIFrame*
nsLayoutUtils::GetLastContinuationWithChild(nsIFrame* aFrame)
nsLayoutUtils::LastContinuationWithChild(nsIFrame* aFrame)
{
NS_PRECONDITION(aFrame, "NULL frame pointer");
aFrame = aFrame->GetLastContinuation();
aFrame = aFrame->LastContinuation();
while (!aFrame->GetFirstPrincipalChild() &&
aFrame->GetPrevContinuation()) {
aFrame = aFrame->GetPrevContinuation();
@ -606,13 +606,13 @@ GetLastChildFrame(nsIFrame* aFrame,
// Get the last continuation frame that's a parent
nsIFrame* lastParentContinuation =
nsLayoutUtils::GetLastContinuationWithChild(aFrame);
nsLayoutUtils::LastContinuationWithChild(aFrame);
nsIFrame* lastChildFrame =
lastParentContinuation->GetLastChild(nsIFrame::kPrincipalList);
if (lastChildFrame) {
// Get the frame's first continuation. This matters in case the frame has
// been continued across multiple lines or split by BiDi resolution.
lastChildFrame = lastChildFrame->GetFirstContinuation();
lastChildFrame = lastChildFrame->FirstContinuation();
// If the last child frame is a pseudo-frame, then return its last child.
// Note that the frame we create for the generated content is also a
@ -2519,7 +2519,7 @@ nsLayoutUtils::GetNextContinuationOrSpecialSibling(nsIFrame *aFrame)
if ((aFrame->GetStateBits() & NS_FRAME_IS_SPECIAL) != 0) {
// We only store the "special sibling" annotation with the first
// frame in the continuation chain. Walk back to find that frame now.
aFrame = aFrame->GetFirstContinuation();
aFrame = aFrame->FirstContinuation();
void* value = aFrame->Properties().Get(nsIFrame::IBSplitSpecialSibling());
return static_cast<nsIFrame*>(value);
@ -2529,9 +2529,9 @@ nsLayoutUtils::GetNextContinuationOrSpecialSibling(nsIFrame *aFrame)
}
nsIFrame*
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(nsIFrame *aFrame)
nsLayoutUtils::FirstContinuationOrSpecialSibling(nsIFrame *aFrame)
{
nsIFrame *result = aFrame->GetFirstContinuation();
nsIFrame *result = aFrame->FirstContinuation();
if (result->GetStateBits() & NS_FRAME_IS_SPECIAL) {
while (true) {
nsIFrame *f = static_cast<nsIFrame*>

View File

@ -276,10 +276,10 @@ public:
static bool IsFrameListSorted(nsFrameList& aFrameList);
/**
* GetLastContinuationWithChild gets the last continuation in aFrame's chain
* LastContinuationWithChild gets the last continuation in aFrame's chain
* that has a child, or the first continuation if the frame has no children.
*/
static nsIFrame* GetLastContinuationWithChild(nsIFrame* aFrame);
static nsIFrame* LastContinuationWithChild(nsIFrame* aFrame);
/**
* GetLastSibling simply finds the last sibling of aFrame, or returns nullptr if
@ -942,7 +942,7 @@ public:
* containing aFrame.
*/
static nsIFrame*
GetFirstContinuationOrSpecialSibling(nsIFrame *aFrame);
FirstContinuationOrSpecialSibling(nsIFrame *aFrame);
/**
* Check whether aFrame is a part of the scrollbar or scrollcorner of
@ -1467,7 +1467,7 @@ public:
*/
static bool FrameIsNonFirstInIBSplit(const nsIFrame* aFrame) {
return (aFrame->GetStateBits() & NS_FRAME_IS_SPECIAL) &&
aFrame->GetFirstContinuation()->
aFrame->FirstContinuation()->
Properties().Get(nsIFrame::IBSplitSpecialPrevSibling());
}
@ -1477,7 +1477,7 @@ public:
*/
static bool FrameIsNonLastInIBSplit(const nsIFrame* aFrame) {
return (aFrame->GetStateBits() & NS_FRAME_IS_SPECIAL) &&
aFrame->GetFirstContinuation()->
aFrame->FirstContinuation()->
Properties().Get(nsIFrame::IBSplitSpecialSibling());
}

View File

@ -571,7 +571,7 @@ RemoveFirstLine(nsLineList& aFromLines, nsFrameList& aFromFrames,
/* virtual */ void
nsBlockFrame::MarkIntrinsicWidthsDirty()
{
nsBlockFrame* dirtyBlock = static_cast<nsBlockFrame*>(GetFirstContinuation());
nsBlockFrame* dirtyBlock = static_cast<nsBlockFrame*>(FirstContinuation());
dirtyBlock->mMinWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
dirtyBlock->mPrefWidth = NS_INTRINSIC_WIDTH_UNKNOWN;
if (!(GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)) {
@ -608,7 +608,7 @@ nsBlockFrame::CheckIntrinsicCacheAgainstShrinkWrapState()
/* virtual */ nscoord
nsBlockFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
{
nsIFrame* firstInFlow = GetFirstContinuation();
nsIFrame* firstInFlow = FirstContinuation();
if (firstInFlow != this)
return firstInFlow->GetMinWidth(aRenderingContext);
@ -693,7 +693,7 @@ nsBlockFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
/* virtual */ nscoord
nsBlockFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
{
nsIFrame* firstInFlow = GetFirstContinuation();
nsIFrame* firstInFlow = FirstContinuation();
if (firstInFlow != this)
return firstInFlow->GetPrefWidth(aRenderingContext);
@ -956,7 +956,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
#ifdef IBMBIDI
if (GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)
static_cast<nsBlockFrame*>(GetFirstContinuation())->ResolveBidi();
static_cast<nsBlockFrame*>(FirstContinuation())->ResolveBidi();
#endif // IBMBIDI
if (RenumberLists(aPresContext)) {
@ -3854,7 +3854,7 @@ CheckPlaceholderInLine(nsIFrame* aBlock, nsLineBox* aLine, nsFloatCache* aFC)
NS_ASSERTION(!(aFC->mFloat->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
"float in a line should never be a pushed float");
nsIFrame* ph = aBlock->PresContext()->FrameManager()->
GetPlaceholderFrameFor(aFC->mFloat->GetFirstInFlow());
GetPlaceholderFrameFor(aFC->mFloat->FirstInFlow());
for (nsIFrame* f = ph; f; f = f->GetParent()) {
if (f->GetParent() == aBlock)
return aLine->Contains(f);
@ -6364,7 +6364,7 @@ nsBlockFrame::ChildIsDirty(nsIFrame* aChild)
AddStateBits(NS_BLOCK_LOOK_FOR_DIRTY_FRAMES);
} else {
NS_ASSERTION(aChild->IsFloating(), "should be a float");
nsIFrame *thisFC = GetFirstContinuation();
nsIFrame *thisFC = FirstContinuation();
nsIFrame *placeholderPath =
PresContext()->FrameManager()->GetPlaceholderFrameFor(aChild);
// SVG code sometimes sends FrameNeedsReflow notifications during
@ -6374,7 +6374,7 @@ nsBlockFrame::ChildIsDirty(nsIFrame* aChild)
for (;;) {
nsIFrame *parent = placeholderPath->GetParent();
if (parent->GetContent() == mContent &&
parent->GetFirstContinuation() == thisFC) {
parent->FirstContinuation() == thisFC) {
parent->AddStateBits(NS_BLOCK_LOOK_FOR_DIRTY_FRAMES);
break;
}
@ -6622,7 +6622,7 @@ nsBlockFrame::RenumberLists(nsPresContext* aPresContext)
}
// Get to first-in-flow
nsBlockFrame* block = (nsBlockFrame*) GetFirstInFlow();
nsBlockFrame* block = (nsBlockFrame*) FirstInFlow();
return RenumberListsInBlock(aPresContext, block, &ordinal, 0, increment);
}
@ -7161,7 +7161,7 @@ nsBlockFrame::VerifyLines(bool aFinalCheckOK)
void
nsBlockFrame::VerifyOverflowSituation()
{
nsBlockFrame* flow = static_cast<nsBlockFrame*>(GetFirstInFlow());
nsBlockFrame* flow = static_cast<nsBlockFrame*>(FirstInFlow());
while (flow) {
FrameLines* overflowLines = flow->GetOverflowLines();
if (overflowLines) {

View File

@ -100,17 +100,17 @@ static nsIFrame*
NearestCommonAncestorFirstInFlow(nsIFrame *aFrame1, nsIFrame *aFrame2,
nsIFrame *aKnownCommonAncestor)
{
aFrame1 = aFrame1->GetFirstInFlow();
aFrame2 = aFrame2->GetFirstInFlow();
aKnownCommonAncestor = aKnownCommonAncestor->GetFirstInFlow();
aFrame1 = aFrame1->FirstInFlow();
aFrame2 = aFrame2->FirstInFlow();
aKnownCommonAncestor = aKnownCommonAncestor->FirstInFlow();
nsAutoTArray<nsIFrame*, 32> ancestors1, ancestors2;
for (nsIFrame *f = aFrame1; f != aKnownCommonAncestor;
(f = f->GetParent()) && (f = f->GetFirstInFlow())) {
(f = f->GetParent()) && (f = f->FirstInFlow())) {
ancestors1.AppendElement(f);
}
for (nsIFrame *f = aFrame2; f != aKnownCommonAncestor;
(f = f->GetParent()) && (f = f->GetFirstInFlow())) {
(f = f->GetParent()) && (f = f->FirstInFlow())) {
ancestors2.AppendElement(f);
}
@ -131,14 +131,14 @@ static nscoord
ComputeDescendantWidth(const nsHTMLReflowState& aAncestorReflowState,
nsIFrame *aDescendantFrame)
{
nsIFrame *ancestorFrame = aAncestorReflowState.frame->GetFirstInFlow();
nsIFrame *ancestorFrame = aAncestorReflowState.frame->FirstInFlow();
if (aDescendantFrame == ancestorFrame) {
return aAncestorReflowState.ComputedWidth();
}
AutoInfallibleTArray<nsIFrame*, 16> frames;
for (nsIFrame *f = aDescendantFrame; f != ancestorFrame;
f = f->GetParent()->GetFirstInFlow()) {
f = f->GetParent()->FirstInFlow()) {
frames.AppendElement(f);
}
@ -156,8 +156,8 @@ ComputeDescendantWidth(const nsHTMLReflowState& aAncestorReflowState,
(i == 0) ? aAncestorReflowState : reflowStates[i - 1];
nsSize availSize(parentReflowState.ComputedWidth(), NS_UNCONSTRAINEDSIZE);
nsIFrame *frame = frames[len - i - 1];
NS_ABORT_IF_FALSE(frame->GetParent()->GetFirstInFlow() ==
parentReflowState.frame->GetFirstInFlow(),
NS_ABORT_IF_FALSE(frame->GetParent()->FirstInFlow() ==
parentReflowState.frame->FirstInFlow(),
"bad logic in this function");
new (reflowStates + i) nsHTMLReflowState(presContext, parentReflowState,
frame, availSize);
@ -203,7 +203,7 @@ nsFontInflationData::UpdateWidth(const nsHTMLReflowState &aReflowState)
lastInflatableDescendant,
bfc);
while (!nsLayoutUtils::IsContainerForFontSizeInflation(nca)) {
nca = nca->GetParent()->GetFirstInFlow();
nca = nca->GetParent()->FirstInFlow();
}
nscoord newNCAWidth = ComputeDescendantWidth(aReflowState, nca);

View File

@ -6609,7 +6609,7 @@ nsFrame::GetLineNumber(nsIFrame *aFrame, bool aLockScroll, nsIFrame** aContainin
//we must instead look for its placeholder
if (thisBlock->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER) {
// abspos continuations don't have placeholders, get the fif
thisBlock = thisBlock->GetFirstInFlow();
thisBlock = thisBlock->FirstInFlow();
}
thisBlock = frameManager->GetPlaceholderFrameFor(thisBlock);
if (!thisBlock)
@ -7209,7 +7209,7 @@ GetIBSpecialSiblingForAnonymousBlock(const nsIFrame* aFrame)
// Find the first continuation of the frame. (Ugh. This ends up
// being O(N^2) when it is called O(N) times.)
aFrame = aFrame->GetFirstContinuation();
aFrame = aFrame->FirstContinuation();
/*
* Now look up the nsGkAtoms::IBSplitSpecialPrevSibling
@ -7346,7 +7346,7 @@ nsFrame::DoGetParentStyleContextFrame() const
GetPrevInFlow()) {
// Out of flows that are continuations do not
// have placeholders. Use their first-in-flow's placeholder.
oofFrame = oofFrame->GetFirstInFlow();
oofFrame = oofFrame->FirstInFlow();
}
nsIFrame* placeholder = oofFrame->PresContext()->FrameManager()->
GetPlaceholderFrameFor(oofFrame);

View File

@ -529,7 +529,7 @@ nsHTMLReflowState::InitResizeFlags(nsPresContext* aPresContext, nsIAtom* aFrameT
// at least nsBoxFrame).
if (IS_TABLE_CELL(aFrameType) &&
(mFlags.mSpecialHeightReflow ||
(frame->GetFirstInFlow()->GetStateBits() &
(frame->FirstInFlow()->GetStateBits() &
NS_TABLE_CELL_HAD_SPECIAL_REFLOW)) &&
(frame->GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_HEIGHT)) {
// Need to set the bit on the cell so that

View File

@ -1490,10 +1490,10 @@ public:
NS_IMETHOD SetPrevContinuation(nsIFrame*) = 0;
virtual nsIFrame* GetNextContinuation() const = 0;
NS_IMETHOD SetNextContinuation(nsIFrame*) = 0;
virtual nsIFrame* GetFirstContinuation() const {
virtual nsIFrame* FirstContinuation() const {
return const_cast<nsIFrame*>(this);
}
virtual nsIFrame* GetLastContinuation() const {
virtual nsIFrame* LastContinuation() const {
return const_cast<nsIFrame*>(this);
}
@ -1518,14 +1518,14 @@ public:
/**
* Return the first frame in our current flow.
*/
virtual nsIFrame* GetFirstInFlow() const {
virtual nsIFrame* FirstInFlow() const {
return const_cast<nsIFrame*>(this);
}
/**
* Return the last frame in our current flow.
*/
virtual nsIFrame* GetLastInFlow() const {
virtual nsIFrame* LastInFlow() const {
return const_cast<nsIFrame*>(this);
}

View File

@ -130,7 +130,7 @@ nsInlineFrame::IsSelfEmpty()
// Get the first continuation eagerly, as a performance optimization, to
// avoid having to get it twice..
nsIFrame* firstCont = GetFirstContinuation();
nsIFrame* firstCont = FirstContinuation();
return
(!haveStart || nsLayoutUtils::FrameIsNonFirstInIBSplit(firstCont)) &&
(!haveEnd || nsLayoutUtils::FrameIsNonLastInIBSplit(firstCont));
@ -640,7 +640,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
* chain.
*/
if (NS_FRAME_IS_COMPLETE(aStatus) &&
!GetLastInFlow()->GetNextContinuation() &&
!LastInFlow()->GetNextContinuation() &&
!nsLayoutUtils::FrameIsNonLastInIBSplit(this)) {
aMetrics.width += ltr ? aReflowState.mComputedBorderPadding.right
: aReflowState.mComputedBorderPadding.left;
@ -886,7 +886,7 @@ nsInlineFrame::GetSkipSides(const nsHTMLReflowState* aReflowState) const
if (((startBit | endBit) & skip) != (startBit | endBit)) {
// We're missing one of the skip bits, so check whether we need to set it.
// Only get the first continuation once, as an optimization.
nsIFrame* firstContinuation = GetFirstContinuation();
nsIFrame* firstContinuation = FirstContinuation();
if (nsLayoutUtils::FrameIsNonLastInIBSplit(firstContinuation)) {
skip |= endBit;
}
@ -946,7 +946,7 @@ nsFirstLineFrame::Init(nsIContent* aContent, nsIFrame* aParent,
// This frame is a continuation - fixup the style context if aPrevInFlow
// is the first-in-flow (the only one with a ::first-line pseudo).
if (aPrevInFlow->StyleContext()->GetPseudo() == nsCSSPseudoElements::firstLine) {
MOZ_ASSERT(GetFirstInFlow() == aPrevInFlow);
MOZ_ASSERT(FirstInFlow() == aPrevInFlow);
// Create a new style context that is a child of the parent
// style context thus removing the ::first-line style. This way
// we behave as if an anonymous (unstyled) span was the child
@ -956,7 +956,7 @@ nsFirstLineFrame::Init(nsIContent* aContent, nsIFrame* aParent,
ResolveAnonymousBoxStyle(nsCSSAnonBoxes::mozLineFrame, parentContext);
SetStyleContext(newSC);
} else {
MOZ_ASSERT(GetFirstInFlow() != aPrevInFlow);
MOZ_ASSERT(FirstInFlow() != aPrevInFlow);
MOZ_ASSERT(aPrevInFlow->StyleContext()->GetPseudo() ==
nsCSSAnonBoxes::mozLineFrame);
}

View File

@ -1145,7 +1145,7 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd,
* However, none of that applies if this is a letter frame (XXXbz why?)
*/
if ((NS_FRAME_IS_NOT_COMPLETE(aStatus) ||
pfd->mFrame->GetLastInFlow()->GetNextContinuation() ||
pfd->mFrame->LastInFlow()->GetNextContinuation() ||
nsLayoutUtils::FrameIsNonLastInIBSplit(pfd->mFrame))
&& !pfd->GetFlag(PFD_ISLETTERFRAME)) {
if (ltr)

View File

@ -74,7 +74,7 @@ NS_METHOD nsSplittableFrame::SetNextContinuation(nsIFrame* aFrame)
return NS_OK;
}
nsIFrame* nsSplittableFrame::GetFirstContinuation() const
nsIFrame* nsSplittableFrame::FirstContinuation() const
{
nsSplittableFrame* firstContinuation = const_cast<nsSplittableFrame*>(this);
while (firstContinuation->mPrevContinuation) {
@ -84,7 +84,7 @@ nsIFrame* nsSplittableFrame::GetFirstContinuation() const
return firstContinuation;
}
nsIFrame* nsSplittableFrame::GetLastContinuation() const
nsIFrame* nsSplittableFrame::LastContinuation() const
{
nsSplittableFrame* lastContinuation = const_cast<nsSplittableFrame*>(this);
while (lastContinuation->mNextContinuation) {
@ -152,7 +152,7 @@ NS_METHOD nsSplittableFrame::SetNextInFlow(nsIFrame* aFrame)
return NS_OK;
}
nsIFrame* nsSplittableFrame::GetFirstInFlow() const
nsIFrame* nsSplittableFrame::FirstInFlow() const
{
nsSplittableFrame* firstInFlow = const_cast<nsSplittableFrame*>(this);
while (nsIFrame *prev = firstInFlow->GetPrevInFlow()) {
@ -162,7 +162,7 @@ nsIFrame* nsSplittableFrame::GetFirstInFlow() const
return firstInFlow;
}
nsIFrame* nsSplittableFrame::GetLastInFlow() const
nsIFrame* nsSplittableFrame::LastInFlow() const
{
nsSplittableFrame* lastInFlow = const_cast<nsSplittableFrame*>(this);
while (nsIFrame* next = lastInFlow->GetNextInFlow()) {

View File

@ -45,8 +45,8 @@ public:
NS_IMETHOD SetNextContinuation(nsIFrame*) MOZ_OVERRIDE;
// Get the first/last continuation for this frame.
virtual nsIFrame* GetFirstContinuation() const MOZ_OVERRIDE;
virtual nsIFrame* GetLastContinuation() const MOZ_OVERRIDE;
virtual nsIFrame* FirstContinuation() const MOZ_OVERRIDE;
virtual nsIFrame* LastContinuation() const MOZ_OVERRIDE;
#ifdef DEBUG
// Can aFrame2 be reached from aFrame1 by following prev/next continuations?
@ -66,8 +66,8 @@ public:
NS_IMETHOD SetNextInFlow(nsIFrame*) MOZ_OVERRIDE;
// Get the first/last frame in the current flow.
virtual nsIFrame* GetFirstInFlow() const MOZ_OVERRIDE;
virtual nsIFrame* GetLastInFlow() const MOZ_OVERRIDE;
virtual nsIFrame* FirstInFlow() const MOZ_OVERRIDE;
virtual nsIFrame* LastInFlow() const MOZ_OVERRIDE;
// Remove the frame from the flow. Connects the frame's prev-in-flow
// and its next-in-flow. This should only be called in frame Destroy() methods.

View File

@ -656,7 +656,7 @@ int32_t nsTextFrame::GetInFlowContentLength() {
return flowLength->mEndFlowOffset - mContentOffset;
}
nsTextFrame* nextBidi = static_cast<nsTextFrame*>(GetLastInFlow()->GetNextContinuation());
nsTextFrame* nextBidi = static_cast<nsTextFrame*>(LastInFlow()->GetNextContinuation());
int32_t endFlow = nextBidi ? nextBidi->GetContentOffset() : mContent->TextLength();
if (!flowLength) {
@ -3924,8 +3924,8 @@ public:
AddStateBits(NS_FRAME_IS_FLUID_CONTINUATION);
return NS_OK;
}
virtual nsIFrame* GetFirstInFlow() const;
virtual nsIFrame* GetFirstContinuation() const;
virtual nsIFrame* FirstInFlow() const;
virtual nsIFrame* FirstContinuation() const;
virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext,
InlineMinWidthData *aData);
@ -4047,7 +4047,7 @@ nsContinuingTextFrame::DestroyFrom(nsIFrame* aDestructRoot)
}
nsIFrame*
nsContinuingTextFrame::GetFirstInFlow() const
nsContinuingTextFrame::FirstInFlow() const
{
// Can't cast to |nsContinuingTextFrame*| because the first one isn't.
nsIFrame *firstInFlow,
@ -4061,7 +4061,7 @@ nsContinuingTextFrame::GetFirstInFlow() const
}
nsIFrame*
nsContinuingTextFrame::GetFirstContinuation() const
nsContinuingTextFrame::FirstContinuation() const
{
// Can't cast to |nsContinuingTextFrame*| because the first one isn't.
nsIFrame *firstContinuation,
@ -4199,7 +4199,7 @@ nsTextFrame::GetCursor(const nsPoint& aPoint,
}
nsIFrame*
nsTextFrame::GetLastInFlow() const
nsTextFrame::LastInFlow() const
{
nsTextFrame* lastInFlow = const_cast<nsTextFrame*>(this);
while (lastInFlow->GetNextInFlow()) {
@ -4210,7 +4210,7 @@ nsTextFrame::GetLastInFlow() const
}
nsIFrame*
nsTextFrame::GetLastContinuation() const
nsTextFrame::LastContinuation() const
{
nsTextFrame* lastInFlow = const_cast<nsTextFrame*>(this);
while (lastInFlow->mNextContinuation) {

View File

@ -96,8 +96,8 @@ public:
aNextInFlow->AddStateBits(NS_FRAME_IS_FLUID_CONTINUATION);
return NS_OK;
}
virtual nsIFrame* GetLastInFlow() const MOZ_OVERRIDE;
virtual nsIFrame* GetLastContinuation() const MOZ_OVERRIDE;
virtual nsIFrame* LastInFlow() const MOZ_OVERRIDE;
virtual nsIFrame* LastContinuation() const MOZ_OVERRIDE;
virtual nsSplittableType GetSplittableType() const MOZ_OVERRIDE {
return NS_FRAME_SPLITTABLE;

View File

@ -192,7 +192,7 @@ nsMathMLFrame::GetPresentationDataFrom(nsIFrame* aFrame,
aPresentationData.flags |= NS_MATHML_DISPLAYSTYLE;
}
FindAttrDisplaystyle(content, aPresentationData);
aPresentationData.mstyle = frame->GetFirstContinuation();
aPresentationData.mstyle = frame->FirstContinuation();
break;
}
frame = frame->GetParent();

View File

@ -181,7 +181,7 @@ nsSVGIntegrationUtils::GetContinuationUnionSize(nsIFrame* aNonSVGFrame)
NS_ASSERTION(!aNonSVGFrame->IsFrameOfType(nsIFrame::eSVG),
"SVG frames should not get here");
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aNonSVGFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(aNonSVGFrame);
return nsLayoutUtils::GetAllInFlowRectsUnion(firstFrame, firstFrame).Size();
}
@ -191,7 +191,7 @@ nsSVGIntegrationUtils::GetSVGCoordContextForNonSVGFrame(nsIFrame* aNonSVGFrame)
NS_ASSERTION(!aNonSVGFrame->IsFrameOfType(nsIFrame::eSVG),
"SVG frames should not get here");
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aNonSVGFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(aNonSVGFrame);
nsRect r = nsLayoutUtils::GetAllInFlowRectsUnion(firstFrame, firstFrame);
nsPresContext* presContext = firstFrame->PresContext();
return gfxSize(presContext->AppUnitsToFloatCSSPixels(r.width),
@ -204,7 +204,7 @@ nsSVGIntegrationUtils::GetSVGBBoxForNonSVGFrame(nsIFrame* aNonSVGFrame)
NS_ASSERTION(!aNonSVGFrame->IsFrameOfType(nsIFrame::eSVG),
"SVG frames should not get here");
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aNonSVGFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(aNonSVGFrame);
// 'r' is in "user space":
nsRect r = GetPreEffectsVisualOverflowUnion(firstFrame, nullptr, nsRect(),
GetOffsetToUserSpace(firstFrame));
@ -253,7 +253,7 @@ nsRect
"Don't call this on SVG child frames");
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(aFrame);
nsSVGEffects::EffectProperties effectProperties =
nsSVGEffects::GetEffectProperties(firstFrame);
nsSVGFilterFrame *filterFrame = effectProperties.mFilter ?
@ -293,7 +293,7 @@ nsSVGIntegrationUtils::AdjustInvalidAreaForSVGEffects(nsIFrame* aFrame,
// Don't bother calling GetEffectProperties; the filter property should
// already have been set up during reflow/ComputeFrameEffectsRect
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(aFrame);
nsSVGEffects::EffectProperties effectProperties =
nsSVGEffects::GetEffectProperties(firstFrame);
if (!effectProperties.mFilter)
@ -339,7 +339,7 @@ nsSVGIntegrationUtils::GetRequiredSourceForInvalidArea(nsIFrame* aFrame,
// Don't bother calling GetEffectProperties; the filter property should
// already have been set up during reflow/ComputeFrameEffectsRect
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(aFrame);
nsSVGFilterFrame* filterFrame =
nsSVGEffects::GetFilterFrame(firstFrame);
if (!filterFrame)
@ -359,7 +359,7 @@ bool
nsSVGIntegrationUtils::HitTestFrameForEffects(nsIFrame* aFrame, const nsPoint& aPt)
{
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(aFrame);
// Convert aPt to user space:
nsPoint toUserSpace;
if (aFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT) {
@ -449,7 +449,7 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
/* Properties are added lazily and may have been removed by a restyle,
so make sure all applicable ones are set again. */
nsIFrame* firstFrame =
nsLayoutUtils::GetFirstContinuationOrSpecialSibling(aFrame);
nsLayoutUtils::FirstContinuationOrSpecialSibling(aFrame);
nsSVGEffects::EffectProperties effectProperties =
nsSVGEffects::GetEffectProperties(firstFrame);

View File

@ -239,7 +239,7 @@ nsTableCellMap::GetMapFor(const nsTableRowGroupFrame* aRowGroup,
// if aRowGroup is a repeated header or footer find the header or footer it was repeated from
if (aRowGroup->IsRepeatable()) {
nsTableFrame* fifTable = static_cast<nsTableFrame*>(mTableFrame.GetFirstInFlow());
nsTableFrame* fifTable = static_cast<nsTableFrame*>(mTableFrame.FirstInFlow());
const nsStyleDisplay* display = aRowGroup->StyleDisplay();
nsTableRowGroupFrame* rgOrig =
@ -273,7 +273,7 @@ nsTableCellMap::Synchronize(nsTableFrame* aTableFrame)
nsCellMap* map = nullptr;
for (uint32_t rgX = 0; rgX < orderedRowGroups.Length(); rgX++) {
nsTableRowGroupFrame* rgFrame = orderedRowGroups[rgX];
map = GetMapFor((nsTableRowGroupFrame*)rgFrame->GetFirstInFlow(), map);
map = GetMapFor((nsTableRowGroupFrame*)rgFrame->FirstInFlow(), map);
if (map) {
if (!maps.AppendElement(map)) {
delete map;
@ -550,7 +550,7 @@ nsTableCellMap::AppendCell(nsTableCellFrame& aCellFrame,
bool aRebuildIfNecessary,
nsIntRect& aDamageArea)
{
NS_ASSERTION(&aCellFrame == aCellFrame.GetFirstInFlow(), "invalid call on continuing frame");
NS_ASSERTION(&aCellFrame == aCellFrame.FirstInFlow(), "invalid call on continuing frame");
nsIFrame* rgFrame = aCellFrame.GetParent(); // get the row
if (!rgFrame) return 0;
rgFrame = rgFrame->GetParent(); // get the row group
@ -611,7 +611,7 @@ nsTableCellMap::RemoveCell(nsTableCellFrame* aCellFrame,
nsIntRect& aDamageArea)
{
if (!aCellFrame) ABORT0();
NS_ASSERTION(aCellFrame == (nsTableCellFrame *)aCellFrame->GetFirstInFlow(),
NS_ASSERTION(aCellFrame == (nsTableCellFrame *)aCellFrame->FirstInFlow(),
"invalid call on continuing frame");
int32_t rowIndex = aRowIndex;
int32_t rgStartRowIndex = 0;

View File

@ -182,7 +182,7 @@ nsresult
nsTableCellFrame::GetColIndex(int32_t &aColIndex) const
{
if (GetPrevInFlow()) {
return ((nsTableCellFrame*)GetFirstInFlow())->GetColIndex(aColIndex);
return ((nsTableCellFrame*)FirstInFlow())->GetColIndex(aColIndex);
}
else {
aColIndex = mColIndex;
@ -787,8 +787,8 @@ CalcUnpaginagedHeight(nsPresContext* aPresContext,
nsTableFrame& aTableFrame,
nscoord aVerticalBorderPadding)
{
const nsTableCellFrame* firstCellInFlow = (nsTableCellFrame*)aCellFrame.GetFirstInFlow();
nsTableFrame* firstTableInFlow = (nsTableFrame*)aTableFrame.GetFirstInFlow();
const nsTableCellFrame* firstCellInFlow = (nsTableCellFrame*)aCellFrame.FirstInFlow();
nsTableFrame* firstTableInFlow = (nsTableFrame*)aTableFrame.FirstInFlow();
nsTableRowFrame* row
= static_cast<nsTableRowFrame*>(firstCellInFlow->GetParent());
nsTableRowGroupFrame* firstRGInFlow
@ -821,7 +821,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsPresContext* aPresContext,
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (aReflowState.mFlags.mSpecialHeightReflow) {
GetFirstInFlow()->AddStateBits(NS_TABLE_CELL_HAD_SPECIAL_REFLOW);
FirstInFlow()->AddStateBits(NS_TABLE_CELL_HAD_SPECIAL_REFLOW);
}
// see if a special height reflow needs to occur due to having a pct height
@ -890,7 +890,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsPresContext* aPresContext,
kidReflowState.mFlags.mSpecialHeightReflow = false;
if (aReflowState.mFlags.mSpecialHeightReflow ||
(GetFirstInFlow()->GetStateBits() & NS_TABLE_CELL_HAD_SPECIAL_REFLOW)) {
(FirstInFlow()->GetStateBits() & NS_TABLE_CELL_HAD_SPECIAL_REFLOW)) {
// We need to force the kid to have mVResize set if we've had a
// special reflow in the past, since the non-special reflow needs to
// resize back to what it was without the special height reflow.

View File

@ -225,7 +225,7 @@ nsTableColGroupFrame::InsertFrames(ChildListID aListID,
col = nextCol;
}
NS_ASSERTION(!aPrevFrame || aPrevFrame == aPrevFrame->GetLastContinuation(),
NS_ASSERTION(!aPrevFrame || aPrevFrame == aPrevFrame->LastContinuation(),
"Prev frame should be last in continuation chain");
NS_ASSERTION(!aPrevFrame || !GetNextColumn(aPrevFrame) ||
GetNextColumn(aPrevFrame)->GetColType() != eColAnonymousCol,

View File

@ -79,7 +79,7 @@ struct nsTableReflowState {
nscoord aAvailWidth,
nscoord aAvailHeight)
{
nsTableFrame* table = (nsTableFrame*)aTableFrame.GetFirstInFlow();
nsTableFrame* table = (nsTableFrame*)aTableFrame.FirstInFlow();
nsMargin borderPadding = table->GetChildAreaOffset(&reflowState);
nscoord cellSpacingX = table->GetCellSpacingX();
@ -578,7 +578,7 @@ void nsTableFrame::RemoveCol(nsTableColGroupFrame* aColGroupFrame,
*/
nsTableCellMap* nsTableFrame::GetCellMap() const
{
nsTableFrame* firstInFlow = (nsTableFrame *)GetFirstInFlow();
nsTableFrame* firstInFlow = (nsTableFrame *)FirstInFlow();
return firstInFlow->mCellMap;
}
@ -1976,7 +1976,7 @@ nsTableFrame::AdjustForCollapsingRowsCols(nsHTMLReflowMetrics& aDesiredSize,
RowGroupArray rowGroups;
OrderRowGroups(rowGroups);
nsTableFrame* firstInFlow = static_cast<nsTableFrame*> (GetFirstInFlow());
nsTableFrame* firstInFlow = static_cast<nsTableFrame*> (FirstInFlow());
nscoord width = firstInFlow->GetCollapsedWidth(aBorderPadding);
nscoord rgWidth = width - 2 * GetCellSpacingX();
nsOverflowAreas overflow;
@ -2334,7 +2334,7 @@ nsTableFrame::DoRemoveFrame(ChildListID aListID,
nsIntRect damageArea;
cellMap->RebuildConsideringCells(nullptr, nullptr, 0, 0, false, damageArea);
((nsTableFrame*)GetFirstInFlow())->MatchCellMapToColCache(cellMap);
((nsTableFrame*)FirstInFlow())->MatchCellMapToColCache(cellMap);
}
}
}
@ -3368,7 +3368,7 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
int32_t nsTableFrame::GetColumnWidth(int32_t aColIndex)
{
nsTableFrame* firstInFlow = static_cast<nsTableFrame*>(GetFirstInFlow());
nsTableFrame* firstInFlow = static_cast<nsTableFrame*>(FirstInFlow());
if (this == firstInFlow) {
nsTableColFrame* colFrame = GetColFrame(aColIndex);
return colFrame ? colFrame->GetFinalWidth() : 0;
@ -6130,7 +6130,7 @@ BCPaintBorderIterator::BCPaintBorderIterator(nsTableFrame* aTable)
mTable = aTable;
mVerInfo = nullptr;
nsMargin childAreaOffset = mTable->GetChildAreaOffset(nullptr);
mTableFirstInFlow = (nsTableFrame*) mTable->GetFirstInFlow();
mTableFirstInFlow = (nsTableFrame*) mTable->FirstInFlow();
mTableCellMap = mTable->GetCellMap();
// y position of first row in damage area
mInitialOffsetY = mTable->GetPrevInFlow() ? 0 : childAreaOffset.top;
@ -6175,7 +6175,7 @@ BCPaintBorderIterator::SetDamageArea(const nsRect& aDirtyRect)
if (haveIntersect) {
if (aDirtyRect.YMost() >= (rowY - topBorderHalf)) {
nsTableRowFrame* fifRow =
static_cast<nsTableRowFrame*>(rowFrame->GetFirstInFlow());
static_cast<nsTableRowFrame*>(rowFrame->FirstInFlow());
endRowIndex = fifRow->GetRowIndex();
}
else done = true;
@ -6185,7 +6185,7 @@ BCPaintBorderIterator::SetDamageArea(const nsRect& aDirtyRect)
mStartRg = rgFrame;
mStartRow = rowFrame;
nsTableRowFrame* fifRow =
static_cast<nsTableRowFrame*>(rowFrame->GetFirstInFlow());
static_cast<nsTableRowFrame*>(rowFrame->FirstInFlow());
startRowIndex = endRowIndex = fifRow->GetRowIndex();
haveIntersect = true;
}
@ -6390,7 +6390,7 @@ BCPaintBorderIterator::SetNewRowGroup()
mPrevRg = mRg;
mRg = mRowGroups[mRgIndex];
nsTableRowGroupFrame* fifRg =
static_cast<nsTableRowGroupFrame*>(mRg->GetFirstInFlow());
static_cast<nsTableRowGroupFrame*>(mRg->FirstInFlow());
mFifRgFirstRowIndex = fifRg->GetStartRowIndex();
mRgFirstRowIndex = mRg->GetStartRowIndex();
mRgLastRowIndex = mRgFirstRowIndex + mRg->GetRowCount() - 1;

View File

@ -550,7 +550,7 @@ protected:
nsMargin aBorderPadding);
nsITableLayoutStrategy* LayoutStrategy() const {
return static_cast<nsTableFrame*>(GetFirstInFlow())->
return static_cast<nsTableFrame*>(FirstInFlow())->
mTableLayoutStrategy;
}
@ -816,12 +816,12 @@ inline void nsTableFrame::SetRowInserted(bool aValue)
inline void nsTableFrame::SetNeedToCollapse(bool aValue)
{
static_cast<nsTableFrame*>(GetFirstInFlow())->mBits.mNeedToCollapse = (unsigned)aValue;
static_cast<nsTableFrame*>(FirstInFlow())->mBits.mNeedToCollapse = (unsigned)aValue;
}
inline bool nsTableFrame::NeedToCollapse() const
{
return (bool) static_cast<nsTableFrame*>(GetFirstInFlow())->mBits.mNeedToCollapse;
return (bool) static_cast<nsTableFrame*>(FirstInFlow())->mBits.mNeedToCollapse;
}
inline void nsTableFrame::SetHasZeroColSpans(bool aValue)
@ -847,7 +847,7 @@ inline bool nsTableFrame::NeedColSpanExpansion() const
inline nsFrameList& nsTableFrame::GetColGroups()
{
return static_cast<nsTableFrame*>(GetFirstInFlow())->mColGroups;
return static_cast<nsTableFrame*>(FirstInFlow())->mColGroups;
}
inline nsTArray<nsTableColFrame*>& nsTableFrame::GetColCache()

View File

@ -765,7 +765,7 @@ nscoord CalcHeightFromUnpaginatedHeight(nsPresContext* aPresContext,
{
nscoord height = 0;
nsTableRowFrame* firstInFlow =
static_cast<nsTableRowFrame*>(aRow.GetFirstInFlow());
static_cast<nsTableRowFrame*>(aRow.FirstInFlow());
if (firstInFlow->HasUnpaginatedHeight()) {
height = firstInFlow->GetUnpaginatedHeight(aPresContext);
for (nsIFrame* prevInFlow = aRow.GetPrevInFlow(); prevInFlow;
@ -1126,7 +1126,7 @@ nsTableRowFrame::CollapseRowIfNecessary(nscoord aRowOffset,
const nsStyleVisibility* rowVis = StyleVisibility();
bool collapseRow = (NS_STYLE_VISIBILITY_COLLAPSE == rowVis->mVisible);
nsTableFrame* tableFrame = static_cast<nsTableFrame*>(
nsTableFrame::GetTableFrame(this)->GetFirstInFlow());
nsTableFrame::GetTableFrame(this)->FirstInFlow());
if (collapseRow) {
tableFrame->SetNeedToCollapse(true);
}
@ -1348,7 +1348,7 @@ nsTableRowFrame::SetUnpaginatedHeight(nsPresContext* aPresContext,
nscoord
nsTableRowFrame::GetUnpaginatedHeight(nsPresContext* aPresContext)
{
FrameProperties props = GetFirstInFlow()->Properties();
FrameProperties props = FirstInFlow()->Properties();
return NS_PTR_TO_INT32(props.Get(RowUnpaginatedHeightProperty()));
}