Bug 1179285 - Give text-combine-upright its own pref, separate from writing-mode (vertical-text), so that we can keep it disabled until we actually have a layout implementation backing the CSS property. r=dbaron, a=kglazko
authorJonathan Kew <jkew@mozilla.com>
Thu, 02 Jul 2015 13:27:33 +0100
changeset 268767 16b1e64fbed3b89cfefb044e7aa93fc3da26fc0d
parent 268766 ec5312fd44daeed7e6db3089fe4af1908728528f
child 268768 4e6fead2c1f394ae4ced0d2163171689ade74b32
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron, kglazko
bugs1179285
milestone41.0a2
Bug 1179285 - Give text-combine-upright its own pref, separate from writing-mode (vertical-text), so that we can keep it disabled until we actually have a layout implementation backing the CSS property. r=dbaron, a=kglazko
layout/style/nsCSSPropList.h
layout/style/test/property_database.js
layout/style/test/test_computed_style_prefs.html
modules/libpref/init/all.js
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -3195,19 +3195,18 @@ CSS_PROP_SHORTHAND(
     TextDecoration,
     CSS_PROPERTY_PARSE_FUNCTION,
     "")
 CSS_PROP_TEXT(
     text-combine-upright,
     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),
     eStyleAnimType_EnumU8)
 CSS_PROP_TEXTRESET(
     text-decoration-color,
     text_decoration_color,
     TextDecorationColor,
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -4710,26 +4710,16 @@ if (SpecialPowers.getBoolPref("layout.cs
     "text-orientation": {
       domProp: "textOrientation",
       inherited: true,
       type: CSS_TYPE_LONGHAND,
       initial_values: [ "mixed" ],
       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,
       type: CSS_TYPE_TRUE_SHORTHAND,
       subproperties: [ "border-block-end-color", "border-block-end-style", "border-block-end-width" ],
       initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
       other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
       invalid_values: [ "5%", "5", "5 solid green" ]
@@ -5283,16 +5273,29 @@ if (SpecialPowers.getBoolPref("layout.cs
     var p = gCSSProperties[prop];
     if (p.prerequisites === undefined) {
       p.prerequisites = {};
     }
     p.prerequisites["writing-mode"] = "initial";
   });
 }
 
+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",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "luminance" ],
     other_values: [ "alpha" ],
     invalid_values: []
--- a/layout/style/test/test_computed_style_prefs.html
+++ b/layout/style/test/test_computed_style_prefs.html
@@ -63,17 +63,18 @@ function step() {
   gPrefsPushed = true;
   SpecialPowers.pushPrefEnv(gTests[gTestIndex].settings,
                             function() { fn(); SimpleTest.executeSoon(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"],
   "layout.css.masking.enabled": ["mask-type"],
   "layout.css.touch_action.enabled": ["touch-action"],
   "svg.transform-origin.enabled": ["transform-box"]
 };
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2243,16 +2243,19 @@ pref("layout.css.unprefixing-service.ena
 pref("layout.css.scope-pseudo.enabled", true);
 
 // Is support for background-blend-mode enabled?
 pref("layout.css.background-blend-mode.enabled", true);
 
 // Is support for CSS vertical text enabled?
 pref("layout.css.vertical-text.enabled", true);
 
+// 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);
 
 // Is -moz-osx-font-smoothing enabled?
 // Only supported in OSX builds
 #ifdef XP_MACOSX
 pref("layout.css.osx-font-smoothing.enabled", true);
 #else