From c35f47093e99d1ca21ca432284d9b56fa015cb3b Mon Sep 17 00:00:00 2001 From: Boris Chiou Date: Tue, 18 Dec 2018 18:47:37 +0000 Subject: [PATCH] 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 --HG-- extra : moz-landing-system : lando --- browser/base/content/browser.css | 2 +- .../themes/shared/syncedtabs/sidebar.inc.css | 2 +- .../shared/css/generated/properties-db.js | 32 ++++++ gfx/tests/crashtests/423110-1.xhtml | 2 +- layout/base/crashtests/1461812.html | 2 +- layout/base/crashtests/591075-1.html | 2 +- layout/base/nsLayoutUtils.cpp | 8 +- layout/generic/crashtests/398181-1.html | 2 +- layout/generic/crashtests/398181-2.html | 2 +- layout/generic/crashtests/477928.html | 2 +- layout/generic/crashtests/571995.xhtml | 2 +- layout/generic/crashtests/646983-1.html | 2 +- layout/generic/crashtests/650499-1.html | 2 +- layout/generic/crashtests/791601.xhtml | 2 +- layout/generic/crashtests/798235-1.html | 2 +- layout/reftests/bidi/bidi-006-j.html | 2 +- layout/reftests/bidi/bidi-006.html | 2 +- .../reftests/box-properties/box-sizing-1.html | 8 +- .../reftests/box-properties/box-sizing-2.html | 8 +- .../reftests/box-properties/box-sizing-3.html | 8 +- .../reftests/box-properties/box-sizing-4.html | 8 +- ...th-special-values-block-intrinsic-ref.html | 2 +- ...-width-special-values-block-intrinsic.html | 18 ++-- ...th-special-values-block-intrinsic-ref.html | 2 +- .../width-special-values-block-intrinsic.html | 10 +- .../width-special-values-block-ref.html | 2 +- .../width-special-values-block.html | 6 +- .../width-special-values-cell-auto-ref.html | 2 +- .../width-special-values-cell-auto.html | 42 ++++---- .../width-special-values-cell-fixed-ref.html | 2 +- .../width-special-values-cell-fixed.html | 22 ++--- .../width-special-values-float-intrinsic.html | 10 +- .../width-special-values-float.html | 6 +- .../width-special-values-image-block-ref.html | 2 +- .../width-special-values-image-block.html | 6 +- .../width-special-values-image-ref.html | 2 +- .../width-special-values-image.html | 6 +- ...rid-auto-min-sizing-intrinsic-001-ref.html | 4 +- .../grid-auto-min-sizing-intrinsic-001.html | 4 +- ...rid-auto-min-sizing-intrinsic-002-ref.html | 4 +- .../grid-auto-min-sizing-intrinsic-002.html | 4 +- ...rid-auto-min-sizing-intrinsic-003-ref.html | 10 +- ...rid-auto-min-sizing-intrinsic-004-ref.html | 10 +- ...o-min-sizing-min-content-min-size-001.html | 1 - ...o-min-sizing-min-content-min-size-002.html | 1 - ...o-min-sizing-min-content-min-size-003.html | 1 - ...o-min-sizing-min-content-min-size-004.html | 1 - .../grid-container-baselines-003-ref.html | 2 +- .../css-grid/grid-fragmentation-015-ref.html | 2 +- .../grid-item-auto-min-size-clamp-007.html | 4 - .../grid-repeat-auto-fill-fit-010.html | 4 - .../grid-repeat-auto-fill-fit-011.html | 4 - .../grid-track-intrinsic-sizing-001-ref.html | 2 +- .../css-ruby/intrinsic-isize-1-ref.html | 16 +-- .../reftests/css-ruby/intrinsic-isize-1.html | 16 +-- .../flexbox/flexbox-empty-1-ref.xhtml | 8 +- .../reftests/flexbox/flexbox-empty-1a.xhtml | 8 +- .../reftests/flexbox/flexbox-empty-1b.xhtml | 8 +- ...flexbox-intrinsic-sizing-horiz-1-ref.xhtml | 4 +- .../flexbox-intrinsic-sizing-horiz-1a.xhtml | 4 +- .../flexbox-intrinsic-sizing-horiz-1b.xhtml | 4 +- ...flexbox-intrinsic-sizing-horiz-2-ref.xhtml | 2 +- .../flexbox-intrinsic-sizing-horiz-2a.xhtml | 2 +- .../flexbox-intrinsic-sizing-horiz-2b.xhtml | 2 +- .../flexbox/flexbox-table-flex-items-4.html | 1 - .../flexbox/flexbox-table-flex-items-5.html | 1 - .../flexbox-widget-flex-items-2-ref.html | 2 +- layout/reftests/flexbox/reftest.list | 2 +- .../reftests/font-face/disable-sheet-4.html | 2 +- .../reftests/font-face/disable-sheet-5.html | 2 +- layout/reftests/font-face/enable-sheet-1.html | 2 +- layout/reftests/font-face/enable-sheet-2.html | 2 +- layout/reftests/font-face/enable-sheet-3.html | 2 +- layout/reftests/font-face/enable-sheet-4.html | 2 +- layout/reftests/font-face/enable-sheet-5.html | 2 +- layout/reftests/font-face/enable-sheet-6.html | 2 +- layout/reftests/font-face/enable-sheet-7.html | 2 +- layout/reftests/font-face/insert-rule-1a.html | 2 +- layout/reftests/font-face/insert-rule-1b.html | 2 +- .../font-face/media-query-inner-1.html | 2 +- .../font-face/sheet-set-switch-1.html | 2 +- .../underline-offset-change-1-ref.html | 2 +- .../font-face/underline-offset-change-1.html | 2 +- .../underline-offset-change-2-ref.html | 2 +- .../font-face/underline-offset-change-2.html | 2 +- .../font-inflation/intrinsic-max-1.html | 2 +- .../font-inflation/intrinsic-min-1.html | 2 +- .../image/image-resize-percent-width.html | 2 +- .../list-item/bullet-intrinsic-isize-1.html | 2 +- .../table-nested-1308876-1-ref.html | 4 +- layout/reftests/text/444656.html | 2 +- .../contain-size-multicol-003-ref.html | 4 +- .../contain/contain-size-multicol-003.html | 4 +- .../reftests/writing-mode/1216747-1-ref.html | 2 +- layout/reftests/writing-mode/1216747-1.html | 2 +- .../1302389-scrolled-rect-1-ref.html | 2 +- .../1302389-scrolled-rect-2-ref.html | 2 +- .../tables/table-caption-left-1-ref.html | 12 +-- .../tables/table-caption-right-1-ref.html | 12 +-- layout/style/crashtests/1401256.html | 4 +- layout/style/nsCSSKeywordList.h | 2 - layout/style/nsCSSProps.cpp | 8 +- layout/style/nsStyleConsts.h | 4 +- layout/style/res/forms.css | 2 +- layout/style/test/property_database.js | 57 +++++++---- layout/style/test/test_box_size_keywords.html | 98 +++++++++---------- layout/style/test/test_value_computation.html | 2 +- layout/tables/BasicTableLayoutStrategy.cpp | 6 +- layout/tables/crashtests/420242-1.xhtml | 2 +- layout/tables/nsTableFrame.cpp | 2 +- layout/xul/crashtests/430356-1.xhtml | 2 +- .../style/values/computed/length.rs | 6 +- .../css/css-box/parsing/height-valid.html.ini | 6 -- .../css-box/parsing/max-height-valid.html.ini | 6 -- .../css-box/parsing/max-width-valid.html.ini | 6 -- .../css-box/parsing/min-height-valid.html.ini | 6 -- .../css-box/parsing/min-width-valid.html.ini | 6 -- .../css/css-box/parsing/width-valid.html.ini | 6 -- ...-container-sizing-constraints-001.html.ini | 19 ---- .../css/css-tables/fixed-layout-2.html.ini | 2 + .../mozilla-central-reftests/sync-tests.sh | 2 +- view/crashtests/507563-1.html | 2 +- widget/cocoa/crashtests/435223-1.html | 2 +- 123 files changed, 353 insertions(+), 373 deletions(-) delete mode 100644 testing/web-platform/meta/css/css-grid/grid-model/grid-container-sizing-constraints-001.html.ini diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index 6508e20560e9..801d5f84441e 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -928,7 +928,7 @@ html|*.pointerlockfswarning { 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; } diff --git a/browser/themes/shared/syncedtabs/sidebar.inc.css b/browser/themes/shared/syncedtabs/sidebar.inc.css index 1b459d684cd6..251096925800 100644 --- a/browser/themes/shared/syncedtabs/sidebar.inc.css +++ b/browser/themes/shared/syncedtabs/sidebar.inc.css @@ -186,7 +186,7 @@ body { .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 */ diff --git a/devtools/shared/css/generated/properties-db.js b/devtools/shared/css/generated/properties-db.js index 7f223be89836..0aa5322921ef 100644 --- a/devtools/shared/css/generated/properties-db.js +++ b/devtools/shared/css/generated/properties-db.js @@ -2093,6 +2093,8 @@ exports.CSS_PROPERTIES = { "content", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -2111,6 +2113,8 @@ exports.CSS_PROPERTIES = { "content", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -3624,6 +3628,8 @@ exports.CSS_PROPERTIES = { "auto", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -5464,6 +5470,8 @@ exports.CSS_PROPERTIES = { "content", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -5482,6 +5490,8 @@ exports.CSS_PROPERTIES = { "content", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -6347,6 +6357,8 @@ exports.CSS_PROPERTIES = { "auto", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -6427,6 +6439,8 @@ exports.CSS_PROPERTIES = { "auto", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -7264,6 +7278,8 @@ exports.CSS_PROPERTIES = { "-moz-min-content", "inherit", "initial", + "max-content", + "min-content", "none", "unset" ] @@ -7281,6 +7297,8 @@ exports.CSS_PROPERTIES = { "-moz-min-content", "inherit", "initial", + "max-content", + "min-content", "none", "unset" ] @@ -7298,6 +7316,8 @@ exports.CSS_PROPERTIES = { "-moz-min-content", "inherit", "initial", + "max-content", + "min-content", "none", "unset" ] @@ -7315,6 +7335,8 @@ exports.CSS_PROPERTIES = { "-moz-min-content", "inherit", "initial", + "max-content", + "min-content", "none", "unset" ] @@ -7333,6 +7355,8 @@ exports.CSS_PROPERTIES = { "auto", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -7350,6 +7374,8 @@ exports.CSS_PROPERTIES = { "auto", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -7367,6 +7393,8 @@ exports.CSS_PROPERTIES = { "auto", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -7384,6 +7412,8 @@ exports.CSS_PROPERTIES = { "auto", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, @@ -9198,6 +9228,8 @@ exports.CSS_PROPERTIES = { "auto", "inherit", "initial", + "max-content", + "min-content", "unset" ] }, diff --git a/gfx/tests/crashtests/423110-1.xhtml b/gfx/tests/crashtests/423110-1.xhtml index 9633ff86857f..105638b0e8a0 100644 --- a/gfx/tests/crashtests/423110-1.xhtml +++ b/gfx/tests/crashtests/423110-1.xhtml @@ -1 +1 @@ - + diff --git a/layout/base/crashtests/1461812.html b/layout/base/crashtests/1461812.html index 48b662e60f02..2ff21e8019f2 100644 --- a/layout/base/crashtests/1461812.html +++ b/layout/base/crashtests/1461812.html @@ -1,6 +1,6 @@ diff --git a/layout/reftests/bidi/bidi-006.html b/layout/reftests/bidi/bidi-006.html index 5bdf78ed0e8e..cf9c14916f9d 100644 --- a/layout/reftests/bidi/bidi-006.html +++ b/layout/reftests/bidi/bidi-006.html @@ -37,7 +37,7 @@ span { p#test { border-left: 3em solid red; border-right: 3em solid red; - width: -moz-max-content; + width: max-content; width: intrinsic; } diff --git a/layout/reftests/box-properties/box-sizing-1.html b/layout/reftests/box-properties/box-sizing-1.html index 83c9c1d0165c..7070f9c97f4e 100644 --- a/layout/reftests/box-properties/box-sizing-1.html +++ b/layout/reftests/box-properties/box-sizing-1.html @@ -37,8 +37,8 @@
A B
-
A B
-
A B
+
A B
+
A B
A B
A B
A B
@@ -49,8 +49,8 @@
A B
-
A B
-
A B
+
A B
+
A B
A B
A B
A B
diff --git a/layout/reftests/box-properties/box-sizing-2.html b/layout/reftests/box-properties/box-sizing-2.html index d61d8184f2d3..bb9ae4714e18 100644 --- a/layout/reftests/box-properties/box-sizing-2.html +++ b/layout/reftests/box-properties/box-sizing-2.html @@ -34,8 +34,8 @@
A B
-
A B
-
A B
+
A B
+
A B
A B
A B
A B
@@ -45,8 +45,8 @@
A B
-
A B
-
A B
+
A B
+
A B
A B
A B
A B
diff --git a/layout/reftests/box-properties/box-sizing-3.html b/layout/reftests/box-properties/box-sizing-3.html index dd4391d4c065..ca346e538f6a 100644 --- a/layout/reftests/box-properties/box-sizing-3.html +++ b/layout/reftests/box-properties/box-sizing-3.html @@ -37,8 +37,8 @@
A B
-
A B
-
A B
+
A B
+
A B
A B
A B
A B
@@ -49,8 +49,8 @@
A B
-
A B
-
A B
+
A B
+
A B
A B
A B
A B
diff --git a/layout/reftests/box-properties/box-sizing-4.html b/layout/reftests/box-properties/box-sizing-4.html index f02eb12924e0..c170f374650c 100644 --- a/layout/reftests/box-properties/box-sizing-4.html +++ b/layout/reftests/box-properties/box-sizing-4.html @@ -49,8 +49,8 @@
A B
-
A B
-
A B
+
A B
+
A B
A B
A B
A B
@@ -61,8 +61,8 @@
A B
-
A B
-
A B
+
A B
+
A B
A B
A B
A B
diff --git 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 index e11ae0fb1a76..a78e3a9e821c 100644 --- 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,7 +1,7 @@ - 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 + intrinsic min-widths and max-widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks diff --git a/layout/reftests/box-properties/minmax-width-special-values-block-intrinsic.html b/layout/reftests/box-properties/minmax-width-special-values-block-intrinsic.html index 3ea9437b6005..70fcf7cafd9d 100644 --- 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,26 +1,26 @@ - 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 + intrinsic min-widths and max-widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks
-
AA B
+
AA B
-
AA B
+
AA B
-
AA B
+
AA B
-
AA B
+
AA B
@@ -40,19 +40,19 @@
-
AA B
+
AA B
-
AA B
+
AA B
-
AA B
+
AA B
-
AA B
+
AA B
diff --git a/layout/reftests/box-properties/width-special-values-block-intrinsic-ref.html b/layout/reftests/box-properties/width-special-values-block-intrinsic-ref.html index 4e9e11772fc7..819244746e2e 100644 --- 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,7 +1,7 @@ - intrinsic widths for -moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks + intrinsic widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks diff --git a/layout/reftests/box-properties/width-special-values-block-intrinsic.html b/layout/reftests/box-properties/width-special-values-block-intrinsic.html index aec2493fdff4..264e4e117ddd 100644 --- a/layout/reftests/box-properties/width-special-values-block-intrinsic.html +++ b/layout/reftests/box-properties/width-special-values-block-intrinsic.html @@ -1,26 +1,26 @@ - intrinsic widths for -moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks + intrinsic widths for max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks
-
AA B
+
AA B
-
AA B
+
AA B
-
AA B
+
AA B
-
AA B
+
AA B
diff --git a/layout/reftests/box-properties/width-special-values-block-ref.html b/layout/reftests/box-properties/width-special-values-block-ref.html index 0d284e7f02e3..35ccc45afd17 100644 --- a/layout/reftests/box-properties/width-special-values-block-ref.html +++ b/layout/reftests/box-properties/width-special-values-block-ref.html @@ -1,7 +1,7 @@ - -moz-max-content, -moz-min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks + max-content, min-content, -moz-fit-content, and -moz-available values of CSS width property, on blocks -
+
ABCDEF
-
+
ABCDEF

-
+
XYZABCDEFXYZ
-
+
XYZABCDEFXYZ

-
+
あいうえ
-
+
あいうえ

-
+
あいうえ
-
+
あいうえ

diff --git a/layout/reftests/css-ruby/intrinsic-isize-1.html b/layout/reftests/css-ruby/intrinsic-isize-1.html index dd900b4b7072..2e5e38ea0e43 100644 --- a/layout/reftests/css-ruby/intrinsic-isize-1.html +++ b/layout/reftests/css-ruby/intrinsic-isize-1.html @@ -11,34 +11,34 @@ -
+
ABCDEF
-
+
ABCDEF

-
+
XYZABCDEFXYZ
-
+
XYZABCDEFXYZ

-
+
あいうえ
-
+
あいうえ

-
+
あいうえ
-
+
あいうえ

diff --git a/layout/reftests/flexbox/flexbox-empty-1-ref.xhtml b/layout/reftests/flexbox/flexbox-empty-1-ref.xhtml index 074436d1129a..78810b1ce684 100644 --- a/layout/reftests/flexbox/flexbox-empty-1-ref.xhtml +++ b/layout/reftests/flexbox/flexbox-empty-1-ref.xhtml @@ -21,8 +21,8 @@
-
-
+
+
@@ -30,8 +30,8 @@
-
-
+
+
diff --git a/layout/reftests/flexbox/flexbox-empty-1a.xhtml b/layout/reftests/flexbox/flexbox-empty-1a.xhtml index 2912028dd89d..b0b578b165d7 100644 --- a/layout/reftests/flexbox/flexbox-empty-1a.xhtml +++ b/layout/reftests/flexbox/flexbox-empty-1a.xhtml @@ -22,8 +22,8 @@
-
-
+
+
@@ -31,8 +31,8 @@
-
-
+
+
diff --git a/layout/reftests/flexbox/flexbox-empty-1b.xhtml b/layout/reftests/flexbox/flexbox-empty-1b.xhtml index 20ea2e50b9cd..c64f236d43fe 100644 --- a/layout/reftests/flexbox/flexbox-empty-1b.xhtml +++ b/layout/reftests/flexbox/flexbox-empty-1b.xhtml @@ -28,8 +28,8 @@
-
-
+
+
@@ -37,8 +37,8 @@
-
-
+
+
diff --git a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1-ref.xhtml b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1-ref.xhtml index f11668e5962c..2e228fd11af2 100644 --- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1-ref.xhtml +++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1-ref.xhtml @@ -25,10 +25,10 @@ div.prefWidth { - width: -moz-max-content; + width: max-content; } div.minWidth { - width: -moz-min-content; + width: min-content; } div.autoWidth { width: auto; diff --git a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1a.xhtml b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1a.xhtml index f7e99f68ac26..dc1ae6f43420 100644 --- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1a.xhtml +++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1a.xhtml @@ -36,10 +36,10 @@ div.prefWidth { - width: -moz-max-content; + width: max-content; } div.minWidth { - width: -moz-min-content; + width: min-content; } div.autoWidth { width: auto; diff --git a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1b.xhtml b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1b.xhtml index c2b0074baf32..0d0b1dd34c98 100644 --- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1b.xhtml +++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-1b.xhtml @@ -36,10 +36,10 @@ div.prefWidth { - width: -moz-max-content; + width: max-content; } div.minWidth { - width: -moz-min-content; + width: min-content; } div.autoWidth { width: auto; diff --git a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2-ref.xhtml b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2-ref.xhtml index fe839bdd0c49..b71ef35d90d0 100644 --- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2-ref.xhtml +++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2-ref.xhtml @@ -13,7 +13,7 @@ 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; diff --git a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2a.xhtml b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2a.xhtml index bdd41847dc14..40d2f687598d 100644 --- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2a.xhtml +++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2a.xhtml @@ -13,7 +13,7 @@ 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. */ diff --git a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2b.xhtml b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2b.xhtml index 07ba6faf393f..29b3a5dfb528 100644 --- a/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2b.xhtml +++ b/layout/reftests/flexbox/flexbox-intrinsic-sizing-horiz-2b.xhtml @@ -14,7 +14,7 @@ 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. */ diff --git a/layout/reftests/flexbox/flexbox-table-flex-items-4.html b/layout/reftests/flexbox/flexbox-table-flex-items-4.html index 313f7c7269a9..9e6e5f3dc0e2 100644 --- a/layout/reftests/flexbox/flexbox-table-flex-items-4.html +++ b/layout/reftests/flexbox/flexbox-table-flex-items-4.html @@ -20,7 +20,6 @@ margin-bottom: 5px; } .forceMaxContent > * { - width: -moz-max-content; width: max-content; } .container > * { diff --git a/layout/reftests/flexbox/flexbox-table-flex-items-5.html b/layout/reftests/flexbox/flexbox-table-flex-items-5.html index f6bfc96fecaa..2023e1c58b6f 100644 --- a/layout/reftests/flexbox/flexbox-table-flex-items-5.html +++ b/layout/reftests/flexbox/flexbox-table-flex-items-5.html @@ -18,7 +18,6 @@ margin-bottom: 5px; } .forceMaxContent > * { - width: -moz-max-content; width: max-content; } .container > * { diff --git a/layout/reftests/flexbox/flexbox-widget-flex-items-2-ref.html b/layout/reftests/flexbox/flexbox-widget-flex-items-2-ref.html index 49ef4ac2c664..ac52a17d8492 100644 --- a/layout/reftests/flexbox/flexbox-widget-flex-items-2-ref.html +++ b/layout/reftests/flexbox/flexbox-widget-flex-items-2-ref.html @@ -18,7 +18,7 @@ margin: 0; vertical-align: top; display: block; - width: -moz-max-content; + width: max-content; } diff --git a/layout/reftests/flexbox/reftest.list b/layout/reftests/flexbox/reftest.list index 6f87862a4024..cf5d8b3d3784 100644 --- a/layout/reftests/flexbox/reftest.list +++ b/layout/reftests/flexbox/reftest.list @@ -1,7 +1,7 @@ # 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) # diff --git a/layout/reftests/font-face/disable-sheet-4.html b/layout/reftests/font-face/disable-sheet-4.html index d4ff024bfede..1885ca6e271b 100644 --- a/layout/reftests/font-face/disable-sheet-4.html +++ b/layout/reftests/font-face/disable-sheet-4.html @@ -38,7 +38,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/disable-sheet-5.html b/layout/reftests/font-face/disable-sheet-5.html index 17cfc3ebc3a9..c9b0bb6e190f 100644 --- a/layout/reftests/font-face/disable-sheet-5.html +++ b/layout/reftests/font-face/disable-sheet-5.html @@ -38,7 +38,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/enable-sheet-1.html b/layout/reftests/font-face/enable-sheet-1.html index 01ff9cf18026..b904e346f85c 100644 --- a/layout/reftests/font-face/enable-sheet-1.html +++ b/layout/reftests/font-face/enable-sheet-1.html @@ -32,7 +32,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/enable-sheet-2.html b/layout/reftests/font-face/enable-sheet-2.html index 12a9d5fe7d92..bd2cfc6d5cce 100644 --- a/layout/reftests/font-face/enable-sheet-2.html +++ b/layout/reftests/font-face/enable-sheet-2.html @@ -41,7 +41,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/enable-sheet-3.html b/layout/reftests/font-face/enable-sheet-3.html index 8cef6ccdd94e..5dfdbedff6fd 100644 --- a/layout/reftests/font-face/enable-sheet-3.html +++ b/layout/reftests/font-face/enable-sheet-3.html @@ -41,7 +41,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/enable-sheet-4.html b/layout/reftests/font-face/enable-sheet-4.html index 8ae26f7a3751..3ba7c6e64a90 100644 --- a/layout/reftests/font-face/enable-sheet-4.html +++ b/layout/reftests/font-face/enable-sheet-4.html @@ -40,7 +40,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/enable-sheet-5.html b/layout/reftests/font-face/enable-sheet-5.html index 4478df502bad..357d970039f7 100644 --- a/layout/reftests/font-face/enable-sheet-5.html +++ b/layout/reftests/font-face/enable-sheet-5.html @@ -40,7 +40,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/enable-sheet-6.html b/layout/reftests/font-face/enable-sheet-6.html index 41a524c379a6..c25b2a33c9b8 100644 --- a/layout/reftests/font-face/enable-sheet-6.html +++ b/layout/reftests/font-face/enable-sheet-6.html @@ -40,7 +40,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/enable-sheet-7.html b/layout/reftests/font-face/enable-sheet-7.html index d7138866f4b0..9e10d673c850 100644 --- a/layout/reftests/font-face/enable-sheet-7.html +++ b/layout/reftests/font-face/enable-sheet-7.html @@ -40,7 +40,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/insert-rule-1a.html b/layout/reftests/font-face/insert-rule-1a.html index ef15e3ab9881..6f56229f5329 100644 --- a/layout/reftests/font-face/insert-rule-1a.html +++ b/layout/reftests/font-face/insert-rule-1a.html @@ -24,7 +24,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/insert-rule-1b.html b/layout/reftests/font-face/insert-rule-1b.html index 7510d9d8fb26..0b6e34307f6e 100644 --- a/layout/reftests/font-face/insert-rule-1b.html +++ b/layout/reftests/font-face/insert-rule-1b.html @@ -24,7 +24,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/media-query-inner-1.html b/layout/reftests/font-face/media-query-inner-1.html index afaa6ba1a464..30310fb05ff2 100644 --- a/layout/reftests/font-face/media-query-inner-1.html +++ b/layout/reftests/font-face/media-query-inner-1.html @@ -28,7 +28,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/sheet-set-switch-1.html b/layout/reftests/font-face/sheet-set-switch-1.html index 7d94b066f4dc..243cd29f4f68 100644 --- a/layout/reftests/font-face/sheet-set-switch-1.html +++ b/layout/reftests/font-face/sheet-set-switch-1.html @@ -43,7 +43,7 @@ -

ABC

+

ABC

diff --git a/layout/reftests/font-face/underline-offset-change-1-ref.html b/layout/reftests/font-face/underline-offset-change-1-ref.html index b3bd5c9ca01c..a5124bc1228a 100644 --- a/layout/reftests/font-face/underline-offset-change-1-ref.html +++ b/layout/reftests/font-face/underline-offset-change-1-ref.html @@ -19,7 +19,7 @@ -

A

+

A

diff --git a/layout/reftests/font-face/underline-offset-change-1.html b/layout/reftests/font-face/underline-offset-change-1.html index d4ccca7a343d..0f315e316323 100644 --- a/layout/reftests/font-face/underline-offset-change-1.html +++ b/layout/reftests/font-face/underline-offset-change-1.html @@ -39,7 +39,7 @@ -

A

+

A

diff --git a/layout/reftests/font-face/underline-offset-change-2-ref.html b/layout/reftests/font-face/underline-offset-change-2-ref.html index 17bf99d2c766..864a90c8d8de 100644 --- a/layout/reftests/font-face/underline-offset-change-2-ref.html +++ b/layout/reftests/font-face/underline-offset-change-2-ref.html @@ -19,7 +19,7 @@ -

A

+

A

diff --git a/layout/reftests/font-face/underline-offset-change-2.html b/layout/reftests/font-face/underline-offset-change-2.html index 57896d5932ea..9cbeef344239 100644 --- a/layout/reftests/font-face/underline-offset-change-2.html +++ b/layout/reftests/font-face/underline-offset-change-2.html @@ -39,7 +39,7 @@ -

A

+

A

diff --git a/layout/reftests/font-inflation/intrinsic-max-1.html b/layout/reftests/font-inflation/intrinsic-max-1.html index 7cd4c524988a..2300a124d195 100644 --- a/layout/reftests/font-inflation/intrinsic-max-1.html +++ b/layout/reftests/font-inflation/intrinsic-max-1.html @@ -7,7 +7,7 @@ p { margin: 0; background: yellow; color: blue; - width: -moz-max-content; /* computes to 300px */ + width: max-content; /* computes to 300px */ font: 12px Ahem; } diff --git a/layout/reftests/font-inflation/intrinsic-min-1.html b/layout/reftests/font-inflation/intrinsic-min-1.html index a88640218ea2..afb98d440540 100644 --- a/layout/reftests/font-inflation/intrinsic-min-1.html +++ b/layout/reftests/font-inflation/intrinsic-min-1.html @@ -7,7 +7,7 @@ p { margin: 0; background: yellow; color: blue; - width: -moz-min-content; /* computes to 60px */ + width: min-content; /* computes to 60px */ font: 12px Ahem; } diff --git a/layout/reftests/image/image-resize-percent-width.html b/layout/reftests/image/image-resize-percent-width.html index b54785d7ad97..edbed2623b86 100644 --- a/layout/reftests/image/image-resize-percent-width.html +++ b/layout/reftests/image/image-resize-percent-width.html @@ -12,4 +12,4 @@ function imgload() { } -
+
diff --git a/layout/reftests/list-item/bullet-intrinsic-isize-1.html b/layout/reftests/list-item/bullet-intrinsic-isize-1.html index 92d92b3d3b73..ccfa6d9e40bb 100644 --- a/layout/reftests/list-item/bullet-intrinsic-isize-1.html +++ b/layout/reftests/list-item/bullet-intrinsic-isize-1.html @@ -5,6 +5,6 @@ Bug 1142369 -
  • blahblah and foobarboo
  • +
  • blahblah and foobarboo
  • diff --git a/layout/reftests/pagination/table-nested-1308876-1-ref.html b/layout/reftests/pagination/table-nested-1308876-1-ref.html index f19568dfcff6..458b984a2dc4 100644 --- a/layout/reftests/pagination/table-nested-1308876-1-ref.html +++ b/layout/reftests/pagination/table-nested-1308876-1-ref.html @@ -8,12 +8,12 @@ little test coverage of this we currently have. -
    +
    A
    -
    +
    A
    diff --git a/layout/reftests/text/444656.html b/layout/reftests/text/444656.html index ad1ff62aa422..85232c500acf 100644 --- a/layout/reftests/text/444656.html +++ b/layout/reftests/text/444656.html @@ -4,7 +4,7 @@ Test soft hyphen in rtl text diff --git a/layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003.html b/layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003.html index 5a1c5bad309a..447e3cc98dd7 100644 --- a/layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003.html +++ b/layout/reftests/w3c-css/submitted/contain/contain-size-multicol-003.html @@ -29,10 +29,10 @@ align-items: baseline; } .min { - width: -moz-min-content; + width: min-content; } .max { - width: -moz-max-content; + width: max-content; } diff --git a/layout/reftests/writing-mode/1216747-1-ref.html b/layout/reftests/writing-mode/1216747-1-ref.html index 440456ef1fe5..b04015197626 100644 --- a/layout/reftests/writing-mode/1216747-1-ref.html +++ b/layout/reftests/writing-mode/1216747-1-ref.html @@ -2,7 +2,7 @@ diff --git a/layout/reftests/writing-mode/1216747-1.html b/layout/reftests/writing-mode/1216747-1.html index e982646aded0..6e3fba507775 100644 --- a/layout/reftests/writing-mode/1216747-1.html +++ b/layout/reftests/writing-mode/1216747-1.html @@ -2,7 +2,7 @@ diff --git a/layout/reftests/writing-mode/1302389-scrolled-rect-1-ref.html b/layout/reftests/writing-mode/1302389-scrolled-rect-1-ref.html index 01fc3cc515f6..ce1d92680bef 100644 --- a/layout/reftests/writing-mode/1302389-scrolled-rect-1-ref.html +++ b/layout/reftests/writing-mode/1302389-scrolled-rect-1-ref.html @@ -1,7 +1,7 @@
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    diff --git a/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html b/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html index 7e93276d1e43..7bbe52488635 100644 --- a/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html +++ b/layout/reftests/writing-mode/tables/table-caption-right-1-ref.html @@ -36,30 +36,30 @@ body > div {
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    -
    table caption
    +
    table caption
    diff --git a/layout/style/crashtests/1401256.html b/layout/style/crashtests/1401256.html index 2a25dedc7e6c..da0a5795046a 100644 --- a/layout/style/crashtests/1401256.html +++ b/layout/style/crashtests/1401256.html @@ -1,5 +1,5 @@ \ No newline at end of file + o1.animate({'minWidth':['max-content']}); + diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index df4dad4f93e4..3410ea55762c 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -52,9 +52,7 @@ 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) diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index aad86f44146d..ed2f713f473e 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -420,16 +420,16 @@ const KTableEntry nsCSSProps::kVerticalAlignKTable[] = { {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}, diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index c2a57a3727c1..b73fe3c8b8f3 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -518,9 +518,9 @@ enum class StyleGridTrackBreadth : uint8_t { // 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 \ diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index a024348206de..21193acb10eb 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -73,7 +73,7 @@ fieldset { 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 { diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 85b9d44cd122..138dedcbfc00 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -3740,7 +3740,9 @@ var gCSSProperties = { /* 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)", @@ -3993,7 +3995,9 @@ var gCSSProperties = { 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)", @@ -4015,7 +4019,9 @@ var gCSSProperties = { // 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)", @@ -4034,7 +4040,9 @@ var gCSSProperties = { 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%)", @@ -4055,7 +4063,9 @@ var gCSSProperties = { // 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%)", @@ -4738,7 +4748,9 @@ var gCSSProperties = { // 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 @@ -5537,11 +5549,11 @@ var gCSSProperties = { "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: [ @@ -5566,7 +5578,10 @@ var gCSSProperties = { // 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)", @@ -5928,7 +5943,7 @@ var gCSSProperties = { "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", @@ -6101,7 +6116,9 @@ var gCSSProperties = { // 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 @@ -6181,7 +6198,7 @@ var gCSSProperties = { "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", @@ -6195,7 +6212,9 @@ var gCSSProperties = { // 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)", @@ -6220,7 +6239,7 @@ var gCSSProperties = { "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", @@ -6234,7 +6253,9 @@ var gCSSProperties = { // 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%)", diff --git a/layout/style/test/test_box_size_keywords.html b/layout/style/test/test_box_size_keywords.html index ea4716ea526d..0f817275617b 100644 --- a/layout/style/test/test_box_size_keywords.html +++ b/layout/style/test/test_box_size_keywords.html @@ -49,7 +49,7 @@ /** 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 @@ -60,100 +60,100 @@ 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", }, ]; diff --git a/layout/style/test/test_value_computation.html b/layout/style/test/test_value_computation.html index 250a0d9a122d..9faaa3030241 100644 --- a/layout/style/test/test_value_computation.html +++ b/layout/style/test/test_value_computation.html @@ -95,7 +95,7 @@ var gSwapInitialWhenHaveFrame = { // 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) { diff --git a/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp index a905d208f4db..244c06f29bdc 100644 --- a/layout/tables/BasicTableLayoutStrategy.cpp +++ b/layout/tables/BasicTableLayoutStrategy.cpp @@ -170,8 +170,7 @@ static CellISizeInfo GetISizeInfo(gfxContext *aRenderingContext, 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); } } @@ -195,8 +194,7 @@ static CellISizeInfo GetISizeInfo(gfxContext *aRenderingContext, 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); } } diff --git a/layout/tables/crashtests/420242-1.xhtml b/layout/tables/crashtests/420242-1.xhtml index 286bb4f7aa91..60bf5798de40 100644 --- a/layout/tables/crashtests/420242-1.xhtml +++ b/layout/tables/crashtests/420242-1.xhtml @@ -1,4 +1,4 @@ -
    +
    diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 48d50f04ea11..d91f01ff99ac 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -3914,7 +3914,7 @@ nscoord nsTableFrame::CalcBorderBoxBSize(const ReflowInput& aReflowInput) { 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()); diff --git a/layout/xul/crashtests/430356-1.xhtml b/layout/xul/crashtests/430356-1.xhtml index 6e5717ae9410..8e7858904fd3 100644 --- a/layout/xul/crashtests/430356-1.xhtml +++ b/layout/xul/crashtests/430356-1.xhtml @@ -1,5 +1,5 @@ - + diff --git a/servo/components/style/values/computed/length.rs b/servo/components/style/values/computed/length.rs index c286e65fdff9..1af28587a391 100644 --- a/servo/components/style/values/computed/length.rs +++ b/servo/components/style/values/computed/length.rs @@ -985,8 +985,10 @@ pub type NonNegativeLengthOrPercentageOrNormal = Either
    +
    diff --git a/widget/cocoa/crashtests/435223-1.html b/widget/cocoa/crashtests/435223-1.html index 1bbc27ba019d..c7f70860fc37 100644 --- a/widget/cocoa/crashtests/435223-1.html +++ b/widget/cocoa/crashtests/435223-1.html @@ -3,6 +3,6 @@ -
    +