Backout changesets 1639af64e372, 74ecf0f57a56, 94831690f525, 27eab13d3cf2 (bug 1183431) for Android-specific failure in reftest 1183431-orthogonal-modes-5a.html.
authorJonathan Kew <jkew@mozilla.com>
Thu, 06 Aug 2015 17:32:20 +0100
changeset 288205 4a90edbfe8ff9665b26b2ec3950f30a28b9da7ba
parent 288204 d9bb3467a3b2425057b7086d01d4bae21a7b9411
child 288206 5e5cf1ff3d9974eccf9c236343dce9281773bad1
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1183431
milestone42.0a1
backs out1639af64e372ff6a398f5418d32967521239ad81
74ecf0f57a56819ac0f443fedf0915952db8c658
94831690f525b1eced48bca0ce233045cb72de98
27eab13d3cf2e7eeb174a3eb9798ed6df41f26c9
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
Backout changesets 1639af64e372, 74ecf0f57a56, 94831690f525, 27eab13d3cf2 (bug 1183431) for Android-specific failure in reftest 1183431-orthogonal-modes-5a.html.
layout/generic/crashtests/1183431.html
layout/generic/crashtests/crashtests.list
layout/generic/nsHTMLReflowState.cpp
layout/generic/nsHTMLReflowState.h
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1-ref.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1a.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1b.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1c.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2-ref.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2a.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2b.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2c.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3-ref.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3a.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3b.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3c.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4-ref.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4a.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4b.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4c.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5-ref.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5a.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5b.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5c.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6-ref.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6a.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6b.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6c.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7-ref.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7a.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7b.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7c.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8-ref.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8a.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8b.html
layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8c.html
layout/reftests/writing-mode/abspos/reftest.list
deleted file mode 100644
--- a/layout/generic/crashtests/1183431.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE>
-<html>
-<body>
-<div style="writing-mode: vertical-lr;"><div style="position: fixed;"></div></div>
-</body>
-</html>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -582,9 +582,8 @@ asserts(0-3) load 1134667.html
 asserts(0-3) load 1134667.html
 load 1146103.html
 load 1146107.html
 load 1146114.html
 load 1156222.html
 load 1157011.html
 load 1169420-1.html
 load 1169420-2.html
-load 1183431.html
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -990,19 +990,19 @@ nsHTMLReflowState::ApplyRelativePosition
       StickyScrollContainer::GetStickyScrollContainerForFrame(aFrame);
     if (ssc) {
       *aPosition = ssc->ComputePosition(aFrame);
     }
   }
 }
 
 nsIFrame*
-nsHTMLReflowState::GetHypotheticalBoxContainer(nsIFrame*    aFrame,
-                                               nscoord&     aCBIStartEdge,
-                                               LogicalSize& aCBSize)
+nsHTMLReflowState::GetHypotheticalBoxContainer(nsIFrame* aFrame,
+                                               nscoord& aCBIStartEdge,
+                                               nscoord& aCBISize)
 {
   aFrame = aFrame->GetContainingBlock();
   NS_ASSERTION(aFrame != frame, "How did that happen?");
 
   /* Now aFrame is the containing block we want */
 
   /* Check whether the containing block is currently being reflowed.
      If so, use the info from the reflow state. */
@@ -1016,26 +1016,26 @@ nsHTMLReflowState::GetHypotheticalBoxCon
     state = nullptr;
   }
 
   WritingMode wm = aFrame->GetWritingMode();
   if (state) {
     WritingMode stateWM = state->GetWritingMode();
     aCBIStartEdge =
       state->ComputedLogicalBorderPadding().ConvertTo(wm, stateWM).IStart(wm);
-    aCBSize = state->ComputedSize(wm);
+    aCBISize = state->ComputedSize(wm).ISize(wm);
   } else {
     /* Didn't find a reflow state for aFrame.  Just compute the information we
        want, on the assumption that aFrame already knows its size.  This really
        ought to be true by now. */
     NS_ASSERTION(!(aFrame->GetStateBits() & NS_FRAME_IN_REFLOW),
                  "aFrame shouldn't be in reflow; we'll lie if it is");
     LogicalMargin borderPadding = aFrame->GetLogicalUsedBorderAndPadding(wm);
     aCBIStartEdge = borderPadding.IStart(wm);
-    aCBSize = aFrame->GetLogicalSize(wm) - borderPadding.Size(wm);
+    aCBISize = aFrame->ISize(wm) - borderPadding.IStartEnd(wm);
   }
 
   return aFrame;
 }
 
 // When determining the hypothetical box that would have been if the element
 // had been in the flow we may not be able to exactly determine both the IStart
 // and IEnd edges. For example, if the element is a non-replaced inline-level
