Bug 1131451 part 2 - Respect the container height when converting vertical-RTL inline-direction coordinates. r=dholbert
authorJonathan Kew <jkew@mozilla.com>
Thu, 16 Jul 2015 10:08:05 +0100
changeset 253153 e6eed9f588de74077f18248d72508418d7061c23
parent 253152 28673cc5e68b48d6a397b027a6ef5321703dea4a
child 253154 d6cec98744a6569ffadcc7c3492212789f894a51
push id29061
push userryanvm@gmail.com
push dateThu, 16 Jul 2015 18:53:45 +0000
treeherdermozilla-central@a0f4a688433d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1131451
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1131451 part 2 - Respect the container height when converting vertical-RTL inline-direction coordinates. r=dholbert * * * Bug 1131451 part 2a - Remove hack for rtl-in-vertical-mode from ReflowAbsoluteFrame. r=dholbert * * * Bug 1131451 part 2b - Mark relative-overconstrained tests that now pass in vertical mode with rtl. r=dholbert * * * Bug 1131451 part 2c - Mark vertical border-collapse bevel tests that now pass. r=dholbert * * * Bug 1131451 part 2d - Remove partial rtl-in-vertical support from nsBidiPresUtils now that logical-coordinate classes handle it better. r=dholbert * * * Bug 1131451 part 2e - Remove hack for float positioning in vertical mode with dir=rtl. r=dholbert * * * Bug 1131451 part 2f - Mark vertical-mode float-in-rtl reftests that are now passing. r=dholbert * * * Bug 1131451 part 2g - Compute both dimensions of containerSize in nsFlexContainerFrame::DoLayout. r=dholbert * * * Bug 1131451 part 2h - Mark flexbox writing-mode tests that are now passing. r=dholbert
layout/base/nsBidiPresUtils.cpp
layout/generic/WritingModes.h
layout/generic/nsAbsoluteContainingBlock.cpp
layout/generic/nsBlockReflowState.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFloatManager.cpp
layout/reftests/floats/reftest.list
layout/reftests/w3c-css/submitted/flexbox/reftest.list
layout/reftests/writing-mode/reftest.list
layout/reftests/writing-mode/tables/reftest.list
--- a/layout/base/nsBidiPresUtils.cpp
+++ b/layout/base/nsBidiPresUtils.cpp
@@ -1615,38 +1615,33 @@ nsBidiPresUtils::RepositionFrame(nsIFram
   } else if (RubyUtils::IsRubyBox(aFrame->GetType())) {
     icoord += RepositionRubyFrame(aFrame, aContinuationStates,
                                   aContainerWM, borderPadding);
   } else {
     icoord +=
       frameWM.IsOrthogonalTo(aContainerWM) ? aFrame->BSize() : frameISize;
   }
 
-  // LogicalRect doesn't correctly calculate the vertical position
-  // in vertical writing modes with right-to-left direction (Bug 1131451).
-  // This does the correct calculation ad hoc pending the fix for that.
-  nsRect rect = aFrame->GetRect();
-
-  LogicalMargin margin = frameMargin.ConvertTo(aContainerWM, frameWM);
   // In the following variables, if aContainerReverseDir is true, i.e.
   // the container is positioning its children in reverse of its logical
   // direction, the "StartOrEnd" refers to the distance from the frame
   // to the inline end edge of the container, elsewise, it refers to the
   // distance to the inline start edge.
-  nscoord marginStartOrEnd = aContainerReverseDir ?
-    margin.IEnd(aContainerWM) : margin.IStart(aContainerWM);
+  const LogicalMargin margin = frameMargin.ConvertTo(aContainerWM, frameWM);
+  nscoord marginStartOrEnd =
+    aContainerReverseDir ? margin.IEnd(aContainerWM)
+                         : margin.IStart(aContainerWM);
   nscoord frameStartOrEnd = aStartOrEnd + marginStartOrEnd;
