--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -93,17 +93,17 @@ static void MarkSameFloatManagerLinesDir
nsBlockFrame* blockWithFloatMgr = aBlock;
while (!(blockWithFloatMgr->GetStateBits() & NS_BLOCK_FLOAT_MGR)) {
nsBlockFrame* bf = nsLayoutUtils::GetAsBlock(blockWithFloatMgr->GetParent());
if (!bf) {
break;
}
blockWithFloatMgr = bf;
}
-
+
// Mark every line at and below the line where the float was
// dirty, and mark their lines dirty too. We could probably do
// something more efficient --- e.g., just dirty the lines that intersect
// the float vertically.
MarkAllDescendantLinesDirty(blockWithFloatMgr);
}
/**
@@ -111,17 +111,17 @@ static void MarkSameFloatManagerLinesDir
*/
static bool BlockHasAnyFloats(nsIFrame* aFrame)
{
nsBlockFrame* block = nsLayoutUtils::GetAsBlock(aFrame);
if (!block)
return false;
if (block->GetChildList(nsIFrame::kFloatList).FirstChild())
return true;
-
+
nsLineList::iterator line = block->BeginLine();
nsLineList::iterator endLine = block->EndLine();
while (line != endLine) {
if (line->IsBlock() && BlockHasAnyFloats(line->mFirstChild))
return true;
++line;
}
return false;
@@ -590,26 +590,26 @@ ReparentFrame(nsIFrame* aFrame, nsContai
"Parent not consistent with expectations");
aFrame->SetParent(aNewParent);
// When pushing and pulling frames we need to check for whether any
// views need to be reparented
nsContainerFrame::ReparentFrameView(aFrame, aOldParent, aNewParent);
}
-
+
static void
ReparentFrames(nsFrameList& aFrameList, nsContainerFrame* aOldParent,
nsContainerFrame* aNewParent)
{
for (nsFrameList::Enumerator e(aFrameList); !e.AtEnd(); e.Next()) {
ReparentFrame(e.get(), aOldParent, aNewParent);
}
}
-
+
/**
* Remove the first line from aFromLines and adjust the associated frame list
* aFromFrames accordingly. The removed line is assigned to *aOutLine and
* a frame list with its frames is assigned to *aOutFrames, i.e. the frames
* that were extracted from the head of aFromFrames.
* aFromLines must contain at least one line, the line may be empty.
* @return true if aFromLines becomes empty
*/
@@ -633,17 +633,17 @@ RemoveFirstLine(nsLineList& aFromLines,
/* virtual */ void
nsBlockFrame::MarkIntrinsicISizesDirty()
{
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)) {
- for (nsIFrame* frame = dirtyBlock; frame;
+ for (nsIFrame* frame = dirtyBlock; frame;
frame = frame->GetNextContinuation()) {
frame->AddStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
}
}
nsContainerFrame::MarkIntrinsicISizesDirty();
}
@@ -1272,21 +1272,21 @@ nsBlockFrame::Reflow(nsPresContext*
position.mBStart :
reflowInput->ComputedLogicalBorderPadding().BStart(wm);
nsIFrame* bullet = GetOutsideBullet();
ReflowBullet(bullet, state, reflowOutput, lineBStart);
NS_ASSERTION(!BulletIsEmpty() || reflowOutput.BSize(wm) == 0,
"empty bullet took up space");
if (havePosition && !BulletIsEmpty()) {
- // We have some lines to align the bullet with.
+ // We have some lines to align the bullet with.
// Doing the alignment using the baseline will also cater for
// bullets that are placed next to a child block (bug 92896)
-
+
// Tall bullets won't look particularly nice here...
LogicalRect bbox = bullet->GetLogicalRect(wm, reflowOutput.PhysicalSize());
bbox.BStart(wm) = position.mBaseline - reflowOutput.BlockStartAscent();
bullet->SetRect(wm, bbox, reflowOutput.PhysicalSize());
}
// Otherwise just leave the bullet where it is, up against our
// block-start padding.
}
@@ -1928,17 +1928,17 @@ nsBlockFrame::PrepareResizeReflow(BlockR
line->ResizeReflowOptimizationDisabled() ||
line->IsImpactedByFloat() ||
(line->IEnd() > newAvailISize)) {
line->MarkDirty();
}
#ifdef REALLY_NOISY_REFLOW
if (!line->IsBlock()) {
- printf("PrepareResizeReflow thinks line %p is %simpacted by floats\n",
+ printf("PrepareResizeReflow thinks line %p is %simpacted by floats\n",
line.get(), line->IsImpactedByFloat() ? "" : "not ");
}
#endif
#ifdef DEBUG
if (gNoisyReflow && !line->IsDirty()) {
IndentBy(stdout, gNoiseIndent + 1);
printf("skipped: line=%p next=%p %s %s%s%s breakTypeBefore/After=%s/%s xmost=%d\n",
static_cast<void*>(line.get()),
@@ -1990,17 +1990,17 @@ nsBlockFrame::PropagateFloatDamage(Block
// Check to see if there are any floats; if there aren't, there can't
// be any float damage
if (!floatManager->HasAnyFloats())
return;
// Check the damage region recorded in the float damage.
if (floatManager->HasFloatDamage()) {
- // Need to check mBounds *and* mCombinedArea to find intersections
+ // Need to check mBounds *and* mCombinedArea to find intersections
// with aLine's floats
nscoord lineBCoordBefore = aLine->BStart() + aDeltaBCoord;
nscoord lineBCoordAfter = lineBCoordBefore + aLine->BSize();
// Scrollable overflow should be sufficient for things that affect
// layout.
WritingMode wm = aState.mReflowInput.GetWritingMode();
nsSize containerSize = aState.ContainerSize();
LogicalRect overflow = aLine->GetOverflowArea(eScrollableOverflow, wm,
@@ -2030,17 +2030,17 @@ nsBlockFrame::PropagateFloatDamage(Block
} else {
bool wasImpactedByFloat = aLine->IsImpactedByFloat();
nsFlowAreaRect floatAvailableSpace =
aState.GetFloatAvailableSpaceForBSize(aLine->BStart() + aDeltaBCoord,
aLine->BSize(),
nullptr);
#ifdef REALLY_NOISY_REFLOW
- printf("nsBlockFrame::PropagateFloatDamage %p was = %d, is=%d\n",
+ printf("nsBlockFrame::PropagateFloatDamage %p was = %d, is=%d\n",
this, wasImpactedByFloat, floatAvailableSpace.mHasFloats);
#endif
// Mark the line dirty if it was or is affected by a float
// We actually only really need to reflow if the amount of impact
// changes, but that's not straightforward to check
if (wasImpactedByFloat || floatAvailableSpace.mHasFloats) {
aLine->MarkDirty();
@@ -2496,46 +2496,46 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
// didn't change)
// -- my chain of next-in-flows either has no first line, or its first
// line isn't dirty.
bool heightConstrained =
aState.mReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE;
bool skipPull = willReflowAgain && heightConstrained;
if (!skipPull && heightConstrained && aState.mNextInFlow &&
(aState.mReflowInput.mFlags.mNextInFlowUntouched &&
- !lastLineMovedUp &&
+ !lastLineMovedUp &&
!(GetStateBits() & NS_FRAME_IS_DIRTY) &&
!reflowedFloat)) {
- // We'll place lineIter at the last line of this block, so that
+ // We'll place lineIter at the last line of this block, so that
// nsBlockInFlowLineIterator::Next() will take us to the first
- // line of my next-in-flow-chain. (But first, check that I
+ // line of my next-in-flow-chain. (But first, check that I
// have any lines -- if I don't, just bail out of this
- // optimization.)
+ // optimization.)
LineIterator lineIter = this->EndLine();
if (lineIter != this->BeginLine()) {
lineIter--; // I have lines; step back from dummy iterator to last line.
nsBlockInFlowLineIterator bifLineIter(this, lineIter);
// Check for next-in-flow-chain's first line.
// (First, see if there is such a line, and second, see if it's clean)
- if (!bifLineIter.Next() ||
+ if (!bifLineIter.Next() ||
!bifLineIter.GetLine()->IsDirty()) {
skipPull=true;
}
}
}
if (skipPull && aState.mNextInFlow) {
NS_ASSERTION(heightConstrained, "Height should be constrained here\n");
if (IS_TRUE_OVERFLOW_CONTAINER(aState.mNextInFlow))
NS_FRAME_SET_OVERFLOW_INCOMPLETE(aState.mReflowStatus);
else
NS_FRAME_SET_INCOMPLETE(aState.mReflowStatus);
}
-
+
if (!skipPull && aState.mNextInFlow) {
// Pull data from a next-in-flow if there's still room for more
// content here.
while (keepGoing && aState.mNextInFlow) {
// Grab first line from our next-in-flow
nsBlockFrame* nextInFlow = aState.mNextInFlow;
nsLineBox* pulledLine;
nsFrameList pulledFrames;
@@ -2942,17 +2942,17 @@ nsBlockFrame::MoveChildFramesOfLine(nsLi
}
// Make sure the frame's view and any child views are updated
nsContainerFrame::PlaceFrameView(kid);
kid = kid->GetNextSibling();
}
}
}
-nsresult
+nsresult
nsBlockFrame::AttributeChanged(int32_t aNameSpaceID,
nsIAtom* aAttribute,
int32_t aModType)
{
nsresult rv = nsContainerFrame::AttributeChanged(aNameSpaceID,
aAttribute, aModType);
if (NS_FAILED(rv)) {
return rv;
@@ -3136,18 +3136,18 @@ void
nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
LineIterator aLine,
bool* aKeepReflowGoing)
{
NS_PRECONDITION(*aKeepReflowGoing, "bad caller");
nsIFrame* frame = aLine->mFirstChild;
if (!frame) {
- NS_ASSERTION(false, "program error - unexpected empty line");
- return;
+ NS_ASSERTION(false, "program error - unexpected empty line");
+ return;
}
// Prepare the block reflow engine
nsBlockReflowContext brc(aState.mPresContext, aState.mReflowInput);
StyleClear breakType = frame->StyleDisplay()->
PhysicalBreakType(aState.mReflowInput.GetWritingMode());
if (StyleClear::None != aState.mFloatBreakType) {
@@ -3564,31 +3564,31 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
if (nextLine != EndLine()) {
nextLine->MarkPreviousMarginDirty();
}
}
aLine->SetOverflowAreas(overflowAreas);
if (*aKeepReflowGoing) {
// Some of the child block fit
-
+
// Advance to new Y position
nscoord newBCoord = aLine->BEnd();
aState.mBCoord = newBCoord;
-
+
// Continue the block frame now if it didn't completely fit in
// the available space.
if (!NS_FRAME_IS_FULLY_COMPLETE(frameReflowStatus)) {
bool madeContinuation =
CreateContinuationFor(aState, nullptr, frame);
-
+
nsIFrame* nextFrame = frame->GetNextInFlow();
NS_ASSERTION(nextFrame, "We're supposed to have a next-in-flow by now");
-
+
if (NS_FRAME_IS_NOT_COMPLETE(frameReflowStatus)) {
// If nextFrame used to be an overflow container, make it a normal block
if (!madeContinuation &&
(NS_FRAME_IS_OVERFLOW_CONTAINER & nextFrame->GetStateBits())) {
nsOverflowContinuationTracker::AutoFinish fini(aState.mOverflowTracker, frame);
nsContainerFrame* parent = nextFrame->GetParent();
nsresult rv = parent->StealFrame(nextFrame);
if (NS_FAILED(rv)) {
@@ -3632,17 +3632,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
if (line->Contains(nextFrame)) {
line->MarkDirty();
break;
}
}
}
}
*aKeepReflowGoing = false;
-
+
// The block-end margin for a block is only applied on the last
// flow block. Since we just continued the child block frame,
// we know that line->mFirstChild is not the last flow block
// therefore zero out the running margin value.
#ifdef NOISY_BLOCK_DIR_MARGINS
ListTag(stdout);
printf(": reflow incomplete, frame=");
nsFrame::ListTag(stdout, mFrame);
@@ -3718,17 +3718,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
// Now that we've got its final position all figured out, position any child
// views it may have. Note that the case when frame has a view got handled
// by FinishReflowChild, but that function didn't have the coordinates needed
// to correctly decide whether to reposition child views.
if (originalPosition != frame->GetPosition() && !frame->HasView()) {
nsContainerFrame::PositionChildViews(frame);
}
-
+
#ifdef DEBUG
VerifyLines(true);
#endif
}
void
nsBlockFrame::ReflowInlineFrames(BlockReflowInput& aState,
LineIterator aLine,
@@ -4310,17 +4310,17 @@ nsBlockFrame::SplitLine(BlockReflowInput
nsLineLayout& aLineLayout,
LineIterator aLine,
nsIFrame* aFrame,
LineReflowStatus* aLineReflowStatus)
{
MOZ_ASSERT(aLine->IsInline(), "illegal SplitLine on block line");
int32_t pushCount = aLine->GetChildCount() - aLineLayout.GetCurrentSpanCount();
- MOZ_ASSERT(pushCount >= 0, "bad push count");
+ MOZ_ASSERT(pushCount >= 0, "bad push count");
#ifdef DEBUG
if (gNoisyReflow) {
nsFrame::IndentBy(stdout, gNoiseIndent);
printf("split line: from line=%p pushCount=%d aFrame=",
static_cast<void*>(aLine.get()), pushCount);
if (aFrame) {
nsFrame::ListTag(stdout, aFrame);
@@ -4678,17 +4678,17 @@ nsBlockFrame::PushLines(BlockReflowInput
overflowLines->mFrames.InsertFrames(nullptr, nullptr, pushedFrames);
overflowLines->mLines.splice(overflowLines->mLines.begin(), mLines,
overBegin, EndLine());
NS_ASSERTION(!overflowLines->mLines.empty(), "should not be empty");
// this takes ownership but it won't delete it immediately so we
// can keep using it.
SetOverflowLines(overflowLines);
-
+
// Mark all the overflow lines dirty so that they get reflowed when
// they are pulled up by our next-in-flow.
// XXXldb Can this get called O(N) times making the whole thing O(N^2)?
for (LineIterator line = overflowLines->mLines.begin(),
line_end = overflowLines->mLines.end();
line != line_end;
++line)
@@ -4747,17 +4747,17 @@ nsBlockFrame::DrainOverflowLines()
if (!mLines.empty()) {
// Remember to recompute the margins on the first line. This will
// also recompute the correct deltaBCoord if necessary.
mLines.front()->MarkPreviousMarginDirty();
}
// The overflow lines have already been marked dirty and their previous
// margins marked dirty also.
-
+
// Prepend the overflow frames/lines to our principal list.
mFrames.InsertFrames(nullptr, nullptr, overflowLines->mFrames);
mLines.splice(mLines.begin(), overflowLines->mLines);
NS_ASSERTION(overflowLines->mLines.empty(), "splice should empty list");
delete overflowLines;
didFindOverflow = true;
}
}
@@ -5224,17 +5224,17 @@ nsBlockFrame::AddFrames(nsFrameList& aFr
return;
}
// If we're inserting at the beginning of our list and we have an
// inside bullet, insert after that bullet.
if (!aPrevSibling && HasInsideBullet()) {
aPrevSibling = GetInsideBullet();
}
-
+
// Attempt to find the line that contains the previous sibling
nsLineList* lineList = &mLines;
nsFrameList* frames = &mFrames;
nsLineList::iterator prevSibLine = lineList->end();
int32_t prevSiblingIndex = -1;
if (aPrevSibling) {
// XXX_perf This is technically O(N^2) in some cases, but by using
// RFind instead of Find, we make it O(N) in the most common case,
@@ -5712,17 +5712,17 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aD
TryAllLines(&line, &line_start, &line_end, &searchingOverflowList,
&overflowLines);
}
if (line == line_end) {
NS_ERROR("can't find deleted frame in lines");
return;
}
-
+
if (!(aFlags & FRAMES_ARE_EMPTY)) {
if (line != line_start) {
line.prev()->MarkDirty();
line.prev()->SetInvalidateTextRuns(true);
}
else if (searchingOverflowList && !mLines.empty()) {
mLines.back()->MarkDirty();
mLines.back()->SetInvalidateTextRuns(true);
@@ -5740,17 +5740,17 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aD
// If the frame being deleted is the last one on the line then
// optimize away the line->Contains(next-in-flow) call below.
bool isLastFrameOnLine = 1 == line->GetChildCount();
if (!isLastFrameOnLine) {
LineIterator next = line.next();
nsIFrame* lastFrame = next != line_end ?
next->mFirstChild->GetPrevSibling() :
- (searchingOverflowList ? overflowLines->mFrames.LastChild() :
+ (searchingOverflowList ? overflowLines->mFrames.LastChild() :
mFrames.LastChild());
NS_ASSERTION(next == line_end || lastFrame == line->LastChild(),
"unexpected line frames");
isLastFrameOnLine = lastFrame == aDeletedFrame;
}
// Remove aDeletedFrame from the line
if (line->mFirstChild == aDeletedFrame) {
@@ -6198,17 +6198,17 @@ nsBlockFrame::ReflowFloat(BlockReflowInp
if (aReflowStatus & NS_FRAME_REFLOW_NEXTINFLOW) {
aState.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
}
if (aFloat->GetType() == nsGkAtoms::letterFrame) {
// We never split floating first letters; an incomplete state for
// such frames simply means that there is more content to be
// reflowed on the line.
- if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus))
+ if (NS_FRAME_IS_NOT_COMPLETE(aReflowStatus))
aReflowStatus = NS_FRAME_COMPLETE;
}
// Capture the margin and offsets information for the caller
aFloatMargin =
// float margins don't collapse
floatRS.ComputedLogicalMargin().ConvertTo(wm, floatRS.GetWritingMode());
aFloatOffsets =
@@ -6225,17 +6225,17 @@ nsBlockFrame::ReflowFloat(BlockReflowInp
WritingMode metricsWM = metrics.GetWritingMode();
aFloat->SetSize(metricsWM, metrics.Size(metricsWM));
if (aFloat->HasView()) {
nsContainerFrame::SyncFrameViewAfterReflow(aState.mPresContext, aFloat,
aFloat->GetView(),
metrics.VisualOverflow(),
NS_FRAME_NO_MOVE_VIEW);
}
- // Pass floatRS so the frame hierarchy can be used (redoFloatRS has the same hierarchy)
+ // Pass floatRS so the frame hierarchy can be used (redoFloatRS has the same hierarchy)
aFloat->DidReflow(aState.mPresContext, &floatRS,
nsDidReflowStatus::FINISHED);
#ifdef NOISY_FLOAT
printf("end ReflowFloat %p, sized to %d,%d\n",
aFloat, metrics.Width(), metrics.Height());
#endif
}
@@ -6493,17 +6493,17 @@ DisplayLine(nsDisplayListBuilder* aBuild
nsIFrame* kid = aLine->mFirstChild;
int32_t n = aLine->GetChildCount();
while (--n >= 0) {
aFrame->BuildDisplayListForChild(aBuilder, kid, aDirtyRect,
childLists, flags);
kid = kid->GetNextSibling();
}
-
+
if (lineMayHaveTextOverflow) {
aTextOverflow->ProcessLine(collection, aLine.get());
}
collection.MoveTo(aLists);
}
void
@@ -6556,17 +6556,17 @@ nsBlockFrame::BuildDisplayList(nsDisplay
// intersect with the dirty area.
// In particular, we really want to check ShouldDescendIntoFrame()
// on all our child frames, but that might be expensive. So we
// approximate it by checking it on |this|; if it's true for any
// frame in our child list, it's also true for |this|.
nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ?
nullptr : GetFirstLineContaining(aDirtyRect.y);
LineIterator line_end = EndLine();
-
+
if (cursor) {
for (LineIterator line = mLines.begin(cursor);
line != line_end;
++line) {
nsRect lineArea = line->GetVisualOverflowArea();
if (!lineArea.IsEmpty()) {
// Because we have a cursor, the combinedArea.ys are non-decreasing.
// Once we've passed aDirtyRect.YMost(), we can never see it again.
@@ -6656,17 +6656,17 @@ nsBlockFrame::AccessibleType()
if (!HasBullet() || !PresContext()) {
//XXXsmaug What if we're in the shadow dom?
if (!mContent->GetParent()) {
// Don't create accessible objects for the root content node, they are redundant with
// the nsDocAccessible object created with the document node
return a11y::eNoType;
}
-
+
nsCOMPtr<nsIDOMHTMLDocument> htmlDoc =
do_QueryInterface(mContent->GetComposedDoc());
if (htmlDoc) {
nsCOMPtr<nsIDOMHTMLElement> body;
htmlDoc->GetBody(getter_AddRefs(body));
if (SameCOMIdentity(body, mContent)) {
// Don't create accessible objects for the body, they are redundant with
// the nsDocAccessible object created with the document node
@@ -6694,29 +6694,29 @@ void nsBlockFrame::ClearLineCursor()
}
void nsBlockFrame::SetupLineCursor()
{
if (GetStateBits() & NS_BLOCK_HAS_LINE_CURSOR
|| mLines.empty()) {
return;
}
-
+
Properties().Set(LineCursorProperty(), mLines.front());
AddStateBits(NS_BLOCK_HAS_LINE_CURSOR);
}
nsLineBox* nsBlockFrame::GetFirstLineContaining(nscoord y)
{
if (!(GetStateBits() & NS_BLOCK_HAS_LINE_CURSOR)) {
return nullptr;
}
FrameProperties props = Properties();
-
+
nsLineBox* property = props.Get(LineCursorProperty());
LineIterator cursor = mLines.begin(property);
nsRect cursorArea = cursor->GetVisualOverflowArea();
while ((cursorArea.IsEmpty() || cursorArea.YMost() > y)
&& cursor != mLines.front()) {
cursor = cursor.prev();
cursorArea = cursor->GetVisualOverflowArea();
@@ -6745,17 +6745,17 @@ nsBlockFrame::ChildIsDirty(nsIFrame* aCh
// The bullet lives in the first line, unless the first line has
// height 0 and there is a second line, in which case it lives
// in the second line.
LineIterator bulletLine = BeginLine();
if (bulletLine != EndLine() && bulletLine->BSize() == 0 &&
bulletLine != mLines.back()) {
bulletLine = bulletLine.next();
}
-
+
if (bulletLine != EndLine()) {
MarkLineDirty(bulletLine, &mLines);
}
// otherwise we have an empty line list, and ReflowDirtyLines
// will handle reflowing the bullet.
} else {
// Note that we should go through our children to mark lines dirty
// before the next reflow. Doing it now could make things O(N^2)
@@ -7144,17 +7144,17 @@ nsBlockFrame::CheckFloats(BlockReflowInp
lineFloats.AppendElement(fc->mFloat);
fc = fc->Next();
}
}
if (line->IsDirty()) {
anyLineDirty = true;
}
}
-
+
AutoTArray<nsIFrame*, 8> storedFloats;
bool equal = true;
uint32_t i = 0;
for (nsIFrame* f : mFloats) {
if (f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT)
continue;
storedFloats.AppendElement(f);
if (i < lineFloats.Length() && lineFloats.ElementAt(i) != f) {
@@ -7272,25 +7272,25 @@ nsBlockFrame::ISizeToClearPastFloats(con
reflowInput.ComputedSizeWithBorderPadding().ConvertTo(wm, frWM).ISize(wm);
// Use the margins from offsetState rather than reflowInput so that
// they aren't reduced by ignoring margins in overconstrained cases.
LogicalMargin computedMargin =
offsetState.ComputedLogicalMargin().ConvertTo(wm, frWM);
result.marginIStart = computedMargin.IStart(wm);
return result;
}
-
+
/* static */
nsBlockFrame*
nsBlockFrame::GetNearestAncestorBlock(nsIFrame* aCandidate)
{
nsBlockFrame* block = nullptr;
while(aCandidate) {
block = nsLayoutUtils::GetAsBlock(aCandidate);
- if (block) {
+ if (block) {
// yay, candidate is a block!
return block;
}
// Not a block. Check its parent next.
aCandidate = aCandidate->GetParent();
}
NS_NOTREACHED("Fell off frame tree looking for ancestor block!");
return nullptr;