Bug 1121748 - Back out bug 1079154 from Gecko 37 to fix RTL rendering problems. a=lmandel
authorSimon Montagu <smontagu@smontagu.org>
Tue, 27 Jan 2015 02:08:56 -0800
changeset 249523 a96c54ab12ff99d02db61ba79bf424fc6c76ff16
parent 249522 d01793855ebaf77f055e22f7be6a6a18983ca841
child 249524 7e4e593cd4d7774173637421e100fbc133a00e2c
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslmandel
bugs1121748, 1079154
milestone37.0a2
Bug 1121748 - Back out bug 1079154 from Gecko 37 to fix RTL rendering problems. a=lmandel
layout/generic/WritingModes.h
layout/generic/nsBlockReflowContext.cpp
layout/generic/nsBlockReflowState.cpp
layout/generic/nsCanvasFrame.cpp
layout/generic/nsColumnSetFrame.cpp
layout/generic/nsContainerFrame.cpp
layout/generic/nsContainerFrame.h
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsHTMLReflowState.h
layout/generic/nsIFrame.h
layout/generic/nsLineLayout.cpp
layout/reftests/writing-mode/1079154-1-vertical-rl-columns-ref.html
layout/reftests/writing-mode/1079154-1-vertical-rl-columns.html
layout/reftests/writing-mode/reftest.list
--- a/layout/generic/WritingModes.h
+++ b/layout/generic/WritingModes.h
@@ -557,28 +557,22 @@ public:
   {
     CHECK_WRITING_MODE(aFromMode);
     return aToMode == aFromMode ?
       *this : LogicalPoint(aToMode,
                            GetPhysicalPoint(aFromMode, aContainerWidth),
                            aContainerWidth);
   }
 
-  bool operator==(const LogicalPoint& aOther) const
+  bool operator==(LogicalPoint aOther) const
   {
     CHECK_WRITING_MODE(aOther.GetWritingMode());
     return mPoint == aOther.mPoint;
   }
 
-  bool operator!=(const LogicalPoint& aOther) const
-  {
-    CHECK_WRITING_MODE(aOther.GetWritingMode());
-    return mPoint != aOther.mPoint;
-  }
-
   LogicalPoint operator+(const LogicalPoint& aOther) const
   {
     CHECK_WRITING_MODE(aOther.GetWritingMode());
     // In non-debug builds, LogicalPoint does not store the WritingMode,
     // so the first parameter here (which will always be eUnknownWritingMode)
     // is ignored.
     return LogicalPoint(GetWritingMode(),
                         mPoint.x + aOther.mPoint.x,
@@ -1120,26 +1114,26 @@ public:
   }
 
   bool IsAllZero() const
   {
     return (mMargin.left == 0 && mMargin.top == 0 &&
             mMargin.right == 0 && mMargin.bottom == 0);
   }
 
-  LogicalMargin operator+(const LogicalMargin& aMargin) const {
+  LogicalMargin operator+(const LogicalMargin& aMargin) {
     CHECK_WRITING_MODE(aMargin.GetWritingMode());
     return LogicalMargin(GetWritingMode(),
                          BStart() + aMargin.BStart(),
                          IEnd() + aMargin.IEnd(),
                          BEnd() + aMargin.BEnd(),
                          IStart() + aMargin.IStart());
   }
 
-  LogicalMargin operator-(const LogicalMargin& aMargin) const {
+  LogicalMargin operator-(const LogicalMargin& aMargin) {
     CHECK_WRITING_MODE(aMargin.GetWritingMode());
     return LogicalMargin(GetWritingMode(),
                          BStart() - aMargin.BStart(),
                          IEnd() - aMargin.IEnd(),
                          BEnd() - aMargin.BEnd(),
                          IStart() - aMargin.IStart());
   }
 
@@ -1553,16 +1547,29 @@ public:
                     IStart(), BSize(), ISize());
     } else {
       return nsRect(aWritingMode.IsBidiLTR() ?
                       IStart() : aContainerWidth - IEnd(),
                     BStart(), ISize(), BSize());
     }
   }
 
+  nsPoint GetPhysicalPosition(WritingMode aWritingMode,
+                              nscoord aContainerWidth) const
+  {
+    CHECK_WRITING_MODE(aWritingMode);
+    if (aWritingMode.IsVertical()) {
+      return nsPoint(aWritingMode.IsVerticalLR() ? BStart() : aContainerWidth - BEnd(),
+                     IStart());
+    } else {
+      return nsPoint(aWritingMode.IsBidiLTR() ? IStart() : aContainerWidth - IEnd(),
+                     BStart());
+    }
+  }
+
   /**
    * Return a LogicalRect representing this rect in a different writing mode
    */
   LogicalRect ConvertTo(WritingMode aToMode, WritingMode aFromMode,
                         nscoord aContainerWidth) const
   {
     CHECK_WRITING_MODE(aFromMode);
     return aToMode == aFromMode ?
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -419,23 +419,25 @@ nsBlockReflowContext::PlaceBlock(const n
     }
   }
 
   aLine->SetBounds(mWritingMode,
                    mICoord, mBCoord - backupContainingBlockAdvance,
                    mMetrics.ISize(mWritingMode), mMetrics.BSize(mWritingMode),
                    mContainerWidth);
 
-  WritingMode frameWM = mFrame->GetWritingMode();
-  LogicalPoint logPos =
-    LogicalPoint(mWritingMode, mICoord, mBCoord).
-      ConvertTo(frameWM, mWritingMode, mContainerWidth - mMetrics.Width());
-  aReflowState.ApplyRelativePositioning(&logPos, mContainerWidth);
+  // XXX temporary until other classes are logicalized
+  nsPoint position = LogicalRect(mWritingMode,
+                                 mICoord, mBCoord,
+                                 mMetrics.ISize(mWritingMode),
+                                 mMetrics.BSize(mWritingMode)).
+                       GetPhysicalPosition(mWritingMode, mContainerWidth);
+
+  aReflowState.ApplyRelativePositioning(&position);
 
   // Now place the frame and complete the reflow process
   nsContainerFrame::FinishReflowChild(mFrame, mPresContext, mMetrics,
-                                      &aReflowState, frameWM, logPos,
-                                      mContainerWidth, 0);
+                                      &aReflowState, position.x, position.y, 0);
 