@@ -1075,91 +1075,81 @@ GetIntrinsicSizeFor(nsIFrame* aFrame, ns
     if (NS_SUCCEEDED(imageFrame->GetIntrinsicImageSize(aIntrinsicSize))) {
       success = (aIntrinsicSize != nsSize(0, 0));
     }
   }
   return success;
 }
 
 /**
- * aInsideBoxSizing returns the part of the padding, border, and margin
- * in the aAxis dimension that goes inside the edge given by box-sizing;
+ * aInsideBoxSizing returns the part of the horizontal padding, border,
+ * and margin that goes inside the edge given by box-sizing;
  * aOutsideBoxSizing returns the rest.
  */
 void
-nsHTMLReflowState::CalculateBorderPaddingMargin(
-                       LogicalAxis aAxis,
-                       nscoord aContainingBlockSize,
+nsHTMLReflowState::CalculateInlineBorderPaddingMargin(
+                       nscoord aContainingBlockISize,
                        nscoord* aInsideBoxSizing,
                        nscoord* aOutsideBoxSizing)
 {
   WritingMode wm = GetWritingMode();
-  mozilla::css::Side startSide =
-    wm.PhysicalSide(MakeLogicalSide(aAxis, eLogicalEdgeStart));
-  mozilla::css::Side endSide =
-    wm.PhysicalSide(MakeLogicalSide(aAxis, eLogicalEdgeEnd));
+  mozilla::css::Side inlineStart = wm.PhysicalSide(eLogicalSideIStart);
+  mozilla::css::Side inlineEnd   = wm.PhysicalSide(eLogicalSideIEnd);
 
-  nsMargin styleBorder = mStyleBorder->GetComputedBorder();
-  nscoord borderStartEnd =
-    styleBorder.Side(startSide) + styleBorder.Side(endSide);
-
-  nscoord paddingStartEnd, marginStartEnd;
+  const LogicalMargin& border =
+    LogicalMargin(wm, mStyleBorder->GetComputedBorder());
+  LogicalMargin padding(wm), margin(wm);
 
   // See if the style system can provide us the padding directly
   nsMargin stylePadding;
   if (mStylePadding->GetPadding(stylePadding)) {
-    paddingStartEnd =
-      stylePadding.Side(startSide) + stylePadding.Side(endSide);
+    padding = LogicalMargin(wm, stylePadding);
   } else {
-    // We have to compute the start and end values
-    nscoord start, end;
-    start = nsLayoutUtils::
-      ComputeCBDependentValue(aContainingBlockSize,
-                              mStylePadding->mPadding.Get(startSide));
-    end = nsLayoutUtils::
-      ComputeCBDependentValue(aContainingBlockSize,
-                              mStylePadding->mPadding.Get(endSide));
-    paddingStartEnd = start + end;
+    // We have to compute the inline start and end values
+    padding.IStart(wm) = nsLayoutUtils::
+      ComputeCBDependentValue(aContainingBlockISize,
+                              mStylePadding->mPadding.Get(inlineStart));
+    padding.IEnd(wm) = nsLayoutUtils::
+      ComputeCBDependentValue(aContainingBlockISize,
+                              mStylePadding->mPadding.Get(inlineEnd));
   }
 
   // See if the style system can provide us the margin directly
   nsMargin styleMargin;
   if (mStyleMargin->GetMargin(styleMargin)) {
-    marginStartEnd =
-      styleMargin.Side(startSide) + styleMargin.Side(endSide);
+    margin = LogicalMargin(wm, styleMargin);
   } else {
-    nscoord start, end;
-    // We have to compute the start and end values
-    if (eStyleUnit_Auto == mStyleMargin->mMargin.GetUnit(startSide)) {
+    // We have to compute the left and right values
+    if (eStyleUnit_Auto == mStyleMargin->mMargin.GetUnit(inlineStart)) {
       // XXX FIXME (or does CalculateBlockSideMargins do this?)
-      start = 0;  // just ignore
+      margin.IStart(wm) = 0;  // just ignore
     } else {
-      start = nsLayoutUtils::
-        ComputeCBDependentValue(aContainingBlockSize,
-                                mStyleMargin->mMargin.Get(startSide));
+      margin.IStart(wm) = nsLayoutUtils::
+        ComputeCBDependentValue(aContainingBlockISize,
+                                mStyleMargin->mMargin.Get(inlineStart));
     }
-    if (eStyleUnit_Auto == mStyleMargin->mMargin.GetUnit(endSide)) {
+    if (eStyleUnit_Auto == mStyleMargin->mMargin.GetUnit(inlineEnd)) {
       // XXX FIXME (or does CalculateBlockSideMargins do this?)
-      end = 0;  // just ignore
+      margin.IEnd(wm) = 0;  // just ignore
     } else {
-      end = nsLayoutUtils::
-        ComputeCBDependentValue(aContainingBlockSize,
-                                mStyleMargin->mMargin.Get(endSide));
+      margin.IEnd(wm) = nsLayoutUtils::
+        ComputeCBDependentValue(aContainingBlockISize,
+                                mStyleMargin->mMargin.Get(inlineEnd));
     }
-    marginStartEnd = start + end;
   }
 
-  nscoord outside = paddingStartEnd + borderStartEnd + marginStartEnd;
+  nscoord outside =
+    padding.IStartEnd(wm) + border.IStartEnd(wm) + margin.IStartEnd(wm);
   nscoord inside = 0;
   switch (mStylePosition->mBoxSizing) {
     case NS_STYLE_BOX_SIZING_BORDER:
-      inside += borderStartEnd;
+      inside += border.IStartEnd(wm);
       // fall through
     case NS_STYLE_BOX_SIZING_PADDING:
-      inside += paddingStartEnd;
+      inside += padding.IStartEnd(wm);
   }
   outside -= inside;
   *aInsideBoxSizing = inside;
   *aOutsideBoxSizing = outside;
   return;
 }
 
 /**
@@ -1183,48 +1173,40 @@ static bool AreAllEarlierInFlowFramesEmp
     }
   }
   *aFound = false;
   return true;
 }
 
 // Calculate the hypothetical box that the element would have if it were in
 // the flow. The values returned are relative to the padding edge of the
-// absolute containing block. The writing-mode of the hypothetical box will
-// have the same block direction as the absolute containing block, but may
-// differ in inline-bidi direction.
-// In the code below, |cbrs->frame| is the absolute containing block, while
-// |containingBlock| is the nearest block container of the placeholder frame,
-// which may be different from the absolute containing block.
+// absolute containing block, in the actual containing block's writing mode.
+// cbrs->frame is the actual containing block
 void
 nsHTMLReflowState::CalculateHypotheticalBox(nsPresContext*    aPresContext,
                                             nsIFrame*         aPlaceholderFrame,
                                             const nsHTMLReflowState* cbrs,
                                             nsHypotheticalBox& aHypotheticalBox,
                                             nsIAtom*          aFrameType)
 {
   NS_ASSERTION(mStyleDisplay->mOriginalDisplay != NS_STYLE_DISPLAY_NONE,
                "mOriginalDisplay has not been properly initialized");
 
   // Find the nearest containing block frame to the placeholder frame,
   // and its inline-start edge and width.
-  nscoord blockIStartContentEdge;
-  // Dummy writing mode for blockContentSize, will be changed as needed by
-  // GetHypotheticalBoxContainer.
-  WritingMode cbwm = cbrs->GetWritingMode();
-  LogicalSize blockContentSize(cbwm);
+  nscoord blockIStartContentEdge, blockContentISize;
   nsIFrame* containingBlock =
     GetHypotheticalBoxContainer(aPlaceholderFrame, blockIStartContentEdge,
-                                blockContentSize);
-  // Now blockContentSize is in containingBlock's writing mode.
+                                blockContentISize);
 
   // If it's a replaced element and it has a 'auto' value for
   //'inline size', see if we can get the intrinsic size. This will allow
   // us to exactly determine both the inline edges
   WritingMode wm = containingBlock->GetWritingMode();
+  aHypotheticalBox.mWritingMode = wm;
 
   nsStyleCoord styleISize = mStylePosition->ISize(wm);
   bool isAutoISize = styleISize.GetUnit() == eStyleUnit_Auto;
   nsSize      intrinsicSize;
   bool        knowIntrinsicSize = false;
   if (NS_FRAME_IS_REPLACED(mFrameType) && isAutoISize) {
     // See if we can get the intrinsic size of the element
     knowIntrinsicSize = GetIntrinsicSizeFor(frame, intrinsicSize, aFrameType);
@@ -1243,50 +1225,50 @@ nsHTMLReflowState::CalculateHypothetical
   } else {
     // It's either a replaced inline-level element or a block-level element
 
     // Determine the total amount of inline direction
     // border/padding/margin that the element would have had if it had
     // been in the flow. Note that we ignore any 'auto' and 'inherit'
     // values
     nscoord insideBoxSizing, outsideBoxSizing;
-    CalculateBorderPaddingMargin(eLogicalAxisInline,
-                                 blockContentSize.ISize(wm),
-                                 &insideBoxSizing, &outsideBoxSizing);
+    CalculateInlineBorderPaddingMargin(blockContentISize,
+                                       &insideBoxSizing, &outsideBoxSizing);
 
     if (NS_FRAME_IS_REPLACED(mFrameType) && isAutoISize) {
       // It's a replaced element with an 'auto' inline size so the box
       // inline size is its intrinsic size plus any border/padding/margin
       if (knowIntrinsicSize) {
         boxISize = LogicalSize(wm, intrinsicSize).ISize(wm) +
                    outsideBoxSizing + insideBoxSizing;
         knowBoxISize = true;
       }
 
     } else if (isAutoISize) {
       // The box inline size is the containing block inline size
-      boxISize = blockContentSize.ISize(wm);
+      boxISize = blockContentISize;
       knowBoxISize = true;
 
     } else {
       // We need to compute it. It's important we do this, because if it's
       // percentage based this computed value may be different from the computed
       // value calculated using the absolute containing block width
-      boxISize = ComputeISizeValue(blockContentSize.ISize(wm),
+      boxISize = ComputeISizeValue(blockContentISize,
                                    insideBoxSizing, outsideBoxSizing,
                                    styleISize) +
                  insideBoxSizing + outsideBoxSizing;
       knowBoxISize = true;
     }
   }
 
   // Get the placeholder x-offset and y-offset in the coordinate
   // space of its containing block
   // XXXbz the placeholder is not fully reflowed yet if our containing block is
   // relatively positioned...
+  WritingMode cbwm = cbrs->GetWritingMode();
   nsSize containerSize = containingBlock->GetStateBits() & NS_FRAME_IN_REFLOW
     ? cbrs->ComputedSizeAsContainerIfConstrained()
     : containingBlock->GetSize();
   LogicalPoint
     placeholderOffset(wm, aPlaceholderFrame->GetOffsetTo(containingBlock),
                       containerSize);
 
   // First, determine the hypothetical box's mBStart.  We want to check the
@@ -1381,18 +1363,17 @@ nsHTMLReflowState::CalculateHypothetical
     aHypotheticalBox.mIEnd = aHypotheticalBox.mIStart + boxISize;
 #ifdef DEBUG
     aHypotheticalBox.mIEndIsExact = true;
 #endif
   } else {
     // We can't compute the inline-end edge because we don't know the desired
     // inline-size. So instead use the end content edge of the block parent,
     // but remember it's not exact
-    aHypotheticalBox.mIEnd =
-      blockIStartContentEdge + blockContentSize.ISize(wm);
+    aHypotheticalBox.mIEnd = blockIStartContentEdge + blockContentISize;
 #ifdef DEBUG
     aHypotheticalBox.mIEndIsExact = false;
 #endif
   }
 
   // The current coordinate space is that of the nearest block to the placeholder.
   // Convert to the coordinate space of the absolute containing block
   // One weird thing here is that for fixed-positioned elements we want to do
@@ -1425,99 +1406,33 @@ nsHTMLReflowState::CalculateHypothetical
     } while (containingBlock != cbrs->frame);
   } else {
     // XXXldb We need to either ignore scrolling for the absolute
     // positioning case too (and take the incompatibility) or figure out
     // how to make these positioned elements actually *move* when we
     // scroll, and thus avoid the resulting incremental reflow bugs.
     cbOffset = containingBlock->GetOffsetTo(cbrs->frame);
   }
-  nsSize cbrsSize = cbrs->ComputedSizeAsContainerIfConstrained();
+  nsSize cbrsSize =
+    cbrs->ComputedPhysicalSize() +
+    cbrs->ComputedLogicalBorderPadding().Size(cbwm).GetPhysicalSize(cbwm);
   LogicalPoint logCBOffs(wm, cbOffset, cbrsSize - containerSize);
   aHypotheticalBox.mIStart += logCBOffs.I(wm);
   aHypotheticalBox.mIEnd += logCBOffs.I(wm);
   aHypotheticalBox.mBStart += logCBOffs.B(wm);
 
   // The specified offsets are relative to the absolute containing block's
   // padding edge and our current values are relative to the border edge, so
   // translate.
   LogicalMargin border =
     cbrs->ComputedLogicalBorderPadding() - cbrs->ComputedLogicalPadding();
   border = border.ConvertTo(wm, cbrs->GetWritingMode());
   aHypotheticalBox.mIStart -= border.IStart(wm);
   aHypotheticalBox.mIEnd -= border.IStart(wm);
   aHypotheticalBox.mBStart -= border.BStart(wm);
-
-  // At this point, we have computed aHypotheticalBox using the writing mode
-  // of the placeholder's containing block.
-
-  if (cbwm.GetBlockDir() != wm.GetBlockDir()) {
-    // If the block direction we used in calculating aHypotheticalBox does not
-    // match the absolute containing block's, we need to convert here so that
-    // aHypotheticalBox is usable in relation to the absolute containing block.
-    // This requires computing or measuring the abspos frame's block-size,
-    // which is not otherwise required/used here (as aHypotheticalBox records
-    // only the block-start coordinate).
-
-    // This is similar to the inline-size calculation for a replaced
-    // inline-level element or a block-level element (above), except that
-    // 'auto' sizing is handled differently in the block direction for non-
-    // replaced elements and replaced elements lacking an intrinsic size.
-
-    // Determine the total amount of block direction
-    // border/padding/margin that the element would have had if it had
-    // been in the flow. Note that we ignore any 'auto' and 'inherit'
-    // values.
-    nscoord insideBoxSizing, outsideBoxSizing;
-    CalculateBorderPaddingMargin(eLogicalAxisBlock,
-                                 blockContentSize.BSize(wm),
-                                 &insideBoxSizing, &outsideBoxSizing);
-
-    nscoord boxBSize;
-    nsStyleCoord styleBSize = mStylePosition->BSize(wm);
-    bool isAutoBSize = styleBSize.GetUnit() == eStyleUnit_Auto;
-    if (isAutoBSize) {
-      if (NS_FRAME_IS_REPLACED(mFrameType) && knowIntrinsicSize) {
-        // It's a replaced element with an 'auto' block size so the box
-        // block size is its intrinsic size plus any border/padding/margin
-        boxBSize = LogicalSize(wm, intrinsicSize).BSize(wm) +
-                   outsideBoxSizing + insideBoxSizing;
-      } else {
-        // XXX Bug 1191801
-        // Figure out how to get the correct boxBSize here (need to reflow the
-        // positioned frame?)
-        boxBSize = 0;
-      }
-    } else {
-      // We need to compute it. It's important we do this, because if it's
-      // percentage-based this computed value may be different from the
-      // computed value calculated using the absolute containing block height.
-      boxBSize = ComputeBSizeValue(blockContentSize.BSize(wm),
-                                   insideBoxSizing, styleBSize) +
-                 insideBoxSizing + outsideBoxSizing;
-    }
-
-    LogicalSize boxSize(wm, knowBoxISize ? boxISize : 0, boxBSize);
-
-    LogicalPoint origin(wm, aHypotheticalBox.mIStart,
-                        aHypotheticalBox.mBStart);
-    origin = origin.ConvertTo(cbwm, wm, cbrsSize -
-                              boxSize.GetPhysicalSize(wm));
-
-    aHypotheticalBox.mIStart = origin.I(cbwm);
-    aHypotheticalBox.mIEnd = aHypotheticalBox.mIStart +
-                             boxSize.ConvertTo(cbwm, wm).ISize(cbwm);
-#ifdef DEBUG
-    aHypotheticalBox.mIEndIsExact = false; // it may be fake
-#endif
-    aHypotheticalBox.mBStart = origin.B(cbwm);
-    aHypotheticalBox.mWritingMode = cbwm;
-  } else {
-    aHypotheticalBox.mWritingMode = wm;
-  }
 }
 
 void
 nsHTMLReflowState::InitAbsoluteConstraints(nsPresContext* aPresContext,
                                            const nsHTMLReflowState* cbrs,
                                            const LogicalSize& aCBSize,
                                            nsIAtom* aFrameType)
 {
@@ -1603,16 +1518,18 @@ nsHTMLReflowState::InitAbsoluteConstrain
   } else {
     offsets.BEnd(cbwm) = nsLayoutUtils::
       ComputeBSizeDependentValue(cbSize.BSize(cbwm),
                                  mStylePosition->mOffset.GetBEnd(cbwm));
   }
 
   if (bStartIsAuto && bEndIsAuto) {
     // Treat 'top' like 'static-position'
+    NS_ASSERTION(hypotheticalBox.mWritingMode.GetBlockDir() == cbwm.GetBlockDir(),
+                 "block direction mismatch");
     offsets.BStart(cbwm) = hypotheticalBox.mBStart;
     bStartIsAuto = false;
   }
 
   SetComputedLogicalOffsets(offsets.ConvertTo(wm, cbwm));
 
   bool iSizeIsAuto = eStyleUnit_Auto == mStylePosition->ISize(cbwm).GetUnit();
   bool bSizeIsAuto = eStyleUnit_Auto == mStylePosition->BSize(cbwm).GetUnit();
--- a/layout/generic/nsHTMLReflowState.h
+++ b/layout/generic/nsHTMLReflowState.h
@@ -904,49 +904,40 @@ protected:
   void InitConstraints(nsPresContext*              aPresContext,
                        const mozilla::LogicalSize& aContainingBlockSize,
                        const nsMargin*             aBorder,
                        const nsMargin*             aPadding,
                        nsIAtom*                    aFrameType);
 
   // Returns the nearest containing block or block frame (whether or not
   // it is a containing block) for the specified frame.  Also returns
-  // the inline-start edge and logical size of the containing block's
+  // the inline-start edge and inline size of the containing block's
   // content area.
   // These are returned in the coordinate space of the containing block.
   nsIFrame* GetHypotheticalBoxContainer(nsIFrame* aFrame,
                                         nscoord& aCBIStartEdge,
-                                        mozilla::LogicalSize& aCBSize);
+                                        nscoord& aCBISize);
 
-  // Calculate a "hypothetical box" position where the placeholder frame
-  // (for a position:fixed/absolute element) would have been placed if it were
-  // positioned statically. The hypothetical box will have a writing mode with
-  // the same block direction as the absolute containing block (cbrs->frame),
-  // though it may differ in inline-bidi direction.
   void CalculateHypotheticalBox(nsPresContext*    aPresContext,
                                 nsIFrame*         aPlaceholderFrame,
                                 const nsHTMLReflowState* cbrs,
                                 nsHypotheticalBox& aHypotheticalBox,
                                 nsIAtom*          aFrameType);
 
   void InitAbsoluteConstraints(nsPresContext* aPresContext,
                                const nsHTMLReflowState* cbrs,
                                const mozilla::LogicalSize& aContainingBlockSize,
                                nsIAtom* aFrameType);
 
   // Calculates the computed values for the 'min-Width', 'max-Width',
   // 'min-Height', and 'max-Height' properties, and stores them in the assorted
   // data members
   void ComputeMinMaxValues(const mozilla::LogicalSize& aContainingBlockSize);
 
-  // aInsideBoxSizing returns the part of the padding, border, and margin
-  // in the aAxis dimension that goes inside the edge given by box-sizing;
-  // aOutsideBoxSizing returns the rest.
-  void CalculateBorderPaddingMargin(mozilla::LogicalAxis aAxis,
-                                    nscoord aContainingBlockSize,
-                                    nscoord* aInsideBoxSizing,
-                                    nscoord* aOutsideBoxSizing);
+  void CalculateInlineBorderPaddingMargin(nscoord aContainingBlockISize,
+                                          nscoord* aInsideBoxSizing,
+                                          nscoord* aOutsideBoxSizing);
 
   void CalculateBlockSideMargins(nsIAtom* aFrameType);
 };
 
 #endif /* nsHTMLReflowState_h___ */
 
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1-ref.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px;
-       writing-mode: vertical-lr; position: absolute; left: 0; top: 0; }
-.test { background: #aaa; position: absolute; left: 0; top: 0; width: 2em; height: 100%; }
-.rel { position: relative; }
-img { position: absolute; left: 0; top: 34px;
-      width: 30px; height: 40px; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="rel">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1a.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vlr">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1b.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vlr rel">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-1c.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vlr">
-  <div class="test rel"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2-ref.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px;
-       writing-mode: vertical-lr; position: absolute; left: 0; top: 0; }
-.test { background: #aaa; position: absolute; left: 0; top: 0; width: 2em; height: 100%; }
-.rel { position: relative; }
-img { position: absolute; left: 0; top: 34px;
-      background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="rel">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2a.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-img { position: absolute; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vlr">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2b.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-img { position: absolute; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vlr rel">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-2c.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-img { position: absolute; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vlr">
-  <div class="test rel"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3-ref.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; }
-.vlr { writing-mode: vertical-lr; }
-span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; }
-p { margin: 0; padding: 2px; border: 2px solid green; inline-size: -moz-fit-content; }
-</style>
-<body>
-<div>
-  <div class="vlr"><span>abc def</span><p>xyzzy</p></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3a.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; }
-p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; }
-</style>
-<body>
-<div class="vlr">
-  <div><span>abc def</span><p>xyzzy</p></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3b.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; }
-p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; }
-</style>
-<body>
-<div class="vlr rel">
-  <div><span>abc def</span><p>xyzzy</p></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-3c.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; }
-p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; }
-</style>
-<body>
-<div class="vlr">
-  <div class="rel"><span>abc def</span><p>xyzzy</p></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4-ref.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px;
-       position: absolute; right: 0; top: 0; }
-.test { writing-mode: vertical-rl; background: #aaa;
-        position: absolute; right: 0; top: 0; width: 2em; height: 100%; }
-.rel { position: relative; }
-img { position: absolute; right: 0; top: 34px;
-      width: 30px; height: 40px; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="rel">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4a.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vrl">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4b.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vrl rel">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-4c.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-img { position: absolute; width: 30px; height: 40px; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vrl">
-  <div class="test rel"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5-ref.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px;
-       position: absolute; right: 0; top: 0; }
-.test { writing-mode: vertical-rl; background: #aaa;
-        position: absolute; right: 0; top: 0; width: 2em; height: 100%; }
-.rel { position: relative; }
-img { position: absolute; right: 0; top: 34px;
-      background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="rel">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5a.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-img { position: absolute; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vrl">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5b.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-img { position: absolute; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vrl rel">
-  <div class="test"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-5c.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 100px; height: 150px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-img { position: absolute; background: green; border: 5px solid yellow; }
-</style>
-<body>
-<div class="vrl">
-  <div class="test rel"><span class="abc">abc</span><img src=""></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6-ref.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; }
-.vrl { writing-mode: vertical-rl; }
-span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; }
-p { margin: 0; padding: 2px; border: 2px solid green; inline-size: -moz-fit-content; }
-</style>
-<body>
-<div class="vrl">
-  <div><span>abc def</span><p>xyzzy</p></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6a.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; }
-p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; }
-</style>
-<body>
-<div class="vrl">
-  <div><span>abc def</span><p>xyzzy</p></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6b.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; }
-p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; }
-</style>
-<body>
-<div class="vrl rel">
-  <div><span>abc def</span><p>xyzzy</p></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-6c.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 120px; height: 150px; border: 5px solid blue; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-span { display: inline-block; padding: 5px; block-size: 1.5em; border: 2px solid red; }
-p { position: absolute; margin: 0; padding: 2px; border: 2px solid green; }
-</style>
-<body>
-<div class="vrl">
-  <div class="rel"><span>abc def</span><p>xyzzy</p></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7-ref.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px;
-       writing-mode: vertical-lr; position: absolute; left: 0; top: 0; }
-.test { background: #aaa; position: absolute; left: 0; top: 0; width: 2em; height: 100%; }
-.rel { position: relative; }
-iframe {
-  position: absolute; left: 0; top: 34px;
-  background: yellow; border: 5px solid green;
-  width: 150px; height: 300px; /* XXX Bug 1191855 - this is probably wrong, pending CSSWG clarification */
-}
-</style>
-<body>
-<div class="rel">
-  <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7a.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-iframe { position: absolute; background: yellow; border: 5px solid green; }
-</style>
-<body>
-<div class="vlr">
-  <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7b.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-iframe { position: absolute; background: yellow; border: 5px solid green; }
-</style>
-<body>
-<div class="vlr rel">
-  <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-7c.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vlr { writing-mode: vertical-lr; }
-.rel { position: relative; }
-iframe { position: absolute; background: yellow; border: 5px solid green; }
-</style>
-<body>
-<div class="vlr">
-  <div class="test rel"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8-ref.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px;
-       writing-mode: vertical-rl; position: absolute; right: 0; top: 0; }
-.test { background: #aaa; position: absolute; right: 0; top: 0; width: 2em; height: 100%; }
-.rel { position: relative; }
-iframe {
-  position: absolute; right: 0; top: 34px;
-  background: yellow; border: 5px solid green;
-  width: 150px; height: 300px; /* XXX Bug 1191855 - this is probably wrong, pending CSSWG clarification */
-}
-</style>
-<body>
-<div class="rel">
-  <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8a.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-iframe { position: absolute; background: yellow; border: 5px solid green; }
-</style>
-<body>
-<div class="vrl">
-  <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8b.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-iframe { position: absolute; background: yellow; border: 5px solid green; }
-</style>
-<body>
-<div class="vrl rel">
-  <div class="test"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div>
-</div>
deleted file mode 100644
--- a/layout/reftests/writing-mode/abspos/1183431-orthogonal-modes-8c.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta charset="utf-8">
-<style>
-body>div { margin: 50px 20px; width: 400px; height: 500px; border: 5px solid blue; }
-.abc { display: inline-block; border: 2px solid red; inline-size: 30px; }
-.test { background: #aaa; width: 2em; }
-.vrl { writing-mode: vertical-rl; }
-.rel { position: relative; }
-iframe { position: absolute; background: yellow; border: 5px solid green; }
-</style>
-<body>
-<div class="vrl">
-  <div class="test rel"><span class="abc">abc</span><iframe src="data:text/html,hello"></iframe></div>
-</div>
--- a/layout/reftests/writing-mode/abspos/reftest.list
+++ b/layout/reftests/writing-mode/abspos/reftest.list
@@ -94,33 +94,8 @@ fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-082.xht s71-abs-pos-non-replaced-vrl-082-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-084.xht s71-abs-pos-non-replaced-vrl-084-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-086.xht s71-abs-pos-non-replaced-vrl-086-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-088.xht s71-abs-pos-non-replaced-vrl-088-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-090.xht s71-abs-pos-non-replaced-vrl-090-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-092.xht s71-abs-pos-non-replaced-vrl-092-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-094.xht s71-abs-pos-non-replaced-vrl-094-ref.xht
 fuzzy-if(cocoaWidget,15,5) fuzzy-if(d2d,102,164) == s71-abs-pos-non-replaced-vrl-096.xht s71-abs-pos-non-replaced-vrl-096-ref.xht
-
-== 1183431-orthogonal-modes-1a.html 1183431-orthogonal-modes-1-ref.html
-== 1183431-orthogonal-modes-1b.html 1183431-orthogonal-modes-1-ref.html
-== 1183431-orthogonal-modes-1c.html 1183431-orthogonal-modes-1-ref.html
-== 1183431-orthogonal-modes-2a.html 1183431-orthogonal-modes-2-ref.html
-== 1183431-orthogonal-modes-2b.html 1183431-orthogonal-modes-2-ref.html
-== 1183431-orthogonal-modes-2c.html 1183431-orthogonal-modes-2-ref.html
-== 1183431-orthogonal-modes-3a.html 1183431-orthogonal-modes-3-ref.html
-== 1183431-orthogonal-modes-3b.html 1183431-orthogonal-modes-3-ref.html
-== 1183431-orthogonal-modes-3c.html 1183431-orthogonal-modes-3-ref.html
-== 1183431-orthogonal-modes-4a.html 1183431-orthogonal-modes-4-ref.html
-== 1183431-orthogonal-modes-4b.html 1183431-orthogonal-modes-4-ref.html
-== 1183431-orthogonal-modes-4c.html 1183431-orthogonal-modes-4-ref.html
-== 1183431-orthogonal-modes-5a.html 1183431-orthogonal-modes-5-ref.html
-== 1183431-orthogonal-modes-5b.html 1183431-orthogonal-modes-5-ref.html
-== 1183431-orthogonal-modes-5c.html 1183431-orthogonal-modes-5-ref.html
-fails == 1183431-orthogonal-modes-6a.html 1183431-orthogonal-modes-6-ref.html # bug 1191801
-== 1183431-orthogonal-modes-6b.html 1183431-orthogonal-modes-6-ref.html
-== 1183431-orthogonal-modes-6c.html 1183431-orthogonal-modes-6-ref.html
-== 1183431-orthogonal-modes-7a.html 1183431-orthogonal-modes-7-ref.html
-== 1183431-orthogonal-modes-7b.html 1183431-orthogonal-modes-7-ref.html
-== 1183431-orthogonal-modes-7c.html 1183431-orthogonal-modes-7-ref.html
-fails == 1183431-orthogonal-modes-8a.html 1183431-orthogonal-modes-8-ref.html # bug 1191801
-== 1183431-orthogonal-modes-8b.html 1183431-orthogonal-modes-8-ref.html
-== 1183431-orthogonal-modes-8c.html 1183431-orthogonal-modes-8-ref.html