-  // Whether we are placing frames from right to left.
-  // e.g. If the frames are placed reversely in LTR mode, they are
-  // actually placed from right to left.
-  bool orderingRTL = aContainerReverseDir == aContainerWM.IsBidiLTR();
-  (aContainerWM.IsVertical() ? rect.y : rect.x) = orderingRTL ?
-    lineSize - (frameStartOrEnd + icoord) : frameStartOrEnd;
-  (aContainerWM.IsVertical() ? rect.height : rect.width) = icoord;
-  aFrame->SetRect(rect);
+
+  LogicalRect rect = aFrame->GetLogicalRect(aContainerWM, aContainerSize);
+  rect.ISize(aContainerWM) = icoord;
+  rect.IStart(aContainerWM) =
+    aContainerReverseDir ? lineSize - frameStartOrEnd - icoord
+                         : frameStartOrEnd;
+  aFrame->SetRect(aContainerWM, rect, aContainerSize);
 
   return icoord + margin.IStartEnd(aContainerWM);
 }
 
 void
 nsBidiPresUtils::InitContinuationStates(nsIFrame*              aFrame,
                                         nsContinuationStates*  aContinuationStates)
 {
--- a/layout/generic/WritingModes.h
+++ b/layout/generic/WritingModes.h
@@ -637,26 +637,27 @@ public:
 #ifdef DEBUG
       mWritingMode(aWritingMode),
 #endif
       mPoint(aI, aB)
   { }
 
   // Construct from a writing mode and a physical point, within a given
   // containing rectangle's size (defining the conversion between LTR
-  // and RTL coordinates).
+  // and RTL coordinates, and between TTB and BTT coordinates).
   LogicalPoint(WritingMode aWritingMode,
                const nsPoint& aPoint,
                const nsSize& aContainerSize)
 #ifdef DEBUG
     : mWritingMode(aWritingMode)
 #endif
   {
     if (aWritingMode.IsVertical()) {
-      I() = aPoint.y;
+      I() = aWritingMode.IsBidiLTR() ? aPoint.y
+                                     : aContainerSize.height - aPoint.y;
       B() = aWritingMode.IsVerticalLR() ? aPoint.x
                                         : aContainerSize.width - aPoint.x;
     } else {
       I() = aWritingMode.IsBidiLTR() ? aPoint.x
                                      : aContainerSize.width - aPoint.x;
       B() = aPoint.y;
     }
   }
@@ -696,17 +697,18 @@ public:
    */
   nsPoint GetPhysicalPoint(WritingMode aWritingMode,
                            const nsSize& aContainerSize) const
   {
     CHECK_WRITING_MODE(aWritingMode);
     if (aWritingMode.IsVertical()) {
       return nsPoint(aWritingMode.IsVerticalLR()
                      ? B() : aContainerSize.width - B(),
-                     I());
+                     aWritingMode.IsBidiLTR()
+                     ? I() : aContainerSize.height - I());
     } else {
       return nsPoint(aWritingMode.IsBidiLTR()
                      ? I() : aContainerSize.width - I(),
                      B());
     }
   }
 
   /**
@@ -1374,17 +1376,18 @@ public:
               const nsSize& aContainerSize)
 #ifdef DEBUG
     : mWritingMode(aWritingMode)
 #endif
   {
     if (aWritingMode.IsVertical()) {
       mRect.y = aWritingMode.IsVerticalLR()
                 ? aRect.x : aContainerSize.width - aRect.XMost();
-      mRect.x = aRect.y;
+      mRect.x = aWritingMode.IsBidiLTR()
+                ? aRect.y : aContainerSize.height - aRect.YMost();
       mRect.height = aRect.width;
       mRect.width = aRect.height;
     } else {
       mRect.x = aWritingMode.IsBidiLTR()
                 ? aRect.x : aContainerSize.width - aRect.XMost();
       mRect.y = aRect.y;
       mRect.width = aRect.width;
       mRect.height = aRect.height;
@@ -1453,33 +1456,33 @@ public:
 
   /**
    * Accessors for line-relative coordinates
    */
   nscoord LineLeft(WritingMode aWritingMode,
                    const nsSize& aContainerSize) const
   {
     CHECK_WRITING_MODE(aWritingMode);
-    if (aWritingMode.IsVertical()) {
+    if (aWritingMode.IsBidiLTR()) {
       return IStart();
-    } else {
-      return aWritingMode.IsBidiLTR() ? IStart()
-                                      : aContainerSize.width - IEnd();
     }
+    nscoord containerISize =
+      aWritingMode.IsVertical() ? aContainerSize.height : aContainerSize.width;
+    return containerISize - IEnd();
   }
   nscoord LineRight(WritingMode aWritingMode,
                     const nsSize& aContainerSize) const
   {
     CHECK_WRITING_MODE(aWritingMode);
-    if (aWritingMode.IsVertical()) {
+    if (aWritingMode.IsBidiLTR()) {
       return IEnd();
-    } else {
-      return aWritingMode.IsBidiLTR() ? IEnd()
-                                      : aContainerSize.width - IStart();
     }
+    nscoord containerISize =
+      aWritingMode.IsVertical() ? aContainerSize.height : aContainerSize.width;
+    return containerISize - IStart();
   }
 
   /**
    * Physical coordinates of the rect.
    */
   nscoord X(WritingMode aWritingMode, nscoord aContainerWidth) const
   {
     CHECK_WRITING_MODE(aWritingMode);
@@ -1491,17 +1494,18 @@ public:
              mRect.X() : aContainerWidth - mRect.XMost();
     }
   }
 
   nscoord Y(WritingMode aWritingMode, nscoord aContainerHeight) const
   {
     CHECK_WRITING_MODE(aWritingMode);
     if (aWritingMode.IsVertical()) {
-      return mRect.X();
+      return aWritingMode.IsBidiLTR() ? mRect.X()
+                                      : aContainerHeight - mRect.XMost();
     } else {
       return mRect.Y();
     }
   }
 
   nscoord Width(WritingMode aWritingMode) const
   {
     CHECK_WRITING_MODE(aWritingMode);
@@ -1525,17 +1529,18 @@ public:
              mRect.XMost() : aContainerWidth - mRect.X();
     }
   }
 
   nscoord YMost(WritingMode aWritingMode, nscoord aContainerHeight) const
   {
     CHECK_WRITING_MODE(aWritingMode);
     if (aWritingMode.IsVertical()) {
-      return mRect.XMost();
+      return aWritingMode.IsBidiLTR() ? mRect.XMost()
+                                      : aContainerHeight - mRect.x;
     } else {
       return mRect.YMost();
     }
   }
 
   bool IsEmpty() const
   {
     return mRect.IsEmpty();
@@ -1639,17 +1644,18 @@ public:
    */
   nsRect GetPhysicalRect(WritingMode aWritingMode,
                          const nsSize& aContainerSize) const
   {
     CHECK_WRITING_MODE(aWritingMode);
     if (aWritingMode.IsVertical()) {
       return nsRect(aWritingMode.IsVerticalLR()
                     ? BStart() : aContainerSize.width - BEnd(),
-                    IStart(),
+                    aWritingMode.IsBidiLTR()
+                    ? IStart() : aContainerSize.height - IEnd(),
                     BSize(), ISize());
     } else {
       return nsRect(aWritingMode.IsBidiLTR()
                     ? IStart() : aContainerSize.width - IEnd(),
                     BStart(), ISize(), BSize());
     }
   }
 
--- a/layout/generic/nsAbsoluteContainingBlock.cpp
+++ b/layout/generic/nsAbsoluteContainingBlock.cpp
@@ -465,20 +465,16 @@ nsAbsoluteContainingBlock::ReflowAbsolut
                    border.IStart(outerWM) + offsets.IStart(outerWM) +
                      margin.IStart(outerWM),
                    border.BStart(outerWM) + offsets.BStart(outerWM) +
                      margin.BStart(outerWM),
                    kidSize.ISize(outerWM), kidSize.BSize(outerWM));
   nsRect r =
     rect.GetPhysicalRect(outerWM, logicalCBSize.GetPhysicalSize(wm) +
                          border.Size(outerWM).GetPhysicalSize(outerWM));