-  aOverflowAreas = mMetrics.mOverflowAreas + mFrame->GetPosition();
+  aOverflowAreas = mMetrics.mOverflowAreas + position;
 
   return true;
 }
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -908,37 +908,45 @@ nsBlockReflowState::FlowAndPlaceFloat(ns
       !aFloat->GetPrevInFlow()) {
     PushFloatPastBreak(aFloat);
     return false;
   }
 
   // Calculate the actual origin of the float frame's border rect
   // relative to the parent block; the margin must be added in
   // to get the border rect
-  LogicalPoint origin(wm, floatMargin.IStart(wm) + floatPos.I(wm),
-                      floatMargin.BStart(wm) + floatPos.B(wm));
+
+  //XXX temporary! ApplyRelativePositioning still uses physical margin and point
+  LogicalSize size = aFloat->GetLogicalSize(wm);
+  LogicalMargin margin = aFloat->GetLogicalUsedMargin(wm);
+  size.ISize(wm) += margin.IStartEnd(wm);
+  size.BSize(wm) += margin.BStartEnd(wm);
+  nsPoint physicalPos =
+    LogicalRect(wm, floatPos, size).GetPhysicalPosition(wm, mContainerWidth);
+  nsPoint origin(floatMargin.Left(wm) + physicalPos.x,
+                 floatMargin.Top(wm) + physicalPos.y);
 
   // If float is relatively positioned, factor that in as well
-  nsHTMLReflowState::ApplyRelativePositioning(aFloat, wm, floatOffsets,
-                                              &origin, mContainerWidth);
+  nsHTMLReflowState::ApplyRelativePositioning(aFloat,
+                                             floatOffsets.GetPhysicalMargin(wm),
+                                              &origin);
 
   // Position the float and make sure and views are properly
   // positioned. We need to explicitly position its child views as
   // well, since we're moving the float after flowing it.
-  bool moved = aFloat->GetLogicalPosition(wm, mContainerWidth) != origin;
+  bool moved = aFloat->GetPosition() != origin;
   if (moved) {
-    aFloat->SetPosition(wm, origin, mContainerWidth);
+    aFloat->SetPosition(origin);
     nsContainerFrame::PositionFrameView(aFloat);
     nsContainerFrame::PositionChildViews(aFloat);
   }
 
   // Update the float combined area state
   // XXX Floats should really just get invalidated here if necessary
-  mFloatOverflowAreas.UnionWith(aFloat->GetOverflowAreas() +
-                                aFloat->GetPosition());
+  mFloatOverflowAreas.UnionWith(aFloat->GetOverflowAreas() + origin);
 
   // Place the float in the float manager
   // calculate region
   LogicalRect region =
     nsFloatManager::CalculateRegionFor(wm, aFloat, floatMargin,
                                        mContainerWidth);
   // if the float split, then take up all of the vertical height
   if (NS_FRAME_IS_NOT_COMPLETE(reflowStatus) &&
--- a/layout/generic/nsCanvasFrame.cpp
+++ b/layout/generic/nsCanvasFrame.cpp
@@ -597,32 +597,28 @@ nsCanvasFrame::Reflow(nsPresContext*    
 
     if (aReflowState.IsVResize() &&
         (kidFrame->GetStateBits() & NS_FRAME_CONTAINS_RELATIVE_HEIGHT)) {
       // Tell our kid it's being vertically resized too.  Bit of a
       // hack for framesets.
       kidReflowState.SetVResize(true);
     }
 
-    WritingMode wm = aReflowState.GetWritingMode();
-    WritingMode kidWM = kidReflowState.GetWritingMode();
-    nscoord containerWidth = aReflowState.ComputedWidth();
+    nsPoint kidPt(kidReflowState.ComputedPhysicalMargin().left,
+                  kidReflowState.ComputedPhysicalMargin().top);
 
-    LogicalMargin margin = kidReflowState.ComputedLogicalMargin();
-    LogicalPoint kidPt(kidWM, margin.IStart(kidWM), margin.BStart(kidWM));
-
-    kidReflowState.ApplyRelativePositioning(&kidPt, containerWidth);
+    kidReflowState.ApplyRelativePositioning(&kidPt);
 
     // Reflow the frame
     ReflowChild(kidFrame, aPresContext, kidDesiredSize, kidReflowState,
-                kidWM, kidPt, containerWidth, 0, aStatus);
+                kidPt.x, kidPt.y, 0, aStatus);
 
     // Complete the reflow and position and size the child frame
     FinishReflowChild(kidFrame, aPresContext, kidDesiredSize, &kidReflowState,
-                      kidWM, kidPt, containerWidth, 0);
+                      kidPt.x, kidPt.y, 0);
 
     if (!NS_FRAME_IS_FULLY_COMPLETE(aStatus)) {
       nsIFrame* nextFrame = kidFrame->GetNextInFlow();
       NS_ASSERTION(nextFrame || aStatus & NS_FRAME_REFLOW_NEXTINFLOW,
         "If it's incomplete and has no nif yet, it must flag a nif reflow.");
       if (!nextFrame) {
         nextFrame = aPresContext->PresShell()->FrameConstructor()->
           CreateContinuingFrame(aPresContext, kidFrame, this);
@@ -650,29 +646,30 @@ nsCanvasFrame::Reflow(nsPresContext*    
       // which doesn't need to be painted.
       nsIFrame* viewport = PresContext()->GetPresShell()->GetRootFrame();
       viewport->InvalidateFrame();
     }
     
     // Return our desired size. Normally it's what we're told, but
     // sometimes we can be given an unconstrained height (when a window
     // is sizing-to-content), and we should compute our desired height.
+    WritingMode wm = aReflowState.GetWritingMode();
     LogicalSize finalSize(wm);
     finalSize.ISize(wm) = aReflowState.ComputedISize();
     if (aReflowState.ComputedBSize() == NS_UNCONSTRAINEDSIZE) {
       finalSize.BSize(wm) = kidFrame->GetLogicalSize(wm).BSize(wm) +
         kidReflowState.ComputedLogicalMargin().BStartEnd(wm);
     } else {
       finalSize.BSize(wm) = aReflowState.ComputedBSize();
     }
 
     aDesiredSize.SetSize(wm, finalSize);
     aDesiredSize.SetOverflowAreasToDesiredBounds();
     aDesiredSize.mOverflowAreas.UnionWith(
-      kidDesiredSize.mOverflowAreas + kidFrame->GetPosition());
+      kidDesiredSize.mOverflowAreas + kidPt);
   }
 
   if (prevCanvasFrame) {
     ReflowOverflowContainerChildren(aPresContext, aReflowState,
                                     aDesiredSize.mOverflowAreas, 0,
                                     aStatus);
   }
 
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -354,24 +354,23 @@ nsColumnSetFrame::ReflowColumns(nsHTMLRe
     feasible = ReflowChildren(aDesiredSize, aReflowState, aReflowStatus,
                               aConfig, aLastColumnUnbounded,
                               aCarriedOutBEndMargin, aColData);
   }
 
   return feasible;
 }
 
