Bug 1286468 followup - Fix naming issues.
authorJeremy Chen <jeremychen@mozilla.com>
Mon, 24 Oct 2016 15:01:25 +0800
changeset 319150 aa882d8b860955ac073d5026f565ea1f3ae4d174
parent 319149 dfe85b0971188dd33b19e8de4db3aa3acfdcb251
child 319151 b2126432671294b8cfbc237ed47d11a4bdaad330
push id30862
push usercbook@mozilla.com
push dateMon, 24 Oct 2016 14:55:55 +0000
treeherdermozilla-central@c845bfd0accb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1286468
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1286468 followup - Fix naming issues. MozReview-Commit-ID: C2PDA4R5k5F
layout/base/nsBidiPresUtils.cpp
layout/base/nsLayoutUtils.cpp
layout/generic/BlockReflowInput.cpp
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockFrame.h
layout/generic/nsBlockReflowContext.cpp
layout/generic/nsFrame.cpp
layout/generic/nsTextFrame.cpp
layout/svg/SVGTextFrame.cpp
--- a/layout/base/nsBidiPresUtils.cpp
+++ b/layout/base/nsBidiPresUtils.cpp
@@ -687,17 +687,17 @@ nsBidiPresUtils::Resolve(nsBlockFrame* a
   // via using nsIFrame::GetWritingMode(nsIFrame*).
   char16_t ch = GetBidiOverride(aBlockFrame->StyleContext());
   if (ch != 0) {
     bpd.PushBidiControl(ch);
   }
   for (nsBlockFrame* block = aBlockFrame; block;
        block = static_cast<nsBlockFrame*>(block->GetNextContinuation())) {
     block->RemoveStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
-    nsBlockInFlowLineIterator lineIter(block, block->BeginLine());
+    nsBlockInFlowLineIterator lineIter(block, block->LinesBegin());
     bpd.mPrevFrame = nullptr;
     TraverseFrames(aBlockFrame, &lineIter, block->PrincipalChildList().FirstChild(), &bpd);
     // XXX what about overflow lines?
   }
 
   if (ch != 0) {
     bpd.PopBidiControl(ch);
   }
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -6212,18 +6212,18 @@ nsLayoutUtils::GetFirstLinePosition(Writ
       }
       return false;
     }
 
     // No baseline.
     return false;
   }
 
