Bug 385270. Remove unnecessary (hopefully) bidi offset adjustment; the offsets will get fixed by a later reflow. r+sr=dbaron
authorroc+@cs.cmu.edu
Mon, 23 Jul 2007 20:48:10 -0700
changeset 3821 fc9a155e44a6e744546d50fd132e5e3ef7463afe
parent 3820 3e0b14ae1c2eaadeab22c7f2f79582f95b1d90e4
child 3822 cc97475054b04a020c7d10115bc4f1606a5173f8
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs385270
milestone1.9a7pre
Bug 385270. Remove unnecessary (hopefully) bidi offset adjustment; the offsets will get fixed by a later reflow. r+sr=dbaron
layout/generic/nsLineLayout.cpp
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -878,26 +878,16 @@ nsLineLayout::ReflowFrame(nsIFrame* aFra
 #ifdef DEBUG
   metrics.width = nscoord(0xdeadbeef);
   metrics.height = nscoord(0xdeadbeef);
 #endif
   nscoord tx = x - psd->mReflowState->mComputedBorderPadding.left;
   nscoord ty = y - psd->mReflowState->mComputedBorderPadding.top;
   mSpaceManager->Translate(tx, ty);
 
-#ifdef IBMBIDI
-  PRInt32 start, end;
-
-  if (mPresContext->BidiEnabled()) {
-    if (aFrame->GetStateBits() & NS_FRAME_IS_BIDI) {
-      aFrame->GetOffsets(start, end);
-    }
-  }
-#endif // IBMBIDI
-
   nsIAtom* frameType = aFrame->GetType();
   PRInt32 savedOptionalBreakOffset;
   nsIContent* savedOptionalBreakContent =
     GetLastOptionalBreakPosition(&savedOptionalBreakOffset);
 
   rv = aFrame->Reflow(mPresContext, metrics, reflowState, aReflowStatus);
   if (NS_FAILED(rv)) {
     NS_WARNING( "Reflow of frame failed in nsLineLayout" );
@@ -1081,34 +1071,16 @@ nsLineLayout::ReflowFrame(nsIFrame* aFra
   
 #ifdef REALLY_NOISY_REFLOW
   nsFrame::IndentBy(stdout, mSpanDepth);
   printf("End ReflowFrame ");
   nsFrame::ListTag(stdout, aFrame);
   printf(" status=%x\n", aReflowStatus);
 #endif
 
-  if (aFrame->GetStateBits() & NS_FRAME_IS_BIDI) {
-    // Since aReflowStatus may change, check it at the end
-    if (NS_INLINE_IS_BREAK_BEFORE(aReflowStatus) ) {
-      aFrame->AdjustOffsetsForBidi(start, end);
-    }
-    else if (!NS_FRAME_IS_COMPLETE(aReflowStatus) ) {
-      PRInt32 newEnd;
-      aFrame->GetOffsets(start, newEnd);
-      if (newEnd != end) {
-        nsIFrame* nextInFlow = aFrame->GetNextInFlow();
-        if (nextInFlow) {
-          nextInFlow->GetOffsets(start, end);
-          nextInFlow->AdjustOffsetsForBidi(newEnd, end);
-        } // nextInFlow
-      } // newEnd != end
-    } // !NS_FRAME_IS_COMPLETE(aReflowStatus)
-  } // isBidiFrame
-
   return rv;
 }
 
 void
 nsLineLayout::ApplyStartMargin(PerFrameData* pfd,
                                nsHTMLReflowState& aReflowState)
 {
   NS_ASSERTION(aReflowState.mStyleDisplay->mFloats == NS_STYLE_FLOAT_NONE,