Bug 1286468 - Rename line related typedefs in nsBlockFrame. r=TYLin

MozReview-Commit-ID: Cz9R3D4NzMc
This commit is contained in:
Jeremy Chen
2016-10-22 19:41:04 +08:00
parent d564bdfef4
commit a63dddda2b
8 changed files with 114 additions and 114 deletions

View File

@@ -6217,8 +6217,8 @@ nsLayoutUtils::GetFirstLinePosition(WritingMode aWM,
return false; return false;
} }
for (nsBlockFrame::const_line_iterator line = block->begin_lines(), for (nsBlockFrame::ConstLineIterator line = block->begin_lines(),
line_end = block->end_lines(); line_end = block->end_lines();
line != line_end; ++line) { line != line_end; ++line) {
if (line->IsBlock()) { if (line->IsBlock()) {
nsIFrame *kid = line->mFirstChild; nsIFrame *kid = line->mFirstChild;
@@ -6256,8 +6256,8 @@ nsLayoutUtils::GetLastLineBaseline(WritingMode aWM,
// No baseline. (We intentionally don't descend into scroll frames.) // No baseline. (We intentionally don't descend into scroll frames.)
return false; return false;
for (nsBlockFrame::const_reverse_line_iterator line = block->rbegin_lines(), for (nsBlockFrame::ConstReverseLineIterator line = block->rbegin_lines(),
line_end = block->rend_lines(); line_end = block->rend_lines();
line != line_end; ++line) { line != line_end; ++line) {
if (line->IsBlock()) { if (line->IsBlock()) {
nsIFrame *kid = line->mFirstChild; nsIFrame *kid = line->mFirstChild;
@@ -6294,8 +6294,8 @@ CalculateBlockContentBEnd(WritingMode aWM, nsBlockFrame* aFrame)
nscoord contentBEnd = 0; nscoord contentBEnd = 0;
for (nsBlockFrame::line_iterator line = aFrame->begin_lines(), for (nsBlockFrame::LineIterator line = aFrame->begin_lines(),
line_end = aFrame->end_lines(); line_end = aFrame->end_lines();
line != line_end; ++line) { line != line_end; ++line) {
if (line->IsBlock()) { if (line->IsBlock()) {
nsIFrame* child = line->mFirstChild; nsIFrame* child = line->mFirstChild;

View File

@@ -1347,7 +1347,7 @@ ReflowInput::CalculateHypotheticalPosition
} else { } else {
NS_ASSERTION(iter.GetContainer() == blockFrame, NS_ASSERTION(iter.GetContainer() == blockFrame,
"Found placeholder in wrong block!"); "Found placeholder in wrong block!");
nsBlockFrame::line_iterator lineBox = iter.GetLine(); nsBlockFrame::LineIterator lineBox = iter.GetLine();
// How we determine the hypothetical box depends on whether the element // How we determine the hypothetical box depends on whether the element
// would have been inline-level or block-level // would have been inline-level or block-level

View File

@@ -397,7 +397,7 @@ nsBlockFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
// Output the lines // Output the lines
if (!mLines.empty()) { if (!mLines.empty()) {
const_line_iterator line = begin_lines(), line_end = end_lines(); ConstLineIterator line = begin_lines(), line_end = end_lines();
for ( ; line != line_end; ++line) { for ( ; line != line_end; ++line) {
line->List(out, pfx.get(), aFlags); line->List(out, pfx.get(), aFlags);
} }
@@ -409,8 +409,8 @@ nsBlockFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
fprintf_stderr(out, "%sOverflow-lines %p/%p <\n", pfx.get(), overflowLines, &overflowLines->mFrames); fprintf_stderr(out, "%sOverflow-lines %p/%p <\n", pfx.get(), overflowLines, &overflowLines->mFrames);
nsCString nestedPfx(pfx); nsCString nestedPfx(pfx);
nestedPfx += " "; nestedPfx += " ";
const_line_iterator line = overflowLines->mLines.begin(), ConstLineIterator line = overflowLines->mLines.begin(),
line_end = overflowLines->mLines.end(); line_end = overflowLines->mLines.end();
for ( ; line != line_end; ++line) { for ( ; line != line_end; ++line) {
line->List(out, nestedPfx.get(), aFlags); line->List(out, nestedPfx.get(), aFlags);
} }
@@ -504,7 +504,7 @@ nsBlockFrame::GetCaretBaseline() const
nsMargin bp = GetUsedBorderAndPadding(); nsMargin bp = GetUsedBorderAndPadding();
if (!mLines.empty()) { if (!mLines.empty()) {
const_line_iterator line = begin_lines(); ConstLineIterator line = begin_lines();
const nsLineBox* firstLine = line; const nsLineBox* firstLine = line;
if (firstLine->GetChildCount()) { if (firstLine->GetChildCount()) {
return bp.top + firstLine->mFirstChild->GetCaretBaseline(); return bp.top + firstLine->mFirstChild->GetCaretBaseline();
@@ -704,7 +704,7 @@ nsBlockFrame::GetMinISize(nsRenderingContext *aRenderingContext)
InlineMinISizeData data; InlineMinISizeData data;
for (nsBlockFrame* curFrame = this; curFrame; for (nsBlockFrame* curFrame = this; curFrame;
curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) { curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
for (line_iterator line = curFrame->begin_lines(), line_end = curFrame->end_lines(); for (LineIterator line = curFrame->begin_lines(), line_end = curFrame->end_lines();
line != line_end; ++line) line != line_end; ++line)
{ {
#ifdef DEBUG #ifdef DEBUG
@@ -792,7 +792,7 @@ nsBlockFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
InlinePrefISizeData data; InlinePrefISizeData data;
for (nsBlockFrame* curFrame = this; curFrame; for (nsBlockFrame* curFrame = this; curFrame;
curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) { curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
for (line_iterator line = curFrame->begin_lines(), line_end = curFrame->end_lines(); for (LineIterator line = curFrame->begin_lines(), line_end = curFrame->end_lines();
line != line_end; ++line) line != line_end; ++line)
{ {
#ifdef DEBUG #ifdef DEBUG
@@ -878,7 +878,7 @@ nsBlockFrame::GetPrefWidthTightBounds(nsRenderingContext* aRenderingContext,
InlinePrefISizeData data; InlinePrefISizeData data;
for (nsBlockFrame* curFrame = this; curFrame; for (nsBlockFrame* curFrame = this; curFrame;
curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) { curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
for (line_iterator line = curFrame->begin_lines(), line_end = curFrame->end_lines(); for (LineIterator line = curFrame->begin_lines(), line_end = curFrame->end_lines();
line != line_end; ++line) line != line_end; ++line)
{ {
nscoord childX, childXMost; nscoord childX, childXMost;
@@ -1313,7 +1313,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
nsSize containerSize = aMetrics.PhysicalSize(); nsSize containerSize = aMetrics.PhysicalSize();
nscoord deltaX = containerSize.width - state.ContainerSize().width; nscoord deltaX = containerSize.width - state.ContainerSize().width;
if (deltaX != 0) { if (deltaX != 0) {
for (line_iterator line = begin_lines(), end = end_lines(); for (LineIterator line = begin_lines(), end = end_lines();
line != end; line++) { line != end; line++) {
UpdateLineContainerSize(line, containerSize); UpdateLineContainerSize(line, containerSize);
} }
@@ -1484,8 +1484,8 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
bool bool
nsBlockFrame::CheckForCollapsedBEndMarginFromClearanceLine() nsBlockFrame::CheckForCollapsedBEndMarginFromClearanceLine()
{ {
line_iterator begin = begin_lines(); LineIterator begin = begin_lines();
line_iterator line = end_lines(); LineIterator line = end_lines();
while (true) { while (true) {
if (begin == line) { if (begin == line) {
@@ -1719,7 +1719,7 @@ nsBlockFrame::ComputeOverflowAreas(const nsRect& aBounds,
// the things that makes incremental reflow O(N^2). // the things that makes incremental reflow O(N^2).
nsOverflowAreas areas(aBounds, aBounds); nsOverflowAreas areas(aBounds, aBounds);
if (!ShouldApplyOverflowClipping(this, aDisplay)) { if (!ShouldApplyOverflowClipping(this, aDisplay)) {
for (line_iterator line = begin_lines(), line_end = end_lines(); for (LineIterator line = begin_lines(), line_end = end_lines();
line != line_end; line != line_end;
++line) { ++line) {
areas.UnionWith(line->GetOverflowAreas()); areas.UnionWith(line->GetOverflowAreas());
@@ -1757,7 +1757,7 @@ nsBlockFrame::UnionChildOverflow(nsOverflowAreas& aOverflowAreas)
// get cached and re-used otherwise. Lines aren't exposed as normal // get cached and re-used otherwise. Lines aren't exposed as normal
// frame children, so calling UnionChildOverflow alone will end up // frame children, so calling UnionChildOverflow alone will end up
// using the old cached values. // using the old cached values.
for (line_iterator line = begin_lines(), line_end = end_lines(); for (LineIterator line = begin_lines(), line_end = end_lines();
line != line_end; line != line_end;
++line) { ++line) {
nsRect bounds = line->GetPhysicalBounds(); nsRect bounds = line->GetPhysicalBounds();
@@ -1807,7 +1807,7 @@ void
nsBlockFrame::LazyMarkLinesDirty() nsBlockFrame::LazyMarkLinesDirty()
{ {
if (GetStateBits() & NS_BLOCK_LOOK_FOR_DIRTY_FRAMES) { if (GetStateBits() & NS_BLOCK_LOOK_FOR_DIRTY_FRAMES) {
for (line_iterator line = begin_lines(), line_end = end_lines(); for (LineIterator line = begin_lines(), line_end = end_lines();
line != line_end; ++line) { line != line_end; ++line) {
int32_t n = line->GetChildCount(); int32_t n = line->GetChildCount();
for (nsIFrame* lineFrame = line->mFirstChild; for (nsIFrame* lineFrame = line->mFirstChild;
@@ -1824,7 +1824,7 @@ nsBlockFrame::LazyMarkLinesDirty()
} }
void void
nsBlockFrame::MarkLineDirty(line_iterator aLine, const nsLineList* aLineList) nsBlockFrame::MarkLineDirty(LineIterator aLine, const nsLineList* aLineList)
{ {
// Mark aLine dirty // Mark aLine dirty
aLine->MarkDirty(); aLine->MarkDirty();
@@ -1914,7 +1914,7 @@ nsBlockFrame::PrepareResizeReflow(BlockReflowInput& aState)
} }
#endif #endif
for (line_iterator line = begin_lines(), line_end = end_lines(); for (LineIterator line = begin_lines(), line_end = end_lines();
line != line_end; line != line_end;
++line) ++line)
{ {
@@ -1956,7 +1956,7 @@ nsBlockFrame::PrepareResizeReflow(BlockReflowInput& aState)
} }
else { else {
// Mark everything dirty // Mark everything dirty
for (line_iterator line = begin_lines(), line_end = end_lines(); for (LineIterator line = begin_lines(), line_end = end_lines();
line != line_end; line != line_end;
++line) ++line)
{ {
@@ -2124,7 +2124,7 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
if (aState.mReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE if (aState.mReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE
&& GetNextInFlow() && aState.mReflowInput.AvailableBSize() > && GetNextInFlow() && aState.mReflowInput.AvailableBSize() >
GetLogicalSize().BSize(aState.mReflowInput.GetWritingMode())) { GetLogicalSize().BSize(aState.mReflowInput.GetWritingMode())) {
line_iterator lastLine = end_lines(); LineIterator lastLine = end_lines();
if (lastLine != begin_lines()) { if (lastLine != begin_lines()) {
--lastLine; --lastLine;
lastLine->MarkDirty(); lastLine->MarkDirty();
@@ -2145,7 +2145,7 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
// We save up information about BR-clearance here // We save up information about BR-clearance here
StyleClear inlineFloatBreakType = aState.mFloatBreakType; StyleClear inlineFloatBreakType = aState.mFloatBreakType;
line_iterator line = begin_lines(), line_end = end_lines(); LineIterator line = begin_lines(), line_end = end_lines();
// Reflow the lines that are already ours // Reflow the lines that are already ours
for ( ; line != line_end; ++line, aState.AdvanceToNextLine()) { for ( ; line != line_end; ++line, aState.AdvanceToNextLine()) {
@@ -2509,7 +2509,7 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
// 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 // have any lines -- if I don't, just bail out of this
// optimization.) // optimization.)
line_iterator lineIter = this->end_lines(); LineIterator lineIter = this->end_lines();
if (lineIter != this->begin_lines()) { if (lineIter != this->begin_lines()) {
lineIter--; // I have lines; step back from dummy iterator to last line. lineIter--; // I have lines; step back from dummy iterator to last line.
nsBlockInFlowLineIterator bifLineIter(this, lineIter); nsBlockInFlowLineIterator bifLineIter(this, lineIter);
@@ -2763,7 +2763,7 @@ nsBlockFrame::DeleteLine(BlockReflowInput& aState,
*/ */
void void
nsBlockFrame::ReflowLine(BlockReflowInput& aState, nsBlockFrame::ReflowLine(BlockReflowInput& aState,
line_iterator aLine, LineIterator aLine,
bool* aKeepReflowGoing) bool* aKeepReflowGoing)
{ {
MOZ_ASSERT(aLine->GetChildCount(), "reflowing empty line"); MOZ_ASSERT(aLine->GetChildCount(), "reflowing empty line");
@@ -2785,7 +2785,7 @@ nsBlockFrame::ReflowLine(BlockReflowInput& aState,
nsIFrame* nsIFrame*
nsBlockFrame::PullFrame(BlockReflowInput& aState, nsBlockFrame::PullFrame(BlockReflowInput& aState,
line_iterator aLine) LineIterator aLine)
{ {
// First check our remaining lines. // First check our remaining lines.
if (end_lines() != aLine.next()) { if (end_lines() != aLine.next()) {
@@ -3058,7 +3058,7 @@ nsBlockFrame::CachedIsEmpty()
return false; return false;
} }
for (line_iterator line = begin_lines(), line_end = end_lines(); for (LineIterator line = begin_lines(), line_end = end_lines();
line != line_end; line != line_end;
++line) ++line)
{ {
@@ -3076,7 +3076,7 @@ nsBlockFrame::IsEmpty()
return false; return false;
} }
for (line_iterator line = begin_lines(), line_end = end_lines(); for (LineIterator line = begin_lines(), line_end = end_lines();
line != line_end; line != line_end;
++line) ++line)
{ {
@@ -3108,7 +3108,7 @@ nsBlockFrame::ShouldApplyBStartMargin(BlockReflowInput& aState,
} }
// Determine if this line is "essentially" the first line // Determine if this line is "essentially" the first line
line_iterator line = begin_lines(); LineIterator line = begin_lines();
if (aState.mFlags.mHasLineAdjacentToTop) { if (aState.mFlags.mHasLineAdjacentToTop) {
line = aState.mLineAdjacentToTop; line = aState.mLineAdjacentToTop;
} }
@@ -3134,7 +3134,7 @@ nsBlockFrame::ShouldApplyBStartMargin(BlockReflowInput& aState,
void void
nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState, nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
line_iterator aLine, LineIterator aLine,
bool* aKeepReflowGoing) bool* aKeepReflowGoing)
{ {
NS_PRECONDITION(*aKeepReflowGoing, "bad caller"); NS_PRECONDITION(*aKeepReflowGoing, "bad caller");
@@ -3559,7 +3559,7 @@ nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
} }
if (aLine->SetCarriedOutBEndMargin(collapsedBEndMargin)) { if (aLine->SetCarriedOutBEndMargin(collapsedBEndMargin)) {
line_iterator nextLine = aLine; LineIterator nextLine = aLine;
++nextLine; ++nextLine;
if (nextLine != end_lines()) { if (nextLine != end_lines()) {
nextLine->MarkPreviousMarginDirty(); nextLine->MarkPreviousMarginDirty();
@@ -3627,7 +3627,7 @@ nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
nsLayoutUtils::GetAsBlock(nextFrame->GetParent()); nsLayoutUtils::GetAsBlock(nextFrame->GetParent());
NS_ASSERTION(nifBlock, NS_ASSERTION(nifBlock,
"A block's child's next in flow's parent must be a block!"); "A block's child's next in flow's parent must be a block!");
for (line_iterator line = nifBlock->begin_lines(), for (LineIterator line = nifBlock->begin_lines(),
line_end = nifBlock->end_lines(); line != line_end; ++line) { line_end = nifBlock->end_lines(); line != line_end; ++line) {
if (line->Contains(nextFrame)) { if (line->Contains(nextFrame)) {
line->MarkDirty(); line->MarkDirty();
@@ -3731,7 +3731,7 @@ nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
void void
nsBlockFrame::ReflowInlineFrames(BlockReflowInput& aState, nsBlockFrame::ReflowInlineFrames(BlockReflowInput& aState,
line_iterator aLine, LineIterator aLine,
bool* aKeepReflowGoing) bool* aKeepReflowGoing)
{ {
*aKeepReflowGoing = true; *aKeepReflowGoing = true;
@@ -3806,7 +3806,7 @@ nsBlockFrame::ReflowInlineFrames(BlockReflowInput& aState,
void void
nsBlockFrame::PushTruncatedLine(BlockReflowInput& aState, nsBlockFrame::PushTruncatedLine(BlockReflowInput& aState,
line_iterator aLine, LineIterator aLine,
bool* aKeepReflowGoing) bool* aKeepReflowGoing)
{ {
PushLines(aState, aLine.prev()); PushLines(aState, aLine.prev());
@@ -3817,7 +3817,7 @@ nsBlockFrame::PushTruncatedLine(BlockReflowInput& aState,
void void
nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState, nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState,
nsLineLayout& aLineLayout, nsLineLayout& aLineLayout,
line_iterator aLine, LineIterator aLine,
nsFlowAreaRect& aFloatAvailableSpace, nsFlowAreaRect& aFloatAvailableSpace,
nscoord& aAvailableSpaceHeight, nscoord& aAvailableSpaceHeight,
nsFloatManager::SavedState* nsFloatManager::SavedState*
@@ -4074,7 +4074,7 @@ nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState,
void void
nsBlockFrame::ReflowInlineFrame(BlockReflowInput& aState, nsBlockFrame::ReflowInlineFrame(BlockReflowInput& aState,
nsLineLayout& aLineLayout, nsLineLayout& aLineLayout,
line_iterator aLine, LineIterator aLine,
nsIFrame* aFrame, nsIFrame* aFrame,
LineReflowStatus* aLineReflowStatus) LineReflowStatus* aLineReflowStatus)
{ {
@@ -4308,7 +4308,7 @@ CheckPlaceholderInLine(nsIFrame* aBlock, nsLineBox* aLine, nsFloatCache* aFC)
void void
nsBlockFrame::SplitLine(BlockReflowInput& aState, nsBlockFrame::SplitLine(BlockReflowInput& aState,
nsLineLayout& aLineLayout, nsLineLayout& aLineLayout,
line_iterator aLine, LineIterator aLine,
nsIFrame* aFrame, nsIFrame* aFrame,
LineReflowStatus* aLineReflowStatus) LineReflowStatus* aLineReflowStatus)
{ {
@@ -4381,7 +4381,7 @@ nsBlockFrame::SplitLine(BlockReflowInput& aState,
bool bool
nsBlockFrame::IsLastLine(BlockReflowInput& aState, nsBlockFrame::IsLastLine(BlockReflowInput& aState,
line_iterator aLine) LineIterator aLine)
{ {
while (++aLine != end_lines()) { while (++aLine != end_lines()) {
// There is another line // There is another line
@@ -4397,7 +4397,7 @@ nsBlockFrame::IsLastLine(BlockReflowInput& aState,
// Try our next-in-flows lines to answer the question // Try our next-in-flows lines to answer the question
nsBlockFrame* nextInFlow = (nsBlockFrame*) GetNextInFlow(); nsBlockFrame* nextInFlow = (nsBlockFrame*) GetNextInFlow();
while (nullptr != nextInFlow) { while (nullptr != nextInFlow) {
for (line_iterator line = nextInFlow->begin_lines(), for (LineIterator line = nextInFlow->begin_lines(),
line_end = nextInFlow->end_lines(); line_end = nextInFlow->end_lines();
line != line_end; line != line_end;
++line) ++line)
@@ -4415,7 +4415,7 @@ nsBlockFrame::IsLastLine(BlockReflowInput& aState,
bool bool
nsBlockFrame::PlaceLine(BlockReflowInput& aState, nsBlockFrame::PlaceLine(BlockReflowInput& aState,
nsLineLayout& aLineLayout, nsLineLayout& aLineLayout,
line_iterator aLine, LineIterator aLine,
nsFloatManager::SavedState *aFloatStateBeforeLine, nsFloatManager::SavedState *aFloatStateBeforeLine,
LogicalRect& aFloatAvailableSpace, LogicalRect& aFloatAvailableSpace,
nscoord& aAvailableSpaceHeight, nscoord& aAvailableSpaceHeight,
@@ -4688,7 +4688,7 @@ nsBlockFrame::PushLines(BlockReflowInput& aState,
// they are pulled up by our next-in-flow. // they are pulled up by our next-in-flow.
// XXXldb Can this get called O(N) times making the whole thing O(N^2)? // XXXldb Can this get called O(N) times making the whole thing O(N^2)?
for (line_iterator line = overflowLines->mLines.begin(), for (LineIterator line = overflowLines->mLines.begin(),
line_end = overflowLines->mLines.end(); line_end = overflowLines->mLines.end();
line != line_end; line != line_end;
++line) ++line)
@@ -5352,7 +5352,7 @@ nsBlockFrame::RemoveFloatFromFloatCache(nsIFrame* aFloat)
{ {
// Find which line contains the float, so we can update // Find which line contains the float, so we can update
// the float cache. // the float cache.
line_iterator line = begin_lines(), line_end = end_lines(); LineIterator line = begin_lines(), line_end = end_lines();
for ( ; line != line_end; ++line) { for ( ; line != line_end; ++line) {
if (line->IsInline() && line->RemoveFloat(aFloat)) { if (line->IsInline() && line->RemoveFloat(aFloat)) {
break; break;
@@ -5451,7 +5451,7 @@ nsBlockFrame::TryAllLines(nsLineList::iterator* aIterator,
} }
nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame, nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
line_iterator aLine) LineIterator aLine)
: mFrame(aFrame), mLine(aLine), mLineList(&aFrame->mLines) : mFrame(aFrame), mLine(aLine), mLineList(&aFrame->mLines)
{ {
// This will assert if aLine isn't in mLines of aFrame: // This will assert if aLine isn't in mLines of aFrame:
@@ -5459,7 +5459,7 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
} }
nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame, nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
line_iterator aLine, bool aInOverflow) LineIterator aLine, bool aInOverflow)
: mFrame(aFrame), mLine(aLine), : mFrame(aFrame), mLine(aLine),
mLineList(aInOverflow ? &aFrame->GetOverflowLines()->mLines mLineList(aInOverflow ? &aFrame->GetOverflowLines()->mLines
: &aFrame->mLines) : &aFrame->mLines)
@@ -5507,15 +5507,15 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
if (!child) if (!child)
return; return;
line_iterator line_end = aFrame->end_lines(); LineIterator line_end = aFrame->end_lines();
// Try to use the cursor if it exists, otherwise fall back to the first line // Try to use the cursor if it exists, otherwise fall back to the first line
if (nsLineBox* const cursor = aFrame->GetLineCursor()) { if (nsLineBox* const cursor = aFrame->GetLineCursor()) {
mLine = line_end; mLine = line_end;
// Perform a simultaneous forward and reverse search starting from the // Perform a simultaneous forward and reverse search starting from the
// line cursor. // line cursor.
nsBlockFrame::line_iterator line = aFrame->line(cursor); nsBlockFrame::LineIterator line = aFrame->line(cursor);
nsBlockFrame::reverse_line_iterator rline = aFrame->rline(cursor); nsBlockFrame::ReverseLineIterator rline = aFrame->rline(cursor);
nsBlockFrame::reverse_line_iterator rline_end = aFrame->rend_lines(); nsBlockFrame::ReverseLineIterator rline_end = aFrame->rend_lines();
// rline is positioned on the line containing 'cursor', so it's not // rline is positioned on the line containing 'cursor', so it's not
// rline_end. So we can safely increment it (i.e. move it to one line // rline_end. So we can safely increment it (i.e. move it to one line
// earlier) to start searching there. // earlier) to start searching there.
@@ -5571,7 +5571,7 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
} while (Next()); } while (Next());
} }
nsBlockFrame::line_iterator nsBlockFrame::LineIterator
nsBlockInFlowLineIterator::End() nsBlockInFlowLineIterator::End()
{ {
return mLineList->end(); return mLineList->end();
@@ -5580,7 +5580,7 @@ nsBlockInFlowLineIterator::End()
bool bool
nsBlockInFlowLineIterator::IsLastLineInList() nsBlockInFlowLineIterator::IsLastLineInList()
{ {
line_iterator end = End(); LineIterator end = End();
return mLine != end && mLine.next() == end; return mLine != end && mLine.next() == end;
} }
@@ -5594,7 +5594,7 @@ nsBlockInFlowLineIterator::Next()
bool bool
nsBlockInFlowLineIterator::Prev() nsBlockInFlowLineIterator::Prev()
{ {
line_iterator begin = mLineList->begin(); LineIterator begin = mLineList->begin();
if (mLine != begin) { if (mLine != begin) {
--mLine; --mLine;
return true; return true;
@@ -5628,7 +5628,7 @@ nsBlockInFlowLineIterator::Prev()
bool bool
nsBlockInFlowLineIterator::FindValidLine() nsBlockInFlowLineIterator::FindValidLine()
{ {
line_iterator end = mLineList->end(); LineIterator end = mLineList->end();
if (mLine != end) if (mLine != end)
return true; return true;
bool currentlyInOverflowLines = GetInOverflow(); bool currentlyInOverflowLines = GetInOverflow();
@@ -5742,7 +5742,7 @@ nsBlockFrame::DoRemoveFrame(nsIFrame* aDeletedFrame, uint32_t aFlags)
// optimize away the line->Contains(next-in-flow) call below. // optimize away the line->Contains(next-in-flow) call below.
bool isLastFrameOnLine = 1 == line->GetChildCount(); bool isLastFrameOnLine = 1 == line->GetChildCount();
if (!isLastFrameOnLine) { if (!isLastFrameOnLine) {
line_iterator next = line.next(); LineIterator next = line.next();
nsIFrame* lastFrame = next != line_end ? nsIFrame* lastFrame = next != line_end ?
next->mFirstChild->GetPrevSibling() : next->mFirstChild->GetPrevSibling() :
(searchingOverflowList ? overflowLines->mFrames.LastChild() : (searchingOverflowList ? overflowLines->mFrames.LastChild() :
@@ -6246,7 +6246,7 @@ nsBlockFrame::FindTrailingClear()
// find the break type of the last line // find the break type of the last line
for (nsIFrame* b = this; b; b = b->GetPrevInFlow()) { for (nsIFrame* b = this; b; b = b->GetPrevInFlow()) {
nsBlockFrame* block = static_cast<nsBlockFrame*>(b); nsBlockFrame* block = static_cast<nsBlockFrame*>(b);
line_iterator endLine = block->end_lines(); LineIterator endLine = block->end_lines();
if (endLine != block->begin_lines()) { if (endLine != block->begin_lines()) {
--endLine; --endLine;
return endLine->GetBreakTypeAfter(); return endLine->GetBreakTypeAfter();
@@ -6350,7 +6350,7 @@ nsBlockFrame::RecoverFloats(nsFloatManager& aFloatManager, WritingMode aWM,
} }
// Recurse into our normal children // Recurse into our normal children
for (nsBlockFrame::line_iterator line = begin_lines(); line != end_lines(); ++line) { for (nsBlockFrame::LineIterator line = begin_lines(); line != end_lines(); ++line) {
if (line->IsBlock()) { if (line->IsBlock()) {
RecoverFloatsFor(line->mFirstChild, aFloatManager, aWM, aContainerSize); RecoverFloatsFor(line->mFirstChild, aFloatManager, aWM, aContainerSize);
} }
@@ -6453,7 +6453,7 @@ static void DebugOutputDrawLine(int32_t aDepth, nsLineBox* aLine, bool aDrawn) {
static void static void
DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea, DisplayLine(nsDisplayListBuilder* aBuilder, const nsRect& aLineArea,
const nsRect& aDirtyRect, nsBlockFrame::line_iterator& aLine, const nsRect& aDirtyRect, nsBlockFrame::LineIterator& aLine,
int32_t aDepth, int32_t& aDrawnLines, const nsDisplayListSet& aLists, int32_t aDepth, int32_t& aDrawnLines, const nsDisplayListSet& aLists,
nsBlockFrame* aFrame, TextOverflow* aTextOverflow) { nsBlockFrame* aFrame, TextOverflow* aTextOverflow) {
// If the line's combined area (which includes child frames that // If the line's combined area (which includes child frames that
@@ -6560,10 +6560,10 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// frame in our child list, it's also true for |this|. // frame in our child list, it's also true for |this|.
nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ? nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ?
nullptr : GetFirstLineContaining(aDirtyRect.y); nullptr : GetFirstLineContaining(aDirtyRect.y);
line_iterator line_end = end_lines(); LineIterator line_end = end_lines();
if (cursor) { if (cursor) {
for (line_iterator line = mLines.begin(cursor); for (LineIterator line = mLines.begin(cursor);
line != line_end; line != line_end;
++line) { ++line) {
nsRect lineArea = line->GetVisualOverflowArea(); nsRect lineArea = line->GetVisualOverflowArea();
@@ -6582,7 +6582,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
int32_t lineCount = 0; int32_t lineCount = 0;
nscoord lastY = INT32_MIN; nscoord lastY = INT32_MIN;
nscoord lastYMost = INT32_MIN; nscoord lastYMost = INT32_MIN;
for (line_iterator line = begin_lines(); for (LineIterator line = begin_lines();
line != line_end; line != line_end;
++line) { ++line) {
nsRect lineArea = line->GetVisualOverflowArea(); nsRect lineArea = line->GetVisualOverflowArea();
@@ -6713,7 +6713,7 @@ nsLineBox* nsBlockFrame::GetFirstLineContaining(nscoord y)
FrameProperties props = Properties(); FrameProperties props = Properties();
nsLineBox* property = props.Get(LineCursorProperty()); nsLineBox* property = props.Get(LineCursorProperty());
line_iterator cursor = mLines.begin(property); LineIterator cursor = mLines.begin(property);
nsRect cursorArea = cursor->GetVisualOverflowArea(); nsRect cursorArea = cursor->GetVisualOverflowArea();
while ((cursorArea.IsEmpty() || cursorArea.YMost() > y) while ((cursorArea.IsEmpty() || cursorArea.YMost() > y)
@@ -6745,7 +6745,7 @@ nsBlockFrame::ChildIsDirty(nsIFrame* aChild)
// The bullet lives in the first line, unless the first line has // 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 // height 0 and there is a second line, in which case it lives
// in the second line. // in the second line.
line_iterator bulletLine = begin_lines(); LineIterator bulletLine = begin_lines();
if (bulletLine != end_lines() && bulletLine->BSize() == 0 && if (bulletLine != end_lines() && bulletLine->BSize() == 0 &&
bulletLine != mLines.back()) { bulletLine != mLines.back()) {
bulletLine = bulletLine.next(); bulletLine = bulletLine.next();
@@ -7136,7 +7136,7 @@ nsBlockFrame::CheckFloats(BlockReflowInput& aState)
// Check that the float list is what we would have built // Check that the float list is what we would have built
AutoTArray<nsIFrame*, 8> lineFloats; AutoTArray<nsIFrame*, 8> lineFloats;
for (line_iterator line = begin_lines(), line_end = end_lines(); for (LineIterator line = begin_lines(), line_end = end_lines();
line != line_end; ++line) { line != line_end; ++line) {
if (line->HasFloats()) { if (line->HasFloats()) {
nsFloatCache* fc = line->GetFirstFloat(); nsFloatCache* fc = line->GetFirstFloat();
@@ -7378,7 +7378,7 @@ nsBlockFrame::VerifyLines(bool aFinalCheckOK)
// Add up the counts on each line. Also validate that IsFirstLine is // Add up the counts on each line. Also validate that IsFirstLine is
// set properly. // set properly.
int32_t count = 0; int32_t count = 0;
line_iterator line, line_end; LineIterator line, line_end;
for (line = begin_lines(), line_end = end_lines(); for (line = begin_lines(), line_end = end_lines();
line != line_end; line != line_end;
++line) { ++line) {
@@ -7421,8 +7421,8 @@ nsBlockFrame::VerifyLines(bool aFinalCheckOK)
if (cursor) { if (cursor) {
FrameLines* overflowLines = GetOverflowLines(); FrameLines* overflowLines = GetOverflowLines();
if (overflowLines) { if (overflowLines) {
line_iterator line = overflowLines->mLines.begin(); LineIterator line = overflowLines->mLines.begin();
line_iterator line_end = overflowLines->mLines.end(); LineIterator line_end = overflowLines->mLines.end();
for (; line != line_end; ++line) { for (; line != line_end; ++line) {
if (line == cursor) { if (line == cursor) {
cursor = nullptr; cursor = nullptr;
@@ -7492,8 +7492,8 @@ nsBlockFrame::VerifyOverflowSituation()
} }
nsLineBox* cursor = flow->GetLineCursor(); nsLineBox* cursor = flow->GetLineCursor();
if (cursor) { if (cursor) {
line_iterator line = flow->begin_lines(); LineIterator line = flow->begin_lines();
line_iterator line_end = flow->end_lines(); LineIterator line_end = flow->end_lines();
for (; line != line_end && line != cursor; ++line) for (; line != line_end && line != cursor; ++line)
; ;
if (line == line_end && overflowLines) { if (line == line_end && overflowLines) {

View File

@@ -83,21 +83,21 @@ public:
NS_DECL_QUERYFRAME_TARGET(nsBlockFrame) NS_DECL_QUERYFRAME_TARGET(nsBlockFrame)
NS_DECL_FRAMEARENA_HELPERS NS_DECL_FRAMEARENA_HELPERS
typedef nsLineList::iterator line_iterator; typedef nsLineList::iterator LineIterator;
typedef nsLineList::const_iterator const_line_iterator; typedef nsLineList::const_iterator ConstLineIterator;
typedef nsLineList::reverse_iterator reverse_line_iterator; typedef nsLineList::reverse_iterator ReverseLineIterator;
typedef nsLineList::const_reverse_iterator const_reverse_line_iterator; typedef nsLineList::const_reverse_iterator ConstReverseLineIterator;
line_iterator begin_lines() { return mLines.begin(); } LineIterator begin_lines() { return mLines.begin(); }
line_iterator end_lines() { return mLines.end(); } LineIterator end_lines() { return mLines.end(); }
const_line_iterator begin_lines() const { return mLines.begin(); } ConstLineIterator begin_lines() const { return mLines.begin(); }
const_line_iterator end_lines() const { return mLines.end(); } ConstLineIterator end_lines() const { return mLines.end(); }
reverse_line_iterator rbegin_lines() { return mLines.rbegin(); } ReverseLineIterator rbegin_lines() { return mLines.rbegin(); }
reverse_line_iterator rend_lines() { return mLines.rend(); } ReverseLineIterator rend_lines() { return mLines.rend(); }
const_reverse_line_iterator rbegin_lines() const { return mLines.rbegin(); } ConstReverseLineIterator rbegin_lines() const { return mLines.rbegin(); }
const_reverse_line_iterator rend_lines() const { return mLines.rend(); } ConstReverseLineIterator rend_lines() const { return mLines.rend(); }
line_iterator line(nsLineBox* aList) { return mLines.begin(aList); } LineIterator line(nsLineBox* aList) { return mLines.begin(aList); }
reverse_line_iterator rline(nsLineBox* aList) { return mLines.rbegin(aList); } ReverseLineIterator rline(nsLineBox* aList) { return mLines.rbegin(aList); }
friend nsBlockFrame* NS_NewBlockFrame(nsIPresShell* aPresShell, friend nsBlockFrame* NS_NewBlockFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext); nsStyleContext* aContext);
@@ -648,7 +648,7 @@ protected:
* @param aKeepReflowGoing [OUT] indicates whether the caller should continue to reflow more lines * @param aKeepReflowGoing [OUT] indicates whether the caller should continue to reflow more lines
*/ */
void ReflowLine(BlockReflowInput& aState, void ReflowLine(BlockReflowInput& aState,
line_iterator aLine, LineIterator aLine,
bool* aKeepReflowGoing); bool* aKeepReflowGoing);
// Return false if it needs another reflow because of reduced space // Return false if it needs another reflow because of reduced space
@@ -656,7 +656,7 @@ protected:
// return true otherwise. // return true otherwise.
bool PlaceLine(BlockReflowInput& aState, bool PlaceLine(BlockReflowInput& aState,
nsLineLayout& aLineLayout, nsLineLayout& aLineLayout,
line_iterator aLine, LineIterator aLine,
nsFloatManager::SavedState* aFloatStateBeforeLine, nsFloatManager::SavedState* aFloatStateBeforeLine,
mozilla::LogicalRect& aFloatAvailableSpace, //in-out mozilla::LogicalRect& aFloatAvailableSpace, //in-out
nscoord& aAvailableSpaceHeight, // in-out nscoord& aAvailableSpaceHeight, // in-out
@@ -676,11 +676,11 @@ protected:
* @param aLine the line to mark dirty * @param aLine the line to mark dirty
* @param aLineList the line list containing that line * @param aLineList the line list containing that line
*/ */
void MarkLineDirty(line_iterator aLine, const nsLineList* aLineList); void MarkLineDirty(LineIterator aLine, const nsLineList* aLineList);
// XXX where to go // XXX where to go
bool IsLastLine(BlockReflowInput& aState, bool IsLastLine(BlockReflowInput& aState,
line_iterator aLine); LineIterator aLine);
void DeleteLine(BlockReflowInput& aState, void DeleteLine(BlockReflowInput& aState,
nsLineList::iterator aLine, nsLineList::iterator aLine,
@@ -694,16 +694,16 @@ protected:
nsIFrame* aChildFrame); nsIFrame* aChildFrame);
void ReflowBlockFrame(BlockReflowInput& aState, void ReflowBlockFrame(BlockReflowInput& aState,
line_iterator aLine, LineIterator aLine,
bool* aKeepGoing); bool* aKeepGoing);
void ReflowInlineFrames(BlockReflowInput& aState, void ReflowInlineFrames(BlockReflowInput& aState,
line_iterator aLine, LineIterator aLine,
bool* aKeepLineGoing); bool* aKeepLineGoing);
void DoReflowInlineFrames(BlockReflowInput& aState, void DoReflowInlineFrames(BlockReflowInput& aState,
nsLineLayout& aLineLayout, nsLineLayout& aLineLayout,
line_iterator aLine, LineIterator aLine,
nsFlowAreaRect& aFloatAvailableSpace, nsFlowAreaRect& aFloatAvailableSpace,
nscoord& aAvailableSpaceHeight, nscoord& aAvailableSpaceHeight,
nsFloatManager::SavedState* nsFloatManager::SavedState*
@@ -714,7 +714,7 @@ protected:
void ReflowInlineFrame(BlockReflowInput& aState, void ReflowInlineFrame(BlockReflowInput& aState,
nsLineLayout& aLineLayout, nsLineLayout& aLineLayout,
line_iterator aLine, LineIterator aLine,
nsIFrame* aFrame, nsIFrame* aFrame,
LineReflowStatus* aLineReflowStatus); LineReflowStatus* aLineReflowStatus);
@@ -763,12 +763,12 @@ protected:
* flag aState.mReflowStatus as incomplete. * flag aState.mReflowStatus as incomplete.
*/ */
void PushTruncatedLine(BlockReflowInput& aState, void PushTruncatedLine(BlockReflowInput& aState,
line_iterator aLine, LineIterator aLine,
bool* aKeepReflowGoing); bool* aKeepReflowGoing);
void SplitLine(BlockReflowInput& aState, void SplitLine(BlockReflowInput& aState,
nsLineLayout& aLineLayout, nsLineLayout& aLineLayout,
line_iterator aLine, LineIterator aLine,
nsIFrame* aFrame, nsIFrame* aFrame,
LineReflowStatus* aLineReflowStatus); LineReflowStatus* aLineReflowStatus);
@@ -778,7 +778,7 @@ protected:
* @return the pulled frame or nullptr * @return the pulled frame or nullptr
*/ */
nsIFrame* PullFrame(BlockReflowInput& aState, nsIFrame* PullFrame(BlockReflowInput& aState,
line_iterator aLine); LineIterator aLine);
/** /**
* Try to pull a frame out of a line pointed at by aFromLine. * Try to pull a frame out of a line pointed at by aFromLine.
@@ -954,12 +954,12 @@ private:
*/ */
class nsBlockInFlowLineIterator { class nsBlockInFlowLineIterator {
public: public:
typedef nsBlockFrame::line_iterator line_iterator; typedef nsBlockFrame::LineIterator LineIterator;
/** /**
* Set up the iterator to point to aLine which must be a normal line * Set up the iterator to point to aLine which must be a normal line
* in aFrame (not an overflow line). * in aFrame (not an overflow line).
*/ */
nsBlockInFlowLineIterator(nsBlockFrame* aFrame, line_iterator aLine); nsBlockInFlowLineIterator(nsBlockFrame* aFrame, LineIterator aLine);
/** /**
* Set up the iterator to point to the first line found starting from * Set up the iterator to point to the first line found starting from
* aFrame. Sets aFoundValidLine to false if there is no such line. * aFrame. Sets aFoundValidLine to false if there is no such line.
@@ -978,7 +978,7 @@ public:
nsBlockInFlowLineIterator(nsBlockFrame* aFrame, nsIFrame* aFindFrame, nsBlockInFlowLineIterator(nsBlockFrame* aFrame, nsIFrame* aFindFrame,
bool* aFoundValidLine); bool* aFoundValidLine);
line_iterator GetLine() { return mLine; } LineIterator GetLine() { return mLine; }
bool IsLastLineInList(); bool IsLastLineInList();
nsBlockFrame* GetContainer() { return mFrame; } nsBlockFrame* GetContainer() { return mFrame; }
bool GetInOverflow() { return mLineList != &mFrame->mLines; } bool GetInOverflow() { return mLineList != &mFrame->mLines; }
@@ -992,7 +992,7 @@ public:
/** /**
* Returns the end-iterator of whatever line list we're in. * Returns the end-iterator of whatever line list we're in.
*/ */
line_iterator End(); LineIterator End();
/** /**
* Returns false if there are no more lines. After this has returned false, * Returns false if there are no more lines. After this has returned false,
@@ -1008,10 +1008,10 @@ public:
private: private:
friend class nsBlockFrame; friend class nsBlockFrame;
// XXX nsBlockFrame uses this internally in one place. Try to remove it. // XXX nsBlockFrame uses this internally in one place. Try to remove it.
nsBlockInFlowLineIterator(nsBlockFrame* aFrame, line_iterator aLine, bool aInOverflow); nsBlockInFlowLineIterator(nsBlockFrame* aFrame, LineIterator aLine, bool aInOverflow);
nsBlockFrame* mFrame; nsBlockFrame* mFrame;
line_iterator mLine; LineIterator mLine;
nsLineList* mLineList; // the line list mLine is in nsLineList* mLineList; // the line list mLine is in
/** /**

View File

@@ -101,8 +101,8 @@ nsBlockReflowContext::ComputeCollapsedBStartMargin(const ReflowInput& aRI,
// OK because our traversal is idempotent. // OK because our traversal is idempotent.
for ( ;block; block = static_cast<nsBlockFrame*>(block->GetNextInFlow())) { for ( ;block; block = static_cast<nsBlockFrame*>(block->GetNextInFlow())) {
for (int overflowLines = 0; overflowLines <= 1; ++overflowLines) { for (int overflowLines = 0; overflowLines <= 1; ++overflowLines) {
nsBlockFrame::line_iterator line; nsBlockFrame::LineIterator line;
nsBlockFrame::line_iterator line_end; nsBlockFrame::LineIterator line_end;
bool anyLines = true; bool anyLines = true;
if (overflowLines) { if (overflowLines) {
nsBlockFrame::FrameLines* frames = block->GetOverflowLines(); nsBlockFrame::FrameLines* frames = block->GetOverflowLines();

View File

@@ -3977,7 +3977,7 @@ static FrameTarget DrillDownToSelectionFrame(nsIFrame* aFrame,
// no valid FrameTarget on the line, it returns a null FrameTarget // no valid FrameTarget on the line, it returns a null FrameTarget
static FrameTarget GetSelectionClosestFrameForLine( static FrameTarget GetSelectionClosestFrameForLine(
nsBlockFrame* aParent, nsBlockFrame* aParent,
nsBlockFrame::line_iterator aLine, nsBlockFrame::LineIterator aLine,
nsPoint aPoint, nsPoint aPoint,
uint32_t aFlags) uint32_t aFlags)
{ {
@@ -4044,8 +4044,8 @@ static FrameTarget GetSelectionClosestFrameForBlock(nsIFrame* aFrame,
return FrameTarget::Null(); return FrameTarget::Null();
// This code searches for the correct line // This code searches for the correct line
nsBlockFrame::line_iterator firstLine = bf->begin_lines(); nsBlockFrame::LineIterator firstLine = bf->begin_lines();
nsBlockFrame::line_iterator end = bf->end_lines(); nsBlockFrame::LineIterator end = bf->end_lines();
if (firstLine == end) { if (firstLine == end) {
nsIContent *blockContent = aFrame->GetContent(); nsIContent *blockContent = aFrame->GetContent();
if (blockContent) { if (blockContent) {
@@ -4054,8 +4054,8 @@ static FrameTarget GetSelectionClosestFrameForBlock(nsIFrame* aFrame,
} }
return FrameTarget::Null(); return FrameTarget::Null();
} }
nsBlockFrame::line_iterator curLine = firstLine; nsBlockFrame::LineIterator curLine = firstLine;
nsBlockFrame::line_iterator closestLine = end; nsBlockFrame::LineIterator closestLine = end;
// Convert aPoint into a LogicalPoint in the writing-mode of this block // Convert aPoint into a LogicalPoint in the writing-mode of this block
WritingMode wm = curLine->mWritingMode; WritingMode wm = curLine->mWritingMode;
LogicalPoint pt(wm, aPoint, curLine->mContainerSize); LogicalPoint pt(wm, aPoint, curLine->mContainerSize);
@@ -4073,8 +4073,8 @@ static FrameTarget GetSelectionClosestFrameForBlock(nsIFrame* aFrame,
} }
if (closestLine == end) { if (closestLine == end) {
nsBlockFrame::line_iterator prevLine = curLine.prev(); nsBlockFrame::LineIterator prevLine = curLine.prev();
nsBlockFrame::line_iterator nextLine = curLine; nsBlockFrame::LineIterator nextLine = curLine;
// Avoid empty lines // Avoid empty lines
while (nextLine != end && nextLine->IsEmpty()) while (nextLine != end && nextLine->IsEmpty())
++nextLine; ++nextLine;

View File

@@ -1451,7 +1451,7 @@ BuildTextRuns(DrawTarget* aDrawTarget, nsTextFrame* aForFrame,
NS_ASSERTION(backIterator.GetContainer() == block, NS_ASSERTION(backIterator.GetContainer() == block,
"Someone lied to us about the block"); "Someone lied to us about the block");
} }
nsBlockFrame::line_iterator startLine = backIterator.GetLine(); nsBlockFrame::LineIterator startLine = backIterator.GetLine();
// Find a line where we can start building text runs. We choose the last line // Find a line where we can start building text runs. We choose the last line
// where: // where:
@@ -1473,7 +1473,7 @@ BuildTextRuns(DrawTarget* aDrawTarget, nsTextFrame* aForFrame,
bool mayBeginInTextRun = true; bool mayBeginInTextRun = true;
while (true) { while (true) {
forwardIterator = backIterator; forwardIterator = backIterator;
nsBlockFrame::line_iterator line = backIterator.GetLine(); nsBlockFrame::LineIterator line = backIterator.GetLine();
if (!backIterator.Prev() || backIterator.GetLine()->IsBlock()) { if (!backIterator.Prev() || backIterator.GetLine()->IsBlock()) {
mayBeginInTextRun = false; mayBeginInTextRun = false;
break; break;
@@ -1519,7 +1519,7 @@ BuildTextRuns(DrawTarget* aDrawTarget, nsTextFrame* aForFrame,
bool seenStartLine = false; bool seenStartLine = false;
uint32_t linesAfterStartLine = 0; uint32_t linesAfterStartLine = 0;
do { do {
nsBlockFrame::line_iterator line = forwardIterator.GetLine(); nsBlockFrame::LineIterator line = forwardIterator.GetLine();
if (line->IsBlock()) if (line->IsBlock())
break; break;
line->SetInvalidateTextRuns(false); line->SetInvalidateTextRuns(false);
@@ -5093,7 +5093,7 @@ LazyGetLineBaselineOffset(nsIFrame* aChildFrame, nsBlockFrame* aBlockFrame)
nsIFrame::LineBaselineOffset(), &offsetFound); nsIFrame::LineBaselineOffset(), &offsetFound);
if (!offsetFound) { if (!offsetFound) {
for (nsBlockFrame::line_iterator line = aBlockFrame->begin_lines(), for (nsBlockFrame::LineIterator line = aBlockFrame->begin_lines(),
line_end = aBlockFrame->end_lines(); line_end = aBlockFrame->end_lines();
line != line_end; line++) { line != line_end; line++) {
if (line->IsInline()) { if (line->IsInline()) {

View File

@@ -4740,7 +4740,7 @@ SVGTextFrame::AdjustChunksForLineBreaks()
nsBlockFrame* block = nsLayoutUtils::GetAsBlock(PrincipalChildList().FirstChild()); nsBlockFrame* block = nsLayoutUtils::GetAsBlock(PrincipalChildList().FirstChild());
NS_ASSERTION(block, "expected block frame"); NS_ASSERTION(block, "expected block frame");
nsBlockFrame::line_iterator line = block->begin_lines(); nsBlockFrame::LineIterator line = block->begin_lines();
CharIterator it(this, CharIterator::eOriginal); CharIterator it(this, CharIterator::eOriginal);
while (!it.AtEnd() && line != block->end_lines()) { while (!it.AtEnd() && line != block->end_lines()) {