Backed out 2 changesets (bug 504622) for android reftest failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Tue, 29 Nov 2016 14:04:40 -0800
changeset 324679 f6961e572571fa8b018fc972c34de3b0671b91f4
parent 324678 cdff330f17a4922320f37bffb50109cbc9c0fc81
child 324680 a544ec8cb49864b7c8ff2921e47c9b64160ac1e7
push id84474
push userkwierso@gmail.com
push dateTue, 29 Nov 2016 22:05:00 +0000
treeherdermozilla-inbound@a544ec8cb498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs504622
milestone53.0a1
backs outc024721d9b03fac54eee5730a34f8e7bfbff2129
056f728704e77c6ddc3cf9fc0f0ae8e539d73dc9
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
Backed out 2 changesets (bug 504622) for android reftest failures a=backout Backed out changeset c024721d9b03 (bug 504622) Backed out changeset 056f728704e7 (bug 504622)
layout/forms/nsFieldSetFrame.cpp
layout/forms/nsFieldSetFrame.h
layout/reftests/bugs/433700-ref.html
layout/reftests/forms/fieldset/blue-1x1.png
layout/reftests/forms/fieldset/fieldset-border-image-1-ref.html
layout/reftests/forms/fieldset/fieldset-border-image-1a.html
layout/reftests/forms/fieldset/fieldset-border-image-1b.html
layout/reftests/forms/fieldset/fieldset-border-image-2-ref.html
layout/reftests/forms/fieldset/fieldset-border-image-2a.html
layout/reftests/forms/fieldset/fieldset-border-image-2b.html
layout/reftests/forms/fieldset/fieldset-min-width-1-ref.html
layout/reftests/forms/fieldset/fieldset-min-width-1a.html
layout/reftests/forms/fieldset/fieldset-min-width-1b.html
layout/reftests/forms/fieldset/fieldset-min-width-2-ref.html
layout/reftests/forms/fieldset/fieldset-min-width-2a.html
layout/reftests/forms/fieldset/fieldset-min-width-2b.html
layout/reftests/forms/fieldset/legend-overlapping-right-border-1-ref.html
layout/reftests/forms/fieldset/legend-overlapping-right-border-1.html
layout/reftests/forms/fieldset/reftest.list
layout/reftests/forms/fieldset/relpos-legend-3-ref.html
layout/reftests/forms/fieldset/relpos-legend-3.html
layout/reftests/forms/fieldset/relpos-legend-4-ref.html
layout/reftests/forms/fieldset/relpos-legend-4.html
layout/style/res/forms.css
testing/web-platform/meta/html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important.html.ini
--- a/layout/forms/nsFieldSetFrame.cpp
+++ b/layout/forms/nsFieldSetFrame.cpp
@@ -105,17 +105,16 @@ public:
                        HitTestState* aState,
                        nsTArray<nsIFrame*> *aOutFrames) override;
   virtual void Paint(nsDisplayListBuilder* aBuilder,
                      nsRenderingContext* aCtx) override;
   virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override;
   virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
                                          const nsDisplayItemGeometry* aGeometry,
                                          nsRegion *aInvalidRegion) override;
-  virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) override;
   NS_DISPLAY_DECL_NAME("FieldSetBorderBackground", TYPE_FIELDSET_BORDER_BACKGROUND)
 };
 
 void nsDisplayFieldSetBorderBackground::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
                                                 HitTestState* aState, nsTArray<nsIFrame*> *aOutFrames)
 {
   // aPt is guaranteed to be in this item's bounds. We do the hit test based on the
   // frame bounds even though our background doesn't cover the whole frame.
@@ -151,29 +150,16 @@ nsDisplayFieldSetBorderBackground::Compu
       geometry->ShouldInvalidateToSyncDecodeImages()) {
     bool snap;
     aInvalidRegion->Or(*aInvalidRegion, GetBounds(aBuilder, &snap));
   }
 
   nsDisplayItem::ComputeInvalidationRegion(aBuilder, aGeometry, aInvalidRegion);
 }
 
