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
authorJonathan Kew <jkew@mozilla.com>
Thu, 02 Jul 2015 13:27:33 +0100
changeset 251200 643d8e8d61a2a632cb5738a375300c58cc652028
parent 251199 6b6c58581aff089a21c3cee96786e7b250dd87a0
child 251201 c725221a7c45f7b23f319fe63f537c4f3298bbd8
push id28987
push userkwierso@gmail.com
push dateFri, 03 Jul 2015 00:14:52 +0000
treeherdermozilla-central@1af1b4e1c35a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1179285
milestone42.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 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
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
@@ -2244,16 +2244,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