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 345621 6b35c4986b0e81cd250d730d12472b3faaca2d1a
parent 345620 4699504e17bae5ad05e5be96a9136833dfede02b
child 345622 e49c530bd068653fccacb200bf5c8386d5000c84
push id87632
push usermpalmgren@mozilla.com
push dateThu, 02 Mar 2017 19:45:50 +0000
treeherdermozilla-inbound@e49c530bd068 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame
bugs1343606
milestone54.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 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);