Bug 410857 - Part 1: Traverse overflow lines too so we don't miss some text. r=jfkthame, a=jcristau
authorMats Palmgren <mats@mozilla.com>
Mon, 20 Feb 2017 17:43:08 +0100
changeset 354371 4619a89b7f733e17ed7968bc7cdbcecdaaf6c9f5
parent 354370 732a5221be43ac411b14b77dc4a686ac812fb495
child 354372 720cbc37da356c260e60c8caf4170bdb5a66d914
push id6897
push userryanvm@gmail.com
push dateTue, 21 Feb 2017 21:41:19 +0000
treeherdermozilla-esr52@0316bb85a29c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, jcristau
bugs410857
milestone52.0
Bug 410857 - Part 1: Traverse overflow lines too so we don't miss some text. r=jfkthame, a=jcristau
layout/base/nsBidiPresUtils.cpp
layout/generic/nsBlockFrame.h
--- a/layout/base/nsBidiPresUtils.cpp
+++ b/layout/base/nsBidiPresUtils.cpp
@@ -690,17 +690,21 @@ nsBidiPresUtils::Resolve(nsBlockFrame* a
     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->LinesBegin());
     bpd.mPrevFrame = nullptr;
     TraverseFrames(aBlockFrame, &lineIter, block->PrincipalChildList().FirstChild(), &bpd);
-    // XXX what about overflow lines?
+    nsBlockFrame::FrameLines* overflowLines = block->GetOverflowLines();
+    if (overflowLines) {
+      nsBlockInFlowLineIterator lineIter(block, overflowLines->mLines.begin(), true);
+      TraverseFrames(aBlockFrame, &lineIter, block->PrincipalChildList().FirstChild(), &bpd);
+    }
   }
 
   if (ch != 0) {
     bpd.PopBidiControl(ch);
   }
 
   return ResolveParagraph(aBlockFrame, &bpd);
 }
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -1014,17 +1014,19 @@ public:
   /**
    * Returns false if there are no more lines. After this has returned false,
    * don't call any methods on this object again.
    */
   bool Prev();
 
 private:
   friend class nsBlockFrame;
+  friend class nsBidiPresUtils;
   // XXX nsBlockFrame uses this internally in one place.  Try to remove it.
+  // XXX uhm, and nsBidiPresUtils::Resolve too.
   nsBlockInFlowLineIterator(nsBlockFrame* aFrame, LineIterator aLine, bool aInOverflow);
 
   nsBlockFrame* mFrame;
   LineIterator mLine;
   nsLineList* mLineList;  // the line list mLine is in
 
   /**
    * Moves iterator to next valid line reachable from the current block.