Bug 1231485 part 3 - Fix style tests for text-emphasis properties. draft
authorXidorn Quan <quanxunzhen@gmail.com>
Wed, 16 Dec 2015 00:11:09 +1100
changeset 315602 5a50ffeb4d110dfa68a94c6c763723b585b83784
parent 315601 0d317df52b15943518d116febbe9fcbd422ad2b2
child 315603 2a747710c5c324e530283be33ab3ee6c2b6117a2
push id8436
push userxquan@mozilla.com
push dateTue, 15 Dec 2015 22:14:22 +0000
bugs1231485
milestone46.0a1
Bug 1231485 part 3 - Fix style tests for text-emphasis properties.
layout/style/test/property_database.js
layout/style/test/test_transitions_per_property.html
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -6981,27 +6981,28 @@ if (IsCSSPropertyPrefEnabled("layout.css
   gCSSProperties["clear"].invalid_values.push("inline-end");
 }
 
 if (IsCSSPropertyPrefEnabled("layout.css.text-emphasis.enabled")) {
   gCSSProperties["text-emphasis"] = {
     domProp: "textEmphasis",
     inherited: true,
     type: CSS_TYPE_TRUE_SHORTHAND,
+    prerequisites: { "color": "black" },
     subproperties: [ "text-emphasis-style", "text-emphasis-color" ],
-    initial_values: [ "none currentColor", "currentColor none", "none", "currentColor" ],
-    other_values: [ "filled dot black", "#f00 circle open", "sesame filled rgba(0,0,255,0.5)", "red", "none black", "green none", "currentColor filled", "currentColor open" ],
+    initial_values: [ "none currentColor", "currentColor none", "none", "currentColor", "none black" ],
+    other_values: [ "filled dot black", "#f00 circle open", "sesame filled rgba(0,0,255,0.5)", "red", "green none", "currentColor filled", "currentColor open" ],
     invalid_values: [ "filled black dot", "filled filled red", "open open circle #000", "circle dot #f00", "rubbish" ]
   };
   gCSSProperties["text-emphasis-color"] = {
     domProp: "textEmphasisColor",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     prerequisites: { "color": "black" },
-    initial_values: [ "currentColor", "-moz-use-text-color" ],
+    initial_values: [ "currentColor", "black", "rgb(0,0,0)" ],
     other_values: [ "red", "rgba(255,255,255,0.5)", "transparent" ],
     invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "ff00ff", "rgb(255,xxx,255)" ]
   };
   gCSSProperties["text-emphasis-position"] = {
     domProp: "textEmphasisPosition",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "over right", "right over" ],
--- a/layout/style/test/test_transitions_per_property.html
+++ b/layout/style/test/test_transitions_per_property.html
@@ -230,16 +230,18 @@ var supported_properties = {
     // NOTE: when calc() is supported on 'stroke-width', we should add
     // test_length_percent_calc_transition.
     "stroke-width": [ test_length_transition_svg, test_percent_transition,
                       test_length_clamped_svg, test_percent_clamped ],
     "text-decoration": [ test_color_shorthand_transition,
                          test_border_color_shorthand_transition ],
     "text-decoration-color": [ test_color_transition,
                                test_border_color_transition ],
+    "text-emphasis-color": [ test_color_transition,
+                             test_border_color_transition ],
     "text-indent": [ test_length_transition, test_percent_transition,
                      test_length_percent_calc_transition,
                      test_length_unclamped, test_percent_unclamped ],
     "text-shadow": [ test_shadow_transition ],
     "top": [ test_length_transition, test_percent_transition,
              test_length_percent_calc_transition,
              test_length_unclamped, test_percent_unclamped ],
     "transform": [ test_transform_transition ],