Bug 1343606 - Pass the correct first child frame for the lines we're going to traverse, and reset bpd.mPrevFrame since we're starting at a new line. r=jfkthame
authorMats Palmgren <mats@mozilla.com>
Thu, 02 Mar 2017 20:45:40 +0100
changeset 374759 6b35c4986b0e81cd250d730d12472b3faaca2d1a
parent 374758 4699504e17bae5ad05e5be96a9136833dfede02b
child 374760 e49c530bd068653fccacb200bf5c8386d5000c84
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1343606
milestone54.0a1
Bug 1343606 - Pass the correct first child frame for the lines we're going to traverse, and reset bpd.mPrevFrame since we're starting at a new line. r=jfkthame MozReview-Commit-ID: 77CG4u22OTt
layout/base/nsBidiPresUtils.cpp
--- a/layout/base/nsBidiPresUtils.cpp
+++ b/layout/base/nsBidiPresUtils.cpp
@@ -706,17 +706,18 @@ nsBidiPresUtils::Resolve(nsBlockFrame* a
 #endif
     block->RemoveStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
     nsBlockInFlowLineIterator it(block, block->LinesBegin());
     bpd.mPrevFrame = nullptr;
     TraverseFrames(&it, block->PrincipalChildList().FirstChild(), &bpd);
     nsBlockFrame::FrameLines* overflowLines = block->GetOverflowLines();
     if (overflowLines) {
       nsBlockInFlowLineIterator it(block, overflowLines->mLines.begin(), true);
-      TraverseFrames(&it, block->PrincipalChildList().FirstChild(), &bpd);
+      bpd.mPrevFrame = nullptr;
+      TraverseFrames(&it, overflowLines->mFrames.FirstChild(), &bpd);
     }
   }
 
   if (ch != 0) {
     bpd.PopBidiControl(ch);
   }
 
   return ResolveParagraph(&bpd);