From cccd1f323cb880e97ea998b963880e80f4205e86 Mon Sep 17 00:00:00 2001 From: Pale Moon Date: Mon, 3 Apr 2017 14:42:16 +0200 Subject: [PATCH] Split out combine-upright (tate-chu-yoko) from vertical text writing mode. We don't actually have an implementation for this, so we should not advertise support along with vertical text writing mode. --- layout/style/nsCSSPropList.h | 5 ++-- layout/style/test/property_database.js | 23 +++++++++++-------- .../style/test/test_computed_style_prefs.html | 3 ++- modules/libpref/init/all.js | 3 +++ 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 342202b761..182029b66f 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -3112,9 +3112,8 @@ CSS_PROP_TEXT( text_combine_upright, TextCombineUpright, CSS_PROPERTY_PARSE_VALUE | - CSS_PROPERTY_VALUE_PARSER_FUNCTION | - CSS_PROPERTY_ALWAYS_ENABLED_IN_UA_SHEETS, - "layout.css.vertical-text.enabled", + CSS_PROPERTY_VALUE_PARSER_FUNCTION, + "layout.css.text-combine-upright.enabled", 0, kTextCombineUprightKTable, offsetof(nsStyleText, mTextCombineUpright), diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 28baebd198..1602092432 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -4741,16 +4741,6 @@ if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) { other_values: [ "upright", "sideways-right" ], invalid_values: [ "none", "3em", "sideways", "sideways-left" ] /* sideways, sideways-left not yet supported */ }, - "text-combine-upright": { - domProp: "textCombineUpright", - inherited: true, - type: CSS_TYPE_LONGHAND, - initial_values: [ "none" ], - other_values: [ "all", "digits", "digits 2", "digits 3", "digits 4", "digits 3" ], - invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0", - "digits 12", "none 3", "digits 3.1415", "digits3", "digits 1", - "digits 3 all", "digits foo", "digits all", "digits 3.0" ] - }, "border-block-end": { domProp: "borderBlockEnd", inherited: false, @@ -5314,6 +5304,19 @@ if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) { }); } +if (SpecialPowers.getBoolPref("layout.css.text-combine-upright.enabled")) { + gCSSProperties["text-combine-upright"] = { + domProp: "textCombineUpright", + inherited: true, + type: CSS_TYPE_LONGHAND, + initial_values: [ "none" ], + other_values: [ "all", "digits", "digits 2", "digits 3", "digits 4", "digits 3" ], + invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0", + "digits 12", "none 3", "digits 3.1415", "digits3", "digits 1", + "digits 3 all", "digits foo", "digits all", "digits 3.0" ] + }; +} + if (SpecialPowers.getBoolPref("layout.css.masking.enabled")) { gCSSProperties["mask-type"] = { domProp: "maskType", diff --git a/layout/style/test/test_computed_style_prefs.html b/layout/style/test/test_computed_style_prefs.html index 0d55857ffd..3ad73f7605 100644 --- a/layout/style/test/test_computed_style_prefs.html +++ b/layout/style/test/test_computed_style_prefs.html @@ -68,7 +68,8 @@ function step() { // ---- var gProps = { - "layout.css.vertical-text.enabled": ["text-combine-upright", "text-orientation", "writing-mode"], + "layout.css.vertical-text.enabled": ["text-orientation", "writing-mode"], + "layout.css.text-combine-upright.enabled": ["text-combine-upright"], "layout.css.image-orientation.enabled": ["image-orientation"], "layout.css.mix-blend-mode.enabled": ["mix-blend-mode"], "layout.css.isolation.enabled": [ "isolation"], diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 4ba79bcdae..b74d9a1dd9 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2441,6 +2441,9 @@ pref("layout.css.background-blend-mode.enabled", true); // Is support for CSS vertical text enabled? pref("layout.css.vertical-text.enabled", false); +// Is support for CSS text-combine-upright (tate-chu-yoko) enabled? +pref("layout.css.text-combine-upright.enabled", false); + // Is support for object-fit and object-position enabled? pref("layout.css.object-fit-and-position.enabled", true);