-static void MoveChildTo(nsIFrame* aChild, LogicalPoint aOrigin,
-                        WritingMode aWM, nscoord aContainerWidth)
+static void MoveChildTo(nsIFrame* aParent, nsIFrame* aChild, nsPoint aOrigin)
 {
-  if (aChild->GetLogicalPosition(aWM, aContainerWidth) == aOrigin) {
+  if (aChild->GetPosition() == aOrigin) {
     return;
   }
 
-  aChild->SetPosition(aWM, aOrigin, aContainerWidth);
+  aChild->SetPosition(aOrigin);
   nsContainerFrame::PlaceFrameView(aChild);
 }
 
 nscoord
 nsColumnSetFrame::GetMinISize(nsRenderingContext *aRenderingContext)
 {
   nscoord iSize = 0;
   DISPLAY_MIN_WIDTH(this, iSize);
@@ -481,39 +480,32 @@ nsColumnSetFrame::ReflowChildren(nsHTMLR
   // get our border and padding
   LogicalMargin borderPadding = aReflowState.ComputedLogicalBorderPadding();
   borderPadding.ApplySkipSides(GetLogicalSkipSides(&aReflowState));
 
   nsRect contentRect(0, 0, 0, 0);
   nsOverflowAreas overflowRects;
 
   nsIFrame* child = mFrames.FirstChild();
-  LogicalPoint childOrigin(wm, borderPadding.IStart(wm),
-                           borderPadding.BStart(wm));
-  // In vertical-rl mode we can't use the computed width as the
-  // container width because it may be NS_UNCONSTRAINEDSIZE, so we use 0
-  // for now and reposition the columns after reflowing them all.
-  nscoord containerWidth = wm.IsVerticalRL() ? 0 : aReflowState.ComputedWidth();
-
-  // For RTL, since the columns might not fill the frame exactly, we
-  // need to account for the slop. Otherwise we'll waste time moving the
-  // columns by some tiny amount
-
-  // XXX when all of layout is converted to logical coordinates, we
-  //     probably won't need to do this hack any more. For now, we
-  //     confine it to the legacy horizontal-rl case
-  if (!isVertical && isRTL) {
+  nsMargin physicalBP = borderPadding.GetPhysicalMargin(wm);
+  nsPoint childOrigin(physicalBP.left, physicalBP.top);
+  // For RTL, figure out where the last column's left edge should be. Since the
+  // columns might not fill the frame exactly, we need to account for the
+  // slop. Otherwise we'll waste time moving the columns by some tiny
+  // amount unnecessarily.
+  nscoord& childOriginICoord = isVertical ? childOrigin.y : childOrigin.x;
+  if (isRTL) {
     nscoord availISize = aReflowState.AvailableISize();
     if (aReflowState.ComputedISize() != NS_INTRINSICSIZE) {
       availISize = aReflowState.ComputedISize();
     }
     if (availISize != NS_INTRINSICSIZE) {
-      childOrigin.I(wm) = containerWidth - borderPadding.Left(wm) - availISize;
+      childOriginICoord += availISize - aConfig.mColISize;
 #ifdef DEBUG_roc
-      printf("*** childOrigin.iCoord = %d\n", childOrigin.I(wm));
+      printf("*** childOrigin.iCoord = %d\n", childOriginICoord);
 #endif
     }
   }
 
   int columnCount = 0;
   int contentBEnd = 0;
   bool reflowNext = false;
 
@@ -562,17 +554,17 @@ nsColumnSetFrame::ReflowChildren(nsHTMLR
         NS_NOTREACHED("unknown block direction");
         break;
       }
     }
 
     nscoord childContentBEnd = 0;
     if (!reflowNext && (skipIncremental || skipResizeBSizeShrink)) {
       // This child does not need to be reflowed, but we may need to move it
-      MoveChildTo(child, childOrigin, wm, containerWidth);
+      MoveChildTo(this, child, childOrigin);
 
       // If this is the last frame then make sure we get the right status
       nsIFrame* kidNext = child->GetNextSibling();
       if (kidNext) {
         aStatus = (kidNext->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)
                   ? NS_FRAME_OVERFLOW_INCOMPLETE
                   : NS_FRAME_NOT_COMPLETE;
       } else {
@@ -624,38 +616,35 @@ nsColumnSetFrame::ReflowChildren(nsHTMLR
       // XXX it would be cool to consult the float manager for the
       // previous block to figure out the region of floats from the
       // previous column that extend into this column, and subtract
       // that region from the new float manager.  So you could stick a
       // really big float in the first column and text in following
       // columns would flow around it.
 
       // Reflow the frame
-      LogicalPoint origin(wm,
-                          childOrigin.I(wm) +
-                          kidReflowState.ComputedLogicalMargin().IStart(wm),
-                          childOrigin.B(wm) +
-                          kidReflowState.ComputedLogicalMargin().BStart(wm));
       ReflowChild(child, PresContext(), kidDesiredSize, kidReflowState,
-                  wm, origin, containerWidth, 0, aStatus);
+                  childOrigin.x + kidReflowState.ComputedPhysicalMargin().left,
+                  childOrigin.y + kidReflowState.ComputedPhysicalMargin().top,
+                  0, aStatus);
 
       reflowNext = (aStatus & NS_FRAME_REFLOW_NEXTINFLOW) != 0;
-
+    
 #ifdef DEBUG_roc
       printf("*** Reflowed child #%d %p: status = %d, desiredSize=%d,%d CarriedOutBEndMargin=%d\n",
              columnCount, (void*)child, aStatus, kidDesiredSize.Width(), kidDesiredSize.Height(),
              kidDesiredSize.mCarriedOutBEndMargin.get());
 #endif
 
       NS_FRAME_TRACE_REFLOW_OUT("Column::Reflow", aStatus);
 
       *aCarriedOutBEndMargin = kidDesiredSize.mCarriedOutBEndMargin;
 
       FinishReflowChild(child, PresContext(), kidDesiredSize,
-                        &kidReflowState, wm, childOrigin, containerWidth, 0);
+                        &kidReflowState, childOrigin.x, childOrigin.y, 0);
 
       childContentBEnd = nsLayoutUtils::CalculateContentBEnd(wm, child);
       if (childContentBEnd > aConfig.mColMaxBSize) {
         allFit = false;
       }
       if (childContentBEnd > availSize.BSize(wm)) {
         aColData.mMaxOverflowingBSize = std::max(childContentBEnd,
             aColData.mMaxOverflowingBSize);
@@ -738,20 +727,24 @@ nsColumnSetFrame::ReflowChildren(nsHTMLR
       // simplest (and probably fastest) thing.
       break;
     }
 
     // Advance to the next column
     child = child->GetNextSibling();
 
     if (child) {
-      childOrigin.I(wm) += aConfig.mColISize + aConfig.mColGap;
+      if (isRTL) {
+        childOriginICoord -= aConfig.mColISize + aConfig.mColGap;
+      } else {
+        childOriginICoord += aConfig.mColISize + aConfig.mColGap;
+      }
 
 #ifdef DEBUG_roc
-      printf("*** NEXT CHILD ORIGIN.icoord = %d\n", childOrigin.I(wm));
+      printf("*** NEXT CHILD ORIGIN.iCoord = %d\n", childOriginICoord);
 #endif
     }
   }
 
   if (PresContext()->CheckForInterrupt(this) &&
       (GetStateBits() & NS_FRAME_IS_DIRTY)) {
     // Mark all our kids starting with |child| dirty
 
@@ -766,16 +759,31 @@ nsColumnSetFrame::ReflowChildren(nsHTMLR
     }
   }
 
   aColData.mMaxBSize = contentBEnd;
   LogicalSize contentSize = LogicalSize(wm, contentRect.Size());
   contentSize.BSize(wm) = std::max(contentSize.BSize(wm), contentBEnd);
   mLastFrameStatus = aStatus;
 
+  // In vertical-rl mode, where we want the column "top" (right) edge to be
+  // aligned, we need to adjust the position of any short columns so as to
+  // make them flush-right instead of flush-left within the entire set.
+  if (wm.IsVerticalRL()) {
+    child = mFrames.FirstChild();
+    while (child) {
+      nscoord offset = aColData.mMaxBSize - child->GetRect().width;
+      if (offset) {
+        nsPoint childPos = child->GetPosition();
+        child->SetPosition(childPos + nsPoint(offset, 0));
+      }
+      child = child->GetNextSibling();
+    }
+  }
+
   // Apply computed and min/max values
   if (aConfig.mComputedBSize != NS_INTRINSICSIZE) {
     if (aReflowState.AvailableBSize() != NS_INTRINSICSIZE) {
       contentSize.BSize(wm) = std::min(contentSize.BSize(wm),
                                        aConfig.mComputedBSize);
     } else {
       contentSize.BSize(wm) = aConfig.mComputedBSize;
     }
@@ -797,30 +805,16 @@ nsColumnSetFrame::ReflowChildren(nsHTMLR
   }
 
   contentSize.ISize(wm) += borderPadding.IStartEnd(wm);
   contentSize.BSize(wm) += borderPadding.BStartEnd(wm);
   aDesiredSize.SetSize(wm, contentSize);
   aDesiredSize.mOverflowAreas = overflowRects;
   aDesiredSize.UnionOverflowAreasWithDesiredBounds();
 
-  // In vertical-rl mode, make a second pass to reposition the columns
-  // with the correct container width
-  if (wm.IsVerticalRL()) {
-    child = mFrames.FirstChild();
-    while (child) {
-      // Get the logical position as set before with containerWidth=0
-      // and reset with the correct container width (which is the block
-      // size in vertical modes).
-      child->SetPosition(wm, child->GetLogicalPosition(wm, 0),
-                         contentSize.BSize(wm));
-      child = child->GetNextSibling();
-    }
-  }
-
 #ifdef DEBUG_roc
   printf("*** DONE PASS feasible=%d\n", allFit && NS_FRAME_IS_FULLY_COMPLETE(aStatus)
          && !NS_FRAME_IS_TRUNCATED(aStatus));
 #endif
   return allFit && NS_FRAME_IS_FULLY_COMPLETE(aStatus)
     && !NS_FRAME_IS_TRUNCATED(aStatus);
 }
 
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -943,66 +943,16 @@ nsContainerFrame::ComputeAutoSize(nsRend
  * requested), and then calls Reflow(). If the reflow succeeds and the child
  * frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
  */
 void
 nsContainerFrame::ReflowChild(nsIFrame*                aKidFrame,
                               nsPresContext*           aPresContext,
                               nsHTMLReflowMetrics&     aDesiredSize,
                               const nsHTMLReflowState& aReflowState,
-                              const WritingMode&       aWM,
-                              const LogicalPoint&      aPos,
-                              nscoord                  aContainerWidth,
-                              uint32_t                 aFlags,
-                              nsReflowStatus&          aStatus,
-                              nsOverflowContinuationTracker* aTracker)
-{
-  NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
-  if (aWM.IsVerticalRL() || (!aWM.IsVertical() && !aWM.IsBidiLTR())) {
-    NS_ASSERTION(aContainerWidth != NS_UNCONSTRAINEDSIZE,
-                 "FinishReflowChild with unconstrained container width!");
-  }
-
-  // Send the WillReflow() notification, and position the child frame
-  // and its view if requested
-  aKidFrame->WillReflow(aPresContext);
-
-  if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
-    aKidFrame->SetPosition(aWM, aPos, aContainerWidth);
-  }
-
-  if (0 == (aFlags & NS_FRAME_NO_MOVE_VIEW)) {
-    PositionFrameView(aKidFrame);
-  }
-
-  // Reflow the child frame
-  aKidFrame->Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
-
-  // If the child frame is complete, delete any next-in-flows,
-  // but only if the NO_DELETE_NEXT_IN_FLOW flag isn't set.
-  if (NS_FRAME_IS_FULLY_COMPLETE(aStatus) &&
-      !(aFlags & NS_FRAME_NO_DELETE_NEXT_IN_FLOW_CHILD)) {
-    nsIFrame* kidNextInFlow = aKidFrame->GetNextInFlow();
-    if (kidNextInFlow) {
-      // Remove all of the childs next-in-flows. Make sure that we ask
-      // the right parent to do the removal (it's possible that the
-      // parent is not this because we are executing pullup code)
-      nsOverflowContinuationTracker::AutoFinish fini(aTracker, aKidFrame);
-      kidNextInFlow->GetParent()->DeleteNextInFlowChild(kidNextInFlow, true);
-    }
-  }
-}
-
-//XXX temporary: hold on to a copy of the old physical version of
-//    ReflowChild so that we can convert callers incrementally.
-void
-nsContainerFrame::ReflowChild(nsIFrame*                aKidFrame,
-                              nsPresContext*           aPresContext,
-                              nsHTMLReflowMetrics&     aDesiredSize,
-                              const nsHTMLReflowState& aReflowState,
                               nscoord                  aX,
                               nscoord                  aY,
                               uint32_t                 aFlags,
                               nsReflowStatus&          aStatus,
                               nsOverflowContinuationTracker* aTracker)
 {
   NS_PRECONDITION(aReflowState.frame == aKidFrame, "bad reflow state");
 
@@ -1089,65 +1039,16 @@ nsContainerFrame::PositionChildViews(nsI
  *    don't want to automatically sync the frame and view
  * NS_FRAME_NO_SIZE_VIEW - don't size the frame's view
  */
 void
 nsContainerFrame::FinishReflowChild(nsIFrame*                  aKidFrame,
                                     nsPresContext*             aPresContext,
                                     const nsHTMLReflowMetrics& aDesiredSize,
                                     const nsHTMLReflowState*   aReflowState,
-                                    const WritingMode&         aWM,
-                                    const LogicalPoint&        aPos,
-                                    nscoord                    aContainerWidth,
-                                    uint32_t                   aFlags)
-{
-  if (aWM.IsVerticalRL() || (!aWM.IsVertical() && !aWM.IsBidiLTR())) {
-    NS_ASSERTION(aContainerWidth != NS_UNCONSTRAINEDSIZE,
-                 "FinishReflowChild with unconstrained container width!");
-  }
-
-  nsPoint curOrigin = aKidFrame->GetPosition();
-  WritingMode outerWM = aDesiredSize.GetWritingMode();
-  LogicalSize convertedSize = aDesiredSize.Size(outerWM).ConvertTo(aWM,
-                                                                   outerWM);
-
-  if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
-    aKidFrame->SetRect(aWM, LogicalRect(aWM, aPos, convertedSize),
-                       aContainerWidth);
-  } else {
-    aKidFrame->SetSize(aWM, convertedSize);
-  }
-
-  if (aKidFrame->HasView()) {
-    nsView* view = aKidFrame->GetView();
-    // Make sure the frame's view is properly sized and positioned and has
-    // things like opacity correct
-    SyncFrameViewAfterReflow(aPresContext, aKidFrame, view,
-                             aDesiredSize.VisualOverflow(), aFlags);
-  }
-
-  nsPoint newOrigin = aKidFrame->GetPosition();
-  if (!(aFlags & NS_FRAME_NO_MOVE_VIEW) && curOrigin != newOrigin) {
-    if (!aKidFrame->HasView()) {
-      // If the frame has moved, then we need to make sure any child views are
-      // correctly positioned
-      PositionChildViews(aKidFrame);
-    }
-  }
-
-  aKidFrame->DidReflow(aPresContext, aReflowState, nsDidReflowStatus::FINISHED);
-}
-
-//XXX temporary: hold on to a copy of the old physical version of
-//    FinishReflowChild so that we can convert callers incrementally.
-void
-nsContainerFrame::FinishReflowChild(nsIFrame*                  aKidFrame,
-                                    nsPresContext*             aPresContext,
-                                    const nsHTMLReflowMetrics& aDesiredSize,
-                                    const nsHTMLReflowState*   aReflowState,
                                     nscoord                    aX,
                                     nscoord                    aY,
                                     uint32_t                   aFlags)
 {
   nsPoint curOrigin = aKidFrame->GetPosition();
 
   if (NS_FRAME_NO_MOVE_FRAME != (aFlags & NS_FRAME_NO_MOVE_FRAME)) {
     aKidFrame->SetRect(nsRect(aX, aY, aDesiredSize.Width(), aDesiredSize.Height()));
@@ -1238,36 +1139,34 @@ nsContainerFrame::ReflowOverflowContaine
     // even if the frame isn't dirty.
     if (shouldReflowAllKids || NS_SUBTREE_DIRTY(frame)) {
       // Get prev-in-flow
       nsIFrame* prevInFlow = frame->GetPrevInFlow();
       NS_ASSERTION(prevInFlow,
                    "overflow container frame must have a prev-in-flow");
       NS_ASSERTION(frame->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER,
                    "overflow container frame must have overflow container bit set");
-      WritingMode wm = frame->GetWritingMode();
-      nscoord containerWidth = aReflowState.AvailableSize(wm).Width(wm);
-      LogicalRect prevRect = prevInFlow->GetLogicalRect(wm, containerWidth);
+      nsRect prevRect = prevInFlow->GetRect();
 
       // Initialize reflow params
-      LogicalSize availSpace(wm, prevRect.ISize(wm),
+      WritingMode wm = frame->GetWritingMode();
+      LogicalSize availSpace(wm, LogicalSize(wm, prevRect.Size()).ISize(wm),
                              aReflowState.AvailableSize(wm).BSize(wm));
       nsHTMLReflowMetrics desiredSize(aReflowState);
       nsHTMLReflowState frameState(aPresContext, aReflowState,
                                    frame, availSpace);
       nsReflowStatus frameStatus;
 
       // Reflow
-      LogicalPoint pos(wm, prevRect.IStart(wm), 0);
       ReflowChild(frame, aPresContext, desiredSize, frameState,
-                  wm, pos, containerWidth, aFlags, frameStatus, &tracker);
+                  prevRect.x, 0, aFlags, frameStatus, &tracker);
       //XXXfr Do we need to override any shrinkwrap effects here?
       // e.g. desiredSize.Width() = prevRect.width;
       FinishReflowChild(frame, aPresContext, desiredSize, &frameState,
-                        wm, pos, containerWidth, aFlags);
+                        prevRect.x, 0, aFlags);
 
       // Handle continuations
       if (!NS_FRAME_IS_FULLY_COMPLETE(frameStatus)) {
         if (frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW) {
           // Abspos frames can't cause their parent to be incomplete,
           // only overflow incomplete.
           NS_FRAME_SET_OVERFLOW_INCOMPLETE(frameStatus);
         }
--- a/layout/generic/nsContainerFrame.h
+++ b/layout/generic/nsContainerFrame.h
@@ -240,19 +240,18 @@ public:
    *    don't want to automatically sync the frame and view
    * NS_FRAME_NO_MOVE_FRAME - don't move the frame. aX and aY are ignored in this
    *    case. Also implies NS_FRAME_NO_MOVE_VIEW
    */
   void ReflowChild(nsIFrame*                      aKidFrame,
                    nsPresContext*                 aPresContext,
                    nsHTMLReflowMetrics&           aDesiredSize,
                    const nsHTMLReflowState&       aReflowState,
-                   const mozilla::WritingMode&    aWM,
-                   const mozilla::LogicalPoint&   aPos,
-                   nscoord                        aContainerWidth,
+                   nscoord                        aX,
+                   nscoord                        aY,
                    uint32_t                       aFlags,
                    nsReflowStatus&                aStatus,
                    nsOverflowContinuationTracker* aTracker = nullptr);
 
   /**
    * The second half of frame reflow. Does the following:
    * - sets the frame's bounds
    * - sizes and positions (if requested) the frame's view. If the frame's final
@@ -264,46 +263,25 @@ public:
    *
    * Flags:
    * NS_FRAME_NO_MOVE_FRAME - don't move the frame. aX and aY are ignored in this
    *    case. Also implies NS_FRAME_NO_MOVE_VIEW
    * NS_FRAME_NO_MOVE_VIEW - don't position the frame's view. Set this if you
    *    don't want to automatically sync the frame and view
    * NS_FRAME_NO_SIZE_VIEW - don't size the frame's view
    */
-  static void FinishReflowChild(nsIFrame*                    aKidFrame,
-                                nsPresContext*               aPresContext,
-                                const nsHTMLReflowMetrics&   aDesiredSize,
-                                const nsHTMLReflowState*     aReflowState,
-                                const mozilla::WritingMode&  aWM,
-                                const mozilla::LogicalPoint& aPos,
-                                nscoord                      aContainerWidth,
-                                uint32_t                     aFlags);
-
-  //XXX temporary: hold on to a copy of the old physical versions of
-  //    ReflowChild and FinishReflowChild so that we can convert callers
-  //    incrementally.
-  void ReflowChild(nsIFrame*                      aKidFrame,
-                   nsPresContext*                 aPresContext,
-                   nsHTMLReflowMetrics&           aDesiredSize,
-                   const nsHTMLReflowState&       aReflowState,
-                   nscoord                        aX,
-                   nscoord                        aY,
-                   uint32_t                       aFlags,
-                   nsReflowStatus&                aStatus,
-                   nsOverflowContinuationTracker* aTracker = nullptr);
-
   static void FinishReflowChild(nsIFrame*                  aKidFrame,
                                 nsPresContext*             aPresContext,
                                 const nsHTMLReflowMetrics& aDesiredSize,
                                 const nsHTMLReflowState*   aReflowState,
                                 nscoord                    aX,
                                 nscoord                    aY,
                                 uint32_t                   aFlags);
 
+  
   static void PositionChildViews(nsIFrame* aFrame);
 
   // ==========================================================================
   /* Overflow containers are continuation frames that hold overflow. They
    * are created when the frame runs out of computed height, but still has
    * too much content to fit in the availableHeight. The parent creates a
    * continuation as usual, but marks it as NS_FRAME_IS_OVERFLOW_CONTAINER
    * and adds it to its next-in-flow's overflow container list, either by
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -3603,39 +3603,31 @@ nsFlexContainerFrame::DoFlexLayout(nsPre
 
   // Before giving each child a final reflow, calculate the origin of the
   // flex container's content box (with respect to its border-box), so that
   // we can compute our flex item's final positions.
   nsMargin containerBorderPadding(aReflowState.ComputedPhysicalBorderPadding());
   containerBorderPadding.ApplySkipSides(GetSkipSides(&aReflowState));
   const nsPoint containerContentBoxOrigin(containerBorderPadding.left,
                                           containerBorderPadding.top);
-  WritingMode outerWM = aReflowState.GetWritingMode();
-  nscoord containerWidth = IsAxisHorizontal(aAxisTracker.GetMainAxis()) ?
-                             aContentBoxMainSize : contentBoxCrossSize;
 
   // FINAL REFLOW: Give each child frame another chance to reflow, now that
   // we know its final size and position.
   for (const FlexLine* line = lines.getFirst(); line; line = line->getNext()) {
     for (const FlexItem* item = line->GetFirstItem(); item;
          item = item->getNext()) {
       nsPoint physicalPosn = aAxisTracker.PhysicalPointFromLogicalPoint(
                                item->GetMainPosition(),
                                item->GetCrossPosition(),
                                aContentBoxMainSize,
                                contentBoxCrossSize);
       // Adjust physicalPosn to be relative to the container's border-box
       // (i.e. its frame rect), instead of the container's content-box:
       physicalPosn += containerContentBoxOrigin;
 
-      //XXX Can we calculate the logical position more directly instead
-      //    of this double conversion?
-      LogicalPoint framePos(outerWM, physicalPosn,
-                            containerWidth - item->Frame()->GetRect().width);
-
       WritingMode wm = item->Frame()->GetWritingMode();
       LogicalSize availSize = aReflowState.ComputedSize(wm);
       availSize.BSize(wm) = NS_UNCONSTRAINEDSIZE;
       nsHTMLReflowState childReflowState(aPresContext, aReflowState,
                                          item->Frame(), availSize);
 
       // Keep track of whether we've overriden the child's computed height
       // and/or width, so we can set its resize flags accordingly.
@@ -3688,47 +3680,48 @@ nsFlexContainerFrame::DoFlexLayout(nsPre
       // NOTE: Be very careful about doing anything else with childReflowState
       // after this point, because some of its methods (e.g. SetComputedWidth)
       // internally call InitResizeFlags and stomp on mVResize & mHResize.
 
       nsHTMLReflowMetrics childDesiredSize(childReflowState);
       nsReflowStatus childReflowStatus;
       ReflowChild(item->Frame(), aPresContext,
                   childDesiredSize, childReflowState,
-                  outerWM, framePos, containerWidth,
+                  physicalPosn.x, physicalPosn.y,
                   0, childReflowStatus);
 
       // XXXdholbert Once we do pagination / splitting, we'll need to actually
       // handle incomplete childReflowStatuses. But for now, we give our kids
       // unconstrained available height, which means they should always
       // complete.
       MOZ_ASSERT(NS_FRAME_IS_COMPLETE(childReflowStatus),
                  "We gave flex item unconstrained available height, so it "
                  "should be complete");
 
-      childReflowState.ApplyRelativePositioning(&framePos, containerWidth);
+      childReflowState.ApplyRelativePositioning(&physicalPosn);
 
       FinishReflowChild(item->Frame(), aPresContext,
                         childDesiredSize, &childReflowState,
-                        outerWM, framePos, containerWidth, 0);
+                        physicalPosn.x, physicalPosn.y, 0);
 
       // If this is our first child and we haven't established a baseline for
       // the container yet (i.e. if we don't have 'align-self: baseline' on any
       // children), then use this child's baseline as the container's baseline.
       if (item->Frame() == mFrames.FirstChild() &&
           flexContainerAscent == nscoord_MIN) {
         ResolveReflowedChildAscent(item->Frame(), childDesiredSize);
 
         // (We use GetNormalPosition() instead of physicalPosn because we don't
         // want relative positioning on the child to affect the baseline that we
         // read from it).
-        flexContainerAscent = item->Frame()->GetLogicalNormalPosition(
-                                outerWM,
-                                childDesiredSize.Width()).B(outerWM) +
-                              childDesiredSize.BlockStartAscent();
+        WritingMode wm = aReflowState.GetWritingMode();
+        flexContainerAscent =
+          item->Frame()->GetLogicalNormalPosition(wm,
+                                                  childDesiredSize.Width()).B(wm) +
+          childDesiredSize.BlockStartAscent();
       }
     }
   }
 
   nsSize desiredContentBoxSize =
     aAxisTracker.PhysicalSizeFromLogicalSizes(aContentBoxMainSize,
                                               contentBoxCrossSize);
 
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -498,33 +498,30 @@ nsHTMLScrollFrame::ReflowScrolledFrame(S
   // Temporarily set mHasHorizontalScrollbar/mHasVerticalScrollbar to
   // reflect our assumptions while we reflow the child.
   bool didHaveHorizontalScrollbar = mHelper.mHasHorizontalScrollbar;
   bool didHaveVerticalScrollbar = mHelper.mHasVerticalScrollbar;
   mHelper.mHasHorizontalScrollbar = aAssumeHScroll;
   mHelper.mHasVerticalScrollbar = aAssumeVScroll;
 
   nsReflowStatus status;
-  // No need to pass a container-width to ReflowChild or
-  // FinishReflowChild, because it's only used there when positioning
-  // the frame (i.e. if NS_FRAME_NO_MOVE_FRAME isn't set)
   ReflowChild(mHelper.mScrolledFrame, presContext, *aMetrics,
-              kidReflowState, wm, LogicalPoint(wm), 0,
+              kidReflowState, 0, 0,
               NS_FRAME_NO_MOVE_FRAME, status);
 
   mHelper.mHasHorizontalScrollbar = didHaveHorizontalScrollbar;
   mHelper.mHasVerticalScrollbar = didHaveVerticalScrollbar;
 
   // Don't resize or position the view (if any) because we're going to resize
   // it to the correct size anyway in PlaceScrollArea. Allowing it to
   // resize here would size it to the natural height of the frame,
   // which will usually be different from the scrollport height;
   // invalidating the difference will cause unnecessary repainting.
   FinishReflowChild(mHelper.mScrolledFrame, presContext,
-                    *aMetrics, &kidReflowState, wm, LogicalPoint(wm), 0,
+                    *aMetrics, &kidReflowState, 0, 0,
                     NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_SIZE_VIEW);
 
   // XXX Some frames (e.g., nsPluginFrame, nsFrameFrame, nsTextFrame) don't bother
   // setting their mOverflowArea. This is wrong because every frame should
   // always set mOverflowArea. In fact nsPluginFrame and nsFrameFrame don't
   // support the 'outline' property because of this. Rather than fix the world
   // right now, just fix up the overflow area if necessary. Note that we don't
   // check HasOverflowRect() because it could be set even though the
--- a/layout/generic/nsHTMLReflowState.h
+++ b/layout/generic/nsHTMLReflowState.h
@@ -820,44 +820,16 @@ public:
   static void ApplyRelativePositioning(nsIFrame* aFrame,
                                        const nsMargin& aComputedOffsets,
                                        nsPoint* aPosition);
 
   void ApplyRelativePositioning(nsPoint* aPosition) const {
     ApplyRelativePositioning(frame, ComputedPhysicalOffsets(), aPosition);
   }
 
-  static void
-  ApplyRelativePositioning(nsIFrame* aFrame,
-                           mozilla::WritingMode aWritingMode,
-                           const mozilla::LogicalMargin& aComputedOffsets,
-                           mozilla::LogicalPoint* aPosition,
-                           nscoord aContainerWidth) {
-    // Subtract the width of the frame from the container width that we
-    // use for converting between the logical and physical origins of
-    // the frame. This accounts for the fact that logical origins in RTL
-    // coordinate systems are at the top right of the frame instead of
-    // the top left.
-    nscoord frameWidth = aFrame->GetSize().width;
-    nsPoint pos = aPosition->GetPhysicalPoint(aWritingMode,
-                                              aContainerWidth - frameWidth);
-    ApplyRelativePositioning(aFrame,
-                             aComputedOffsets.GetPhysicalMargin(aWritingMode),
-                             &pos);
-    *aPosition = mozilla::LogicalPoint(aWritingMode, pos,
-                                       aContainerWidth - frameWidth);
-  }
-
-  void ApplyRelativePositioning(mozilla::LogicalPoint* aPosition,
-                                nscoord aContainerWidth) const {
-    ApplyRelativePositioning(frame, mWritingMode,
-                             ComputedLogicalOffsets(), aPosition,
-                             aContainerWidth);
-  }
-
 #ifdef DEBUG
   // Reflow trace methods.  Defined in nsFrame.cpp so they have access
   // to the display-reflow infrastructure.
   static void* DisplayInitConstraintsEnter(nsIFrame* aFrame,
                                            nsHTMLReflowState* aState,
                                            nscoord aCBWidth,
                                            nscoord aCBHeight,
                                            const nsMargin* aBorder,
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -721,25 +721,16 @@ public:
   void SetSize(mozilla::WritingMode aWritingMode,
                const mozilla::LogicalSize& aSize) {
     SetSize(aSize.GetPhysicalSize(aWritingMode));
   }
   void SetSize(const nsSize& aSize) {
     SetRect(nsRect(mRect.TopLeft(), aSize));
   }
   void SetPosition(const nsPoint& aPt) { mRect.MoveTo(aPt); }
-  void SetPosition(mozilla::WritingMode aWritingMode,
-                   const mozilla::LogicalPoint& aPt,
-                   nscoord aContainerWidth) {
-    // We subtract mRect.width from the container width to account for
-    // the fact that logical origins in RTL coordinate systems are at
-    // the top right of the frame instead of the top left.
-    mRect.MoveTo(aPt.GetPhysicalPoint(aWritingMode,
-                                      aContainerWidth - mRect.width));
-  }
 
   /**
    * Move the frame, accounting for relative positioning. Use this when
    * adjusting the frame's position by a known amount, to properly update its
    * saved normal position (see GetNormalPosition below).
    *
    * This must be used only when moving a frame *after*
    * nsHTMLReflowState::ApplyRelativePositioning is called.  When moving
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -3052,27 +3052,29 @@ nsLineLayout::RelativePositionFrames(Per
     // line and is sized to match the size of the line's bounding box
     // (the same size as the values returned from VerticalAlignFrames)
     overflowAreas.VisualOverflow() = rect.GetPhysicalRect(wm, mContainerWidth);
     overflowAreas.ScrollableOverflow() = overflowAreas.VisualOverflow();
   }
 
   for (PerFrameData* pfd = psd->mFirstFrame; pfd; pfd = pfd->mNext) {
     nsIFrame* frame = pfd->mFrame;
+    nsPoint origin = frame->GetPosition();
 
     // Adjust the origin of the frame
     if (pfd->mRelativePos) {
-      WritingMode frameWM = frame->GetWritingMode();
-      LogicalPoint origin = frame->GetLogicalPosition(mContainerWidth);
+      //XXX temporary until ApplyRelativePositioning can handle logical offsets
+      nsMargin physicalOffsets =
+        pfd->mOffsets.GetPhysicalMargin(pfd->mFrame->GetWritingMode());
       // right and bottom are handled by
       // nsHTMLReflowState::ComputeRelativeOffsets
-      nsHTMLReflowState::ApplyRelativePositioning(frame, frameWM,
-                                                  pfd->mOffsets, &origin,
-                                                  mContainerWidth);
-      frame->SetPosition(frameWM, origin, mContainerWidth);
+      nsHTMLReflowState::ApplyRelativePositioning(pfd->mFrame,
+                                                  physicalOffsets,
+                                                  &origin);
+      frame->SetPosition(origin);
     }
 
     // We must position the view correctly before positioning its
     // descendants so that widgets are positioned properly (since only
     // some views have widgets).
     if (frame->HasView())
       nsContainerFrame::SyncFrameViewAfterReflow(mPresContext, frame,
         frame->GetView(), pfd->mOverflowAreas.VisualOverflow(),
@@ -3116,17 +3118,17 @@ nsLineLayout::RelativePositionFrames(Per
     // below) so we get leaf frames as well.  No need to worry
     // about the root span, since it doesn't have a frame.
     if (frame->HasView())
       nsContainerFrame::SyncFrameViewAfterReflow(mPresContext, frame,
                                                  frame->GetView(),
                                                  r.VisualOverflow(),
                                                  NS_FRAME_NO_MOVE_VIEW);
 
-    overflowAreas.UnionWith(r + frame->GetPosition());
+    overflowAreas.UnionWith(r + origin);
   }
 
   // If we just computed a spans combined area, we need to update its
   // overflow rect...
   if (psd != mRootSpan) {
     PerFrameData* spanPFD = psd->mFrame;
     nsIFrame* frame = spanPFD->mFrame;
     frame->FinishAndStoreOverflow(overflowAreas, frame->GetSize());
deleted file mode 100644
--- a/layout/reftests/writing-mode/1079154-1-vertical-rl-columns-ref.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<style>
-body { width: 500px; height: 300px; writing-mode: vertical-rl;
-       font:16px/24px serif; margin: 0; border: 1px solid gray; }
-div { margin: 10px; background: #eee; }
-</style>
-</head>
-
-<body>
-
-<div>
-First single-column division.
-</div>
-
-<div>
-<div style="margin: 0; display: inline-block; height: 145px">
-Two columns<br>
-one<br>two<br>three
-</div><div style="margin: 0; display: inline-block; height: 135px; vertical-align: top">
-four<br>five<br>six
-</div>
-</div>
-
-<div>
-Another single-column division.
-</div>
-
-<div>
-<div style="margin: 0; display: inline-block; height: 95px">
-Three columns<br>
-one
-</div><div style="margin: 0; display: inline-block; height: 95px">two<br>three<br>four
-</div><div style="margin: 0; display: inline-block; height: 85px; vertical-align: top">five<br>six
-</div>
-</div>
-
-<div>
-Final single-column division.
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/writing-mode/1079154-1-vertical-rl-columns.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<style>
-body { width: 500px; height: 300px; writing-mode: vertical-rl;
-       font:16px/24px serif; margin: 0; border: 1px solid gray; }
-div { margin: 10px; background: #eee; }
-</style>
-</head>
-
-<body>
-
-<div>
-First single-column division.
-</div>
-
-<div style="-moz-column-count:2; -moz-column-gap:10px">
-Two columns<br>
-one<br>two<br>three<br>four<br>five<br>six
-</div>
-
-<div>
-Another single-column division.
-</div>
-
-<div style="-moz-column-count:3; -moz-column-gap:5px">
-Three columns<br>
-one<br>two<br>three<br>four<br>five<br>six
-</div>
-
-<div>
-Final single-column division.
-</div>
-
-</body>
-</html>
--- a/layout/reftests/writing-mode/reftest.list
+++ b/layout/reftests/writing-mode/reftest.list
@@ -1,12 +1,11 @@
 # This directory contains tests for vertical text and logical layout coordinates
 # It should not be included in layout/reftests/reftest.list until vertical layout
 # is turned on
-== 1079154-1-vertical-rl-columns.html 1079154-1-vertical-rl-columns-ref.html
 == 1082844.html 1082844-ref.html
 == 1083748.html 1083748-ref.html
 == 1083848-1-inline-border.html 1083848-1-inline-border-ref.html
 == 1083848-2-inline-background.html 1083848-2-inline-background-ref.html
 == 1083848-3-inline-background-repeat.html 1083848-3-inline-background-repeat-ref.html
 == 1083892-1.html 1083892-1-ref.html
 == 1086883-1a.html 1086883-1-ref.html
 == 1086883-1b.html 1086883-1-ref.html