-nsRect
-nsDisplayFieldSetBorderBackground::GetBounds(nsDisplayListBuilder* aBuilder,
-                                             bool* aSnap)
-{
-  // Just go ahead and claim our frame's overflow rect as the bounds, because we
-  // may have border-image-outset or other features that cause borders to extend
-  // outside the border rect.  We could try to duplicate all the complexity
-  // nsDisplayBorder has here, but keeping things in sync would be a pain, and
-  // this code is not typically performance-sensitive.
-  *aSnap = false;
-  return Frame()->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame();
-}
-
 void
 nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                   const nsRect&           aDirtyRect,
                                   const nsDisplayListSet& aLists) {
   // Paint our background and border in a special way.
   // REVIEW: We don't really need to check frame emptiness here; if it's empty,
   // the background/border display item won't do anything, and if it isn't empty,
   // we need to paint the outline
@@ -226,67 +212,85 @@ nsFieldSetFrame::BuildDisplayList(nsDisp
 
 DrawResult
 nsFieldSetFrame::PaintBorder(
   nsDisplayListBuilder* aBuilder,
   nsRenderingContext& aRenderingContext,
   nsPoint aPt,
   const nsRect& aDirtyRect)
 {
-  // If the border is smaller than the legend, move the border down
-  // to be centered on the legend.  We call VisualBorderRectRelativeToSelf() to
-  // compute the border positioning.
+  // if the border is smaller than the legend. Move the border down
+  // to be centered on the legend.
   // FIXME: This means border-radius clamping is incorrect; we should
   // override nsIFrame::GetBorderRadii.
-  nsRect rect = VisualBorderRectRelativeToSelf() + aPt;
+  WritingMode wm = GetWritingMode();
+  nsRect rect = VisualBorderRectRelativeToSelf();
+  nscoord off = wm.IsVertical() ? rect.x : rect.y;
+  rect += aPt;
   nsPresContext* presContext = PresContext();
 
   PaintBorderFlags borderFlags = aBuilder->ShouldSyncDecodeImages()
                                ? PaintBorderFlags::SYNC_DECODE_IMAGES
                                : PaintBorderFlags();
 
   DrawResult result = DrawResult::SUCCESS;
 
   nsCSSRendering::PaintBoxShadowInner(presContext, aRenderingContext,
                                       this, rect);
 
   if (nsIFrame* legend = GetLegend()) {
-    // We want to avoid drawing our border under the legend, so clip out the
-    // legend while drawing our border.  We don't want to use mLegendRect here,
-    // because we do want to draw our border under the legend's inline-start and
-    // -end margins.  And we use GetNormalRect(), not GetRect(), because we do
-    // not want relative positioning applied to the legend to change how our
-    // border looks.
-    nsRect legendRect = legend->GetNormalRect() + aPt;
+    Side legendSide = wm.PhysicalSide(eLogicalSideBStart);
+    nscoord legendBorderWidth =
+      StyleBorder()->GetComputedBorderWidth(legendSide);
 
+    // Use the rect of the legend frame, not mLegendRect, so we draw our
+    // border under the legend's inline-start and -end margins.
+    LogicalRect legendRect(wm, legend->GetRect() + aPt, rect.Size());
+
+    // Compute clipRect using logical coordinates, so that the legend space
+    // will be clipped out of the appropriate physical side depending on mode.
+    LogicalRect clipRect = LogicalRect(wm, rect, rect.Size());
     DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
-    // We set up a clip path which has our rect clockwise and the legend rect
-    // counterclockwise, with FILL_WINDING as the fill rule.  That will allow us
-    // to paint within our rect but outside the legend rect.  For "our rect" we
-    // use our visual overflow rect (relative to ourselves, so it's not affected
-    // by transforms), because we can have borders sticking outside our border
-    // box (e.g. due to border-image-outset).
-    RefPtr<PathBuilder> pathBuilder =
-      drawTarget->CreatePathBuilder(FillRule::FILL_WINDING);
+    gfxContext* gfx = aRenderingContext.ThebesContext();
     int32_t appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
-    AppendRectToPath(pathBuilder,
-                     NSRectToSnappedRect(GetVisualOverflowRectRelativeToSelf() + aPt,
-                                         appUnitsPerDevPixel,
-                                         *drawTarget),
-                     true);
-    AppendRectToPath(pathBuilder,
-                     NSRectToSnappedRect(legendRect, appUnitsPerDevPixel,
-                                         *drawTarget),
-                     false);
-    RefPtr<Path> clipPath = pathBuilder->Finish();
 
-    gfxContext* gfx = aRenderingContext.ThebesContext();
+    // draw inline-start portion of the block-start side of the border
+    clipRect.ISize(wm) = legendRect.IStart(wm) - clipRect.IStart(wm);
+    clipRect.BSize(wm) = legendBorderWidth;
 
     gfx->Save();
-    gfx->Clip(clipPath);
+    gfx->Clip(NSRectToSnappedRect(clipRect.GetPhysicalRect(wm, rect.Size()),
+                                  appUnitsPerDevPixel, *drawTarget));
+    result &=
+      nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
+                                  aDirtyRect, rect, mStyleContext, borderFlags);
+    gfx->Restore();
+
+    // draw inline-end portion of the block-start side of the border
+    clipRect = LogicalRect(wm, rect, rect.Size());
+    clipRect.ISize(wm) = clipRect.IEnd(wm) - legendRect.IEnd(wm);
+    clipRect.IStart(wm) = legendRect.IEnd(wm);
+    clipRect.BSize(wm) = legendBorderWidth;
+
+    gfx->Save();
+    gfx->Clip(NSRectToSnappedRect(clipRect.GetPhysicalRect(wm, rect.Size()),
+                                  appUnitsPerDevPixel, *drawTarget));
+    result &=
+      nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
+                                  aDirtyRect, rect, mStyleContext, borderFlags);
+    gfx->Restore();
+
+    // draw remainder of the border (omitting the block-start side)
+    clipRect = LogicalRect(wm, rect, rect.Size());
+    clipRect.BStart(wm) += legendBorderWidth;
+    clipRect.BSize(wm) = BSize(wm) - (off + legendBorderWidth);
+
+    gfx->Save();
+    gfx->Clip(NSRectToSnappedRect(clipRect.GetPhysicalRect(wm, rect.Size()),
+                                  appUnitsPerDevPixel, *drawTarget));
     result &=
       nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
                                   aDirtyRect, rect, mStyleContext, borderFlags);
     gfx->Restore();
   } else {
     result &=
       nsCSSRendering::PaintBorder(presContext, aRenderingContext, this,
                                   aDirtyRect, nsRect(aPt, mRect.Size()),
@@ -336,16 +340,52 @@ nsFieldSetFrame::GetPrefISize(nsRenderin
   nscoord result = 0;
   DISPLAY_PREF_WIDTH(this, result);
 
   result = GetIntrinsicISize(aRenderingContext, nsLayoutUtils::PREF_ISIZE);
   return result;
 }
 
 /* virtual */
+LogicalSize
+nsFieldSetFrame::ComputeSize(nsRenderingContext *aRenderingContext,
+                             WritingMode aWM,
+                             const LogicalSize& aCBSize,
+                             nscoord aAvailableISize,
+                             const LogicalSize& aMargin,
+                             const LogicalSize& aBorder,
+                             const LogicalSize& aPadding,
+                             ComputeSizeFlags aFlags)
+{
+  LogicalSize result =
+    nsContainerFrame::ComputeSize(aRenderingContext, aWM,
+                                  aCBSize, aAvailableISize,
+                                  aMargin, aBorder, aPadding, aFlags);
+
+  // XXX The code below doesn't make sense if the caller's writing mode
+  // is orthogonal to this frame's. Not sure yet what should happen then;
+  // for now, just bail out.
+  if (aWM.IsVertical() != GetWritingMode().IsVertical()) {
+    return result;
+  }
+
+  // Fieldsets never shrink below their min width.
+
+  // If we're a container for font size inflation, then shrink
+  // wrapping inside of us should not apply font size inflation.
+  AutoMaybeDisableFontInflation an(this);
+
+  nscoord minISize = GetMinISize(aRenderingContext);
+  if (minISize > result.ISize(aWM)) {
+    result.ISize(aWM) = minISize;
+  }
+
+  return result;
+}
+
 void
 nsFieldSetFrame::Reflow(nsPresContext*           aPresContext,
                         ReflowOutput&     aDesiredSize,
                         const ReflowInput& aReflowInput,
                         nsReflowStatus&          aStatus)
 {
   MarkInReflow();
   DO_GLOBAL_REFLOW_COUNT("nsFieldSetFrame");
@@ -383,16 +423,28 @@ nsFieldSetFrame::Reflow(nsPresContext*  
   // to compute the available width for our children.
   WritingMode wm = GetWritingMode();
   WritingMode innerWM = inner ? inner->GetWritingMode() : wm;
   WritingMode legendWM = legend ? legend->GetWritingMode() : wm;
   LogicalSize innerAvailSize = aReflowInput.ComputedSizeWithPadding(innerWM);
   LogicalSize legendAvailSize = aReflowInput.ComputedSizeWithPadding(legendWM);
   innerAvailSize.BSize(innerWM) = legendAvailSize.BSize(legendWM) =
     NS_UNCONSTRAINEDSIZE;
+  NS_ASSERTION(!inner ||
+      nsLayoutUtils::IntrinsicForContainer(aReflowInput.mRenderingContext,
+                                           inner,
+                                           nsLayoutUtils::MIN_ISIZE) <=
+               innerAvailSize.ISize(innerWM),
+               "Bogus availSize.ISize; should be bigger");
+  NS_ASSERTION(!legend ||
+      nsLayoutUtils::IntrinsicForContainer(aReflowInput.mRenderingContext,
+                                           legend,
+                                           nsLayoutUtils::MIN_ISIZE) <=
+               legendAvailSize.ISize(legendWM),
+               "Bogus availSize.ISize; should be bigger");
 
   // get our border and padding
   LogicalMargin border = aReflowInput.ComputedLogicalBorderPadding() -
                          aReflowInput.ComputedLogicalPadding();
 
   // Figure out how big the legend is if there is one.
   // get the legend's margin
   LogicalMargin legendMargin(wm);
@@ -546,18 +598,21 @@ nsFieldSetFrame::Reflow(nsPresContext*  
         case NS_STYLE_VERTICAL_ALIGN_TOP:
         case NS_STYLE_VERTICAL_ALIGN_BOTTOM:
           mLegendRect.IStart(wm) = innerContentRect.IStart(wm);
           break;
         default:
           MOZ_ASSERT_UNREACHABLE("unexpected GetLogicalAlign value");
       }
     } else {
-      // otherwise just start-align it.
+      // otherwise make place for the legend
       mLegendRect.IStart(wm) = innerContentRect.IStart(wm);
+      innerContentRect.ISize(wm) = mLegendRect.ISize(wm);
+      contentRect.ISize(wm) = mLegendRect.ISize(wm) +
+        aReflowInput.ComputedLogicalPadding().IStartEnd(wm);
     }
 
     // place the legend
     LogicalRect actualLegendRect = mLegendRect;
     actualLegendRect.Deflate(wm, legendMargin);
     LogicalPoint actualLegendPos(actualLegendRect.Origin(wm));
 
     // Note that legend's writing mode may be different from the fieldset's,
--- a/layout/forms/nsFieldSetFrame.h
+++ b/layout/forms/nsFieldSetFrame.h
@@ -19,16 +19,25 @@ public:
 
   explicit nsFieldSetFrame(nsStyleContext* aContext);
 
   nscoord
     GetIntrinsicISize(nsRenderingContext* aRenderingContext,
                       nsLayoutUtils::IntrinsicISizeType);
   virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
   virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
+  virtual mozilla::LogicalSize
+  ComputeSize(nsRenderingContext *aRenderingContext,
+              mozilla::WritingMode aWritingMode,
+              const mozilla::LogicalSize& aCBSize,
+              nscoord aAvailableISize,
+              const mozilla::LogicalSize& aMargin,
+              const mozilla::LogicalSize& aBorder,
+              const mozilla::LogicalSize& aPadding,
+              ComputeSizeFlags aFlags) override;
   virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const override;
 
   /**
    * The area to paint box-shadows around.  It's the border rect except
    * when there's a <legend> we offset the y-position to the center of it.
    */
   virtual nsRect VisualBorderRectRelativeToSelf() const override;
 
--- a/layout/reftests/bugs/433700-ref.html
+++ b/layout/reftests/bugs/433700-ref.html
@@ -21,20 +21,17 @@ fieldset { border-right:7px solid blue; 
 #test3 .legend  { margin-left: 80px; background:pink; }
 
 #test4 { position:fixed; top:9em; width:200px; }
 #test4 fieldset { background:lime; width:260px; }
 #test4 .legend  { margin-left: 80px; background:pink; }
 
 #test5 { position:fixed; top:12em; width:200px; }
 #test5 fieldset { background:lime;}
-/* Percentage margins don't get counted in intrinsic width, so make sure that
-   our fixed-size margins sum to 0, so they also do not affect intrinsic width
-   either. */
-#test5 .legend  { margin-left: 193px; background:pink; margin-right: -193px; }
+#test5 .legend  { margin-left: 193px; background:pink; }
 
 #test6 { position:fixed; left:20px; top:15em; width:400px; }
 #test6 fieldset { width:300px; }
 #test6 fieldset div { position:relative; left:100px; padding-left:0px; width:200px; background:lime; }
 #test6 legend  { margin-left:0; background:pink; }
 
 fieldset div { padding-left:60px; }
 
deleted file mode 100644
index 5da01370015660ee34f6c45d4ce17366707177d2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-border-image-1-ref.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<style>
-  div {
-    padding: 0;
-    margin: 10px;
-    height: 100px;
-    width: 100px;
-    border: 10px solid;
-    border-image-source: url(blue-1x1.png);
-    border-image-outset: 10px;
-  }
-</style>
-<div></div>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-border-image-1a.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<style>
-  fieldset {
-    padding: 0;
-    margin: 10px;
-    height: 100px;
-    width: 100px;
-    border: 10px solid;
-    border-image-source: url(blue-1x1.png);
-    border-image-outset: 10px;
-  }
-</style>
-<fieldset></fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-border-image-1b.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<style>
-  fieldset {
-    padding: 0;
-    margin: 10px;
-    height: 100px;
-    width: 100px;
-    border: 10px solid;
-    border-image-source: url(blue-1x1.png);
-    border-image-outset: 10px;
-  }
-</style>
-<fieldset><legend></legend></fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-border-image-2-ref.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<style>
-  div {
-    padding: 0;
-    margin: 10px;
-    height: 100px;
-    width: 100px;
-    border: 10px solid;
-    border-image-source: url(blue-1x1.png);
-    border-image-outset: 10px;
-    transform: scale(0.5);
-  }
-</style>
-<div></div>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-border-image-2a.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<style>
-  fieldset {
-    padding: 0;
-    margin: 10px;
-    height: 100px;
-    width: 100px;
-    border: 10px solid;
-    border-image-source: url(blue-1x1.png);
-    border-image-outset: 10px;
-    transform: scale(0.5);
-  }
-</style>
-<fieldset></fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-border-image-2b.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<style>
-  fieldset {
-    padding: 0;
-    margin: 10px;
-    height: 100px;
-    width: 100px;
-    border: 10px solid;
-    border-image-source: url(blue-1x1.png);
-    border-image-outset: 10px;
-    transform: scale(0.5);
-  }
-</style>
-<fieldset><legend></legend></fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-min-width-1-ref.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<fieldset style="width: -moz-fit-content">
-  Longwordgoeshere
-</fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-min-width-1a.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<fieldset style="width: 0">
-  Longwordgoeshere
-</fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-min-width-1b.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body style="width: 0">
-  <fieldset style="width: 0">
-    Longwordgoeshere
-  </fieldset>
-</body>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-min-width-2-ref.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!DOCTYPE html>
-<fieldset style="width: -moz-fit-content">&zwnj;<!-- To give us the right height --></fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-min-width-2a.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<fieldset style="width: 0; min-width: 0">
-  <div style="visibility: hidden">Longwordgoeshere</div>
-</fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/fieldset-min-width-2b.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<body style="width: 0">
-  <fieldset style="min-width: 0">
-    <div style="visibility: hidden">Longwordgoeshere</div>
-  </fieldset>
-</body>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/legend-overlapping-right-border-1-ref.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<style>
-  fieldset {
-    min-width: 0;
-    width: 0;
-  }
-  legend {
-    width: 100px;
-    height: 20px;
-    background: white;
-  }
-</style>
-<fieldset>
-  <legend></legend>
-</fieldset>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/legend-overlapping-right-border-1.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<style>
-  fieldset {
-    min-width: 0;
-    width: 0;
-  }
-  legend {
-    width: 100px;
-    height: 20px;
-  }
-</style>
-<fieldset>
-  <legend></legend>
-</fieldset>
--- a/layout/reftests/forms/fieldset/reftest.list
+++ b/layout/reftests/forms/fieldset/reftest.list
@@ -3,25 +3,14 @@ fuzzy-if(skiaContent,2,13) == dynamic-le
 == fieldset-intrinsic-width-1.html fieldset-intrinsic-width-1-ref.html
 == fieldset-percentage-padding-1.html fieldset-percentage-padding-1-ref.html
 == fieldset-scroll-1.html fieldset-scroll-1-ref.html
 == fieldset-scrolled-1.html fieldset-scrolled-1-ref.html
 == fieldset-overflow-auto-1.html fieldset-overflow-auto-1-ref.html
 fuzzy-if(winWidget&&!layersGPUAccelerated,121,276) == positioned-container-1.html positioned-container-1-ref.html
 == relpos-legend-1.html relpos-legend-1-ref.html
 == relpos-legend-2.html relpos-legend-2-ref.html
-== relpos-legend-3.html relpos-legend-3-ref.html
-== relpos-legend-4.html relpos-legend-4-ref.html
 == sticky-legend-1.html sticky-legend-1-ref.html
 fuzzy-if(skiaContent,1,40768) == abs-pos-child-sizing.html abs-pos-child-sizing-ref.html
 == overflow-hidden.html overflow-hidden-ref.html
 == legend-rtl.html legend-rtl-ref.html
 == fieldset-grid-001.html fieldset-grid-001-ref.html
 == fieldset-flexbox-001.html fieldset-flexbox-001-ref.html
-== fieldset-min-width-1a.html fieldset-min-width-1-ref.html
-== fieldset-min-width-1b.html fieldset-min-width-1-ref.html
-== fieldset-min-width-2a.html fieldset-min-width-2-ref.html
-== fieldset-min-width-2b.html fieldset-min-width-2-ref.html
-== legend-overlapping-right-border-1.html legend-overlapping-right-border-1-ref.html
-== fieldset-border-image-1a.html fieldset-border-image-1-ref.html
-== fieldset-border-image-1b.html fieldset-border-image-1-ref.html
-== fieldset-border-image-2a.html fieldset-border-image-2-ref.html
-== fieldset-border-image-2b.html fieldset-border-image-2-ref.html
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/relpos-legend-3-ref.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-<fieldset>
-  <legend><div style="position:relative; left:20px">Legend</div></legend>
-</fieldset>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/relpos-legend-3.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-<fieldset>
-  <legend style="position:relative; left:20px">Legend</legend>
-</fieldset>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/relpos-legend-4-ref.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-<fieldset>
-  <legend><span style="position:relative; left:20px">Legend</span></legend>
-</fieldset>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/fieldset/relpos-legend-4.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<body>
-<fieldset>
-  <legend style="display:inline; position:relative; left:20px">Legend</legend>
-</fieldset>
-</body>
-</html>
--- a/layout/style/res/forms.css
+++ b/layout/style/res/forms.css
@@ -66,17 +66,16 @@ fieldset {
   display: block;
   margin-inline-start: 2px;
   margin-inline-end: 2px;
   padding-block-start: 0.35em;
   padding-block-end: 0.75em;
   padding-inline-start: 0.625em;
   padding-inline-end: 0.625em;
   border: 2px groove ThreeDLightShadow;
-  min-width: -moz-min-content;
 }
 
 label {
   cursor: default;
 }
 
 /* default inputs, text inputs, and selects */
 
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important.html.ini
@@ -0,0 +1,3 @@
+[min-width-not-important.html]
+  type: reftest
+  expected: FAIL