Bug 1473779: Make writing-mode and direction non-animatable. r?heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 06 Jul 2018 03:44:28 +0200
changeset 814757 a828614b8b5e4d44c6a1edf334cdf799d061f0f5
parent 814756 c098c97c2eb1405ad8423b50f415aed6d1b410e9
push id115330
push userbmo:emilio@crisal.io
push dateFri, 06 Jul 2018 02:47:53 +0000
reviewersheycam
bugs1473779
milestone63.0a1
Bug 1473779: Make writing-mode and direction non-animatable. r?heycam Per https://github.com/w3c/csswg-drafts/issues/2751 MozReview-Commit-ID: GCG3vJWNPfC
servo/components/style/properties/longhands/inherited_box.mako.rs
testing/web-platform/tests/web-animations/animation-model/animation-types/property-list.js
--- a/servo/components/style/properties/longhands/inherited_box.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_box.mako.rs
@@ -21,30 +21,33 @@
 ${helpers.single_keyword(
     "writing-mode",
     "horizontal-tb vertical-rl vertical-lr",
     extra_gecko_values="sideways-rl sideways-lr",
     extra_gecko_aliases="lr=horizontal-tb lr-tb=horizontal-tb \
                          rl=horizontal-tb rl-tb=horizontal-tb \
                          tb=vertical-rl   tb-rl=vertical-rl",
     servo_pref="layout.writing-mode.enabled",
-    animation_value_type="discrete",
+    animation_value_type="none",
     spec="https://drafts.csswg.org/css-writing-modes/#propdef-writing-mode",
     servo_restyle_damage="rebuild_and_reflow",
 )}
 
 ${helpers.single_keyword(
     "direction",
     "ltr rtl",
-    animation_value_type="discrete",
+    animation_value_type="none",
     spec="https://drafts.csswg.org/css-writing-modes/#propdef-direction",
     needs_conversion=True,
     servo_restyle_damage="rebuild_and_reflow",
 )}
 
+// TODO(emilio): Should text-orientation be non-animatable? It affects the
+// WritingMode value, but not the logical -> physical mapping of properties,
+// which is the reason direction / writing-mode are non-animatable.
 ${helpers.single_keyword(
     "text-orientation",
     "mixed upright sideways",
     extra_gecko_aliases="sideways-right=sideways",
     products="gecko",
     animation_value_type="discrete",
     spec="https://drafts.csswg.org/css-writing-modes/#propdef-text-orientation",
 )}
--- a/testing/web-platform/tests/web-animations/animation-model/animation-types/property-list.js
+++ b/testing/web-platform/tests/web-animations/animation-model/animation-types/property-list.js
@@ -441,22 +441,16 @@ const gCSSProperties = {
     ]
   },
   'cursor': {
     // https://drafts.csswg.org/css2/ui.html#propdef-cursor
     types: [
       { type: 'discrete', options: [ [ 'pointer', 'wait' ] ] }
     ]
   },
-  'direction': {
-    // https://drafts.csswg.org/css-writing-modes-3/#propdef-direction
-    types: [
-      { type: 'discrete', options: [ [ 'ltr', 'rtl' ] ] }
-    ]
-  },
   'dominant-baseline': {
     // https://drafts.csswg.org/css-inline/#propdef-dominant-baseline
     types: [
       { type: 'discrete', options: [ [ 'ideographic', 'alphabetic' ] ] }
     ]
   },
   'empty-cells': {
     // https://drafts.csswg.org/css-tables/#propdef-empty-cells
@@ -1467,22 +1461,16 @@ const gCSSProperties = {
     types: [ 'lengthPercentageOrCalc' ]
   },
   'will-change': {
     // http://dev.w3.org/csswg/css-will-change/#propdef-will-change
     types: [
       { type: 'discrete', options: [ [ 'scroll-position', 'contents' ] ] }
     ]
   },
-  'writing-mode': {
-    // https://drafts.csswg.org/css-writing-modes-3/#propdef-writing-mode
-    types: [
-      { type: 'discrete', options: [ [ 'vertical-rl', 'sideways-rl' ] ] }
-    ]
-  },
   'z-index': {
     // https://drafts.csswg.org/css-position/#propdef-z-index
     types: [
     ]
   },
 };
 
 function testAnimationSamples(animation, idlName, testSamples) {