-  // XXX hack to correct for lack of bidi support in vertical mode
-  if (outerWM.IsVertical() && !outerWM.IsBidiLTR()) {
-    r.y = logicalCBSize.Height(wm) + border.TopBottom(outerWM) - r.YMost();
-  }
 
   // Offset the frame rect by the given origin of the absolute containing block.
   // If the frame is auto-positioned on both sides of an axis, it will be
   // positioned based on its containing block and we don't need to offset.
   if (aContainingBlock.TopLeft() != nsPoint(0, 0)) {
     const nsStyleSides& offsets = kidReflowState.mStylePosition->mOffset;
     if (!(offsets.GetLeftUnit() == eStyleUnit_Auto &&
           offsets.GetRightUnit() == eStyleUnit_Auto)) {
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -847,26 +847,17 @@ nsBlockReflowState::FlowAndPlaceFloat(ns
   // place and size itself as required.
 
   // Assign inline and block dir coordinates to the float. We don't use
   // LineLeft() and LineRight() here, because we would only have to
   // convert the result back into this block's writing mode.
   LogicalPoint floatPos(wm);
   bool leftFloat = NS_STYLE_FLOAT_LEFT == floatDisplay->mFloats;
 
-  if (wm.IsVertical()) {
-    // IStart and IEnd should use the ContainerHeight in vertical modes
-    // with rtl direction. Since they don't yet (bug 1131451), we'll
-    // just put left floats at the top of the line and right floats at
-    // bottom.
-    floatPos.I(wm) =
-      leftFloat ? floatAvailableSpace.mRect.Y(wm, ContainerSize().height)
-                : floatAvailableSpace.mRect.YMost(wm, ContainerSize().height) -
-                  floatMarginISize;
-  } else if (leftFloat == wm.IsBidiLTR()) {
+  if (leftFloat == wm.IsBidiLTR()) {
     floatPos.I(wm) = floatAvailableSpace.mRect.IStart(wm);
   }
   else {
     if (!keepFloatOnSameLine) {
       floatPos.I(wm) = floatAvailableSpace.mRect.IEnd(wm) - floatMarginISize;
     }
     else {
       // this is the IE quirk (see few lines above)
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -3819,21 +3819,22 @@ nsFlexContainerFrame::DoFlexLayout(nsPre
   const LogicalSides skipSides =
     GetLogicalSkipSides(&aReflowState) | LogicalSides(eLogicalSideBitsBEnd);
   containerBP.ApplySkipSides(skipSides);
 
   const LogicalPoint containerContentBoxOrigin(flexWM,
                                                containerBP.IStart(flexWM),
                                                containerBP.BStart(flexWM));
 
-  nsSize containerSize;
-  containerSize.width = aAxisTracker.IsMainAxisHorizontal() ?
-                          aContentBoxMainSize : contentBoxCrossSize;
-  containerSize.width +=
-    aReflowState.ComputedPhysicalBorderPadding().LeftRight();
+  // Determine flex container's border-box size (used in positioning children):
+  LogicalSize logSize =
+    aAxisTracker.LogicalSizeFromFlexRelativeSizes(aContentBoxMainSize,
+                                                  contentBoxCrossSize);
+  logSize += aReflowState.ComputedLogicalBorderPadding().Size(flexWM);
+  nsSize containerSize = logSize.GetPhysicalSize(flexWM);
 
   // 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()) {
       LogicalPoint framePos = aAxisTracker.LogicalPointFromFlexRelativePoint(
                                item->GetMainPosition(),
--- a/layout/generic/nsFloatManager.cpp
+++ b/layout/generic/nsFloatManager.cpp
@@ -237,19 +237,20 @@ nsFloatManager::GetFlowArea(WritingMode 
         }
       }
     }
   }
 
   nscoord blockSize = (blockEnd == nscoord_MAX) ?
                        nscoord_MAX : (blockEnd - blockStart);
   // convert back from LineLeft/Right to IStart
-  nscoord inlineStart = aWM.IsVertical() || aWM.IsBidiLTR()
+  nscoord inlineStart = aWM.IsBidiLTR()
                         ? lineLeft - mLineLeft
-                        : mLineLeft - lineRight + aContainerSize.width;
+                        : mLineLeft - lineRight +
+                          LogicalSize(aWM, aContainerSize).ISize(aWM);
 
   return nsFlowAreaRect(aWM, inlineStart, blockStart - mBlockStart,
                         lineRight - lineLeft, blockSize, haveFloats);
 }
 
 nsresult
 nsFloatManager::AddFloat(nsIFrame* aFloatFrame, const LogicalRect& aMarginRect,
                          WritingMode aWM, const nsSize& aContainerSize)
--- a/layout/reftests/floats/reftest.list
+++ b/layout/reftests/floats/reftest.list
@@ -46,36 +46,36 @@ default-preferences pref(layout.css.vert
 == float-in-rtl-vlr-1a.html float-in-rtl-vlr-1-ref.html
 == float-in-rtl-vlr-1b.html float-in-rtl-vlr-1-ref.html
 == float-in-rtl-vlr-1c.html float-in-rtl-vlr-1-ref.html
 == float-in-rtl-vlr-1d.html float-in-rtl-vlr-1-ref.html
 == float-in-rtl-vlr-2a.html float-in-rtl-vlr-2-ref.html
 == float-in-rtl-vlr-2b.html float-in-rtl-vlr-2-ref.html
 == float-in-rtl-vlr-2c.html float-in-rtl-vlr-2-ref.html
 == float-in-rtl-vlr-2d.html float-in-rtl-vlr-2-ref.html
-fails == float-in-rtl-vlr-3a.html float-in-rtl-vlr-3-ref.html # bug 1131451
-fails == float-in-rtl-vlr-3b.html float-in-rtl-vlr-3-ref.html # bug 1131451
-fails == float-in-rtl-vlr-3c.html float-in-rtl-vlr-3-ref.html # bug 1131451
-fails == float-in-rtl-vlr-3d.html float-in-rtl-vlr-3-ref.html # bug 1131451
-fails == float-in-rtl-vlr-4a.html float-in-rtl-vlr-4-ref.html # bug 1131451
-fails == float-in-rtl-vlr-4b.html float-in-rtl-vlr-4-ref.html # bug 1131451
-fails == float-in-rtl-vlr-4c.html float-in-rtl-vlr-4-ref.html # bug 1131451
-fails == float-in-rtl-vlr-4d.html float-in-rtl-vlr-4-ref.html # bug 1131451
+== float-in-rtl-vlr-3a.html float-in-rtl-vlr-3-ref.html
+== float-in-rtl-vlr-3b.html float-in-rtl-vlr-3-ref.html
+== float-in-rtl-vlr-3c.html float-in-rtl-vlr-3-ref.html
+== float-in-rtl-vlr-3d.html float-in-rtl-vlr-3-ref.html
+== float-in-rtl-vlr-4a.html float-in-rtl-vlr-4-ref.html
+== float-in-rtl-vlr-4b.html float-in-rtl-vlr-4-ref.html
+== float-in-rtl-vlr-4c.html float-in-rtl-vlr-4-ref.html
+== float-in-rtl-vlr-4d.html float-in-rtl-vlr-4-ref.html
 == float-in-rtl-vrl-1a.html float-in-rtl-vrl-1-ref.html
 == float-in-rtl-vrl-1b.html float-in-rtl-vrl-1-ref.html
 == float-in-rtl-vrl-1c.html float-in-rtl-vrl-1-ref.html
 == float-in-rtl-vrl-1d.html float-in-rtl-vrl-1-ref.html
 == float-in-rtl-vrl-2a.html float-in-rtl-vrl-2-ref.html
 == float-in-rtl-vrl-2b.html float-in-rtl-vrl-2-ref.html
 == float-in-rtl-vrl-2c.html float-in-rtl-vrl-2-ref.html
 == float-in-rtl-vrl-2d.html float-in-rtl-vrl-2-ref.html
-fails == float-in-rtl-vrl-3a.html float-in-rtl-vrl-3-ref.html # bug 1131451
-fails == float-in-rtl-vrl-3b.html float-in-rtl-vrl-3-ref.html # bug 1131451
-fails == float-in-rtl-vrl-3c.html float-in-rtl-vrl-3-ref.html # bug 1131451
-fails == float-in-rtl-vrl-3d.html float-in-rtl-vrl-3-ref.html # bug 1131451
-fails == float-in-rtl-vrl-4a.html float-in-rtl-vrl-4-ref.html # bug 1131451
-fails == float-in-rtl-vrl-4b.html float-in-rtl-vrl-4-ref.html # bug 1131451
-fails == float-in-rtl-vrl-4c.html float-in-rtl-vrl-4-ref.html # bug 1131451
-fails == float-in-rtl-vrl-4d.html float-in-rtl-vrl-4-ref.html # bug 1131451
+== float-in-rtl-vrl-3a.html float-in-rtl-vrl-3-ref.html
+== float-in-rtl-vrl-3b.html float-in-rtl-vrl-3-ref.html
+== float-in-rtl-vrl-3c.html float-in-rtl-vrl-3-ref.html
+== float-in-rtl-vrl-3d.html float-in-rtl-vrl-3-ref.html
+== float-in-rtl-vrl-4a.html float-in-rtl-vrl-4-ref.html
+== float-in-rtl-vrl-4b.html float-in-rtl-vrl-4-ref.html
+== float-in-rtl-vrl-4c.html float-in-rtl-vrl-4-ref.html
+== float-in-rtl-vrl-4d.html float-in-rtl-vrl-4-ref.html
 fuzzy-if(OSX==1010,26,7) fuzzy-if(Android,16,2) == orthogonal-floats-1a.html orthogonal-floats-1-ref.html
 fuzzy-if(OSX==1010,26,7) == orthogonal-floats-1b.html orthogonal-floats-1-ref.html
 fuzzy-if(OSX==1010,103,802) fuzzy-if(winWidget,116,700) HTTP(..) == orthogonal-floats-1c.html orthogonal-floats-1-ref.html
 fuzzy-if(OSX==1010,103,802) fuzzy-if(winWidget,116,700) HTTP(..) == orthogonal-floats-1d.html orthogonal-floats-1-ref.html
--- a/layout/reftests/w3c-css/submitted/flexbox/reftest.list
+++ b/layout/reftests/w3c-css/submitted/flexbox/reftest.list
@@ -183,13 +183,13 @@ fails == flexbox-min-width-auto-002b.htm
 == flexbox-with-pseudo-elements-002.html flexbox-with-pseudo-elements-002-ref.html
 == flexbox-with-pseudo-elements-003.html flexbox-with-pseudo-elements-003-ref.html
 
 # Tests for combined influence of 'writing-mode' & 'direction' on flex axes
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-001.html flexbox-writing-mode-001-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-002.html flexbox-writing-mode-002-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-003.html flexbox-writing-mode-003-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-004.html flexbox-writing-mode-004-ref.html
-test-pref(layout.css.vertical-text.enabled,true) fails == flexbox-writing-mode-005.html flexbox-writing-mode-005-ref.html # bug 1131451
-test-pref(layout.css.vertical-text.enabled,true) fails == flexbox-writing-mode-006.html flexbox-writing-mode-006-ref.html # bug 1131451
+test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-005.html flexbox-writing-mode-005-ref.html
+test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-006.html flexbox-writing-mode-006-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-007.html flexbox-writing-mode-007-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-008.html flexbox-writing-mode-008-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-009.html flexbox-writing-mode-009-ref.html
--- a/layout/reftests/writing-mode/reftest.list
+++ b/layout/reftests/writing-mode/reftest.list
@@ -125,19 +125,19 @@ pref(dom.meta-viewport.enabled,true) pre
 test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == font-inflation-1c.html font-inflation-1c-ref.html
 test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == font-inflation-1d.html font-inflation-1d-ref.html
 
 == 1144501-1a-block-end-margin-orthogonal-size.html 1144501-1-block-end-margin-orthogonal-size-ref.html
 == 1144501-1b-block-end-margin-orthogonal-size.html 1144501-1-block-end-margin-orthogonal-size-ref.html
 == 1147834-relative-overconstrained-horizontal-tb-ltr.html 1147834-bottom-right-ref.html
 == 1147834-relative-overconstrained-horizontal-tb-rtl.html 1147834-bottom-left-ref.html
 == 1147834-relative-overconstrained-vertical-lr-ltr.html 1147834-bottom-right-ref.html
-fails == 1147834-relative-overconstrained-vertical-lr-rtl.html 1147834-top-right-ref.html # bug 1131451
+== 1147834-relative-overconstrained-vertical-lr-rtl.html 1147834-top-right-ref.html
 == 1147834-relative-overconstrained-vertical-rl-ltr.html 1147834-bottom-left-ref.html
-fails == 1147834-relative-overconstrained-vertical-rl-rtl.html 1147834-top-left-ref.html # bug 1131451
+== 1147834-relative-overconstrained-vertical-rl-rtl.html 1147834-top-left-ref.html
 == 1151993-1-orthogonal-block-size.html 1151993-1-orthogonal-block-size-ref.html
 == 1152941-1-orthogonal-blocksize-overflow.html 1152941-1-orthogonal-blocksize-overflow-ref.html
 == 1156021-text-indent-percent.html 1156021-text-indent-percent-ref.html
 == 1157752-upright-bidi.html 1157752-upright-bidi-ref.html
 == 1157758-1-vertical-arabic.html 1157758-1-vertical-arabic-ref.html
 == 1158549-1-vertical-block-size-constraints.html 1158549-1-vertical-block-size-constraints-ref.html
 == 1163238-orthogonal-auto-margins.html 1163238-orthogonal-auto-margins-ref.html
 == 1172774-percent-margin-1.html 1172774-percent-horizontal-ref.html
--- a/layout/reftests/writing-mode/tables/reftest.list
+++ b/layout/reftests/writing-mode/tables/reftest.list
@@ -81,10 +81,10 @@ fuzzy-if(Android,255,38) == table-captio
 fuzzy-if(Android,255,38) == table-caption-top-1.html table-caption-top-1-ref.html
 fuzzy-if(Android,255,38) == table-caption-bottom-1.html table-caption-bottom-1-ref.html
 == table-caption-left-1.html table-caption-left-1-ref.html
 == table-caption-right-1.html table-caption-right-1-ref.html
 
 == border-collapse-bevels-1a.html border-collapse-bevels-1-ref.html
 fuzzy-if(cocoaWidget,23,162) == border-collapse-bevels-1b.html border-collapse-bevels-1-ref.html
 fuzzy-if(cocoaWidget,23,162) == border-collapse-bevels-1c.html border-collapse-bevels-1-ref.html
-fails == border-collapse-bevels-1d.html border-collapse-bevels-1-ref.html # bug 1177690, bug 1180528
-fails == border-collapse-bevels-1e.html border-collapse-bevels-1-ref.html # bug 1177690, bug 1180528
+fuzzy-if(cocoaWidget,23,162) == border-collapse-bevels-1d.html border-collapse-bevels-1-ref.html
+fuzzy-if(cocoaWidget,23,162) == border-collapse-bevels-1e.html border-collapse-bevels-1-ref.html