commit c098d04ec19ed6bdc271ad006f5c36bb56af39a6 parent e09440858244cc2daf1d6888442b0d8230bb5da8 Author: Ting-Yu Lin <tlin@mozilla.com> Date: Tue, 14 Oct 2025 19:23:01 +0000 Bug 1987997 - Change initial value of text-autospace from normal to no-autospace. r=jfkthame,layout-jp-market-reviewers CSSWG allows shipping `text-autospace` with `no-autospace` as the initial value. The WPT ini is updated automatically using the following commands. ``` ./mach wpt testing/web-platform/tests/css/css-text/parsing/text-autospace-* --log-wptreport wptreport.json ./mach wpt-update wptreport.json ``` Differential Revision: https://phabricator.services.mozilla.com/D264984 Diffstat:
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h @@ -1185,7 +1185,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleText { mozilla::StyleWordBreak mWordBreak = mozilla::StyleWordBreak::Normal; mozilla::StyleOverflowWrap mOverflowWrap = mozilla::StyleOverflowWrap::Normal; mozilla::StyleTextAutospace mTextAutospace = - mozilla::StyleTextAutospace::NORMAL; + mozilla::StyleTextAutospace::NO_AUTOSPACE; public: mozilla::StyleHyphens mHyphens; diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js @@ -14171,9 +14171,9 @@ if (IsCSSPropertyPrefEnabled("layout.css.text-autospace.enabled")) { applies_to_first_letter: true, applies_to_first_line: true, applies_to_placeholder: true, - initial_values: ["normal"], + initial_values: ["no-autospace"], other_values: [ - "no-autospace", + "normal", "auto", "ideograph-alpha", "ideograph-numeric", diff --git a/servo/components/style/properties/longhands/inherited_text.mako.rs b/servo/components/style/properties/longhands/inherited_text.mako.rs @@ -157,7 +157,7 @@ ${helpers.single_keyword( ${helpers.predefined_type( "text-autospace", "TextAutospace", - "computed::text::TextAutospace::NORMAL", + "computed::text::TextAutospace::NO_AUTOSPACE", engines="gecko", animation_type="discrete", gecko_pref="layout.css.text-autospace.enabled", diff --git a/testing/web-platform/meta/css/css-text/parsing/text-autospace-computed.html.ini b/testing/web-platform/meta/css/css-text/parsing/text-autospace-computed.html.ini @@ -56,3 +56,6 @@ [Property text-autospace value 'insert punctuation ideograph-alpha ideograph-numeric'] expected: FAIL + + [Property text-autospace value 'initial'] + expected: FAIL