Bug 1322780 - Part 2: Support unprefixed min-content and max-content. r=mats,emilio
authorBoris Chiou <boris.chiou@gmail.com>
Tue, 18 Dec 2018 18:47:37 +0000
changeset 451198 3511904f12cf4e71e3e2baaa20c1845b936b3cbe
parent 451197 1edf365b731a68dae4543ad652c123d32c537d4c
child 451199 ecf13af1b4211804cb4210f17a667377cd911667
push id35229
push userbtara@mozilla.com
push dateWed, 19 Dec 2018 04:52:04 +0000
treeherdermozilla-central@be5e54edad60 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats, emilio
bugs1322780
milestone66.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 1322780 - Part 2: Support unprefixed min-content and max-content. r=mats,emilio Support unprefixed min-content and max-content and treat the prefixed version as aliases for 1. width, min-width, max-width if inline-axis is horizontal, and 2. height, min-height, max-height if inline-axis is vertical, and 3. inline-size, min-inline-size, max-inline-size, and 4. flex-basis. Besides, update the test cases to use unprefixed max-content and min-content. Depends on D7535 Differential Revision: https://phabricator.services.mozilla.com/D7536
browser/base/content/browser.css
browser/themes/shared/syncedtabs/sidebar.inc.css
devtools/shared/css/generated/properties-db.js
gfx/tests/crashtests/423110-1.xhtml
layout/base/crashtests/1461812.html
layout/base/crashtests/591075-1.html
layout/base/nsLayoutUtils.cpp
layout/generic/crashtests/398181-1.html
layout/generic/crashtests/398181-2.html
layout/generic/crashtests/477928.html
layout/generic/crashtests/571995.xhtml
layout/generic/crashtests/646983-1.html
layout/generic/crashtests/650499-1.html
layout/generic/crashtests/791601.xhtml
layout/generic/crashtests/798235-1.html
layout/reftests/bidi/bidi-006-j.html
layout/reftests/bidi/bidi-006.html
layout/reftests/box-properties/box-sizing-1.html
layout/reftests/box-properties/box-sizing-2.html
layout/reftests/box-properties/box-sizing-3.html
layout/reftests/box-properties/box-sizing-4.html
layout/reftests/box-properties/minmax-width-special-values-block-intrinsic-ref.html
layout/reftests/box-properties/minmax-width-special-values-block-intrinsic.html
layout/reftests/box-properties/width-special-values-block-intrinsic-ref.html
layout/reftests/box-properties/width-special-values-block-intrinsic.html
layout/reftests/box-properties/width-special-values-block-ref.html
layout/reftests/box-properties/width-special-values-block.html
layout/reftests/box-properties/width-special-values-cell-auto-ref.html
layout/reftests/box-properties/width-special-values-cell-auto.html
layout/reftests/box-properties/width-special-values-cell-fixed-ref.html
layout/reftests/box-properties/width-special-values-cell-fixed.html
layout/reftests/box-properties/width-special-values-float-intrinsic.html
layout/reftests/box-properties/width-special-values-float.html
layout/reftests/box-properties/width-special-values-image-block-ref.html
layout/reftests/box-properties/width-special-values-image-block.html
layout/reftests/box-properties/width-special-values-image-ref.html
layout/reftests/box-properties/width-special-values-image.html
layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-001-ref.html
layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-001.html
layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-002-ref.html
layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-002.html
layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-003-ref.html
layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-004-ref.html
layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-001.html
layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-002.html
layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-003.html
layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-004.html
layout/reftests/css-grid/grid-container-baselines-003-ref.html
layout/reftests/css-grid/grid-fragmentation-015-ref.html
layout/reftests/css-grid/grid-item-auto-min-size-clamp-007.html
layout/reftests/css-grid/grid-repeat-auto-fill-fit-010.html
layout/reftests/css-grid/grid-repeat-auto-fill-fit-011.html
layout/reftests/css-grid/grid-track-intrinsic-sizing-001-ref.html
layout/reftests/css-ruby/intrinsic-isize-1-ref.html
layout/reftests/css-ruby/intrinsic-isize-1.html
layout/reftests/flexbox/flexbox-empty-1-ref.xhtml
layout/reftests/flexbox/flexbox-empty-1a.xhtml
layout/reftests/flexbox/flexbox-empty-1b.xhtml
layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1-ref.xhtml
layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1a.xhtml
layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1b.xhtml
layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2-ref.xhtml
layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2a.xhtml
layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2b.xhtml
layout/reftests/flexbox/flexbox-table-flex-items-4.html
layout/reftests/flexbox/flexbox-table-flex-items-5.html
layout/reftests/flexbox/flexbox-widget-flex-items-2-ref.html
layout/reftests/flexbox/reftest.list
layout/reftests/font-face/disable-sheet-4.html
layout/reftests/font-face/disable-sheet-5.html
layout/reftests/font-face/enable-sheet-1.html
layout/reftests/font-face/enable-sheet-2.html
layout/reftests/font-face/enable-sheet-3.html
layout/reftests/font-face/enable-sheet-4.html
layout/reftests/font-face/enable-sheet-5.html
layout/reftests/font-face/enable-sheet-6.html
layout/reftests/font-face/enable-sheet-7.html
layout/reftests/font-face/insert-rule-1a.html
layout/reftests/font-face/insert-rule-1b.html
layout/reftests/font-face/media-query-inner-1.html
layout/reftests/font-face/sheet-set-switch-1.html
layout/reftests/font-face/underline-offset-change-1-ref.html
layout/reftests/font-face/underline-offset-change-1.html
layout/reftests/font-face/underline-offset-change-2-ref.html
layout/reftests/font-face/underline-offset-change-2.html
layout/reftests/font-inflation/intrinsic-max-1.html
layout/reftests/font-inflation/intrinsic-min-1.html
layout/reftests/image/image-resize-percent-width.html
layout/reftests/list-item/bullet-intrinsic-isize-1.html
layout/reftests/pagination/table-nested-1308876-1-ref.html
layout/reftests/text/444656.html
layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003-ref.html
layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003.html
layout/reftests/writing-mode/1216747-1-ref.html
layout/reftests/writing-mode/1216747-1.html
layout/reftests/writing-mode/1302389-scrolled-rect-1-ref.html
layout/reftests/writing-mode/1302389-scrolled-rect-2-ref.html
layout/reftests/writing-mode/tables/table-caption-left-1-ref.html
layout/reftests/writing-mode/tables/table-caption-right-1-ref.html
layout/style/crashtests/1401256.html
layout/style/nsCSSKeywordList.h
layout/style/nsCSSProps.cpp
layout/style/nsStyleConsts.h
layout/style/res/forms.css
layout/style/test/property_database.js
layout/style/test/test_box_size_keywords.html
layout/style/test/test_value_computation.html
layout/tables/BasicTableLayoutStrategy.cpp
layout/tables/crashtests/420242-1.xhtml
layout/tables/nsTableFrame.cpp
layout/xul/crashtests/430356-1.xhtml
servo/components/style/values/computed/length.rs
testing/web-platform/meta/css/css-box/parsing/height-valid.html.ini
testing/web-platform/meta/css/css-box/parsing/max-height-valid.html.ini
testing/web-platform/meta/css/css-box/parsing/max-width-valid.html.ini
testing/web-platform/meta/css/css-box/parsing/min-height-valid.html.ini
testing/web-platform/meta/css/css-box/parsing/min-width-valid.html.ini
testing/web-platform/meta/css/css-box/parsing/width-valid.html.ini
testing/web-platform/meta/css/css-grid/grid-model/grid-container-sizing-constraints-001.html.ini
testing/web-platform/meta/css/css-tables/fixed-layout-2.html.ini
testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/sync-tests.sh
view/crashtests/507563-1.html
widget/cocoa/crashtests/435223-1.html
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -923,17 +923,17 @@ html|*.pointerlockfswarning {
   z-index: 2147483647 !important;
   visibility: visible;
   transition: transform 300ms ease-in;
   /* To center the warning box horizontally,
      we use left: 50% with translateX(-50%). */
   top: 0; left: 50%;
   transform: translate(-50%, -100%);
   box-sizing: border-box;
-  width: -moz-max-content;
+  width: max-content;
   max-width: 95%;
   pointer-events: none;
 }
 html|*.pointerlockfswarning:not([hidden]) {
   display: flex;
   will-change: transform;
 }
 html|*.pointerlockfswarning[onscreen] {
--- a/browser/themes/shared/syncedtabs/sidebar.inc.css
+++ b/browser/themes/shared/syncedtabs/sidebar.inc.css
@@ -181,17 +181,17 @@ body {
 
 .textbox-input-box {
   display: flex;
   flex-direction: row;
 }
 
 .tabsFilter {
   flex: 1;
-  /* min-width of anything to override the implicit "-moz-min-content" value.
+  /* min-width of anything to override the implicit "min-content" value.
      0px is safe as the sidebar itself has a constrained size meaning we will
      never actually hit this minimum
   */
   min-width: 0px;
 }
 
 .sync-state > p {
   padding-inline-end: 10px;
--- a/devtools/shared/css/generated/properties-db.js
+++ b/devtools/shared/css/generated/properties-db.js
@@ -2088,16 +2088,18 @@ exports.CSS_PROPERTIES = {
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "content",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "-webkit-flex-basis": {
     "isInherited": false,
     "subproperties": [
       "flex-basis"
     ],
@@ -2106,16 +2108,18 @@ exports.CSS_PROPERTIES = {
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "content",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "-webkit-flex-direction": {
     "isInherited": false,
     "subproperties": [
       "flex-direction"
     ],
@@ -3619,16 +3623,18 @@ exports.CSS_PROPERTIES = {
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "border": {
     "isInherited": false,
     "subproperties": [
       "border-top-color",
       "border-top-style",
@@ -5459,16 +5465,18 @@ exports.CSS_PROPERTIES = {
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "content",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "flex-basis": {
     "isInherited": false,
     "subproperties": [
       "flex-basis"
     ],
@@ -5477,16 +5485,18 @@ exports.CSS_PROPERTIES = {
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "content",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "flex-direction": {
     "isInherited": false,
     "subproperties": [
       "flex-direction"
     ],
@@ -6342,16 +6352,18 @@ exports.CSS_PROPERTIES = {
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "hyphens": {
     "isInherited": true,
     "subproperties": [
       "hyphens"
     ],
@@ -6422,16 +6434,18 @@ exports.CSS_PROPERTIES = {
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "inset-block-end": {
     "isInherited": false,
     "subproperties": [
       "inset-block-end"
     ],
@@ -7259,16 +7273,18 @@ exports.CSS_PROPERTIES = {
     "supports": [],
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "none",
       "unset"
     ]
   },
   "max-height": {
     "isInherited": false,
     "subproperties": [
       "max-height"
@@ -7276,16 +7292,18 @@ exports.CSS_PROPERTIES = {
     "supports": [],
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "none",
       "unset"
     ]
   },
   "max-inline-size": {
     "isInherited": false,
     "subproperties": [
       "max-inline-size"
@@ -7293,16 +7311,18 @@ exports.CSS_PROPERTIES = {
     "supports": [],
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "none",
       "unset"
     ]
   },
   "max-width": {
     "isInherited": false,
     "subproperties": [
       "max-width"
@@ -7310,16 +7330,18 @@ exports.CSS_PROPERTIES = {
     "supports": [],
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "none",
       "unset"
     ]
   },
   "min-block-size": {
     "isInherited": false,
     "subproperties": [
       "min-block-size"
@@ -7328,16 +7350,18 @@ exports.CSS_PROPERTIES = {
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "min-height": {
     "isInherited": false,
     "subproperties": [
       "min-height"
     ],
@@ -7345,16 +7369,18 @@ exports.CSS_PROPERTIES = {
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "min-inline-size": {
     "isInherited": false,
     "subproperties": [
       "min-inline-size"
     ],
@@ -7362,16 +7388,18 @@ exports.CSS_PROPERTIES = {
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "min-width": {
     "isInherited": false,
     "subproperties": [
       "min-width"
     ],
@@ -7379,16 +7407,18 @@ exports.CSS_PROPERTIES = {
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "mix-blend-mode": {
     "isInherited": false,
     "subproperties": [
       "mix-blend-mode"
     ],
@@ -9193,16 +9223,18 @@ exports.CSS_PROPERTIES = {
     "values": [
       "-moz-available",
       "-moz-fit-content",
       "-moz-max-content",
       "-moz-min-content",
       "auto",
       "inherit",
       "initial",
+      "max-content",
+      "min-content",
       "unset"
     ]
   },
   "will-change": {
     "isInherited": false,
     "subproperties": [
       "will-change"
     ],
--- a/gfx/tests/crashtests/423110-1.xhtml
+++ b/gfx/tests/crashtests/423110-1.xhtml
@@ -1,1 +1,1 @@
-<html xmlns="http://www.w3.org/1999/xhtml" style="min-width: -moz-max-content; float: left;"><head style="padding: 200%; display: -moz-inline-box; float: inherit;"></head></html>
+<html xmlns="http://www.w3.org/1999/xhtml" style="min-width: max-content; float: left;"><head style="padding: 200%; display: -moz-inline-box; float: inherit;"></head></html>
--- a/layout/base/crashtests/1461812.html
+++ b/layout/base/crashtests/1461812.html
@@ -1,11 +1,11 @@
 <style>
 :not(feConvolveMatrix) {
-  width: -moz-max-content;
+  width: max-content;
   column-width: 0em;
   text-indent: 1pt;
 }
 .cl {
   padding-bottom: 93vw;
 }
 </style>
 <script>
--- a/layout/base/crashtests/591075-1.html
+++ b/layout/base/crashtests/591075-1.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html style="max-width: -moz-max-content"><body style="max-width: 210708270904025mozmm"></body></html>
+<html style="max-width: max-content"><body style="max-width: 210708270904025mozmm"></body></html>
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -4843,17 +4843,17 @@ static nscoord GetDefiniteSizeTakenByBox
            GetPercentBSize(pEnd, aFrame, isHorizontalAxis, pad))) {
         sizeTakenByBoxSizing += pad;
       }
     }
   }
   return sizeTakenByBoxSizing;
 }
 
-// Handles only -moz-max-content and -moz-min-content, and
+// Handles only max-content and min-content, and
 // -moz-fit-content for min-width and max-width, since the others
 // (-moz-fit-content for width, and -moz-available) have no effect on
 // intrinsic widths.
 enum eWidthProperty { PROP_WIDTH, PROP_MAX_WIDTH, PROP_MIN_WIDTH };
 static bool GetIntrinsicCoord(const nsStyleCoord& aStyle,
                               gfxContext* aRenderingContext, nsIFrame* aFrame,
                               eWidthProperty aProperty, nscoord& aResult) {
   MOZ_ASSERT(aProperty == PROP_WIDTH || aProperty == PROP_MAX_WIDTH ||
@@ -4865,20 +4865,20 @@ static bool GetIntrinsicCoord(const nsSt
   NS_ASSERTION(
       val == NS_STYLE_WIDTH_MAX_CONTENT || val == NS_STYLE_WIDTH_MIN_CONTENT ||
           val == NS_STYLE_WIDTH_FIT_CONTENT || val == NS_STYLE_WIDTH_AVAILABLE,
       "unexpected enumerated value for width property");
   if (val == NS_STYLE_WIDTH_AVAILABLE) return false;
   if (val == NS_STYLE_WIDTH_FIT_CONTENT) {
     if (aProperty == PROP_WIDTH) return false;  // handle like 'width: auto'
     if (aProperty == PROP_MAX_WIDTH)
-      // constrain large 'width' values down to -moz-max-content
+      // constrain large 'width' values down to max-content
       val = NS_STYLE_WIDTH_MAX_CONTENT;
     else
-      // constrain small 'width' or 'max-width' values up to -moz-min-content
+      // constrain small 'width' or 'max-width' values up to min-content
       val = NS_STYLE_WIDTH_MIN_CONTENT;
   }
 
   NS_ASSERTION(
       val == NS_STYLE_WIDTH_MAX_CONTENT || val == NS_STYLE_WIDTH_MIN_CONTENT,
       "should have reduced everything remaining to one of these");
 
   // If aFrame is a container for font size inflation, then shrink
@@ -5161,17 +5161,17 @@ static void AddStateBitToAncestors(nsIFr
   // this case GetAbsoluteCoord(styleISize, w) will always succeed, so
   // we'll never need the intrinsic dimensions.
   if (styleISize.GetUnit() == eStyleUnit_Enumerated &&
       (styleISize.GetIntValue() == NS_STYLE_WIDTH_MAX_CONTENT ||
        styleISize.GetIntValue() == NS_STYLE_WIDTH_MIN_CONTENT)) {
     MOZ_ASSERT(isInlineAxis);
     // -moz-fit-content and -moz-available enumerated widths compute intrinsic
     // widths just like auto.
-    // For -moz-max-content and -moz-min-content, we handle them like
+    // For max-content and min-content, we handle them like
     // specified widths, but ignore box-sizing.
     boxSizing = StyleBoxSizing::Content;
   } else if (!styleISize.ConvertsToLength() &&
              !(haveFixedMinISize && haveFixedMaxISize &&
                maxISize <= minISize)) {
 #ifdef DEBUG_INTRINSIC_WIDTH
     ++gNoiseIndent;
 #endif
--- a/layout/generic/crashtests/398181-1.html
+++ b/layout/generic/crashtests/398181-1.html
@@ -1,9 +1,9 @@
-<html style="min-width: -moz-max-content;">
+<html style="min-width: max-content;">
   <head>
   </head>
   <body>
     <div>
       <span style="margin: 0 100%; display: inline-block;"></span>
       t
     </div>
   </body>
--- a/layout/generic/crashtests/398181-2.html
+++ b/layout/generic/crashtests/398181-2.html
@@ -1,9 +1,9 @@
-<html style="min-width: -moz-max-content;">
+<html style="min-width: max-content;">
   <head>
   </head>
   <body>
     <div>
       <span style="margin: 0 100%; display: inline-block;"></span>
       t
       <div style="float: left">foo</div>
     </div>
--- a/layout/generic/crashtests/477928.html
+++ b/layout/generic/crashtests/477928.html
@@ -6,13 +6,13 @@
 function boom()
 {
   document.getElementById("a").appendChild(document.createTextNode("\n"));
 }
 
 </script>
 </head>
 <body onload="boom();">
-<div id="a" style="max-width: -moz-max-content; -moz-column-count: 2;"><span style="white-space: pre-line;"><span>
+<div id="a" style="max-width: max-content; -moz-column-count: 2;"><span style="white-space: pre-line;"><span>
 </span>
 </span></div>
 </body>
 </html>
--- a/layout/generic/crashtests/571995.xhtml
+++ b/layout/generic/crashtests/571995.xhtml
@@ -1,8 +1,8 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <body onload="document.getElementById('a').style.letterSpacing = '15ch';"></body>
-<span id="a" style="position: fixed; bottom: 0pt; top: 4095em; -moz-column-width: 1px;"><span style="-moz-column-count: 1; min-height: 2097150ch; font-size-adjust: 256; width: 89px; bottom: 35875px; min-width: -moz-min-content; position: absolute; top: 33554432ch; white-space: pre-line;">
+<span id="a" style="position: fixed; bottom: 0pt; top: 4095em; -moz-column-width: 1px;"><span style="-moz-column-count: 1; min-height: 2097150ch; font-size-adjust: 256; width: 89px; bottom: 35875px; min-width: min-content; position: absolute; top: 33554432ch; white-space: pre-line;">
 
 a b:
 c def:
 
  </span></span></html>
--- a/layout/generic/crashtests/646983-1.html
+++ b/layout/generic/crashtests/646983-1.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
-<body style="min-width: -moz-min-content">
+<body style="min-width: min-content">
 <span>&#x06CD;T</span><span>&shy;</span>
 </body>
 </html>
--- a/layout/generic/crashtests/650499-1.html
+++ b/layout/generic/crashtests/650499-1.html
@@ -5,11 +5,11 @@
 function boom()
 {
   document.documentElement.offsetHeight;
   document.body.appendChild(document.createElement("span"));
 }
 
 </script>
 </head>
-<body style="max-width: -moz-min-content; white-space: pre;" onload="boom();">&#x00AD;
+<body style="max-width: min-content; white-space: pre;" onload="boom();">&#x00AD;
 R</body>
 </html>
--- a/layout/generic/crashtests/791601.xhtml
+++ b/layout/generic/crashtests/791601.xhtml
@@ -1,4 +1,4 @@
-<html xmlns="http://www.w3.org/1999/xhtml" style="white-space: pre-wrap; width: -moz-min-content; font-size: 4294967297px;" class="reftest-wait">
+<html xmlns="http://www.w3.org/1999/xhtml" style="white-space: pre-wrap; width: min-content; font-size: 4294967297px;" class="reftest-wait">
 <body style="font-size: 1px; -moz-column-count: 2;" onload="document.getElementById('p').style.paddingInlineStart = '4294967296px'; document.documentElement.offsetHeight; setTimeout(function(){document.documentElement.removeAttribute('class');},0); "> x
 
 y<div id="p"></div></body></html>
--- a/layout/generic/crashtests/798235-1.html
+++ b/layout/generic/crashtests/798235-1.html
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <body>
   <div style="flex-direction: column-reverse; display: inline-flex;">
-    <div style="flex: 1 1 -moz-max-content;"></div>
+    <div style="flex: 1 1 max-content;"></div>
   </div>
 </body>
 </html>
--- a/layout/reftests/bidi/bidi-006-j.html
+++ b/layout/reftests/bidi/bidi-006-j.html
@@ -33,17 +33,17 @@ span {
   margin-top: -2em;
   vertical-align: bottom;
   background: white;
 }
 /* borders should be covered by overhang */
 p#test {
   border-left: 3em solid red;
   border-right: 3em solid red;
-  width: -moz-max-content;
+  width: max-content;
   width: intrinsic;
 }
   </style>
  <body>
   <p id="test">&#x5e0;&#x5b8;</p>
   <p id="overhang"><span></span>&#x5e0;<span></span></p>
  </body>
 </html>
--- a/layout/reftests/bidi/bidi-006.html
+++ b/layout/reftests/bidi/bidi-006.html
@@ -32,17 +32,17 @@ span {
   margin-top: -2em;
   vertical-align: bottom;
   background: white;
 }
 /* borders should be covered by overhang */
 p#test {
   border-left: 3em solid red;
   border-right: 3em solid red;
-  width: -moz-max-content;
+  width: max-content;
   width: intrinsic;
 }
   </style>
  <body>
   <p id="test">&#x5e0;&#x5b8;</p>
   <p id="overhang"><span></span>&#x5e0;<span></span></p>
  </body>
 </html>
--- a/layout/reftests/box-properties/box-sizing-1.html
+++ b/layout/reftests/box-properties/box-sizing-1.html
@@ -32,30 +32,30 @@
 <body>
 
 <table><tr>
 
 <td id="bscontent"><div>
 
 <!-- box-sizing: content-box -->
 <div style="width: auto">A B</div>
-<div style="width: -moz-max-content">A B</div>
-<div style="width: -moz-min-content">A B</div>
+<div style="width: max-content">A B</div>
+<div style="width: min-content">A B</div>
 <div style="width: -moz-fit-content">A B</div>
 <div style="width: -moz-available">A B</div>
 <div style="width: 50px">A B</div>
 <div style="width: 60%">A B</div>
 
 </div></td>
 
 <td id="bsborder"><div>
 <!-- box-sizing: border-box -->
 <div style="width: auto">A B</div>
-<div style="width: -moz-max-content">A B</div>
-<div style="width: -moz-min-content">A B</div>
+<div style="width: max-content">A B</div>
+<div style="width: min-content">A B</div>
 <div style="width: -moz-fit-content">A B</div>
 <div style="width: -moz-available">A B</div>
 <div style="width: 50px">A B</div>
 <div style="width: 60%">A B</div>
 
 </div></td>
 
 </tr></table>
--- a/layout/reftests/box-properties/box-sizing-2.html
+++ b/layout/reftests/box-properties/box-sizing-2.html
@@ -29,29 +29,29 @@
 <body>
 
 <table><tr>
 
 <td id="bscontent">
 
 <!-- box-sizing: content-box -->
 <table><tr><td><div style="width: auto">A B</div></td></tr></table>
-<table><tr><td><div style="width: -moz-max-content">A B</div></td></tr></table>
-<table><tr><td><div style="width: -moz-min-content">A B</div></td></tr></table>
+<table><tr><td><div style="width: max-content">A B</div></td></tr></table>
+<table><tr><td><div style="width: min-content">A B</div></td></tr></table>
 <table><tr><td><div style="width: -moz-fit-content">A B</div></td></tr></table>
 <table><tr><td><div style="width: -moz-available">A B</div></td></tr></table>
 <table><tr><td><div style="width: 150px">A B</div></td></tr></table>
 
 </td>
 
 <td id="bsborder">
 <!-- box-sizing: border-box -->
 <table><tr><td><div style="width: auto">A B</div></td></tr></table>
-<table><tr><td><div style="width: -moz-max-content">A B</div></td></tr></table>
-<table><tr><td><div style="width: -moz-min-content">A B</div></td></tr></table>
+<table><tr><td><div style="width: max-content">A B</div></td></tr></table>
+<table><tr><td><div style="width: min-content">A B</div></td></tr></table>
 <table><tr><td><div style="width: -moz-fit-content">A B</div></td></tr></table>
 <table><tr><td><div style="width: -moz-available">A B</div></td></tr></table>
 <table><tr><td><div style="width: 150px">A B</div></td></tr></table>
 
 </td>
 
 </tr></table>
 
--- a/layout/reftests/box-properties/box-sizing-3.html
+++ b/layout/reftests/box-properties/box-sizing-3.html
@@ -32,30 +32,30 @@
 <body>
 
 <table><tr>
 
 <td id="bscontent"><div>
 
 <!-- box-sizing: content-box -->
 <div style="width: auto">A B</div>
-<div style="width: -moz-max-content">A B</div>
-<div style="width: -moz-min-content">A B</div>
+<div style="width: max-content">A B</div>
+<div style="width: min-content">A B</div>
 <div style="width: -moz-fit-content">A B</div>
 <div style="width: -moz-available">A B</div>
 <div style="width: 50px">A B</div>
 <div style="width: 60%">A B</div>
 
 </div></td>
 
 <td id="bsborder"><div>
 <!-- box-sizing: border-box -->
 <div style="width: auto">A B</div>
-<div style="width: -moz-max-content">A B</div>
-<div style="width: -moz-min-content">A B</div>
+<div style="width: max-content">A B</div>
+<div style="width: min-content">A B</div>
 <div style="width: -moz-fit-content">A B</div>
 <div style="width: -moz-available">A B</div>
 <div style="width: 50px">A B</div>
 <div style="width: 60%">A B</div>
 
 </div></td>
 
 </tr></table>
--- a/layout/reftests/box-properties/box-sizing-4.html
+++ b/layout/reftests/box-properties/box-sizing-4.html
@@ -44,30 +44,30 @@
 <body>
 
 <table><tr>
 
 <td id="bscontent"><div>
 
 <!-- box-sizing: content-box -->
 <div style="width: auto">A B</div>
-<div style="width: -moz-max-content">A B</div>
-<div style="width: -moz-min-content">A B</div>
+<div style="width: max-content">A B</div>
+<div style="width: min-content">A B</div>
 <div style="width: -moz-fit-content">A B</div>
 <div style="width: -moz-available">A B</div>
 <div style="width: 50px">A B</div>
 <div style="width: 60%">A B</div>
 
 </div></td>
 
 <td id="bsborder"><div>
 <!-- box-sizing: border-box -->
 <div style="width: auto">A B</div>
-<div style="width: -moz-max-content">A B</div>
-<div style="width: -moz-min-content">A B</div>
+<div style="width: max-content">A B</div>
+<div style="width: min-content">A B</div>
 <div style="width: -moz-fit-content">A B</div>
 <div style="width: -moz-available">A B</div>
 <div style="width: 50px">A B</div>
 <div style="width: 60%">A B</div>
 
 </div></td>
 
 </tr></table>
--- a/layout/reftests/box-properties/minmax-width-special-values-block-intrinsic-ref.html
+++ b/layout/reftests/box-properties/minmax-width-special-values-block-intrinsic-ref.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>intrinsic min-widths and max-widths for -moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
+  <title>intrinsic min-widths and max-widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
 </head>
 <body>
 
 <table border><tr><td>
   <div>AA B</div>
 </td></tr></table>
--- a/layout/reftests/box-properties/minmax-width-special-values-block-intrinsic.html
+++ b/layout/reftests/box-properties/minmax-width-special-values-block-intrinsic.html
@@ -1,31 +1,31 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>intrinsic min-widths and max-widths for -moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
+  <title>intrinsic min-widths and max-widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
 </head>
 <body>
 
 <table border><tr><td>
-  <div style="width: 1px; min-width: -moz-max-content">AA B</div>
+  <div style="width: 1px; min-width: max-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
-  <div style="width: 1px; min-width: -moz-max-content">AA B</div>
+  <div style="width: 1px; min-width: max-content">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
-  <div style="width: 1px; min-width: -moz-min-content">AA B</div>
+  <div style="width: 1px; min-width: min-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
-  <div style="width: 1px; min-width: -moz-min-content">AA B</div>
+  <div style="width: 1px; min-width: min-content">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
   <div style="width: 1px; min-width: -moz-fit-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
   <div style="width: 1px; min-width: -moz-fit-content">AA B</div>
@@ -35,29 +35,29 @@
   <div style="width: 1px; min-width: -moz-available">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
   <div style="width: 1px; min-width: -moz-available">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
-  <div style="width: 500px; max-width: -moz-max-content">AA B</div>
+  <div style="width: 500px; max-width: max-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
-  <div style="width: 500px; max-width: -moz-max-content">AA B</div>
+  <div style="width: 500px; max-width: max-content">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
-  <div style="width: 500px; max-width: -moz-min-content">AA B</div>
+  <div style="width: 500px; max-width: min-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
-  <div style="width: 500px; max-width: -moz-min-content">AA B</div>
+  <div style="width: 500px; max-width: min-content">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
   <div style="width: 500px; max-width: -moz-fit-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
   <div style="width: 500px; max-width: -moz-fit-content">AA B</div>
--- a/layout/reftests/box-properties/width-special-values-block-intrinsic-ref.html
+++ b/layout/reftests/box-properties/width-special-values-block-intrinsic-ref.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>intrinsic widths for -moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
+  <title>intrinsic widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
 </head>
 <body>
 
 <table border><tr><td>
   <div>AA B</div>
 </td></tr></table>
--- a/layout/reftests/box-properties/width-special-values-block-intrinsic.html
+++ b/layout/reftests/box-properties/width-special-values-block-intrinsic.html
@@ -1,31 +1,31 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>intrinsic widths for -moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
+  <title>intrinsic widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
 </head>
 <body>
 
 <table border><tr><td>
-  <div style="width: -moz-max-content">AA B</div>
+  <div style="width: max-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
-  <div style="width: -moz-max-content">AA B</div>
+  <div style="width: max-content">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
-  <div style="width: -moz-min-content">AA B</div>
+  <div style="width: min-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
-  <div style="width: -moz-min-content">AA B</div>
+  <div style="width: min-content">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
   <div style="width: -moz-fit-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
   <div style="width: -moz-fit-content">AA B</div>
--- a/layout/reftests/box-properties/width-special-values-block-ref.html
+++ b/layout/reftests/box-properties/width-special-values-block-ref.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     body { font-size: 10px; line-height: 1; }
 
     div {
       margin-left: 1px;
--- a/layout/reftests/box-properties/width-special-values-block.html
+++ b/layout/reftests/box-properties/width-special-values-block.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     body { font-size: 10px; line-height: 1; }
 
     div {
       margin-left: 1px;
@@ -15,18 +15,18 @@
       padding-right: 8px;
       border-right: 16px solid;
       margin-right: 32px;
 
       background: yellow;
       margin-bottom: 1px;
     }
 
-    div.v1 { width: -moz-max-content; }
-    div.v2 { width: -moz-min-content; }
+    div.v1 { width: max-content; }
+    div.v2 { width: min-content; }
     div.v3 { width: -moz-fit-content; }
     div.v4 { width: -moz-available; }
 
     div.s1 { box-sizing: content; }
     div.s2 { box-sizing: padding; }
     div.s3 { box-sizing: border; }
 
   </style>
--- a/layout/reftests/box-properties/width-special-values-cell-auto-ref.html
+++ b/layout/reftests/box-properties/width-special-values-cell-auto-ref.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on table cells with table-layout: auto</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on table cells with table-layout: auto</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     body { font-size: 10px; line-height: 1; }
 
     td td {
       border-left: 1px solid;
--- a/layout/reftests/box-properties/width-special-values-cell-auto.html
+++ b/layout/reftests/box-properties/width-special-values-cell-auto.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on table cells with table-layout: auto</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on table cells with table-layout: auto</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     body { font-size: 10px; line-height: 1; }
 
     td td {
       border-left: 1px solid;
@@ -19,64 +19,64 @@
 
   </style>
 </head>
 <body>
 
 <table border><tr>
 <td>
 <!-- width -->
-<table border><tr><td style="width: -moz-max-content">A B</td></tr></table>
-<table border width="1"><tr><td style="width: -moz-max-content">A B</td></tr></table>
-<table border><tr><td style="width: -moz-min-content">A B</td></tr></table>
-<table border width="1"><tr><td style="width: -moz-min-content">A B</td></tr></table>
+<table border><tr><td style="width: max-content">A B</td></tr></table>
+<table border width="1"><tr><td style="width: max-content">A B</td></tr></table>
+<table border><tr><td style="width: min-content">A B</td></tr></table>
+<table border width="1"><tr><td style="width: min-content">A B</td></tr></table>
 <table border><tr><td style="width: -moz-fit-content">A B</td></tr></table>
 <table border width="1"><tr><td style="width: -moz-fit-content">A B</td></tr></table>
 <table border><tr><td style="width: -moz-available">A B</td></tr></table>
 <table border width="1"><tr><td style="width: -moz-available">A B</td></tr></table>
 
 </td>
 <td>
 <!-- min-width -->
 
-<table border><tr><td style="min-width: -moz-max-content">A B</td></tr></table>
-<table border width="1"><tr><td style="min-width: -moz-max-content">A B</td></tr></table>
-<table border><tr><td style="min-width: -moz-min-content">A B</td></tr></table>
-<table border width="1"><tr><td style="min-width: -moz-min-content">A B</td></tr></table>
+<table border><tr><td style="min-width: max-content">A B</td></tr></table>
+<table border width="1"><tr><td style="min-width: max-content">A B</td></tr></table>
+<table border><tr><td style="min-width: min-content">A B</td></tr></table>
+<table border width="1"><tr><td style="min-width: min-content">A B</td></tr></table>
 <table border><tr><td style="min-width: -moz-fit-content">A B</td></tr></table>
 <table border width="1"><tr><td style="min-width: -moz-fit-content">A B</td></tr></table>
 <table border><tr><td style="min-width: -moz-available">A B</td></tr></table>
 <table border width="1"><tr><td style="min-width: -moz-available">A B</td></tr></table>
 
-<table border><tr><td style="width: 1px; min-width: -moz-max-content">A B</td></tr></table>
-<table border width="1"><tr><td style="width: 1px; min-width: -moz-max-content">A B</td></tr></table>
-<table border><tr><td style="width: 1px; min-width: -moz-min-content">A B</td></tr></table>
-<table border width="1"><tr><td style="width: 1px; min-width: -moz-min-content">A B</td></tr></table>
+<table border><tr><td style="width: 1px; min-width: max-content">A B</td></tr></table>
+<table border width="1"><tr><td style="width: 1px; min-width: max-content">A B</td></tr></table>
+<table border><tr><td style="width: 1px; min-width: min-content">A B</td></tr></table>
+<table border width="1"><tr><td style="width: 1px; min-width: min-content">A B</td></tr></table>
 <table border><tr><td style="width: 1px; min-width: -moz-fit-content">A B</td></tr></table>
 <table border width="1"><tr><td style="width: 1px; min-width: -moz-fit-content">A B</td></tr></table>
 <table border><tr><td style="width: 1px; min-width: -moz-available">A B</td></tr></table>
 <table border width="1"><tr><td style="width: 1px; min-width: -moz-available">A B</td></tr></table>
 
 </td>
 <td>
 <!-- max-width -->
 
-<table border><tr><td style="max-width: -moz-max-content">A B</td></tr></table>
-<table border width="1"><tr><td style="max-width: -moz-max-content">A B</td></tr></table>
-<table border><tr><td style="max-width: -moz-min-content">A B</td></tr></table>
-<table border width="1"><tr><td style="max-width: -moz-min-content">A B</td></tr></table>
+<table border><tr><td style="max-width: max-content">A B</td></tr></table>
+<table border width="1"><tr><td style="max-width: max-content">A B</td></tr></table>
+<table border><tr><td style="max-width: min-content">A B</td></tr></table>
+<table border width="1"><tr><td style="max-width: min-content">A B</td></tr></table>
 <table border><tr><td style="max-width: -moz-fit-content">A B</td></tr></table>
 <table border width="1"><tr><td style="max-width: -moz-fit-content">A B</td></tr></table>
 <table border><tr><td style="max-width: -moz-available">A B</td></tr></table>
 <table border width="1"><tr><td style="max-width: -moz-available">A B</td></tr></table>
 
-<table border><tr><td style="width: 150px; max-width: -moz-max-content">A B</td></tr></table>
-<table border width="1"><tr><td style="width: 150px; max-width: -moz-max-content">A B</td></tr></table>
-<table border><tr><td style="width: 150px; max-width: -moz-min-content">A B</td></tr></table>
-<table border width="1"><tr><td style="width: 150px; max-width: -moz-min-content">A B</td></tr></table>
+<table border><tr><td style="width: 150px; max-width: max-content">A B</td></tr></table>
+<table border width="1"><tr><td style="width: 150px; max-width: max-content">A B</td></tr></table>
+<table border><tr><td style="width: 150px; max-width: min-content">A B</td></tr></table>
+<table border width="1"><tr><td style="width: 150px; max-width: min-content">A B</td></tr></table>
 <table border><tr><td style="width: 150px; max-width: -moz-fit-content">A B</td></tr></table>
 <table border width="1"><tr><td style="width: 150px; max-width: -moz-fit-content">A B</td></tr></table>
 <table border><tr><td style="width: 150px; max-width: -moz-available">A B</td></tr></table>
 <table border width="1"><tr><td style="width: 150px; max-width: -moz-available">A B</td></tr></table>
 
 
 </td>
 </tr></table>
--- a/layout/reftests/box-properties/width-special-values-cell-fixed-ref.html
+++ b/layout/reftests/box-properties/width-special-values-cell-fixed-ref.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on table cells with table-layout: fixed</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on table cells with table-layout: fixed</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     body { font-size: 10px; line-height: 1; }
 
     td table { width: 200px; }
     td td:first-child {
--- a/layout/reftests/box-properties/width-special-values-cell-fixed.html
+++ b/layout/reftests/box-properties/width-special-values-cell-fixed.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on table cells with table-layout: fixed</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on table cells with table-layout: fixed</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     body { font-size: 10px; line-height: 1; }
 
     td table { table-layout: fixed; width: 200px; }
     td td:first-child {
@@ -20,46 +20,46 @@
 
   </style>
 </head>
 <body>
 
 <table border><tr>
 <td>
 <!-- width -->
-<table border><tr><td style="width: -moz-max-content">A B</td><td></td></tr></table>
-<table border><tr><td style="width: -moz-min-content">A B</td><td></td></tr></table>
+<table border><tr><td style="width: max-content">A B</td><td></td></tr></table>
+<table border><tr><td style="width: min-content">A B</td><td></td></tr></table>
 <table border><tr><td style="width: -moz-fit-content">A B</td><td></td></tr></table>
 <table border><tr><td style="width: -moz-available">A B</td><td></td></tr></table>
 
 </td>
 <td>
 <!-- min-width -->
 
-<table border><tr><td style="min-width: -moz-max-content">A B</td><td></td></tr></table>
-<table border><tr><td style="min-width: -moz-min-content">A B</td><td></td></tr></table>
+<table border><tr><td style="min-width: max-content">A B</td><td></td></tr></table>
+<table border><tr><td style="min-width: min-content">A B</td><td></td></tr></table>
 <table border><tr><td style="min-width: -moz-fit-content">A B</td><td></td></tr></table>
 <table border><tr><td style="min-width: -moz-available">A B</td><td></td></tr></table>
 
-<table border><tr><td style="width: 1px; min-width: -moz-max-content">A B</td><td></td></tr></table>
-<table border><tr><td style="width: 1px; min-width: -moz-min-content">A B</td><td></td></tr></table>
+<table border><tr><td style="width: 1px; min-width: max-content">A B</td><td></td></tr></table>
+<table border><tr><td style="width: 1px; min-width: min-content">A B</td><td></td></tr></table>
 <table border><tr><td style="width: 1px; min-width: -moz-fit-content">A B</td><td></td></tr></table>
 <table border><tr><td style="width: 1px; min-width: -moz-available">A B</td><td></td></tr></table>
 
 </td>
 <td>
 <!-- max-width -->
 
-<table border><tr><td style="max-width: -moz-max-content">A B</td><td></td></tr></table>
-<table border><tr><td style="max-width: -moz-min-content">A B</td><td></td></tr></table>
+<table border><tr><td style="max-width: max-content">A B</td><td></td></tr></table>
+<table border><tr><td style="max-width: min-content">A B</td><td></td></tr></table>
 <table border><tr><td style="max-width: -moz-fit-content">A B</td><td></td></tr></table>
 <table border><tr><td style="max-width: -moz-available">A B</td><td></td></tr></table>
 
-<table border><tr><td style="width: 150px; max-width: -moz-max-content">A B</td><td></td></tr></table>
-<table border><tr><td style="width: 150px; max-width: -moz-min-content">A B</td><td></td></tr></table>
+<table border><tr><td style="width: 150px; max-width: max-content">A B</td><td></td></tr></table>
+<table border><tr><td style="width: 150px; max-width: min-content">A B</td><td></td></tr></table>
 <table border><tr><td style="width: 150px; max-width: -moz-fit-content">A B</td><td></td></tr></table>
 <table border><tr><td style="width: 150px; max-width: -moz-available">A B</td><td></td></tr></table>
 
 
 </td>
 </tr></table>
 
 
--- a/layout/reftests/box-properties/width-special-values-float-intrinsic.html
+++ b/layout/reftests/box-properties/width-special-values-float-intrinsic.html
@@ -1,36 +1,36 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>intrinsic widths for -moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
+  <title>intrinsic widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
   div { float: left; clear: left; }
 
   </style>
 </head>
 <body>
 
 <table border><tr><td>
-  <div style="width: -moz-max-content">AA B</div>
+  <div style="width: max-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
-  <div style="width: -moz-max-content">AA B</div>
+  <div style="width: max-content">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
-  <div style="width: -moz-min-content">AA B</div>
+  <div style="width: min-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
-  <div style="width: -moz-min-content">AA B</div>
+  <div style="width: min-content">AA B</div>
 </td></tr></table>
 
 <table border><tr><td>
   <div style="width: -moz-fit-content">AA B</div>
 </td></tr></table>
 
 <table border width="1"><tr><td>
   <div style="width: -moz-fit-content">AA B</div>
--- a/layout/reftests/box-properties/width-special-values-float.html
+++ b/layout/reftests/box-properties/width-special-values-float.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     body { font-size: 10px; line-height: 1; }
 
     div {
       margin-left: 1px;
@@ -17,18 +17,18 @@
       margin-right: 32px;
 
       background: yellow;
       float: left;
       clear: left;
       margin-bottom: 1px;
     }
 
-    div.v1 { width: -moz-max-content; }
-    div.v2 { width: -moz-min-content; }
+    div.v1 { width: max-content; }
+    div.v2 { width: min-content; }
     div.v3 { width: -moz-fit-content; }
     div.v4 { width: -moz-available; }
 
     div.s1 { box-sizing: content; }
     div.s2 { box-sizing: padding; }
     div.s3 { box-sizing: border; }
 
   </style>
--- a/layout/reftests/box-properties/width-special-values-image-block-ref.html
+++ b/layout/reftests/box-properties/width-special-values-image-block-ref.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on block images</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on block images</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     img {
       display: block;
       margin-left: 1px;
       border-left: 2px solid;
--- a/layout/reftests/box-properties/width-special-values-image-block.html
+++ b/layout/reftests/box-properties/width-special-values-image-block.html
@@ -1,29 +1,29 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on block images</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on block images</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     img {
       display: block;
       margin-left: 1px;
       border-left: 2px solid;
       padding-left: 4px;
       padding-right: 8px;
       border-right: 16px solid;
       margin-right: 32px;
       margin-bottom: 1px;
     }
 
-    img.v1 { width: -moz-max-content; }
-    img.v2 { width: -moz-min-content; }
+    img.v1 { width: max-content; }
+    img.v2 { width: min-content; }
     img.v3 { width: -moz-fit-content; }
     img.v4 { width: -moz-available; }
 
     img.s1 { box-sizing: content; }
     img.s2 { box-sizing: padding; }
     img.s3 { box-sizing: border; }
 
   </style>
--- a/layout/reftests/box-properties/width-special-values-image-ref.html
+++ b/layout/reftests/box-properties/width-special-values-image-ref.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on inline images</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on inline images</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     img {
       margin-left: 1px;
       border-left: 2px solid;
       padding-left: 4px;
--- a/layout/reftests/box-properties/width-special-values-image.html
+++ b/layout/reftests/box-properties/width-special-values-image.html
@@ -1,28 +1,28 @@
 <!DOCTYPE html>
 <html lang="en-US">
 <head>
-  <title>-moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on inline images</title>
+  <title>max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on inline images</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="Content-Style-Type" content="text/css">
   <style type="text/css">
 
     img {
       margin-left: 1px;
       border-left: 2px solid;
       padding-left: 4px;
       padding-right: 8px;
       border-right: 16px solid;
       margin-right: 32px;
       margin-bottom: 1px;
     }
 
-    img.v1 { width: -moz-max-content; }
-    img.v2 { width: -moz-min-content; }
+    img.v1 { width: max-content; }
+    img.v2 { width: min-content; }
     img.v3 { width: -moz-fit-content; }
     img.v4 { width: -moz-available; }
 
     img.s1 { box-sizing: content; }
     img.s2 { box-sizing: padding; }
     img.s3 { box-sizing: border; }
 
   </style>
--- a/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-001-ref.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-001-ref.html
@@ -16,18 +16,18 @@ body,html { color:black; background:whit
  border: 1px solid;
  width: 500px;
  align-items: start;
  justify-items: start;
 }
 span,img { min-height:0; }
 
 .c1 { border:2px solid;   min-width:auto; }
-.c3 { background: blue;   min-width:-moz-min-content; min-width:-webkit-min-content; }
-.c4 { background: lime;   min-width:-moz-max-content; min-width:-webkit-max-content; }
+.c3 { background: blue;   min-width:min-content; min-width:-webkit-min-content; }
+.c4 { background: lime;   min-width:max-content; min-width:-webkit-max-content; }
 .c5 { background: cyan;   min-width:-moz-available;   min-width:-webkit-fill-available; }
 .c6 { background: yellow; min-width:-moz-fit-content; min-width:-webkit-fit-content; }
 .w20   { width: 20px; }
 .w450  { width: 450px; }
 .max50 { max-width: 50px; }
 .h05   { height: 0.5px; }
 .h4    { height: 4px; }
 
--- a/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-001.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-001.html
@@ -18,18 +18,18 @@ body,html { color:black; background:whit
  border: 1px solid;
  width: 500px;
  align-items: start;
  justify-items: start;
 }
 span,img { min-height:0; }
 
 .c1 { border:2px solid;   min-width:auto; }
-.c3 { background: blue;   min-width:-moz-min-content; min-width:-webkit-min-content; }
-.c4 { background: lime;   min-width:-moz-max-content; min-width:-webkit-max-content; }
+.c3 { background: blue;   min-width:min-content; min-width:-webkit-min-content; }
+.c4 { background: lime;   min-width:max-content; min-width:-webkit-max-content; }
 .c5 { background: cyan;   min-width:-moz-available;   min-width:-webkit-fill-available; }
 .c6 { background: yellow; min-width:-moz-fit-content; min-width:-webkit-fit-content; }
 .w20   { width: 20px; }
 .w450  { width: 450px; }
 .max50 { max-width: 50px; }
 .h05   { height: 0.5px; }
 .h4    { height: 4px; }
 
--- a/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-002-ref.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-002-ref.html
@@ -18,18 +18,18 @@ body,html { color:black; background:whit
  align-items: start;
  justify-items: start;
 }
 .min4 { grid-template-columns: minmax(4px,0) minmax(0,1fr); }
 span,img { min-height:0; }
 span, c2 { min-width:0; }
 
 .c1 { border:2px solid;   min-width:auto; }
-.c3 { background: blue;   min-width:-moz-min-content; min-width:-webkit-min-content; }
-.c4 { background: lime;   min-width:-moz-max-content; min-width:-webkit-max-content; }
+.c3 { background: blue;   min-width:min-content; min-width:-webkit-min-content; }
+.c4 { background: lime;   min-width:max-content; min-width:-webkit-max-content; }
 .c5 { background: cyan;   min-width:-moz-available;   min-width:-webkit-fill-available; }
 .c6 { background: yellow; min-width:-moz-fit-content; min-width:-webkit-fit-content; }
 .w20   { width: 20px; }
 .w450  { width: 450px; }
 .max50 { max-width: 50px; }
 .h05   { height: 0.5px; }
 .h4    { height: 4px; }
 
--- a/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-002.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-002.html
@@ -18,18 +18,18 @@ body,html { color:black; background:whit
  border: 1px solid;
  width: 500px;
  align-items: start;
  justify-items: start;
 }
 span,img { min-height:0; overflow:hidden; }
 
 .c1 { border:2px solid;   min-width:auto; }
-.c3 { background: blue;   min-width:-moz-min-content; min-width:-webkit-min-content; }
-.c4 { background: lime;   min-width:-moz-max-content; min-width:-webkit-max-content; }
+.c3 { background: blue;   min-width:min-content; min-width:-webkit-min-content; }
+.c4 { background: lime;   min-width:max-content; min-width:-webkit-max-content; }
 .c5 { background: cyan;   min-width:-moz-available;   min-width:-webkit-fill-available; }
 .c6 { background: yellow; min-width:-moz-fit-content; min-width:-webkit-fit-content; }
 .w20   { width: 20px; }
 .w450  { width: 450px; }
 .max50 { max-width: 50px; }
 .h05   { height: 0.5px; }
 .h4    { height: 4px; }
 
--- a/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-003-ref.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-003-ref.html
@@ -26,41 +26,41 @@ span {
   min-height:0;
 }
 </style>
 </head>
 <body>
 
 <div class="grid">
   <span>a</span>
-  <span style="width:-moz-max-content">IAmReallyWideAndTheBorderShouldSurroundMe</span>
+  <span style="width:max-content">IAmReallyWideAndTheBorderShouldSurroundMe</span>
 </div>
 
 <pre>The border shouldn't shrink-wrap the wide text below, due to definite "width" values:</pre>
 <div class="grid">
   <span>a</span>
   <span style="width: 130%">IAmReallyWideButIHaveADefiniteWidthSoIOverflow</span>
   <span>c</span>
   <span style="width: 50px">SameHereeeeeeeeeeeeeeeeeeeeeeeeeeee</span>
   <span style="width: 20px">SameHereeeeeeeeeeeeeeeeeeeeeeeeeeee</span><span></span>
   <span style="width: 20px; grid-column:span 2;">SameHereeeeeeeeeeeeeeeeeeeeeeeeeeee</span>
 </div>
 
 <pre>Now the same tests for 'height':</pre>
 
 <div class="grid" style="margin-bottom:50px;">
   <span>a</span>
-  <span style="font-size:72px;width:-moz-max-content;height:-moz-max-content">IAmReallyTall</span>
+  <span style="font-size:72px;width:max-content;height:max-content">IAmReallyTall</span>
   <span>c</span>
   <span>d</span>
 </div>
 
 The border shouldn't shrink-wrap the text vertically below, due to definite "height" values:
 <div class="grid">
   <span>a</span>
-  <span style="font-size:72px; height:10%;width:-moz-max-content">IAmReallyTall</span>
+  <span style="font-size:72px; height:10%;width:max-content">IAmReallyTall</span>
   <span>c</span>
-  <span style="font-size:72px; height:10px;width:-moz-max-content">SameHere</span>
-  <span style="font-size:72px; height:40px;width:-moz-max-content">SameHere</span>
+  <span style="font-size:72px; height:10px;width:max-content">SameHere</span>
+  <span style="font-size:72px; height:40px;width:max-content">SameHere</span>
 </div>
 
 </body>
 </html>
--- a/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-004-ref.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-intrinsic-004-ref.html
@@ -35,41 +35,41 @@ pre {
   float: left;
 }
 </style>
 </head>
 <body>
 
 <div class="grid" style="margin-left:0">
   <span>a</span>
-  <span style="height:-moz-max-content">IAmReallyWideAndTheBorderShouldSurroundMe</span>
+  <span style="height:max-content">IAmReallyWideAndTheBorderShouldSurroundMe</span>
 </div>
 
 <pre>The border shouldn't shrink-wrap the wide text below, due to definite "height" values:</pre>
 <div class="grid">
   <span>a</span>
   <span style="height: 130%;">IAmReallyWideButIHaveADefiniteHeightSoIOverflow</span>
   <span>c</span>
   <span style="height: 50px">SameHereeeeeeeeeeeeeeeeeeeeeeeeeeee</span>
   <span style="height: 20px">SameHereeeeeeeeeeeeeeeeeeeeeeeeeeee</span><span></span>
   <span style="height: 20px; grid-column:span 2;">SameHereeeeeeeeeeeeeeeeeeeeeeeeeeee</span>
 </div>
 
 <pre>Now the same tests for 'width':</pre>
 
 <div class="grid" style="margin-bottom:50px;">
   <span>a</span>
-  <span style="font-size:72px;height:-moz-max-content;width:-moz-max-content">IAmReallyTall</span>
+  <span style="font-size:72px;height:max-content;width:max-content">IAmReallyTall</span>
   <span>c</span>
   <span>d</span>
 </div>
 
 <pre>The border shouldn't shrink-wrap the wide text below, due to definite "width" values:</pre>
 <div class="grid">
   <span>a</span>
-  <span style="font-size:72px; width:10%;height:-moz-max-content">IAmReallyTall</span>
+  <span style="font-size:72px; width:10%;height:max-content">IAmReallyTall</span>
   <span>c</span>
-  <span style="font-size:72px; width:10px;height:-moz-max-content">SameHere</span>
-  <span style="font-size:72px; width:40px;height:-moz-max-content">SameHere</span>
+  <span style="font-size:72px; width:10px;height:max-content">SameHere</span>
+  <span style="font-size:72px; width:40px;height:max-content">SameHere</span>
 </div>
 
 </body>
 </html>
--- a/layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-001.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-001.html
@@ -19,17 +19,16 @@ html,body { color:black; background-colo
   align-items: start;
   justify-items: start;
   margin-bottom: 1em;
 }
 
 .col { grid-template-columns:minmax(auto,0.0001fr); grid-auto-rows:10px; }
 .col img {
   min-height: 0;
-  min-width: -moz-min-content;
   min-width: -webkit-min-content;
   min-width: min-content;
 }
 
 br { clear:both; }
 
   </style>
 </head>
--- a/layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-002.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-002.html
@@ -19,17 +19,16 @@ html,body { color:black; background-colo
   align-items: start;
   justify-items: start;
   margin-bottom: 1em;
 }
 
 .col { grid-template-columns:minmax(auto,0.0001fr); grid-auto-rows:10px; }
 .col img {
   min-height: 0;
-  min-width: -moz-min-content;
   min-width: -webkit-min-content;
   min-width: min-content;
 }
 
 br { clear:both; }
 
   </style>
 </head>
--- a/layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-003.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-003.html
@@ -19,17 +19,16 @@ html,body { color:black; background-colo
   align-items: start;
   justify-items: start;
   margin-bottom: 1em;
 }
 
 .row { grid-template-rows:minmax(auto,0.0001fr); }
 .row img {
   min-width: 0;
-  min-height: -moz-min-content;
   min-height: -webkit-min-content;
   min-height: min-content;
 }
 
 br { clear:both; }
 
   </style>
 </head>
--- a/layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-004.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-min-content-min-size-004.html
@@ -20,17 +20,16 @@ body { overflow:hidden; }
   align-items: start;
   justify-items: start;
   margin-bottom: 1em;
 }
 
 .row { grid-template-rows:minmax(auto,0.0001fr); }
 .row img {
   min-width: 0;
-  min-height: -moz-min-content;
   min-height: -webkit-min-content;
   min-height: min-content;
 }
 
 br { clear:both; }
 
   </style>
 </head>
--- a/layout/reftests/css-grid/grid-container-baselines-003-ref.html
+++ b/layout/reftests/css-grid/grid-container-baselines-003-ref.html
@@ -99,17 +99,17 @@ A<div class="ib">
     <span class="a" style="display:block; padding-block-end:15px; height:1px">A<br>B</span>
   </div>
 </div><div class="ib" style="width:200px">
   <div class="ib vl" style="height:70px; width:196px;">
     <span class="a" style="display:block; padding-block-end:15px; width:148px; height:1px">A<br>B</span>
   </div>
 </div><div class="ib" style="width:200px;position:relative; top:-31px">
   <div class="ib vl" style="height:70px; width:196px;">
-    <span class="a" style="display:block; height:-moz-min-content; padding-block-end:15px; width:148px; height:-moz-min-content">A<br>B</span>
+    <span class="a" style="display:block; height:min-content; padding-block-end:15px; width:148px; height:min-content">A<br>B</span>
   </div>
 </div>
 
 <br>
 
 A<div class="igrid slb">
   <div class="igrid slb" style="grid: 7px 13px 100px / 36px 3px; grid-row: span 4;">
     <n></n>
--- a/layout/reftests/css-grid/grid-fragmentation-015-ref.html
+++ b/layout/reftests/css-grid/grid-fragmentation-015-ref.html
@@ -89,17 +89,17 @@ x { display:block; height:20px; }
 <span style="grid-row:span 2"><x></x></span>
 <span><x></x></span>
 <span><x></x></span>
 </div></div></div></div>
 
 <!-- grid wrapped in FIELDSET overflow:hidden block -->
 <div class="columns" style="height: 40px; margin-left:400px">
 <div style="padding-top:2px; background:grey">
-<div style="display:block; overflow:hidden; border:none; padding:0; margin:0; width:-moz-min-content">
+<div style="display:block; overflow:hidden; border:none; padding:0; margin:0; width:min-content">
 <div class="grid">
 <span style="grid-row:span 2"><x></x></span>
 <span><x></x></span>
 <span><x></x></span>
 </div></div></div></div>
 
 <!-- grid with orthogonal writing-mode to fragmentainer -->
 <div class="columns" style="height: 40px; margin-top:70px">
--- a/layout/reftests/css-grid/grid-item-auto-min-size-clamp-007.html
+++ b/layout/reftests/css-grid/grid-item-auto-min-size-clamp-007.html
@@ -39,43 +39,39 @@ y {
   position: absolute;
   grid-area: 2 / 1 / 3 / 2;
   top:0;left:0;right:0;
   height: 10px;
   background: lightgrey;
 }
 
 .min-content {
-  width: -moz-min-content;
   width: -webkit-min-content;
   width: min-content;
 }
 .max-content {
-  width: -moz-max-content;
   width: -webkit-max-content;
   width: max-content;
 }
 .fit-content {
   width: -moz-fit-content;
   width: -webkit-fit-content;
   width: fit-content;
 }
 .fill {
   width: -moz-available;
   width: -webkit-fill-available;
   width: fill;
 }
 
 .r .min-content {
-  height: -moz-min-content;
   height: -webkit-min-content;
   height: min-content;
 }
 .r .max-content {
-  height: -moz-max-content;
   height: -webkit-max-content;
   height: max-content;
 }
 .r .fit-content {
   height: -moz-fit-content;
   height: -webkit-fit-content;
   height: fit-content;
 }
--- a/layout/reftests/css-grid/grid-repeat-auto-fill-fit-010.html
+++ b/layout/reftests/css-grid/grid-repeat-auto-fill-fit-010.html
@@ -49,43 +49,39 @@ y {
   align-self: stretch;
   justify-self: stretch;
   min-width: 10px;
   min-height: 10px;
   background: grey;
 }
 
 .min-content {
-  min-width: -moz-min-content;
   min-width: -webkit-min-content;
   min-width: min-content;
 }
 .max-content {
-  min-width: -moz-max-content;
   min-width: -webkit-max-content;
   min-width: max-content;
 }
 .fill {
   min-width: -moz-available;
   min-width: -webkit-fill-available;
   min-width: fill;
 }
 .fit-content {
   min-width: -moz-fit-content;
   min-width: -webkit-fit-content;
   min-width: fit-content;
 }
 
 .rfill.min-content {
-  min-height: -moz-min-content;
   min-height: -webkit-min-content;
   min-height: min-content;
 }
 .rfill.max-content {
-  min-height: -moz-max-content;
   min-height: -webkit-max-content;
   min-height: max-content;
 }
 .rfill.fill {
   min-height: -moz-available;
   min-height: -webkit-fill-available;
   min-height: fill;
 }
--- a/layout/reftests/css-grid/grid-repeat-auto-fill-fit-011.html
+++ b/layout/reftests/css-grid/grid-repeat-auto-fill-fit-011.html
@@ -49,43 +49,39 @@ y {
   align-self: stretch;
   justify-self: stretch;
   min-width: 10px;
   min-height: 10px;
   background: grey;
 }
 
 .min-content {
-  min-width: -moz-min-content;
   min-width: -webkit-min-content;
   min-width: min-content;
 }
 .max-content {
-  min-width: -moz-max-content;
   min-width: -webkit-max-content;
   min-width: max-content;
 }
 .fill {
   min-width: -moz-available;
   min-width: -webkit-fill-available;
   min-width: fill;
 }
 .fit-content {
   min-width: -moz-fit-content;
   min-width: -webkit-fit-content;
   min-width: fit-content;
 }
 
 .rfill.min-content {
-  min-height: -moz-min-content;
   min-height: -webkit-min-content;
   min-height: min-content;
 }
 .rfill.max-content {
-  min-height: -moz-max-content;
   min-height: -webkit-max-content;
   min-height: max-content;
 }
 .rfill.fill {
   min-height: -moz-available;
   min-height: -webkit-fill-available;
   min-height: fill;
 }
--- a/layout/reftests/css-grid/grid-track-intrinsic-sizing-001-ref.html
+++ b/layout/reftests/css-grid/grid-track-intrinsic-sizing-001-ref.html
@@ -76,17 +76,17 @@ x { display:block; width:396px; border:2
   <td colspan="2"><x>1 2 3 4 5 6 7 8 9 0 1 2 3 4 5</x></td>
 </tr><tr>
   <td class="c2 h10"></td>
   <td class="c3 h10"></td>
 </tr></table>
 </div>
 <div class="grid t1">
 <table border="0" cellpadding="0" cellspacing="0"><tr>
-  <td colspan="2"><x style="width:-webkit-max-content;width:-moz-max-content;width:max-content">1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4</x></td>
+  <td colspan="2"><x style="width:-webkit-max-content;width:max-content">1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4</x></td>
 </tr><tr>
   <td class="c2">&nbsp;</td>
   <td class="c3">&nbsp;</td>
 </tr></table>
 </div>
 <div class="grid t2">
 <table border="0" cellpadding="0" cellspacing="0"><tr>
   <td colspan="2"><x style="width:auto">1 2 3 4 5&nbsp;</x></td>
--- a/layout/reftests/css-ruby/intrinsic-isize-1-ref.html
+++ b/layout/reftests/css-ruby/intrinsic-isize-1-ref.html
@@ -9,41 +9,41 @@
       border: 1px solid black;
     }
     span {
       white-space: nowrap;
     }
   </style>
 </head>
 <body>
-  <div style="width: -moz-min-content">
+  <div style="width: min-content">
     <span>ABC</span><span>DEF</span>
   </div>
-  <div style="width: -moz-max-content">
+  <div style="width: max-content">
     <span>ABC</span><span>DEF</span>
   </div>
   <br>
 
-  <div style="width: -moz-min-content">
+  <div style="width: min-content">
     XYZ<span>ABC</span><span>DEF</span>XYZ
   </div>
-  <div style="width: -moz-max-content">
+  <div style="width: max-content">
     XYZ<span>ABC</span><span>DEF</span>XYZ
   </div>
   <br>
 
-  <div style="width: -moz-min-content">
+  <div style="width: min-content">
     <span>あい</span><span>うえ</span>
   </div>
-  <div style="width: -moz-max-content">
+  <div style="width: max-content">
     <span>あい</span><span>うえ</span>
   </div>
   <br>
 
-  <div style="width: -moz-min-content">
+  <div style="width: min-content">
     お<span>あい</span><span>うえ</span>お
   </div>
-  <div style="width: -moz-max-content">
+  <div style="width: max-content">
     お<span>あい</span><span>うえ</span>お
   </div>
   <br>
 </body>
 </html>
--- a/layout/reftests/css-ruby/intrinsic-isize-1.html
+++ b/layout/reftests/css-ruby/intrinsic-isize-1.html
@@ -6,41 +6,41 @@
   <style>
     div {
       display: inline-block;
       border: 1px solid black;
     }
   </style>
 </head>
 <body>
-  <div style="width: -moz-min-content">
+  <div style="width: min-content">
     <ruby><rb>ABC<rb>DEF</ruby>
   </div>
-  <div style="width: -moz-max-content">
+  <div style="width: max-content">
     <ruby><rb>ABC<rb>DEF</ruby>
   </div>
   <br>
 
-  <div style="width: -moz-min-content">
+  <div style="width: min-content">
     XYZ<ruby><rb>ABC<rb>DEF</ruby>XYZ
   </div>
-  <div style="width: -moz-max-content">
+  <div style="width: max-content">
     XYZ<ruby><rb>ABC<rb>DEF</ruby>XYZ
   </div>
   <br>
 
-  <div style="width: -moz-min-content">
+  <div style="width: min-content">
     <ruby><rb>あい<rb>うえ</ruby>
   </div>
-  <div style="width: -moz-max-content">
+  <div style="width: max-content">
     <ruby><rb>あい<rb>うえ</ruby>
   </div>
   <br>
 
-  <div style="width: -moz-min-content">
+  <div style="width: min-content">
     お<ruby><rb>あい<rb>うえ</ruby>お
   </div>
-  <div style="width: -moz-max-content">
+  <div style="width: max-content">
     お<ruby><rb>あい<rb>うえ</ruby>お
   </div>
   <br>
 </body>
 </html>
--- a/layout/reftests/flexbox/flexbox-empty-1-ref.xhtml
+++ b/layout/reftests/flexbox/flexbox-empty-1-ref.xhtml
@@ -16,23 +16,23 @@
         padding: 2px 3px 4px 5px;
       }
     </style>
   </head>
   <body>
     <div class="flexbox"/>
     <div class="flexbox" style="width: 5px"/>
     <div class="flexbox" style="width: -moz-available"/>
-    <div class="flexbox" style="width: -moz-max-content"/>
-    <div class="flexbox" style="width: -moz-min-content"/>
+    <div class="flexbox" style="width: max-content"/>
+    <div class="flexbox" style="width: min-content"/>
     <div class="flexbox" style="height: 6px"/>
     <div class="flexbox" style="width: 7px; height: 8px"/>
 
     <!-- now with padding -->
     <div class="flexbox withPadding"/>
     <div class="flexbox withPadding" style="width: 5px"/>
     <div class="flexbox withPadding" style="width: -moz-available"/>
-    <div class="flexbox withPadding" style="width: -moz-max-content"/>
-    <div class="flexbox withPadding" style="width: -moz-min-content"/>
+    <div class="flexbox withPadding" style="width: max-content"/>
+    <div class="flexbox withPadding" style="width: min-content"/>
     <div class="flexbox withPadding" style="height: 6px"/>
     <div class="flexbox withPadding" style="width: 7px; height: 8px"/>
   </body>
 </html>
--- a/layout/reftests/flexbox/flexbox-empty-1a.xhtml
+++ b/layout/reftests/flexbox/flexbox-empty-1a.xhtml
@@ -17,23 +17,23 @@
         padding: 2px 3px 4px 5px;
       }
     </style>
   </head>
   <body>
     <div class="flexbox"/>
     <div class="flexbox" style="width: 5px"/>
     <div class="flexbox" style="width: -moz-available"/>
-    <div class="flexbox" style="width: -moz-max-content"/>
-    <div class="flexbox" style="width: -moz-min-content"/>
+    <div class="flexbox" style="width: max-content"/>
+    <div class="flexbox" style="width: min-content"/>
     <div class="flexbox" style="height: 6px"/>
     <div class="flexbox" style="width: 7px; height: 8px"/>
 
     <!-- now with padding -->
     <div class="flexbox withPadding"/>
     <div class="flexbox withPadding" style="width: 5px"/>
     <div class="flexbox withPadding" style="width: -moz-available"/>
-    <div class="flexbox withPadding" style="width: -moz-max-content"/>
-    <div class="flexbox withPadding" style="width: -moz-min-content"/>
+    <div class="flexbox withPadding" style="width: max-content"/>
+    <div class="flexbox withPadding" style="width: min-content"/>
     <div class="flexbox withPadding" style="height: 6px"/>
     <div class="flexbox withPadding" style="width: 7px; height: 8px"/>
   </body>
 </html>
--- a/layout/reftests/flexbox/flexbox-empty-1b.xhtml
+++ b/layout/reftests/flexbox/flexbox-empty-1b.xhtml
@@ -23,23 +23,23 @@
         padding: 2px 3px 4px 5px;
       }
     </style>
   </head>
   <body>
     <div class="flexbox">  </div>
     <div class="flexbox" style="width: 5px"> </div>
     <div class="flexbox" style="width: -moz-available"> </div>
-    <div class="flexbox" style="width: -moz-max-content"> </div>
-    <div class="flexbox" style="width: -moz-min-content"> </div>
+    <div class="flexbox" style="width: max-content"> </div>
+    <div class="flexbox" style="width: min-content"> </div>
     <div class="flexbox" style="height: 6px"> </div>
     <div class="flexbox" style="width: 7px; height: 8px"> </div>
 
     <!-- now with padding -->
     <div class="flexbox withPadding"> </div>
     <div class="flexbox withPadding" style="width: 5px"> </div>
     <div class="flexbox withPadding" style="width: -moz-available"> </div>
-    <div class="flexbox withPadding" style="width: -moz-max-content"> </div>
-    <div class="flexbox withPadding" style="width: -moz-min-content"> </div>
+    <div class="flexbox withPadding" style="width: max-content"> </div>
+    <div class="flexbox withPadding" style="width: min-content"> </div>
     <div class="flexbox withPadding" style="height: 6px"> </div>
     <div class="flexbox withPadding" style="width: 7px; height: 8px"> </div>
   </body>
 </html>
--- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1-ref.xhtml
+++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1-ref.xhtml
@@ -20,20 +20,20 @@
         border: 1px dashed black;
       }
 
       div.a { background: lightgreen; }
       div.b { background: lightblue;  }
 
       <!-- helper-classes for assigning pref / min / auto-width to our divs -->
       div.prefWidth {
-        width: -moz-max-content;
+        width: max-content;
       }
       div.minWidth {
-        width: -moz-min-content;
+        width: min-content;
       }
       div.autoWidth {
         width: auto;
       }
   </style>
 </head>
 <body>
   <!-- both auto width -->
--- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1a.xhtml
+++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1a.xhtml
@@ -31,20 +31,20 @@
 
       div.a, div.b { display: flex; }
 
       div.a { background: lightgreen; }
       div.b { background: lightblue;  }
 
       <!-- helper-classes for assigning pref / min / auto-width to our divs -->
       div.prefWidth {
-        width: -moz-max-content;
+        width: max-content;
       }
       div.minWidth {
-        width: -moz-min-content;
+        width: min-content;
       }
       div.autoWidth {
         width: auto;
       }
   </style>
 </head>
 <body>
   <!-- both auto width -->
--- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1b.xhtml
+++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1b.xhtml
@@ -31,20 +31,20 @@
 
       div.a, div.b { display: flex; }
 
       div.a { background: lightgreen; }
       div.b { background: lightblue;  }
 
       <!-- helper-classes for assigning pref / min / auto-width to our divs -->
       div.prefWidth {
-        width: -moz-max-content;
+        width: max-content;
       }
       div.minWidth {
-        width: -moz-min-content;
+        width: min-content;
       }
       div.autoWidth {
         width: auto;
       }
   </style>
 </head>
 <body>
   <!-- both auto width -->
--- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2-ref.xhtml
+++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2-ref.xhtml
@@ -8,17 +8,17 @@
      flex items in a flex container.
 -->
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <style>
       body { margin: 0; }
 
       div.flexbox {
-        width: -moz-max-content;
+        width: max-content;
         /* We give the flex container a border and background so we can easily
          * see how large it is. */
         border: 2px dotted black;
         background: lime;
 
         font-size: 0; /* to prevent whitespace from having an effect */
       }
 
--- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2a.xhtml
+++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2a.xhtml
@@ -8,17 +8,17 @@
      preferred sizes.
 -->
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <style>
       body { margin: 0; }
       div.flexbox {
         display: flex;
-        width: -moz-max-content;
+        width: max-content;
 
         /* We give the flexbox a border and background so we can easily see how
          * large it is. */
         border: 2px dotted black;
         background: lime;
       }
 
       div.imgWrapper {
--- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2b.xhtml
+++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2b.xhtml
@@ -9,17 +9,17 @@
 -->
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <style>
       body { margin: 0; }
 
       div.flexbox {
         display: flex;
-        width: -moz-max-content;
+        width: max-content;
 
         /* We give the flex container a border and background so we can easily
          * see how large it is. */
         border: 2px dotted black;
         background: lime;
       }
 
       div.wrapper {
--- a/layout/reftests/flexbox/flexbox-table-flex-items-4.html
+++ b/layout/reftests/flexbox/flexbox-table-flex-items-4.html
@@ -15,17 +15,16 @@
       display: flex;
       flex-wrap: wrap;
       width: 300px;
       border: 1px solid black;
       font: 12px monospace;
       margin-bottom: 5px;
     }
     .forceMaxContent > * {
-      width: -moz-max-content;
       width: max-content;
     }
     .container > * {
       display: flex;
       padding: 5px 10px;
     }
     table {
       width: 100%;
--- a/layout/reftests/flexbox/flexbox-table-flex-items-5.html
+++ b/layout/reftests/flexbox/flexbox-table-flex-items-5.html
@@ -13,17 +13,16 @@
   <style>
     .container {
       display: flex;
       width: 300px;
       border: 1px solid black;
       margin-bottom: 5px;
     }
     .forceMaxContent > * {
-      width: -moz-max-content;
       width: max-content;
     }
     .container > * {
       margin: 5px;
     }
     table {
       width: 100%;
       height: 30px;
--- a/layout/reftests/flexbox/flexbox-widget-flex-items-2-ref.html
+++ b/layout/reftests/flexbox/flexbox-widget-flex-items-2-ref.html
@@ -13,17 +13,17 @@
       margin-bottom: 10px;
     }
     div.flexbox > * {
       min-width: 350px;
       outline: 1px dashed black;
       margin: 0;
       vertical-align: top;
       display: block;
-      width: -moz-max-content;
+      width: max-content;
     }
   </style>
 </head>
 <body>
   <div class="flexbox"><input type="button"></div>
   <div class="flexbox"><input type="checkbox"></div>
   <div class="flexbox"><input type="file"></div>
   <div class="flexbox"><input type="image"></div>
--- a/layout/reftests/flexbox/reftest.list
+++ b/layout/reftests/flexbox/reftest.list
@@ -1,12 +1,12 @@
 # NOTE: Most of our flexbox tests have moved to the w3c-css reftest directory.
 # The tests that remain in *this* directory are still here because either:
 #   a) They (or one of their closely-related tests) use some moz-prefixed
-#      feature, e.g. MozReftestInvalidate or -moz-max-content.
+#      feature, e.g. MozReftestInvalidate.
 # ...or...
 #   b) They test a feature that has known bugs (e.g. bug 874713)
 #
 # Where possible & practical, we should try to address these so we can migrate
 # tests over to the w3c-css directory, so that they can become part of the
 # W3C's test suite.
 
 # SUBDIRECTORY: Reftests for paginated flex containers
--- a/layout/reftests/font-face/disable-sheet-4.html
+++ b/layout/reftests/font-face/disable-sheet-4.html
@@ -33,12 +33,12 @@
 
 		document.getElementsByTagName("style")[0].disabled = true;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="restore-size-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="restore-size-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/disable-sheet-5.html
+++ b/layout/reftests/font-face/disable-sheet-5.html
@@ -33,12 +33,12 @@
 
 		document.getElementsByTagName("style")[1].disabled = true;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/enable-sheet-1.html
+++ b/layout/reftests/font-face/enable-sheet-1.html
@@ -27,12 +27,12 @@
 
 		document.getElementsByTagName("style")[0].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/enable-sheet-2.html
+++ b/layout/reftests/font-face/enable-sheet-2.html
@@ -36,12 +36,12 @@
 
 		document.getElementsByTagName("style")[0].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/enable-sheet-3.html
+++ b/layout/reftests/font-face/enable-sheet-3.html
@@ -36,12 +36,12 @@
 
 		document.getElementsByTagName("style")[1].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/enable-sheet-4.html
+++ b/layout/reftests/font-face/enable-sheet-4.html
@@ -35,12 +35,12 @@
 
 		document.getElementsByTagName("style")[0].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="restore-size-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="restore-size-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/enable-sheet-5.html
+++ b/layout/reftests/font-face/enable-sheet-5.html
@@ -35,12 +35,12 @@
 
 		document.getElementsByTagName("style")[1].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/enable-sheet-6.html
+++ b/layout/reftests/font-face/enable-sheet-6.html
@@ -35,12 +35,12 @@
 
 		document.getElementsByTagName("style")[0].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/enable-sheet-7.html
+++ b/layout/reftests/font-face/enable-sheet-7.html
@@ -35,12 +35,12 @@
 
 		document.getElementsByTagName("style")[1].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/insert-rule-1a.html
+++ b/layout/reftests/font-face/insert-rule-1a.html
@@ -19,12 +19,12 @@
 		var sheet = document.getElementsByTagName("style")[0].sheet;
 		sheet.insertRule("@font-face { font-family: 'MarkA'; src: url(../fonts/markA.ttf); }", sheet.cssRules.length);
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/insert-rule-1b.html
+++ b/layout/reftests/font-face/insert-rule-1b.html
@@ -19,12 +19,12 @@
 		var sheet = document.getElementsByTagName("style")[0].sheet;
 		sheet.insertRule("@font-face { font-family: 'MarkB'; src: url(../fonts/markB.ttf); }", 0);
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/media-query-inner-1.html
+++ b/layout/reftests/font-face/media-query-inner-1.html
@@ -23,12 +23,12 @@
 		// The resize-detector iframe will remove the class attribute.
 		document.getElementsByTagName("iframe")[0].contentWindow.arm();
 	}
 
 	</script>
 </head>
 <body>
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/sheet-set-switch-1.html
+++ b/layout/reftests/font-face/sheet-set-switch-1.html
@@ -38,12 +38,12 @@
 
 		document.selectedStyleSheetSet = "Set B";
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">ABC<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/underline-offset-change-1-ref.html
+++ b/layout/reftests/font-face/underline-offset-change-1-ref.html
@@ -14,12 +14,12 @@
 	body { font-family: "Mark2AHighUnderline"; }
 
 	p { text-decoration: underline; border: blue solid; padding: 0.2em; }
 
 	</style>
 </head>
 <body>
 
-<p style="position:relative; width: -moz-max-content">A</p>
+<p style="position:relative; width: max-content">A</p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/underline-offset-change-1.html
+++ b/layout/reftests/font-face/underline-offset-change-1.html
@@ -34,12 +34,12 @@
 
 		document.getElementsByTagName("style")[0].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">A<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">A<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/underline-offset-change-2-ref.html
+++ b/layout/reftests/font-face/underline-offset-change-2-ref.html
@@ -14,12 +14,12 @@
 	body { font-family: "Mark2ALowUnderline"; }
 
 	p { text-decoration: underline; border: blue solid; padding: 0.2em; }
 
 	</style>
 </head>
 <body>
 
-<p style="position:relative; width: -moz-max-content">A</p>
+<p style="position:relative; width: max-content">A</p>
 
 </body>
 </html>
--- a/layout/reftests/font-face/underline-offset-change-2.html
+++ b/layout/reftests/font-face/underline-offset-change-2.html
@@ -34,12 +34,12 @@
 
 		document.getElementsByTagName("style")[0].disabled = false;
 	}
 
 	</script>
 </head>
 <body onload="setTimeout(run, 20)">
 
-<p style="position:relative; width: -moz-max-content">A<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
+<p style="position:relative; width: max-content">A<iframe style="visibility:hidden;position:absolute;height:100%;width:100%" src="resize-detector-iframe.html"></iframe></p>
 
 </body>
 </html>
--- a/layout/reftests/font-inflation/intrinsic-max-1.html
+++ b/layout/reftests/font-inflation/intrinsic-max-1.html
@@ -2,17 +2,17 @@
 <style>
 @font-face { font-family: Ahem; src: url(../fonts/Ahem.ttf); }
 html, body { margin: 0; padding: 0; }
 body { width: 450px }
 p {
   margin: 0;
   background: yellow;
   color: blue;
-  width: -moz-max-content; /* computes to 300px */
+  width: max-content; /* computes to 300px */
   font: 12px Ahem;
 }
 </style>
 <!--
 In a 300px container, the minimum font size at 15em per line is 20px.
 This means we map 0px-30px into 20px-30px, so 12px gets mapped to 24px.
 -->
 <p>This is tiny bit of text.</p>
--- a/layout/reftests/font-inflation/intrinsic-min-1.html
+++ b/layout/reftests/font-inflation/intrinsic-min-1.html
@@ -2,13 +2,13 @@
 <style>
 @font-face { font-family: Ahem; src: url(../fonts/Ahem.ttf); }
 html, body { margin: 0; padding: 0; }
 body { width: 450px }
 p {
   margin: 0;
   background: yellow;
   color: blue;
-  width: -moz-min-content; /* computes to 60px */
+  width: min-content; /* computes to 60px */
   font: 12px Ahem;
 }
 </style>
 <p>This is some text.</p>
--- a/layout/reftests/image/image-resize-percent-width.html
+++ b/layout/reftests/image/image-resize-percent-width.html
@@ -7,9 +7,9 @@ function run() {
   img.onload = imgload;
   img.src = "blue-50x50.png";
 }
 function imgload() {
   document.documentElement.classList.remove("reftest-wait");
 }
 </script>
 <body onload="run()">
-<div style="width: -moz-max-content"><img src="blue-100x50.png" style="width: 100%; height: 50px"></div>
+<div style="width: max-content"><img src="blue-100x50.png" style="width: 100%; height: 50px"></div>
--- a/layout/reftests/list-item/bullet-intrinsic-isize-1.html
+++ b/layout/reftests/list-item/bullet-intrinsic-isize-1.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <html lang="en">
 <head>
   <meta charset="UTF-8">
   <title>Bug 1142369</title>
 </head>
 <body>
-  <li style="width: -moz-max-content; list-style: inside;">blahblah and foobarboo</li>
+  <li style="width: max-content; list-style: inside;">blahblah and foobarboo</li>
 </body>
 </html>
--- a/layout/reftests/pagination/table-nested-1308876-1-ref.html
+++ b/layout/reftests/pagination/table-nested-1308876-1-ref.html
@@ -3,18 +3,18 @@
 <!--
 This reference matches our current rendering, which isn't necessarily
 correct, but I'd at least like to know about it if it changes, given how
 little test coverage of this we currently have.
 -->
 <style>
 html, body { margin: 0; padding: 0; }
 </style>
-<div id="page1" style="border: 2px solid black; background: yellow; height: 2in; box-sizing: border-box; padding: 3px; width: -moz-min-content">
+<div id="page1" style="border: 2px solid black; background: yellow; height: 2in; box-sizing: border-box; padding: 3px; width: min-content">
   <div style="background: orange; height: calc(2in - 16px); padding: 3px;">
     <div style="background: brown; color: black;padding: 1px;">A</div>
   </div>
 </div>
-<div id="page2" style="border: 2px solid black; background: yellow; height: 2in; box-sizing: border-box; padding: 3px; border-bottom: none; padding-bottom: 0; width: -moz-min-content">
+<div id="page2" style="border: 2px solid black; background: yellow; height: 2in; box-sizing: border-box; padding: 3px; border-bottom: none; padding-bottom: 0; width: min-content">
   <div style="background: orange; height: calc(2in - 8px); padding: 3px 3px 0 3px">
     <div style="border: 1px solid fuchsia; background: aqua; height: calc(2in - 9px); border-bottom: none; color: transparent">A</div>
   </div>
 </div>
--- a/layout/reftests/text/444656.html
+++ b/layout/reftests/text/444656.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <html>
  <head>
   <meta http-equiv="content-type" content="text/html; charset=UTF-8">
   <title>Test soft hyphen in rtl text</title>
   <style>
-   div { width: -moz-min-content; position: relative; }
+   div { width: min-content; position: relative; }
 
    /*prevent the soft hyphens from contributing to the minimum content width*/
    div > p:nth-child(2) {
     position: absolute;
     top: auto;
     right: 0;
     margin-top: 0;
     width: 100%;
--- a/layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003-ref.html
+++ b/layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003-ref.html
@@ -20,20 +20,20 @@
   .col-gap-ref {
     column-gap: 5px;
   }
   .flexBaselineCheck {
     display: flex;
     align-items: baseline;
   }
   .min {
-    width: -moz-min-content;
+    width: min-content;
   }
   .max {
-    width: -moz-max-content;
+    width: max-content;
   }
   </style>
 </head>
 <body>
   <div class="flexBaselineCheck">
     outside before
     <div class="basic" style="max-height:0px">
       <div class="innerContents">inner</div>
--- a/layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003.html
+++ b/layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003.html
@@ -24,20 +24,20 @@
   .col-gap {
     column-gap: 5px;
   }
   .flexBaselineCheck {
     display: flex;
     align-items: baseline;
   }
   .min {
-    width: -moz-min-content;
+    width: min-content;
   }
   .max {
-    width: -moz-max-content;
+    width: max-content;
   }
   </style>
 </head>
 <body>
   <!-- This test verifies that contain:size doesn't interfere with the
        determination of a multicol element's baseline. -->
   <div class="flexBaselineCheck">
     outside before
--- a/layout/reftests/writing-mode/1216747-1-ref.html
+++ b/layout/reftests/writing-mode/1216747-1-ref.html
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML>
 <style>
 
 div {
-  width: -moz-min-content;
+  width: min-content;
 }
 
 </style>
 
 <div>This should have min-content width (i.e., many line breaks).</div>
--- a/layout/reftests/writing-mode/1216747-1.html
+++ b/layout/reftests/writing-mode/1216747-1.html
@@ -1,13 +1,13 @@
 <!DOCTYPE HTML>
 <style>
 
 div {
-  width: -moz-min-content;
+  width: min-content;
 }
 
 </style>
 
 <!-- If you delete this div, the bug goes away, because we don't cache
      vertical-specific data in the rule tree.  -->
 <div style="writing-mode: vertical-rl"></div>
 
--- a/layout/reftests/writing-mode/1302389-scrolled-rect-1-ref.html
+++ b/layout/reftests/writing-mode/1302389-scrolled-rect-1-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <body>
 <div style="height: 300px;
-            width: -moz-min-content;
+            width: min-content;
             font-size: 0;
             line-height: 0;
             border: 1px solid gray;
             overflow: scroll;">
   <div style="height: 100%;
               width: 100px;
               border: 50px solid blue;">
--- a/layout/reftests/writing-mode/1302389-scrolled-rect-2-ref.html
+++ b/layout/reftests/writing-mode/1302389-scrolled-rect-2-ref.html
@@ -1,16 +1,16 @@
 <!DOCTYPE html>
 <script>
 function scroll() {
   document.getElementsByTagName("div")[0].scrollTop = 200;
 }
 </script>
 <body onload="scroll()">
 <div style="height: 300px;
-            width: -moz-min-content;
+            width: min-content;
             font-size: 0;
             line-height: 0;
             border: 1px solid gray;
             overflow: scroll;">
   <div style="height: 100%;
               width: 100px;
               border: 50px solid blue;">
--- a/layout/reftests/writing-mode/tables/table-caption-left-1-ref.html
+++ b/layout/reftests/writing-mode/tables/table-caption-left-1-ref.html
@@ -30,36 +30,36 @@ body > div {
   font-size: 12px;
   vertical-align: top;
 }
 </style>
 </head>
 <body>
 
 <div class="h">
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content">table caption</div>
   <div class="t" style="display: inline-block"></div>
 </div>
 
 <div class="h">
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content">table caption</div>
   <div class="t" style="display: inline-block"></div>
 </div>
 
 <div class="vlr">
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content; vertical-align: bottom">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content; vertical-align: bottom">table caption</div>
   <div class="t" style="display: inline-block"></div>
 </div>
 
 <div class="vlr">
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content; vertical-align: bottom">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content; vertical-align: bottom">table caption</div>
   <div class="t" style="display: inline-block"></div>
 </div>
 
 <div class="vrl">
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content; vertical-align: top">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content; vertical-align: top">table caption</div>
   <div class="t" style="display: inline-block"></div>
 </div>
 
 <div class="vrl">
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content; vertical-align: top">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content; vertical-align: top">table caption</div>
   <div class="t" style="display: inline-block"></div>
 </div>
--- a/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html
+++ b/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html
@@ -31,35 +31,35 @@ body > div {
   vertical-align: top;
 }
 </style>
 </head>
 <body>
 
 <div class="h">
   <div class="t" style="display: inline-block"></div>
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content">table caption</div>
 </div>
 
 <div class="h">
   <div class="t" style="display: inline-block"></div>
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content">table caption</div>
 </div>
 
 <div class="vlr">
   <div class="t" style="display: inline-block"></div>
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content; vertical-align: bottom">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content; vertical-align: bottom">table caption</div>
 </div>
 
 <div class="vlr">
   <div class="t" style="display: inline-block"></div>
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content; vertical-align: bottom">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content; vertical-align: bottom">table caption</div>
 </div>
 
 <div class="vrl">
   <div class="t" style="display: inline-block"></div>
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content; vertical-align: top">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content; vertical-align: top">table caption</div>
 </div>
 
 <div class="vrl">
   <div class="t" style="display: inline-block"></div>
-  <div class="c" style="display: inline-block; inline-size: -moz-min-content; vertical-align: top">table caption</div>
+  <div class="c" style="display: inline-block; inline-size: min-content; vertical-align: top">table caption</div>
 </div>
--- a/layout/style/crashtests/1401256.html
+++ b/layout/style/crashtests/1401256.html
@@ -1,5 +1,5 @@
 <script>
   let o1 = document.createElement('p');
   document.documentElement.appendChild(o1);
-  o1.animate({'minWidth':['-moz-max-content']});
-</script>
\ No newline at end of file
+  o1.animate({'minWidth':['max-content']});
+</script>
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -47,19 +47,17 @@ CSS_KEY(-moz-grab, _moz_grab)
 CSS_KEY(-moz-grid-group, _moz_grid_group)
 CSS_KEY(-moz-grid-line, _moz_grid_line)
 CSS_KEY(-moz-grid, _moz_grid)
 CSS_KEY(-moz-groupbox, _moz_groupbox)
 CSS_KEY(-moz-inline-box, _moz_inline_box)
 CSS_KEY(-moz-inline-grid, _moz_inline_grid)
 CSS_KEY(-moz-inline-stack, _moz_inline_stack)
 CSS_KEY(-moz-left, _moz_left)
-CSS_KEY(-moz-max-content, _moz_max_content)
 CSS_KEY(-moz-middle-with-baseline, _moz_middle_with_baseline)
-CSS_KEY(-moz-min-content, _moz_min_content)
 CSS_KEY(-moz-none, _moz_none)
 CSS_KEY(-moz-popup, _moz_popup)
 CSS_KEY(-moz-right, _moz_right)
 CSS_KEY(-moz-stack, _moz_stack)
 CSS_KEY(-moz-zoom-in, _moz_zoom_in)
 CSS_KEY(-moz-zoom-out, _moz_zoom_out)
 CSS_KEY(-webkit-box, _webkit_box)
 CSS_KEY(-webkit-flex, _webkit_flex)
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -415,26 +415,26 @@ const KTableEntry nsCSSProps::kVerticalA
     {eCSSKeyword_middle, NS_STYLE_VERTICAL_ALIGN_MIDDLE},
     {eCSSKeyword__moz_middle_with_baseline,
      NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE},
     {eCSSKeyword_bottom, NS_STYLE_VERTICAL_ALIGN_BOTTOM},
     {eCSSKeyword_text_bottom, NS_STYLE_VERTICAL_ALIGN_TEXT_BOTTOM},
     {eCSSKeyword_UNKNOWN, -1}};
 
 const KTableEntry nsCSSProps::kWidthKTable[] = {
-    {eCSSKeyword__moz_max_content, NS_STYLE_WIDTH_MAX_CONTENT},
-    {eCSSKeyword__moz_min_content, NS_STYLE_WIDTH_MIN_CONTENT},
+    {eCSSKeyword_max_content, NS_STYLE_WIDTH_MAX_CONTENT},
+    {eCSSKeyword_min_content, NS_STYLE_WIDTH_MIN_CONTENT},
     {eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT},
     {eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE},
     {eCSSKeyword_UNKNOWN, -1}};
 
 // This must be the same as kWidthKTable, but just with 'content' added:
 const KTableEntry nsCSSProps::kFlexBasisKTable[] = {
-    {eCSSKeyword__moz_max_content, NS_STYLE_WIDTH_MAX_CONTENT},
-    {eCSSKeyword__moz_min_content, NS_STYLE_WIDTH_MIN_CONTENT},
+    {eCSSKeyword_max_content, NS_STYLE_WIDTH_MAX_CONTENT},
+    {eCSSKeyword_min_content, NS_STYLE_WIDTH_MIN_CONTENT},
     {eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT},
     {eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE},
     {eCSSKeyword_content, NS_STYLE_FLEX_BASIS_CONTENT},
     {eCSSKeyword_UNKNOWN, -1}};
 static_assert(ArrayLength(nsCSSProps::kFlexBasisKTable) ==
                   ArrayLength(nsCSSProps::kWidthKTable) + 1,
               "kFlexBasisKTable should have the same entries as "
               "kWidthKTable, plus one more for 'content'");
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -513,19 +513,19 @@ enum class StyleGridTrackBreadth : uint8
 #define NS_MATHML_MATHVARIANT_STRETCHED 18
 
 // See nsStyleFont::mMathDisplay
 #define NS_MATHML_DISPLAYSTYLE_INLINE 0
 #define NS_MATHML_DISPLAYSTYLE_BLOCK 1
 
 // See nsStylePosition::mWidth, mMinWidth, mMaxWidth
 #define NS_STYLE_WIDTH_MAX_CONTENT \
-  ((uint8_t)mozilla::StyleExtremumLength::MozMaxContent)
+  ((uint8_t)mozilla::StyleExtremumLength::MaxContent)
 #define NS_STYLE_WIDTH_MIN_CONTENT \
-  ((uint8_t)mozilla::StyleExtremumLength::MozMinContent)
+  ((uint8_t)mozilla::StyleExtremumLength::MinContent)
 #define NS_STYLE_WIDTH_FIT_CONTENT \
   ((uint8_t)mozilla::StyleExtremumLength::MozFitContent)
 #define NS_STYLE_WIDTH_AVAILABLE \
   ((uint8_t)mozilla::StyleExtremumLength::MozAvailable)
 // The 'content' keyword is only valid for 'flex-basis' (not for 'width').  But
 // aside from that, the 'flex-basis' property accepts exactly the same values
 // as 'width'. So I'm listing this one 'flex-basis'-specific enumerated value
 // alongside the 'width' ones, to be sure we don't accidentally overload this
--- a/layout/style/res/forms.css
+++ b/layout/style/res/forms.css
@@ -68,17 +68,17 @@ fieldset {
   display: block;
   margin-inline-start: 2px;
   margin-inline-end: 2px;
   padding-block-start: 0.35em;
   padding-block-end: 0.625em;
   padding-inline-start: 0.75em;
   padding-inline-end: 0.75em;
   border: 2px groove ThreeDLightShadow;
-  min-inline-size: -moz-min-content;
+  min-inline-size: min-content;
 }
 
 label {
   cursor: default;
 }
 
 /* default inputs, text inputs, and selects */
 
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -3735,17 +3735,19 @@ var gCSSProperties = {
     domProp: "height",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     /* FIXME: test zero, and test calc clamping */
     initial_values: [ " auto" ],
     /* computed value tests for height test more with display:block */
     prerequisites: { "display": "block" },
     other_values: [ "15px", "3em", "15%",
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "max-content", "min-content", "-moz-fit-content", "-moz-available",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: [ "none" ],
     quirks_values: { "5": "5px" },
@@ -3988,17 +3990,19 @@ var gCSSProperties = {
   },
   "max-height": {
     domProp: "maxHeight",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     prerequisites: { "display": "block" },
     initial_values: [ "none" ],
     other_values: [ "30px", "50%", "0",
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "max-content", "min-content", "-moz-fit-content", "-moz-available",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       "calc(2px)",
       "calc(-2px)",
       "calc(0px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
@@ -4010,17 +4014,19 @@ var gCSSProperties = {
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     prerequisites: { "display": "block" },
     initial_values: [ "none" ],
     other_values: [ "30px", "50%", "0",
       // these four keywords compute to the initial value only when the
       // writing mode is vertical, and we're testing with a horizontal
       // writing mode
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "max-content", "min-content", "-moz-fit-content", "-moz-available",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       "calc(2px)",
       "calc(-2px)",
       "calc(0px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
@@ -4029,17 +4035,19 @@ var gCSSProperties = {
   },
   "min-height": {
     domProp: "minHeight",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     prerequisites: { "display": "block" },
     initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)" ],
     other_values: [ "30px", "50%",
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "max-content", "min-content", "-moz-fit-content", "-moz-available",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       "calc(-1%)",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: ["none"],
@@ -4050,17 +4058,19 @@ var gCSSProperties = {
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     prerequisites: { "display": "block" },
     initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)" ],
     other_values: [ "30px", "50%",
       // these four keywords compute to the initial value only when the
       // writing mode is vertical, and we're testing with a horizontal
       // writing mode
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "max-content", "min-content", "-moz-fit-content", "-moz-available",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       "calc(-1%)",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: [ "none" ],
@@ -4733,17 +4743,19 @@ var gCSSProperties = {
       "margin-left": "5px",
     },
     initial_values: [ " auto" ],
     /* XXX these have prerequisites */
     other_values: [ "15px", "3em", "15%",
       // these three keywords compute to the initial value only when the
       // writing mode is vertical, and we're testing with a horizontal
       // writing mode
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content",
+      "max-content", "min-content", "-moz-fit-content",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       // whether -moz-available computes to the initial value depends on
       // the container size, and for the container size we're testing
       // with, it does
       // "-moz-available",
       "3e1px", "3e+1px", "3e0px", "3e+0px", "3e-0px", "3e-1px",
       "3.2e1px", "3.2e+1px", "3.2e0px", "3.2e+0px", "3.2e-0px", "3.2e-1px",
       "3e1%", "3e+1%", "3e0%", "3e+0%", "3e-0%", "3e-1%",
       "3.2e1%", "3.2e+1%", "3.2e0%", "3.2e+0%", "3.2e-0%", "3.2e-1%",
@@ -5532,21 +5544,21 @@ var gCSSProperties = {
       "1.2 3.4",
       "0 0 0",
       "0 0 0px",
       "0px 0 0",
       "5px 0 0",
       "2 auto",
       "auto 4",
       "auto 5.6 7.8",
-      "-moz-max-content",
-      "1 -moz-max-content",
-      "1 2 -moz-max-content",
-      "-moz-max-content 1",
-      "-moz-max-content 1 2",
+      "max-content",
+      "1 max-content",
+      "1 2 max-content",
+      "max-content 1",
+      "max-content 1 2",
       "-0"
     ],
     invalid_values: [
       "1 2px 3",
       "1 auto 3",
       "1px 2 3px",
       "1px 2 3 4px",
       "-1",
@@ -5561,17 +5573,20 @@ var gCSSProperties = {
     initial_values: [ " auto" ],
         // NOTE: Besides "content", this is cribbed directly from the "width"
         // chunk, since this property takes the exact same values as width
         // (plus 'content' & with different semantics on 'auto').
         // XXXdholbert (Maybe these should get separated out into
         // a reusable array defined at the top of this file?)
     other_values: [
       "content",
-      "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "15px", "3em", "15%",
+      "max-content", "min-content",
+      "-moz-max-content", "-moz-min-content",
+      "-moz-fit-content", "-moz-available",
       // valid calc() values
       "calc(-2px)",
       "calc(2px)",
       "calc(50%)",
       "calc(50% + 2px)",
       "calc( 50% + 2px)",
       "calc(50% + 2px )",
       "calc( 50% + 2px )",
@@ -5923,17 +5938,17 @@ var gCSSProperties = {
     prerequisites: { "display": "block" },
     other_values: [ "15px", "3em", "15%",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
-    invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ],
+    invalid_values: [ "none", "max-content", "min-content", "-moz-fit-content", "-moz-available" ],
   },
   "border-block-end-color": {
     domProp: "borderBlockEndColor",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     applies_to_first_letter: true,
     logical: true,
     initial_values: [ "currentColor" ],
@@ -6096,17 +6111,19 @@ var gCSSProperties = {
       // add some margin to avoid the initial "auto" value getting
       // resolved to the same length as the parent element.
       "margin-left": "5px",
     },
     other_values: [ "15px", "3em", "15%",
       // these three keywords compute to the initial value only when the
       // writing mode is vertical, and we're testing with a horizontal
       // writing mode
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content",
+      "max-content", "min-content", "-moz-fit-content",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       // whether -moz-available computes to the initial value depends on
       // the container size, and for the container size we're testing
       // with, it does
       // "-moz-available",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
@@ -6176,31 +6193,33 @@ var gCSSProperties = {
     initial_values: [ "none" ],
     other_values: [ "30px", "50%",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
-    invalid_values: [ "auto", "5", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
+    invalid_values: [ "auto", "5", "max-content", "min-content", "-moz-fit-content", "-moz-available" ]
   },
   "max-inline-size": {
     domProp: "maxInlineSize",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     logical: true,
     axis: true,
     prerequisites: { "display": "block" },
     initial_values: [ "none" ],
     other_values: [ "30px", "50%",
       // these four keywords compute to the initial value only when the
       // writing mode is vertical, and we're testing with a horizontal
       // writing mode
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "max-content", "min-content", "-moz-fit-content", "-moz-available",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: [ "auto", "5" ]
   },
@@ -6215,31 +6234,33 @@ var gCSSProperties = {
     other_values: [ "30px", "50%",
       "calc(-1%)",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
-    invalid_values: [ "none", "5", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ]
+    invalid_values: [ "none", "5", "max-content", "min-content", "-moz-fit-content", "-moz-available" ]
   },
   "min-inline-size": {
     domProp: "minInlineSize",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     logical: true,
     axis: true,
     prerequisites: { "display": "block" },
     initial_values: [ "auto", "0", "calc(0em)", "calc(-2px)" ],
     other_values: [ "30px", "50%",
       // these four keywords compute to the initial value only when the
       // writing mode is vertical, and we're testing with a horizontal
       // writing mode
-      "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
+      "max-content", "min-content", "-moz-fit-content", "-moz-available",
+      // these two keywords are the aliases of above first two.
+      "-moz-max-content", "-moz-min-content",
       "calc(-1%)",
       "calc(2px)",
       "calc(50%)",
       "calc(3*25px)",
       "calc(25px*3)",
       "calc(3*25px + 50%)",
     ],
     invalid_values: [ "none", "5" ]
--- a/layout/style/test/test_box_size_keywords.html
+++ b/layout/style/test/test_box_size_keywords.html
@@ -44,121 +44,121 @@
   <div id=vertical><span class=small></span><span class=big></span><span class=big></span><span class=big></span></div>
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 1122253 and Bug 1496558 **/
 
-// Test that the -moz-available, -moz-min-content, -moz-max-content, and
+// Test that the -moz-available, min-content, max-content, and
 // -moz-fit-content keywords are usable only on width, when the writing
 // mode is horizontal, or height, when the writing mode is vertical,
 // and that they are always available on inline-size and never on
 // block-size.  When used on the wrong properties, they should be
 // equivalent to unset.
 //
 // Also test the corresponding min-* and max-* properties.
 
 var gTests = [
   { orientation: "horizontal", property: "width", specified_value: "-moz-available", computed_value: "200px", },
-  { orientation: "horizontal", property: "width", specified_value: "-moz-min-content", computed_value: "90px", },
-  { orientation: "horizontal", property: "width", specified_value: "-moz-max-content", computed_value: "280px", },
+  { orientation: "horizontal", property: "width", specified_value: "min-content", computed_value: "90px", },
+  { orientation: "horizontal", property: "width", specified_value: "max-content", computed_value: "280px", },
   { orientation: "horizontal", property: "width", specified_value: "-moz-fit-content", computed_value: "200px", },
   { orientation: "horizontal", property: "inline-size", specified_value: "-moz-available", computed_value: "200px", },
-  { orientation: "horizontal", property: "inline-size", specified_value: "-moz-min-content", computed_value: "90px", },
-  { orientation: "horizontal", property: "inline-size", specified_value: "-moz-max-content", computed_value: "280px", },
+  { orientation: "horizontal", property: "inline-size", specified_value: "min-content", computed_value: "90px", },
+  { orientation: "horizontal", property: "inline-size", specified_value: "max-content", computed_value: "280px", },
   { orientation: "horizontal", property: "inline-size", specified_value: "-moz-fit-content", computed_value: "200px", },
   { orientation: "horizontal", property: "min-width", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "horizontal", property: "min-width", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "horizontal", property: "min-width", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "horizontal", property: "min-width", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "horizontal", property: "min-width", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "horizontal", property: "min-width", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "horizontal", property: "min-inline-size", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "horizontal", property: "min-inline-size", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "horizontal", property: "min-inline-size", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "horizontal", property: "min-inline-size", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "horizontal", property: "min-inline-size", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "horizontal", property: "min-inline-size", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "horizontal", property: "max-width", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "horizontal", property: "max-width", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "horizontal", property: "max-width", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "horizontal", property: "max-width", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "horizontal", property: "max-width", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "horizontal", property: "max-width", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "horizontal", property: "max-inline-size", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "horizontal", property: "max-inline-size", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "horizontal", property: "max-inline-size", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "horizontal", property: "max-inline-size", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "horizontal", property: "max-inline-size", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "horizontal", property: "max-inline-size", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "vertical", property: "height", specified_value: "-moz-available", computed_value: "200px", },
-  { orientation: "vertical", property: "height", specified_value: "-moz-min-content", computed_value: "90px", },
-  { orientation: "vertical", property: "height", specified_value: "-moz-max-content", computed_value: "280px", },
+  { orientation: "vertical", property: "height", specified_value: "min-content", computed_value: "90px", },
+  { orientation: "vertical", property: "height", specified_value: "max-content", computed_value: "280px", },
   { orientation: "vertical", property: "height", specified_value: "-moz-fit-content", computed_value: "200px", },
   { orientation: "vertical", property: "inline-size", specified_value: "-moz-available", computed_value: "200px", },
-  { orientation: "vertical", property: "inline-size", specified_value: "-moz-min-content", computed_value: "90px", },
-  { orientation: "vertical", property: "inline-size", specified_value: "-moz-max-content", computed_value: "280px", },
+  { orientation: "vertical", property: "inline-size", specified_value: "min-content", computed_value: "90px", },
+  { orientation: "vertical", property: "inline-size", specified_value: "max-content", computed_value: "280px", },
   { orientation: "vertical", property: "inline-size", specified_value: "-moz-fit-content", computed_value: "200px", },
   { orientation: "vertical", property: "min-height", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "vertical", property: "min-height", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "vertical", property: "min-height", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "vertical", property: "min-height", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "vertical", property: "min-height", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "vertical", property: "min-height", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "vertical", property: "min-inline-size", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "vertical", property: "min-inline-size", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "vertical", property: "min-inline-size", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "vertical", property: "min-inline-size", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "vertical", property: "min-inline-size", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "vertical", property: "min-inline-size", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "vertical", property: "max-height", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "vertical", property: "max-height", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "vertical", property: "max-height", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "vertical", property: "max-height", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "vertical", property: "max-height", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "vertical", property: "max-height", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "vertical", property: "max-inline-size", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "vertical", property: "max-inline-size", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "vertical", property: "max-inline-size", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "vertical", property: "max-inline-size", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "vertical", property: "max-inline-size", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "vertical", property: "max-inline-size", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "vertical", prerequisites: "width: 30px; ", property: "width", specified_value: "-moz-available", computed_value: "20px", },
-  { orientation: "vertical", prerequisites: "width: 30px; ", property: "width", specified_value: "-moz-min-content", computed_value: "20px", },
-  { orientation: "vertical", prerequisites: "width: 30px; ", property: "width", specified_value: "-moz-max-content", computed_value: "20px", },
+  { orientation: "vertical", prerequisites: "width: 30px; ", property: "width", specified_value: "min-content", computed_value: "20px", },
+  { orientation: "vertical", prerequisites: "width: 30px; ", property: "width", specified_value: "max-content", computed_value: "20px", },
   { orientation: "vertical", prerequisites: "width: 30px; ", property: "width", specified_value: "-moz-fit-content", computed_value: "20px", },
   { orientation: "vertical", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "-moz-available", computed_value: "30px", },
-  { orientation: "vertical", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "-moz-min-content", computed_value: "30px", },
-  { orientation: "vertical", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "-moz-max-content", computed_value: "30px", },
+  { orientation: "vertical", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "min-content", computed_value: "30px", },
+  { orientation: "vertical", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "max-content", computed_value: "30px", },
   { orientation: "vertical", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "-moz-fit-content", computed_value: "30px", },
   { orientation: "vertical", prerequisites: "min-width: 30px; ", property: "min-width", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "vertical", prerequisites: "min-width: 30px; ", property: "min-width", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "vertical", prerequisites: "min-width: 30px; ", property: "min-width", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "vertical", prerequisites: "min-width: 30px; ", property: "min-width", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "vertical", prerequisites: "min-width: 30px; ", property: "min-width", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "vertical", prerequisites: "min-width: 30px; ", property: "min-width", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "vertical", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "-moz-available", computed_value: "30px", },
-  { orientation: "vertical", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "-moz-min-content", computed_value: "30px", },
-  { orientation: "vertical", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "-moz-max-content", computed_value: "30px", },
+  { orientation: "vertical", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "min-content", computed_value: "30px", },
+  { orientation: "vertical", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "max-content", computed_value: "30px", },
   { orientation: "vertical", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "-moz-fit-content", computed_value: "30px", },
   { orientation: "vertical", prerequisites: "max-width: 30px; ", property: "max-width", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "vertical", prerequisites: "max-width: 30px; ", property: "max-width", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "vertical", prerequisites: "max-width: 30px; ", property: "max-width", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "vertical", prerequisites: "max-width: 30px; ", property: "max-width", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "vertical", prerequisites: "max-width: 30px; ", property: "max-width", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "vertical", prerequisites: "max-width: 30px; ", property: "max-width", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "vertical", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "-moz-available", computed_value: "30px", },
-  { orientation: "vertical", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "-moz-min-content", computed_value: "30px", },
-  { orientation: "vertical", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "-moz-max-content", computed_value: "30px", },
+  { orientation: "vertical", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "min-content", computed_value: "30px", },
+  { orientation: "vertical", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "max-content", computed_value: "30px", },
   { orientation: "vertical", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "-moz-fit-content", computed_value: "30px", },
   { orientation: "horizontal", prerequisites: "height: 30px; ", property: "height", specified_value: "-moz-available", computed_value: "20px", },
-  { orientation: "horizontal", prerequisites: "height: 30px; ", property: "height", specified_value: "-moz-min-content", computed_value: "20px", },
-  { orientation: "horizontal", prerequisites: "height: 30px; ", property: "height", specified_value: "-moz-max-content", computed_value: "20px", },
+  { orientation: "horizontal", prerequisites: "height: 30px; ", property: "height", specified_value: "min-content", computed_value: "20px", },
+  { orientation: "horizontal", prerequisites: "height: 30px; ", property: "height", specified_value: "max-content", computed_value: "20px", },
   { orientation: "horizontal", prerequisites: "height: 30px; ", property: "height", specified_value: "-moz-fit-content", computed_value: "20px", },
   { orientation: "horizontal", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "-moz-available", computed_value: "30px", },
-  { orientation: "horizontal", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "-moz-min-content", computed_value: "30px", },
-  { orientation: "horizontal", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "-moz-max-content", computed_value: "30px", },
+  { orientation: "horizontal", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "min-content", computed_value: "30px", },
+  { orientation: "horizontal", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "max-content", computed_value: "30px", },
   { orientation: "horizontal", prerequisites: "block-size: 30px; ", property: "block-size", specified_value: "-moz-fit-content", computed_value: "30px", },
   { orientation: "horizontal", prerequisites: "min-height: 30px; ", property: "min-height", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "horizontal", prerequisites: "min-height: 30px; ", property: "min-height", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "horizontal", prerequisites: "min-height: 30px; ", property: "min-height", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "horizontal", prerequisites: "min-height: 30px; ", property: "min-height", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "horizontal", prerequisites: "min-height: 30px; ", property: "min-height", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "horizontal", prerequisites: "min-height: 30px; ", property: "min-height", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "horizontal", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "-moz-available", computed_value: "30px", },
-  { orientation: "horizontal", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "-moz-min-content", computed_value: "30px", },
-  { orientation: "horizontal", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "-moz-max-content", computed_value: "30px", },
+  { orientation: "horizontal", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "min-content", computed_value: "30px", },
+  { orientation: "horizontal", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "max-content", computed_value: "30px", },
   { orientation: "horizontal", prerequisites: "min-block-size: 30px; ", property: "min-block-size", specified_value: "-moz-fit-content", computed_value: "30px", },
   { orientation: "horizontal", prerequisites: "max-height: 30px; ", property: "max-height", specified_value: "-moz-available", computed_value: "-moz-available", },
-  { orientation: "horizontal", prerequisites: "max-height: 30px; ", property: "max-height", specified_value: "-moz-min-content", computed_value: "-moz-min-content", },
-  { orientation: "horizontal", prerequisites: "max-height: 30px; ", property: "max-height", specified_value: "-moz-max-content", computed_value: "-moz-max-content", },
+  { orientation: "horizontal", prerequisites: "max-height: 30px; ", property: "max-height", specified_value: "min-content", computed_value: "min-content", },
+  { orientation: "horizontal", prerequisites: "max-height: 30px; ", property: "max-height", specified_value: "max-content", computed_value: "max-content", },
   { orientation: "horizontal", prerequisites: "max-height: 30px; ", property: "max-height", specified_value: "-moz-fit-content", computed_value: "-moz-fit-content", },
   { orientation: "horizontal", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "-moz-available", computed_value: "30px", },
-  { orientation: "horizontal", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "-moz-min-content", computed_value: "30px", },
-  { orientation: "horizontal", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "-moz-max-content", computed_value: "30px", },
+  { orientation: "horizontal", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "min-content", computed_value: "30px", },
+  { orientation: "horizontal", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "max-content", computed_value: "30px", },
   { orientation: "horizontal", prerequisites: "max-block-size: 30px; ", property: "max-block-size", specified_value: "-moz-fit-content", computed_value: "30px", },
 ];
 
 gTests.forEach(function(t) {
   var e = document.getElementById(t.orientation);
   e.style = (t.prerequisites || "") + t.property + ": " + t.specified_value;
   is(get_computed_value(getComputedStyle(e), t.property), t.computed_value,
      `${t.orientation} ${t.property}:${t.specified_value}`);
--- a/layout/style/test/test_value_computation.html
+++ b/layout/style/test/test_value_computation.html
@@ -90,17 +90,17 @@ function xfail_value(property, value, is
 
 var gSwapInitialWhenHaveFrame = {
   // When there's a frame, '-moz-available' works out to the same as
   // 'auto' given the prerequisites of only 'display: block'.
   "width": [ "-moz-available" ],
   // When there's a frame, these keywords works out to the same as the initial
   // value, i.e. `auto`, given the prerequisites of only 'display: block'.
   "height": [ "-moz-max-content", "-moz-min-content", "-moz-fit-content",
-              "-moz-available" ],
+              "-moz-available", "max-content", "min-content" ],
 };
 
 function swap_when_frame(property, value) {
   return (property in gSwapInitialWhenHaveFrame) &&
          gSwapInitialWhenHaveFrame[property].includes(value);
 }
 
 var gDisplayTree = document.getElementById("display");
--- a/layout/tables/BasicTableLayoutStrategy.cpp
+++ b/layout/tables/BasicTableLayoutStrategy.cpp
@@ -165,18 +165,17 @@ static CellISizeInfo GetISizeInfo(gfxCon
     }
   }
 
   nsStyleCoord maxISize(stylePos->MaxISize(aWM));
   if (maxISize.GetUnit() == eStyleUnit_Enumerated) {
     if (!aIsCell || maxISize.GetIntValue() == NS_STYLE_WIDTH_AVAILABLE) {
       maxISize.SetNoneValue();
     } else if (maxISize.GetIntValue() == NS_STYLE_WIDTH_FIT_CONTENT) {
-      // for 'max-inline-size', '-moz-fit-content' is like
-      // '-moz-max-content'
+      // for 'max-inline-size', '-moz-fit-content' is like 'max-content'
       maxISize.SetIntValue(NS_STYLE_WIDTH_MAX_CONTENT, eStyleUnit_Enumerated);
     }
   }
   unit = maxISize.GetUnit();
   // XXX To really implement 'max-inline-size' well, we'd need to store
   // it separately on the columns.
   if (maxISize.ConvertsToLength() || unit == eStyleUnit_Enumerated) {
     nscoord c = aFrame->ComputeISizeValue(aRenderingContext, 0, 0, 0, maxISize);
@@ -190,18 +189,17 @@ static CellISizeInfo GetISizeInfo(gfxCon
   }
   // treat calc() with percentages on max-inline-size just like 'none'.
 
   nsStyleCoord minISize(stylePos->MinISize(aWM));
   if (minISize.GetUnit() == eStyleUnit_Enumerated) {
     if (!aIsCell || minISize.GetIntValue() == NS_STYLE_WIDTH_AVAILABLE) {
       minISize.SetCoordValue(0);
     } else if (minISize.GetIntValue() == NS_STYLE_WIDTH_FIT_CONTENT) {
-      // for 'min-inline-size', '-moz-fit-content' is like
-      // '-moz-min-content'
+      // for 'min-inline-size', '-moz-fit-content' is like 'min-content'
       minISize.SetIntValue(NS_STYLE_WIDTH_MIN_CONTENT, eStyleUnit_Enumerated);
     }
   }
   unit = minISize.GetUnit();
   if (minISize.ConvertsToLength() || unit == eStyleUnit_Enumerated) {
     nscoord c = aFrame->ComputeISizeValue(aRenderingContext, 0, 0, 0, minISize);
     minCoord = std::max(c, minCoord);
     prefCoord = std::max(c, prefCoord);
--- a/layout/tables/crashtests/420242-1.xhtml
+++ b/layout/tables/crashtests/420242-1.xhtml
@@ -1,4 +1,4 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head></head>
-<body style="width: -moz-max-content;"><table><div style="margin: 100%;"></div></table></body>
+<body style="width: max-content;"><table><div style="margin: 100%;"></div></table></body>
 </html>
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -3909,17 +3909,17 @@ nscoord nsTableFrame::CalcBorderBoxBSize
   bSize = std::max(0, bSize);
 
   return bSize;
 }
 
 bool nsTableFrame::IsAutoLayout() {
   if (StyleTable()->mLayoutStrategy == NS_STYLE_TABLE_LAYOUT_AUTO) return true;
   // a fixed-layout inline-table must have a inline size
-  // and tables with inline size set to '-moz-max-content' must be
+  // and tables with inline size set to 'max-content' must be
   // auto-layout (at least as long as
   // FixedTableLayoutStrategy::GetPrefISize returns nscoord_MAX)
   const nsStyleCoord& iSize = StylePosition()->ISize(GetWritingMode());
   return (iSize.GetUnit() == eStyleUnit_Auto) ||
          (iSize.GetUnit() == eStyleUnit_Enumerated &&
           iSize.GetIntValue() == NS_STYLE_WIDTH_MAX_CONTENT);
 }
 
--- a/layout/xul/crashtests/430356-1.xhtml
+++ b/layout/xul/crashtests/430356-1.xhtml
@@ -1,5 +1,5 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <body style="visibility: collapse;">
-<tabpanels xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="width: -moz-max-content;"></tabpanels>
+<tabpanels xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="width: max-content;"></tabpanels>
 </body>
 </html>
--- a/servo/components/style/values/computed/length.rs
+++ b/servo/components/style/values/computed/length.rs
@@ -980,18 +980,20 @@ pub type NonNegativeLengthOrPercentageOr
     Parse,
     PartialEq,
     SpecifiedValueInfo,
     ToComputedValue,
     ToCss,
 )]
 #[repr(u8)]
 pub enum ExtremumLength {
-    MozMaxContent,
-    MozMinContent,
+    #[parse(aliases = "-moz-max-content")]
+    MaxContent,
+    #[parse(aliases = "-moz-min-content")]
+    MinContent,
     MozFitContent,
     MozAvailable,
 }
 
 /// A computed value for `min-width`, `min-height`, `width` or `height` property.
 pub type MozLength = GenericMozLength<LengthOrPercentageOrAuto>;
 
 impl MozLength {
--- a/testing/web-platform/meta/css/css-box/parsing/height-valid.html.ini
+++ b/testing/web-platform/meta/css/css-box/parsing/height-valid.html.ini
@@ -1,10 +1,4 @@
 [height-valid.html]
-  [e.style['height'\] = "min-content" should set the property value]
-    expected: FAIL
-
-  [e.style['height'\] = "max-content" should set the property value]
-    expected: FAIL
-
   [e.style['height'\] = "fit-content" should set the property value]
     expected: FAIL
 
--- a/testing/web-platform/meta/css/css-box/parsing/max-height-valid.html.ini
+++ b/testing/web-platform/meta/css/css-box/parsing/max-height-valid.html.ini
@@ -1,10 +1,4 @@
 [max-height-valid.html]
-  [e.style['max-height'\] = "min-content" should set the property value]
-    expected: FAIL
-
-  [e.style['max-height'\] = "max-content" should set the property value]
-    expected: FAIL
-
   [e.style['max-height'\] = "fit-content" should set the property value]
     expected: FAIL
 
--- a/testing/web-platform/meta/css/css-box/parsing/max-width-valid.html.ini
+++ b/testing/web-platform/meta/css/css-box/parsing/max-width-valid.html.ini
@@ -1,10 +1,4 @@
 [max-width-valid.html]
-  [e.style['max-width'\] = "min-content" should set the property value]
-    expected: FAIL
-
-  [e.style['max-width'\] = "max-content" should set the property value]
-    expected: FAIL
-
   [e.style['max-width'\] = "fit-content" should set the property value]
     expected: FAIL
 
--- a/testing/web-platform/meta/css/css-box/parsing/min-height-valid.html.ini
+++ b/testing/web-platform/meta/css/css-box/parsing/min-height-valid.html.ini
@@ -1,10 +1,4 @@
 [min-height-valid.html]
-  [e.style['min-height'\] = "min-content" should set the property value]
-    expected: FAIL
-
-  [e.style['min-height'\] = "max-content" should set the property value]
-    expected: FAIL
-
   [e.style['min-height'\] = "fit-content" should set the property value]
     expected: FAIL
 
--- a/testing/web-platform/meta/css/css-box/parsing/min-width-valid.html.ini
+++ b/testing/web-platform/meta/css/css-box/parsing/min-width-valid.html.ini
@@ -1,10 +1,4 @@
 [min-width-valid.html]
-  [e.style['min-width'\] = "min-content" should set the property value]
-    expected: FAIL
-
-  [e.style['min-width'\] = "max-content" should set the property value]
-    expected: FAIL
-
   [e.style['min-width'\] = "fit-content" should set the property value]
     expected: FAIL
 
--- a/testing/web-platform/meta/css/css-box/parsing/width-valid.html.ini
+++ b/testing/web-platform/meta/css/css-box/parsing/width-valid.html.ini
@@ -1,10 +1,4 @@
 [width-valid.html]
-  [e.style['width'\] = "min-content" should set the property value]
-    expected: FAIL
-
-  [e.style['width'\] = "max-content" should set the property value]
-    expected: FAIL
-
   [e.style['width'\] = "fit-content" should set the property value]
     expected: FAIL
 
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-grid/grid-model/grid-container-sizing-constraints-001.html.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-[grid-container-sizing-constraints-001.html]
-  [.grid 2]
-    expected: FAIL
-
-  [.grid 4]
-    expected: FAIL
-
-  [.grid 7]
-    expected: FAIL
-
-  [.grid 9]
-    expected: FAIL
-
-  [.grid 12]
-    expected: FAIL
-
-  [.grid 14]
-    expected: FAIL
-
--- a/testing/web-platform/meta/css/css-tables/fixed-layout-2.html.ini
+++ b/testing/web-platform/meta/css/css-tables/fixed-layout-2.html.ini
@@ -1,7 +1,9 @@
 [fixed-layout-2.html]
   [Table-layout:fixed reports it is not applied when width is auto]
     expected: FAIL
 
   [Table-layout:fixed reports it is not applied when width is max-content]
     expected: FAIL
 
+  [Table-layout:fixed is not applied when width is min-content]
+    expected: FAIL
--- a/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/sync-tests.sh
+++ b/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/sync-tests.sh
@@ -18,11 +18,11 @@ if [ -e "$MOZTREE/.git" ]
 then
   MOZREV="$(cd "$MOZTREE" && git cinnabar git2hg HEAD)"
 else
   MOZREV="$(cd "$MOZTREE" && hg par --temp='{node}')"
 fi
 
 rsync -avz --delete --filter=". ./sync-tests-filter" "$MOZTREE"/layout/reftests/w3c-css/submitted/ ./
 sed -i -e 's/^\(\(fails\|needs-focus\|random\|skip\|asserts\|slow\|require-or\|silentfail\|pref\|test-pref\|ref-pref\|fuzzy\)[^ ]* *\?\)\+//;/^default-preferences /d;s/ \?# \?\(TC: \)\?[bB]ug.*//' $(find . -name reftest.list)
-sed -i -e 's/-moz-crisp-edges/pixelated/g;s/-moz-min-content/min-content/g;s/-moz-max-content/max-content/g' $(find . -regex ".*\.\(xht\|xhtml\|html\|css\)")
+sed -i -e 's/-moz-crisp-edges/pixelated/g' $(find . -regex ".*\.\(xht\|xhtml\|html\|css\)")
 git add -A .
 git commit -m"Sync Mozilla CSS tests as of https://hg.mozilla.org/mozilla-central/rev/$MOZREV ." -e .
--- a/view/crashtests/507563-1.html
+++ b/view/crashtests/507563-1.html
@@ -1,1 +1,1 @@
-<html style="-moz-transform:rotate(5deg);width:-moz-max-content"><div style="letter-spacing:-4.59pt;overflow:auto;white-space:pre;text-shadow:-125396in -1in blue;-moz-column-count:15;text-indent:4.64%;direction:rtl">
+<html style="-moz-transform:rotate(5deg);width:max-content"><div style="letter-spacing:-4.59pt;overflow:auto;white-space:pre;text-shadow:-125396in -1in blue;-moz-column-count:15;text-indent:4.64%;direction:rtl">
--- a/widget/cocoa/crashtests/435223-1.html
+++ b/widget/cocoa/crashtests/435223-1.html
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
 <head>
 </head>
 <body>
-<div style="min-width: -moz-max-content;"><div style="-moz-appearance: button;"><div style="margin: 0 100%;"></div></div></div>
+<div style="min-width: max-content;"><div style="-moz-appearance: button;"><div style="margin: 0 100%;"></div></div></div>
 </body>
 </html>