-  for (nsBlockFrame::ConstLineIterator line = block->BeginLine(),
-                                       line_end = block->EndLine();
+  for (nsBlockFrame::ConstLineIterator line = block->LinesBegin(),
+                                       line_end = block->LinesEnd();
        line != line_end; ++line) {
     if (line->IsBlock()) {
       nsIFrame *kid = line->mFirstChild;
       LinePosition kidPosition;
       if (GetFirstLinePosition(aWM, kid, &kidPosition)) {
         //XXX Not sure if this is the correct value to use for container
         //    width here. It will only be used in vertical-rl layout,
         //    which we don't have full support and testing for yet.
@@ -6251,18 +6251,18 @@ nsLayoutUtils::GetFirstLinePosition(Writ
 nsLayoutUtils::GetLastLineBaseline(WritingMode aWM,
                                    const nsIFrame* aFrame, nscoord* aResult)
 {
   const nsBlockFrame* block = nsLayoutUtils::GetAsBlock(const_cast<nsIFrame*>(aFrame));
   if (!block)
     // No baseline.  (We intentionally don't descend into scroll frames.)
     return false;
 
-  for (nsBlockFrame::ConstReverseLineIterator line = block->RBeginLine(),
-                                              line_end = block->REndLine();
+  for (nsBlockFrame::ConstReverseLineIterator line = block->LinesRBegin(),
+                                              line_end = block->LinesREnd();
        line != line_end; ++line) {
     if (line->IsBlock()) {
       nsIFrame *kid = line->mFirstChild;
       nscoord kidBaseline;
       const nsSize& containerSize = line->mContainerSize;
       if (GetLastLineBaseline(aWM, kid, &kidBaseline)) {
         // Ignore relative positioning for baseline calculations
         *aResult = kidBaseline +
@@ -6289,18 +6289,18 @@ nsLayoutUtils::GetLastLineBaseline(Writi
 
 static nscoord
 CalculateBlockContentBEnd(WritingMode aWM, nsBlockFrame* aFrame)
 {
   NS_PRECONDITION(aFrame, "null ptr");
 
   nscoord contentBEnd = 0;
 
-  for (nsBlockFrame::LineIterator line = aFrame->BeginLine(),
-                                  line_end = aFrame->EndLine();
+  for (nsBlockFrame::LineIterator line = aFrame->LinesBegin(),
+                                  line_end = aFrame->LinesEnd();
        line != line_end; ++line) {
     if (line->IsBlock()) {
       nsIFrame* child = line->mFirstChild;
       const nsSize& containerSize = line->mContainerSize;
       nscoord offset =
         child->GetLogicalNormalPosition(aWM, containerSize).B(aWM);
       contentBEnd =
         std::max(contentBEnd,
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -135,17 +135,17 @@ BlockReflowInput::BlockReflowInput(const
     // a constrained height.
     mFlags.mHasUnconstrainedBSize = true;
     mContentArea.BSize(wm) = mBEndEdge = NS_UNCONSTRAINEDSIZE;
   }
   mContentArea.IStart(wm) = mBorderPadding.IStart(wm);
   mBCoord = mContentArea.BStart(wm) = mBorderPadding.BStart(wm);
 
   mPrevChild = nullptr;
-  mCurrentLine = aFrame->EndLine();
+  mCurrentLine = aFrame->LinesEnd();
 
   mMinLineHeight = aReflowInput.CalcLineHeight();
 }
 
 nscoord
 BlockReflowInput::GetConsumedBSize()
 {
   if (mConsumedBSize == NS_INTRINSICSIZE) {
@@ -411,17 +411,17 @@ BlockReflowInput::GetFloatAvailableSpace
  * margins of blocks collapse).
  */
 void
 BlockReflowInput::ReconstructMarginBefore(nsLineList::iterator aLine)
 {
   mPrevBEndMargin.Zero();
   nsBlockFrame *block = mBlock;
 
-  nsLineList::iterator firstLine = block->BeginLine();
+  nsLineList::iterator firstLine = block->LinesBegin();
   for (;;) {
     --aLine;
     if (aLine->IsBlock()) {
       mPrevBEndMargin = aLine->GetCarriedOutBEndMargin();
       break;
     }
     if (!aLine->IsEmpty()) {
       break;
@@ -564,17 +564,17 @@ BlockReflowInput::RecoverStateFrom(nsLin
 // float as well unless it won't fit next to what we already have.
 // But nobody else implements it that way...
 bool
 BlockReflowInput::AddFloat(nsLineLayout*       aLineLayout,
                              nsIFrame*           aFloat,
                              nscoord             aAvailableISize)
 {
   NS_PRECONDITION(aLineLayout, "must have line layout");
-  NS_PRECONDITION(mBlock->EndLine() != mCurrentLine, "null ptr");
+  NS_PRECONDITION(mBlock->LinesEnd() != mCurrentLine, "null ptr");
   NS_PRECONDITION(aFloat->GetStateBits() & NS_FRAME_OUT_OF_FLOW,
                   "aFloat must be an out-of-flow frame");
 
   MOZ_ASSERT(aFloat->GetParent(), "float must have parent");
   MOZ_ASSERT(aFloat->GetParent()->IsFrameOfType(nsIFrame::eBlockFrame),
              "float's parent must be block");
   MOZ_ASSERT(aFloat->GetParent() == mBlock ||
              (aFloat->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -68,18 +68,18 @@ static const char16_t kDiscCharacter = 0
 using namespace mozilla;
 using namespace mozilla::css;
 using namespace mozilla::dom;
 using namespace mozilla::layout;
 typedef nsAbsoluteContainingBlock::AbsPosReflowFlags AbsPosReflowFlags;
 
 static void MarkAllDescendantLinesDirty(nsBlockFrame* aBlock)
 {
-  nsLineList::iterator line = aBlock->BeginLine();
-  nsLineList::iterator endLine = aBlock->EndLine();
+  nsLineList::iterator line = aBlock->LinesBegin();
+  nsLineList::iterator endLine = aBlock->LinesEnd();
   while (line != endLine) {
     if (line->IsBlock()) {
       nsIFrame* f = line->mFirstChild;
       nsBlockFrame* bf = nsLayoutUtils::GetAsBlock(f);
       if (bf) {
         MarkAllDescendantLinesDirty(bf);
       }
     }
@@ -112,18 +112,18 @@ 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();
+  nsLineList::iterator line = block->LinesBegin();
+  nsLineList::iterator endLine = block->LinesEnd();
   while (line != endLine) {
     if (line->IsBlock() && BlockHasAnyFloats(line->mFirstChild))
       return true;
     ++line;
   }
   return false;
 }
 
@@ -392,17 +392,17 @@ nsBlockFrame::List(FILE* out, const char
 
   fprintf_stderr(out, "%s<\n", str.get());
 
   nsCString pfx(aPrefix);
   pfx += "  ";
 
   // Output the lines
   if (!mLines.empty()) {
-    ConstLineIterator line = BeginLine(), line_end = EndLine();
+    ConstLineIterator line = LinesBegin(), line_end = LinesEnd();
     for ( ; line != line_end; ++line) {
       line->List(out, pfx.get(), aFlags);
     }
   }
 
   // Output the overflow lines.
   const FrameLines* overflowLines = GetOverflowLines();
   if (overflowLines && !overflowLines->mLines.empty()) {
@@ -499,17 +499,17 @@ nsBlockFrame::GetLogicalBaseline(Writing
 
 nscoord
 nsBlockFrame::GetCaretBaseline() const
 {
   nsRect contentRect = GetContentRect();
   nsMargin bp = GetUsedBorderAndPadding();
 
   if (!mLines.empty()) {
-    ConstLineIterator line = BeginLine();
+    ConstLineIterator line = LinesBegin();
     const nsLineBox* firstLine = line;
     if (firstLine->GetChildCount()) {
       return bp.top + firstLine->mFirstChild->GetCaretBaseline();
     }
   }
   float inflation = nsLayoutUtils::FontSizeInflationFor(this);
   RefPtr<nsFontMetrics> fm =
     nsLayoutUtils::GetFontMetricsForFrame(this, inflation);
@@ -699,17 +699,17 @@ nsBlockFrame::GetMinISize(nsRenderingCon
   if (RenumberList()) {
     AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
   }
   if (GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)
     ResolveBidi();
   InlineMinISizeData data;
   for (nsBlockFrame* curFrame = this; curFrame;
        curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
-    for (LineIterator line = curFrame->BeginLine(), line_end = curFrame->EndLine();
+    for (LineIterator line = curFrame->LinesBegin(), line_end = curFrame->LinesEnd();
       line != line_end; ++line)
     {
 #ifdef DEBUG
       if (gNoisyIntrinsic) {
         IndentBy(stdout, gNoiseIndent);
         printf("line (%s%s)\n",
                line->IsBlock() ? "block" : "inline",
                line->IsEmpty() ? ", empty" : "");
@@ -718,17 +718,17 @@ nsBlockFrame::GetMinISize(nsRenderingCon
 #endif
       if (line->IsBlock()) {
         data.ForceBreak();
         data.mCurrentLine = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
                         line->mFirstChild, nsLayoutUtils::MIN_ISIZE);
         data.ForceBreak();
       } else {
         if (!curFrame->GetPrevContinuation() &&
-            line == curFrame->BeginLine()) {
+            line == curFrame->LinesBegin()) {
           // Only add text-indent if it has no percentages; using a
           // percentage basis of 0 unconditionally would give strange
           // behavior for calc(10%-3px).
           const nsStyleCoord &indent = StyleText()->mTextIndent;
           if (indent.ConvertsToLength())
             data.mCurrentLine += nsRuleNode::ComputeCoordPercentCalc(indent, 0);
         }
         // XXX Bug NNNNNN Should probably handle percentage text-indent.
@@ -787,17 +787,17 @@ nsBlockFrame::GetPrefISize(nsRenderingCo
   if (RenumberList()) {
     AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
   }
   if (GetStateBits() & NS_BLOCK_NEEDS_BIDI_RESOLUTION)
     ResolveBidi();
   InlinePrefISizeData data;
   for (nsBlockFrame* curFrame = this; curFrame;
        curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
-    for (LineIterator line = curFrame->BeginLine(), line_end = curFrame->EndLine();
+    for (LineIterator line = curFrame->LinesBegin(), line_end = curFrame->LinesEnd();
          line != line_end; ++line)
     {
 #ifdef DEBUG
       if (gNoisyIntrinsic) {
         IndentBy(stdout, gNoiseIndent);
         printf("line (%s%s)\n",
                line->IsBlock() ? "block" : "inline",
                line->IsEmpty() ? ", empty" : "");
@@ -808,17 +808,17 @@ nsBlockFrame::GetPrefISize(nsRenderingCo
         if (!data.mLineIsEmpty || BlockCanIntersectFloats(line->mFirstChild)) {
           data.ForceBreak();
         }
         data.mCurrentLine = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
                         line->mFirstChild, nsLayoutUtils::PREF_ISIZE);
         data.ForceBreak();
       } else {
         if (!curFrame->GetPrevContinuation() &&
-            line == curFrame->BeginLine()) {
+            line == curFrame->LinesBegin()) {
           // Only add text-indent if it has no percentages; using a
           // percentage basis of 0 unconditionally would give strange
           // behavior for calc(10%-3px).
           const nsStyleCoord &indent = StyleText()->mTextIndent;
           if (indent.ConvertsToLength()) {
             nscoord length = indent.ToLength();
             if (length != 0) {
               data.mCurrentLine += length;
@@ -873,30 +873,30 @@ nsBlockFrame::GetPrefWidthTightBounds(ns
 
   *aX = 0;
   *aXMost = 0;
 
   nsresult rv;
   InlinePrefISizeData data;
   for (nsBlockFrame* curFrame = this; curFrame;
        curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
-    for (LineIterator line = curFrame->BeginLine(), line_end = curFrame->EndLine();
+    for (LineIterator line = curFrame->LinesBegin(), line_end = curFrame->LinesEnd();
          line != line_end; ++line)
     {
       nscoord childX, childXMost;
       if (line->IsBlock()) {
         data.ForceBreak();
         rv = line->mFirstChild->GetPrefWidthTightBounds(aRenderingContext,
                                                         &childX, &childXMost);
         NS_ENSURE_SUCCESS(rv, rv);
         *aX = std::min(*aX, childX);
         *aXMost = std::max(*aXMost, childXMost);
       } else {
         if (!curFrame->GetPrevContinuation() &&
-            line == curFrame->BeginLine()) {
+            line == curFrame->LinesBegin()) {
           // Only add text-indent if it has no percentages; using a
           // percentage basis of 0 unconditionally would give strange
           // behavior for calc(10%-3px).
           const nsStyleCoord &indent = StyleText()->mTextIndent;
           if (indent.ConvertsToLength()) {
             data.mCurrentLine += nsRuleNode::ComputeCoordPercentCalc(indent, 0);
           }
         }
@@ -1308,17 +1308,17 @@ nsBlockFrame::Reflow(nsPresContext*     
   // logical direction progresses in a negative physical direction, and
   // therefore block-dir coordinate conversion depends on knowing the width
   // of the coordinate space in order to translate between the logical and
   // physical origins.
   if (wm.IsVerticalRL()) {
     nsSize containerSize = aMetrics.PhysicalSize();
     nscoord deltaX = containerSize.width - state.ContainerSize().width;
     if (deltaX != 0) {
-      for (LineIterator line = BeginLine(), end = EndLine();
+      for (LineIterator line = LinesBegin(), end = LinesEnd();
            line != end; line++) {
         UpdateLineContainerSize(line, containerSize);
       }
       for (nsIFrame* f : mFloats) {
         nsPoint physicalDelta(deltaX, 0);
         f->MovePositionBy(physicalDelta);
       }
       nsFrameList* bulletList = GetOutsideBulletList();
@@ -1479,18 +1479,18 @@ nsBlockFrame::Reflow(nsPresContext*     
 #endif
 
   NS_FRAME_SET_TRUNCATION(aStatus, (*reflowInput), aMetrics);
 }
 
 bool
 nsBlockFrame::CheckForCollapsedBEndMarginFromClearanceLine()
 {
-  LineIterator begin = BeginLine();
-  LineIterator line = EndLine();
+  LineIterator begin = LinesBegin();
+  LineIterator line = LinesEnd();
 
   while (true) {
     if (begin == line) {
       return false;
     }
     --line;
     if (line->BSize() != 0 || !line->CachedIsEmpty()) {
       return false;
@@ -1714,17 +1714,17 @@ nsBlockFrame::ComputeOverflowAreas(const
                                    nscoord               aBEndEdgeOfChildren,
                                    nsOverflowAreas&      aOverflowAreas)
 {
   // Compute the overflow areas of our children
   // XXX_perf: This can be done incrementally.  It is currently one of
   // the things that makes incremental reflow O(N^2).
   nsOverflowAreas areas(aBounds, aBounds);
   if (!ShouldApplyOverflowClipping(this, aDisplay)) {
-    for (LineIterator line = BeginLine(), line_end = EndLine();
+    for (LineIterator line = LinesBegin(), line_end = LinesEnd();
          line != line_end;
          ++line) {
       areas.UnionWith(line->GetOverflowAreas());
     }
 
     // Factor an outside bullet in; normally the bullet will be factored into
     // the line-box's overflow areas. However, if the line is a block
     // line then it won't; if there are no lines, it won't. So just
@@ -1752,17 +1752,17 @@ nsBlockFrame::ComputeOverflowAreas(const
 
 void
 nsBlockFrame::UnionChildOverflow(nsOverflowAreas& aOverflowAreas)
 {
   // We need to update the overflow areas of lines manually, as they
   // get cached and re-used otherwise. Lines aren't exposed as normal
   // frame children, so calling UnionChildOverflow alone will end up
   // using the old cached values.
-  for (LineIterator line = BeginLine(), line_end = EndLine();
+  for (LineIterator line = LinesBegin(), line_end = LinesEnd();
        line != line_end;
        ++line) {
     nsRect bounds = line->GetPhysicalBounds();
     nsOverflowAreas lineAreas(bounds, bounds);
 
     int32_t n = line->GetChildCount();
     for (nsIFrame* lineFrame = line->mFirstChild;
          n > 0; lineFrame = lineFrame->GetNextSibling(), --n) {
@@ -1802,17 +1802,17 @@ nsBlockFrame::ComputeCustomOverflow(nsOv
   ClearLineCursor();
   return nsContainerFrame::ComputeCustomOverflow(aOverflowAreas);
 }
 
 void
 nsBlockFrame::LazyMarkLinesDirty()
 {
   if (GetStateBits() & NS_BLOCK_LOOK_FOR_DIRTY_FRAMES) {
-    for (LineIterator line = BeginLine(), line_end = EndLine();
+    for (LineIterator line = LinesBegin(), line_end = LinesEnd();
          line != line_end; ++line) {
       int32_t n = line->GetChildCount();
       for (nsIFrame* lineFrame = line->mFirstChild;
            n > 0; lineFrame = lineFrame->GetNextSibling(), --n) {
         if (NS_SUBTREE_DIRTY(lineFrame)) {
           // NOTE:  MarkLineDirty does more than just marking the line dirty.
           MarkLineDirty(line, &mLines);
           break;
@@ -1909,17 +1909,17 @@ nsBlockFrame::PrepareResizeReflow(BlockR
 #ifdef DEBUG
     if (gNoisyReflow) {
       IndentBy(stdout, gNoiseIndent);
       ListTag(stdout);
       printf(": trying to avoid marking all lines dirty\n");
     }
 #endif
 
-    for (LineIterator line = BeginLine(), line_end = EndLine();
+    for (LineIterator line = LinesBegin(), line_end = LinesEnd();
          line != line_end;
          ++line)
     {
       // We let child blocks make their own decisions the same
       // way we are here.
       bool isLastLine = line == mLines.back() && !GetNextInFlow();
       if (line->IsBlock() ||
           line->HasFloats() ||
@@ -1937,31 +1937,31 @@ nsBlockFrame::PrepareResizeReflow(BlockR
                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()),
-           static_cast<void*>((line.next() != EndLine() ? line.next().get() : nullptr)),
+           static_cast<void*>((line.next() != LinesEnd() ? line.next().get() : nullptr)),
            line->IsBlock() ? "block" : "inline",
            line->HasBreakAfter() ? "has-break-after " : "",
            line->HasFloats() ? "has-floats " : "",
            line->IsImpactedByFloat() ? "impacted " : "",
            line->BreakTypeToString(line->GetBreakTypeBefore()),
            line->BreakTypeToString(line->GetBreakTypeAfter()),
            line->IEnd());
       }
 #endif
     }
   }
   else {
     // Mark everything dirty
-    for (LineIterator line = BeginLine(), line_end = EndLine();
+    for (LineIterator line = LinesBegin(), line_end = LinesEnd();
          line != line_end;
          ++line)
     {
       line->MarkDirty();
     }
   }
 }
 
@@ -2119,18 +2119,18 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
                      (aState.mReflowInput.IsBResize() &&
                       (GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_BSIZE));
 
   // Reflow our last line if our availableBSize has increased
   // so that we (and our last child) pull up content as necessary
   if (aState.mReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE
       && GetNextInFlow() && aState.mReflowInput.AvailableBSize() >
         GetLogicalSize().BSize(aState.mReflowInput.GetWritingMode())) {
-    LineIterator lastLine = EndLine();
-    if (lastLine != BeginLine()) {
+    LineIterator lastLine = LinesEnd();
+    if (lastLine != LinesBegin()) {
       --lastLine;
       lastLine->MarkDirty();
     }
   }
     // the amount by which we will slide the current line if it is not
     // dirty
   nscoord deltaBCoord = 0;
 
@@ -2140,17 +2140,17 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
   bool needToRecoverState = false;
     // Float continuations were reflowed in ReflowPushedFloats
   bool reflowedFloat = mFloats.NotEmpty() &&
     (mFloats.FirstChild()->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT);
   bool lastLineMovedUp = false;
   // We save up information about BR-clearance here
   StyleClear inlineFloatBreakType = aState.mFloatBreakType;
 
-  LineIterator line = BeginLine(), line_end = EndLine();
+  LineIterator line = LinesBegin(), line_end = LinesEnd();
 
   // Reflow the lines that are already ours
   for ( ; line != line_end; ++line, aState.AdvanceToNextLine()) {
     DumpLine(aState, line, deltaBCoord, 0);
 #ifdef DEBUG
     AutoNoisyIndenter indent2(gNoisyReflow);
 #endif
 
@@ -2358,17 +2358,17 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
       // block was and is adjacent to the block-start and empty).
       //
       // If the line is empty now, we can't reliably tell if the line was empty
       // before, so we just assume it was and do nextLine->MarkPreviousMarginDirty.
       // This means the checks in 4) are redundant; if the line is empty now
       // we don't need to check 4), but if the line is not empty now and we're sure
       // it wasn't empty before, any adjacency and clearance changes are irrelevant
       // to the result of nextLine->ShouldApplyBStartMargin.
-      if (line.next() != EndLine()) {
+      if (line.next() != LinesEnd()) {
         bool maybeWasEmpty = oldB == line.next()->BStart();
         bool isEmpty = line->CachedIsEmpty();
         if (maybeReflowingForFirstTime /*1*/ ||
             (isEmpty || maybeWasEmpty) /*2/3/4*/) {
           line.next()->MarkPreviousMarginDirty();
           // since it's marked dirty, nobody will care about |deltaBCoord|
         }
       }
@@ -2504,18 +2504,18 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
        !lastLineMovedUp &&
        !(GetStateBits() & NS_FRAME_IS_DIRTY) &&
        !reflowedFloat)) {
     // 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
     // have any lines -- if I don't, just bail out of this
     // optimization.)
-    LineIterator lineIter = this->EndLine();
-    if (lineIter != this->BeginLine()) {
+    LineIterator lineIter = this->LinesEnd();
+    if (lineIter != this->LinesBegin()) {
       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() ||
           !bifLineIter.GetLine()->IsDirty()) {
         skipPull=true;
@@ -2576,17 +2576,17 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
       NS_ASSERTION(aState.mPrevChild || mLines.empty(), "should have a prevchild here");
       NS_ASSERTION(aState.mPrevChild == mFrames.LastChild(),
                    "Incorrect aState.mPrevChild before inserting line at end");
 
       // Shift pulledLine's frames into our mFrames list.
       mFrames.AppendFrames(nullptr, pulledFrames);
 
       // Add line to our line list, and set its last child as our new prev-child
-      line = mLines.before_insert(EndLine(), pulledLine);
+      line = mLines.before_insert(LinesEnd(), pulledLine);
       aState.mPrevChild = mFrames.LastChild();
 
       // Reparent floats whose placeholders are in the line.
       ReparentFloats(pulledLine->mFirstChild, nextInFlow, true);
 
       DumpLine(aState, pulledLine, deltaBCoord, 0);
 #ifdef DEBUG
       AutoNoisyIndenter indent2(gNoisyReflow);
@@ -2594,17 +2594,17 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
 
       if (aState.mPresContext->HasPendingInterrupt()) {
         MarkLineDirtyForInterrupt(line);
       } else {
         // Now reflow it and any lines that it makes during it's reflow
         // (we have to loop here because reflowing the line may cause a new
         // line to be created; see SplitLine's callers for examples of
         // when this happens).
-        while (line != EndLine()) {
+        while (line != LinesEnd()) {
           ReflowLine(aState, line, &keepGoing);
 
           if (aState.mReflowInput.WillReflowAgainForClearance()) {
             line->MarkDirty();
             keepGoing = false;
             NS_FRAME_SET_INCOMPLETE(aState.mReflowStatus);
             break;
           }
@@ -2783,17 +2783,17 @@ nsBlockFrame::ReflowLine(BlockReflowInpu
   }
 }
 
 nsIFrame*
 nsBlockFrame::PullFrame(BlockReflowInput& aState,
                         LineIterator       aLine)
 {
   // First check our remaining lines.
-  if (EndLine() != aLine.next()) {
+  if (LinesEnd() != aLine.next()) {
     return PullFrameFrom(aLine, this, aLine.next());
   }
 
   NS_ASSERTION(!GetOverflowLines(),
     "Our overflow lines should have been removed at the start of reflow");
 
   // Try each next-in-flow.
   nsBlockFrame* nextInFlow = aState.mNextInFlow;
@@ -3053,17 +3053,17 @@ nsBlockFrame::IsSelfEmpty()
 
 bool
 nsBlockFrame::CachedIsEmpty()
 {
   if (!IsSelfEmpty()) {
     return false;
   }
 
-  for (LineIterator line = BeginLine(), line_end = EndLine();
+  for (LineIterator line = LinesBegin(), line_end = LinesEnd();
        line != line_end;
        ++line)
   {
     if (!line->CachedIsEmpty())
       return false;
   }
 
   return true;
@@ -3071,17 +3071,17 @@ nsBlockFrame::CachedIsEmpty()
 
 bool
 nsBlockFrame::IsEmpty()
 {
   if (!IsSelfEmpty()) {
     return false;
   }
 
-  for (LineIterator line = BeginLine(), line_end = EndLine();
+  for (LineIterator line = LinesBegin(), line_end = LinesEnd();
        line != line_end;
        ++line)
   {
     if (!line->IsEmpty())
       return false;
   }
 
   return true;
@@ -3103,17 +3103,17 @@ nsBlockFrame::ShouldApplyBStartMargin(Bl
     // If we aren't at the start block-coordinate then something of non-zero
     // height must have been placed. Therefore the childs block-start margin
     // applies.
     aState.mFlags.mShouldApplyBStartMargin = true;
     return true;
   }
 
   // Determine if this line is "essentially" the first line
-  LineIterator line = BeginLine();
+  LineIterator line = LinesBegin();
   if (aState.mFlags.mHasLineAdjacentToTop) {
     line = aState.mLineAdjacentToTop;
   }
   while (line != aLine) {
     if (!line->CachedIsEmpty() || line->HasClearance()) {
       // A line which precedes aLine is non-empty, or has clearance,
       // so therefore the block-start margin applies.
       aState.mFlags.mShouldApplyBStartMargin = true;
@@ -3556,17 +3556,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
       if (!NS_FRAME_IS_FULLY_COMPLETE(frameReflowStatus) &&
           ShouldAvoidBreakInside(aState.mReflowInput)) {
         *aKeepReflowGoing = false;
       }
 
       if (aLine->SetCarriedOutBEndMargin(collapsedBEndMargin)) {
         LineIterator nextLine = aLine;
         ++nextLine;
-        if (nextLine != EndLine()) {
+        if (nextLine != LinesEnd()) {
           nextLine->MarkPreviousMarginDirty();
         }
       }
 
       aLine->SetOverflowAreas(overflowAreas);
       if (*aKeepReflowGoing) {
         // Some of the child block fit
 
@@ -3622,18 +3622,18 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
               // else one of our own overflow lines. In the latter case
               // the line is already marked dirty, so just handle the
               // first case.
               if (!madeContinuation) {
                 nsBlockFrame* nifBlock =
                   nsLayoutUtils::GetAsBlock(nextFrame->GetParent());
                 NS_ASSERTION(nifBlock,
                              "A block's child's next in flow's parent must be a block!");
-                for (LineIterator line = nifBlock->BeginLine(),
-                     line_end = nifBlock->EndLine(); line != line_end; ++line) {
+                for (LineIterator line = nifBlock->LinesBegin(),
+                     line_end = nifBlock->LinesEnd(); line != line_end; ++line) {
                   if (line->Contains(nextFrame)) {
                     line->MarkDirty();
                     break;
                   }
                 }
               }
             }
             *aKeepReflowGoing = false;
@@ -3898,17 +3898,17 @@ nsBlockFrame::DoReflowInlineFrames(Block
   for (i = 0; LineReflowStatus::OK == lineReflowStatus && i < aLine->GetChildCount();
        i++, frame = frame->GetNextSibling()) {
     ReflowInlineFrame(aState, aLineLayout, aLine, frame, &lineReflowStatus);
     if (LineReflowStatus::OK != lineReflowStatus) {
       // It is possible that one or more of next lines are empty
       // (because of DeleteNextInFlowChild). If so, delete them now
       // in case we are finished.
       ++aLine;
-      while ((aLine != EndLine()) && (0 == aLine->GetChildCount())) {
+      while ((aLine != LinesEnd()) && (0 == aLine->GetChildCount())) {
         // XXX Is this still necessary now that DeleteNextInFlowChild
         // uses DoRemoveFrame?
         nsLineBox *toremove = aLine;
         aLine = mLines.erase(aLine);
         NS_ASSERTION(nullptr == toremove->mFirstChild, "bad empty line");
         FreeLineBox(toremove);
       }
       --aLine;
@@ -4378,32 +4378,32 @@ nsBlockFrame::SplitLine(BlockReflowInput
 #endif
   }
 }
 
 bool
 nsBlockFrame::IsLastLine(BlockReflowInput& aState,
                          LineIterator aLine)
 {
-  while (++aLine != EndLine()) {
+  while (++aLine != LinesEnd()) {
     // There is another line
     if (0 != aLine->GetChildCount()) {
       // If the next line is a block line then this line is the last in a
       // group of inline lines.
       return aLine->IsBlock();
     }
     // The next line is empty, try the next one
   }
 
   // XXX Not sure about this part
   // Try our next-in-flows lines to answer the question
   nsBlockFrame* nextInFlow = (nsBlockFrame*) GetNextInFlow();
   while (nullptr != nextInFlow) {
-    for (LineIterator line = nextInFlow->BeginLine(),
-                   line_end = nextInFlow->EndLine();
+    for (LineIterator line = nextInFlow->LinesBegin(),
+                   line_end = nextInFlow->LinesEnd();
          line != line_end;
          ++line)
     {
       if (0 != line->GetChildCount())
         return line->IsBlock();
     }
     nextInFlow = (nsBlockFrame*) nextInFlow->GetNextInFlow();
   }
@@ -4630,19 +4630,19 @@ nsBlockFrame::PushLines(BlockReflowInput
 {
   // NOTE: aLineBefore is always a normal line, not an overflow line.
   // The following expression will assert otherwise.
   DebugOnly<bool> check = aLineBefore == mLines.begin();
 
   nsLineList::iterator overBegin(aLineBefore.next());
 
   // PushTruncatedPlaceholderLine sometimes pushes the first line.  Ugh.
-  bool firstLine = overBegin == BeginLine();
-
-  if (overBegin != EndLine()) {
+  bool firstLine = overBegin == LinesBegin();
+
+  if (overBegin != LinesEnd()) {
     // Remove floats in the lines from mFloats
     nsFrameList floats;
     CollectFloats(overBegin->mFirstChild, floats, true);
 
     if (floats.NotEmpty()) {
 #ifdef DEBUG
       for (nsIFrame* f : floats) {
         MOZ_ASSERT(!(f->GetStateBits() & NS_FRAME_IS_PUSHED_FLOAT),
@@ -4673,17 +4673,17 @@ nsBlockFrame::PushLines(BlockReflowInput
         lineBeforeLastFrame = f ? f->GetPrevSibling() : mFrames.LastChild();
         NS_ASSERTION(!f || lineBeforeLastFrame == aLineBefore->LastChild(),
                      "unexpected line frames");
       }
       nsFrameList pushedFrames = mFrames.RemoveFramesAfter(lineBeforeLastFrame);
       overflowLines->mFrames.InsertFrames(nullptr, nullptr, pushedFrames);
 
       overflowLines->mLines.splice(overflowLines->mLines.begin(), mLines,
-                                    overBegin, EndLine());
+                                    overBegin, LinesEnd());
       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.
 
@@ -5347,17 +5347,17 @@ nsBlockFrame::AddFrames(nsFrameList& aFr
 #endif
 }
 
 void
 nsBlockFrame::RemoveFloatFromFloatCache(nsIFrame* aFloat)
 {
   // Find which line contains the float, so we can update
   // the float cache.
-  LineIterator line = BeginLine(), line_end = EndLine();
+  LineIterator line = LinesBegin(), line_end = LinesEnd();
   for ( ; line != line_end; ++line) {
     if (line->IsInline() && line->RemoveFloat(aFloat)) {
       break;
     }
   }
 }
 
 void
@@ -5450,32 +5450,32 @@ nsBlockFrame::TryAllLines(nsLineList::it
   }
 }
 
 nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
     LineIterator aLine)
   : mFrame(aFrame), mLine(aLine), mLineList(&aFrame->mLines)
 {
   // This will assert if aLine isn't in mLines of aFrame:
-  DebugOnly<bool> check = aLine == mFrame->BeginLine();
+  DebugOnly<bool> check = aLine == mFrame->LinesBegin();
 }
 
 nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
     LineIterator aLine, bool aInOverflow)
   : mFrame(aFrame), mLine(aLine),
     mLineList(aInOverflow ? &aFrame->GetOverflowLines()->mLines
                           : &aFrame->mLines)
 {
 }
 
 nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
     bool* aFoundValidLine)
   : mFrame(aFrame), mLineList(&aFrame->mLines)
 {
-  mLine = aFrame->BeginLine();
+  mLine = aFrame->LinesBegin();
   *aFoundValidLine = FindValidLine();
 }
 
 static nsIFrame*
 FindChildContaining(nsBlockFrame* aFrame, nsIFrame* aFindFrame)
 {
   NS_ASSERTION(aFrame, "must have frame");
   nsIFrame* child;
@@ -5502,25 +5502,25 @@ nsBlockInFlowLineIterator::nsBlockInFlow
   : mFrame(aFrame), mLineList(&aFrame->mLines)
 {
   *aFoundValidLine = false;
 
   nsIFrame* child = FindChildContaining(aFrame, aFindFrame);
   if (!child)
     return;
 
-  LineIterator line_end = aFrame->EndLine();
+  LineIterator line_end = aFrame->LinesEnd();
   // Try to use the cursor if it exists, otherwise fall back to the first line
   if (nsLineBox* const cursor = aFrame->GetLineCursor()) {
     mLine = line_end;
     // Perform a simultaneous forward and reverse search starting from the
     // line cursor.
-    nsBlockFrame::LineIterator line = aFrame->BeginLineFrom(cursor);
-    nsBlockFrame::ReverseLineIterator rline = aFrame->RBeginLineFrom(cursor);
-    nsBlockFrame::ReverseLineIterator rline_end = aFrame->REndLine();
+    nsBlockFrame::LineIterator line = aFrame->LinesBeginFrom(cursor);
+    nsBlockFrame::ReverseLineIterator rline = aFrame->LinesRBeginFrom(cursor);
+    nsBlockFrame::ReverseLineIterator rline_end = aFrame->LinesREnd();
     // 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
     // earlier) to start searching there.
     ++rline;
     while (line != line_end || rline != rline_end) {
       if (line != line_end) {
         if (line->Contains(child)) {
           mLine = line;
@@ -5539,17 +5539,17 @@ nsBlockInFlowLineIterator::nsBlockInFlow
     if (mLine != line_end) {
       *aFoundValidLine = true;
       if (mLine != cursor) {
         aFrame->Properties().Set(nsBlockFrame::LineCursorProperty(), mLine);
       }
       return;
     }
   } else {
-    for (mLine = aFrame->BeginLine(); mLine != line_end; ++mLine) {
+    for (mLine = aFrame->LinesBegin(); mLine != line_end; ++mLine) {
       if (mLine->Contains(child)) {
         *aFoundValidLine = true;
         return;
       }
     }
   }
   // Didn't find the line
   MOZ_ASSERT(mLine == line_end, "mLine should be line_end at this point");
@@ -6241,18 +6241,18 @@ nsBlockFrame::ReflowFloat(BlockReflowInp
 }
 
 StyleClear
 nsBlockFrame::FindTrailingClear()
 {
   // find the break type of the last line
   for (nsIFrame* b = this; b; b = b->GetPrevInFlow()) {
     nsBlockFrame* block = static_cast<nsBlockFrame*>(b);
-    LineIterator endLine = block->EndLine();
-    if (endLine != block->BeginLine()) {
+    LineIterator endLine = block->LinesEnd();
+    if (endLine != block->LinesBegin()) {
       --endLine;
       return endLine->GetBreakTypeAfter();
     }
   }
   return StyleClear::None;
 }
 
 void
@@ -6345,17 +6345,17 @@ nsBlockFrame::RecoverFloats(nsFloatManag
 
   // Recurse into our overflow container children
   for (nsIFrame* oc = GetChildList(kOverflowContainersList).FirstChild();
        oc; oc = oc->GetNextSibling()) {
     RecoverFloatsFor(oc, aFloatManager, aWM, aContainerSize);
   }
 
   // Recurse into our normal children
-  for (nsBlockFrame::LineIterator line = BeginLine(); line != EndLine(); ++line) {
+  for (nsBlockFrame::LineIterator line = LinesBegin(); line != LinesEnd(); ++line) {
     if (line->IsBlock()) {
       RecoverFloatsFor(line->mFirstChild, aFloatManager, aWM, aContainerSize);
     }
   }
 }
 
 void
 nsBlockFrame::RecoverFloatsFor(nsIFrame*       aFrame,
@@ -6555,17 +6555,17 @@ nsBlockFrame::BuildDisplayList(nsDisplay
   // it might skip lines that contain placeholders but don't themselves
   // 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();
+  LineIterator line_end = LinesEnd();
 
   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.
@@ -6577,17 +6577,17 @@ nsBlockFrame::BuildDisplayList(nsDisplay
                     linesDisplayListCollection, this, textOverflow.get());
       }
     }
   } else {
     bool nonDecreasingYs = true;
     int32_t lineCount = 0;
     nscoord lastY = INT32_MIN;
     nscoord lastYMost = INT32_MIN;
-    for (LineIterator line = BeginLine();
+    for (LineIterator line = LinesBegin();
          line != line_end;
          ++line) {
       nsRect lineArea = line->GetVisualOverflowArea();
       DisplayLine(aBuilder, lineArea, aDirtyRect, line, depth, drawnLines,
                   linesDisplayListCollection, this, textOverflow.get());
       if (!lineArea.IsEmpty()) {
         if (lineArea.y < lastY
             || lineArea.YMost() < lastYMost) {
@@ -6740,23 +6740,23 @@ nsBlockFrame::ChildIsDirty(nsIFrame* aCh
   // See if the child is absolutely positioned
   if (aChild->GetStateBits() & NS_FRAME_OUT_OF_FLOW &&
       aChild->IsAbsolutelyPositioned()) {
     // do nothing
   } else if (aChild == GetOutsideBullet()) {
     // 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 &&
+    LineIterator bulletLine = LinesBegin();
+    if (bulletLine != LinesEnd() && bulletLine->BSize() == 0 &&
         bulletLine != mLines.back()) {
       bulletLine = bulletLine.next();
     }
 
-    if (bulletLine != EndLine()) {
+    if (bulletLine != LinesEnd()) {
       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)
     // since finding the right line is O(N).
@@ -7131,17 +7131,17 @@ nsBlockFrame::CheckFloats(BlockReflowInp
 #ifdef DEBUG
   // If any line is still dirty, that must mean we're going to reflow this
   // block again soon (e.g. because we bailed out after noticing that
   // clearance was imposed), so don't worry if the floats are out of sync.
   bool anyLineDirty = false;
 
   // Check that the float list is what we would have built
   AutoTArray<nsIFrame*, 8> lineFloats;
-  for (LineIterator line = BeginLine(), line_end = EndLine();
+  for (LineIterator line = LinesBegin(), line_end = LinesEnd();
        line != line_end; ++line) {
     if (line->HasFloats()) {
       nsFloatCache* fc = line->GetFirstFloat();
       while (fc) {
         lineFloats.AppendElement(fc->mFloat);
         fc = fc->Next();
       }
     }
@@ -7374,17 +7374,17 @@ nsBlockFrame::VerifyLines(bool aFinalChe
   }
 
   nsLineBox* cursor = GetLineCursor();
 
   // Add up the counts on each line. Also validate that IsFirstLine is
   // set properly.
   int32_t count = 0;
   LineIterator line, line_end;
-  for (line = BeginLine(), line_end = EndLine();
+  for (line = LinesBegin(), line_end = LinesEnd();
        line != line_end;
        ++line) {
     if (line == cursor) {
       cursor = nullptr;
     }
     if (aFinalCheckOK) {
       MOZ_ASSERT(line->GetChildCount(), "empty line");
       if (line->IsBlock()) {
@@ -7399,17 +7399,17 @@ nsBlockFrame::VerifyLines(bool aFinalChe
   nsIFrame* frame = mLines.front()->mFirstChild;
   while (frame) {
     frameCount++;
     frame = frame->GetNextSibling();
   }
   NS_ASSERTION(count == frameCount, "bad line list");
 
   // Next: test that each line has right number of frames on it
-  for (line = BeginLine(), line_end = EndLine();
+  for (line = LinesBegin(), line_end = LinesEnd();
        line != line_end;
         ) {
     count = line->GetChildCount();
     frame = line->mFirstChild;
     while (--count >= 0) {
       frame = frame->GetNextSibling();
     }
     ++line;
@@ -7487,18 +7487,18 @@ nsBlockFrame::VerifyOverflowSituation()
       NS_ASSERTION(overflowLines->mLines.front()->mFirstChild,
                    "bad overflow lines");
       NS_ASSERTION(overflowLines->mLines.front()->mFirstChild ==
                    overflowLines->mFrames.FirstChild(),
                    "bad overflow frames / lines");
     }
     nsLineBox* cursor = flow->GetLineCursor();
     if (cursor) {
-      LineIterator line = flow->BeginLine();
-      LineIterator line_end = flow->EndLine();
+      LineIterator line = flow->LinesBegin();
+      LineIterator line_end = flow->LinesEnd();
       for (; line != line_end && line != cursor; ++line)
         ;
       if (line == line_end && overflowLines) {
         line = overflowLines->mLines.begin();
         line_end = overflowLines->mLines.end();
         for (; line != line_end && line != cursor; ++line)
           ;
         }
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -83,26 +83,26 @@ public:
   NS_DECL_QUERYFRAME_TARGET(nsBlockFrame)
   NS_DECL_FRAMEARENA_HELPERS
 
   typedef nsLineList::iterator LineIterator;
   typedef nsLineList::const_iterator ConstLineIterator;
   typedef nsLineList::reverse_iterator ReverseLineIterator;
   typedef nsLineList::const_reverse_iterator ConstReverseLineIterator;
 
-  LineIterator BeginLine() { return mLines.begin(); }
-  LineIterator EndLine() { return mLines.end(); }
-  ConstLineIterator BeginLine() const { return mLines.begin(); }
-  ConstLineIterator EndLine() const { return mLines.end(); }
-  ReverseLineIterator RBeginLine() { return mLines.rbegin(); }
-  ReverseLineIterator REndLine() { return mLines.rend(); }
-  ConstReverseLineIterator RBeginLine() const { return mLines.rbegin(); }
-  ConstReverseLineIterator REndLine() const { return mLines.rend(); }
-  LineIterator BeginLineFrom(nsLineBox* aList) { return mLines.begin(aList); }
-  ReverseLineIterator RBeginLineFrom(nsLineBox* aList) { return mLines.rbegin(aList); }
+  LineIterator LinesBegin() { return mLines.begin(); }
+  LineIterator LinesEnd() { return mLines.end(); }
+  ConstLineIterator LinesBegin() const { return mLines.begin(); }
+  ConstLineIterator LinesEnd() const { return mLines.end(); }
+  ReverseLineIterator LinesRBegin() { return mLines.rbegin(); }
+  ReverseLineIterator LinesREnd() { return mLines.rend(); }
+  ConstReverseLineIterator LinesRBegin() const { return mLines.rbegin(); }
+  ConstReverseLineIterator LinesREnd() const { return mLines.rend(); }
+  LineIterator LinesBeginFrom(nsLineBox* aList) { return mLines.begin(aList); }
+  ReverseLineIterator LinesRBeginFrom(nsLineBox* aList) { return mLines.rbegin(aList); }
 
   friend nsBlockFrame* NS_NewBlockFrame(nsIPresShell* aPresShell,
                                         nsStyleContext* aContext);
 
   // nsQueryFrame
   NS_DECL_QUERYFRAME
 
   // nsIFrame
@@ -793,17 +793,17 @@ protected:
    * @return the pulled frame or nullptr
    */
   nsIFrame* PullFrameFrom(nsLineBox* aLine,
                           nsBlockFrame* aFromContainer,
                           nsLineList::iterator aFromLine);
 
   /**
    * Push the line after aLineBefore to the overflow line list.
-   * @param aLineBefore a line in 'mLines' (or BeginLine() when
+   * @param aLineBefore a line in 'mLines' (or LinesBegin() when
    *        pushing the first line)
    */
   void PushLines(BlockReflowInput& aState,
                  nsLineList::iterator aLineBefore);
 
   void PropagateFloatDamage(BlockReflowInput& aState,
                             nsLineBox* aLine,
                             nscoord aDeltaBCoord);
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -109,18 +109,18 @@ nsBlockReflowContext::ComputeCollapsedBS
         nsLineList* lines = frames ? &frames->mLines : nullptr;
         if (!lines) {
           anyLines = false;
         } else {
           line = lines->begin();
           line_end = lines->end();
         }
       } else {
-        line = block->BeginLine();
-        line_end = block->EndLine();
+        line = block->LinesBegin();
+        line_end = block->LinesEnd();
       }
       for (; anyLines && line != line_end; ++line) {
         if (!aClearanceFrame && line->HasClearance()) {
           // If we don't have a clearance frame, then we're computing
           // the collapsed margin in the first pass, assuming that all
           // lines have no clearance. So clear their clearance flags.
           line->ClearHasClearance();
           line->MarkDirty();
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -3978,17 +3978,17 @@ static FrameTarget DrillDownToSelectionF
 static FrameTarget GetSelectionClosestFrameForLine(
                       nsBlockFrame* aParent,
                       nsBlockFrame::LineIterator aLine,
                       nsPoint aPoint,
                       uint32_t aFlags)
 {
   nsIFrame *frame = aLine->mFirstChild;
   // Account for end of lines (any iterator from the block is valid)
-  if (aLine == aParent->EndLine())
+  if (aLine == aParent->LinesEnd())
     return DrillDownToSelectionFrame(aParent, true, aFlags);
   nsIFrame *closestFromIStart = nullptr, *closestFromIEnd = nullptr;
   nscoord closestIStart = aLine->IStart(), closestIEnd = aLine->IEnd();
   WritingMode wm = aLine->mWritingMode;
   LogicalPoint pt(wm, aPoint, aLine->mContainerSize);
   bool canSkipBr = false;
   for (int32_t n = aLine->GetChildCount(); n;
        --n, frame = frame->GetNextSibling()) {
@@ -4039,18 +4039,18 @@ static FrameTarget GetSelectionClosestFr
                                                     nsPoint aPoint,
                                                     uint32_t aFlags)
 {
   nsBlockFrame* bf = nsLayoutUtils::GetAsBlock(aFrame); // used only for QI
   if (!bf)
     return FrameTarget::Null();
 
   // This code searches for the correct line
-  nsBlockFrame::LineIterator firstLine = bf->BeginLine();
-  nsBlockFrame::LineIterator end = bf->EndLine();
+  nsBlockFrame::LineIterator firstLine = bf->LinesBegin();
+  nsBlockFrame::LineIterator end = bf->LinesEnd();
   if (firstLine == end) {
     nsIContent *blockContent = aFrame->GetContent();
     if (blockContent) {
       // Return with empty flag true.
       return FrameTarget(aFrame, false, false, true);
     }
     return FrameTarget::Null();
   }
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -5088,18 +5088,18 @@ PaintSelectionBackground(DrawTarget& aDr
 static nscoord
 LazyGetLineBaselineOffset(nsIFrame* aChildFrame, nsBlockFrame* aBlockFrame)
 {
   bool offsetFound;
   nscoord offset = aChildFrame->Properties().Get(
     nsIFrame::LineBaselineOffset(), &offsetFound);
 
   if (!offsetFound) {
-    for (nsBlockFrame::LineIterator line = aBlockFrame->BeginLine(),
-                                    line_end = aBlockFrame->EndLine();
+    for (nsBlockFrame::LineIterator line = aBlockFrame->LinesBegin(),
+                                    line_end = aBlockFrame->LinesEnd();
          line != line_end; line++) {
       if (line->IsInline()) {
         int32_t n = line->GetChildCount();
         nscoord lineBaseline = line->BStart() + line->GetLogicalAscent();
         for (nsIFrame* lineFrame = line->mFirstChild;
              n > 0; lineFrame = lineFrame->GetNextSibling(), --n) {
           offset = lineBaseline - lineFrame->GetNormalPosition().y;
           lineFrame->Properties().Set(nsIFrame::LineBaselineOffset(), offset);
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -4735,20 +4735,20 @@ ShiftAnchoredChunk(nsTArray<mozilla::Cha
 }
 
 void
 SVGTextFrame::AdjustChunksForLineBreaks()
 {
   nsBlockFrame* block = nsLayoutUtils::GetAsBlock(PrincipalChildList().FirstChild());
   NS_ASSERTION(block, "expected block frame");
 
-  nsBlockFrame::LineIterator line = block->BeginLine();
+  nsBlockFrame::LineIterator line = block->LinesBegin();
 
   CharIterator it(this, CharIterator::eOriginal);
-  while (!it.AtEnd() && line != block->EndLine()) {
+  while (!it.AtEnd() && line != block->LinesEnd()) {
     if (it.TextFrame() == line->mFirstChild) {
       mPositions[it.TextElementCharIndex()].mStartOfChunk = true;
       line++;
     }
     it.AdvancePastCurrentFrame();
   }
 }