Bug 774169, patch 2: Add property_database.js entries for property aliases. r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Tue, 18 Sep 2012 11:37:14 -0700
changeset 107508 775fef3dc66b6461e32442e53ae1c9c7c0d206e9
parent 107507 dec69461a6aed66524dca5deb20428aedc0498e5
child 107509 110a5d25c8f2a24b5004afc17f5f51b5a7699916
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersbzbarsky
bugs774169
milestone18.0a1
Bug 774169, patch 2: Add property_database.js entries for property aliases. r=bzbarsky This adds entries for property aliases as though they are shorthands. This fits with the CSS working group's recent resolution to describe aliases as shorthands, recorded in http://lists.w3.org/Archives/Public/www-style/2012Aug/0770.html . The property_database.js entries themselves are copied from the non-alias entries for the properties, with these changes: (1) The property name is changed to the prefixed form (2) The domProp entry is changed to the prefixed form (3) Adding alias_for entries for each property. (4) When type is CSS_TYPE_LONGHAND in the target of the alias, type for the alias is CSS_TYPE_SHORTHAND_AND_LONGHAND and a subproperties entry is added with the target of the alias. There are also some indentation fixes to the copied entries in property_database.js (made before they were copied, and thus affecting the original as well).
layout/style/test/ListCSSProperties.cpp
layout/style/test/property_database.js
layout/style/test/test_garbage_at_end_of_declarations.html
layout/style/test/test_inherit_storage.html
layout/style/test/test_initial_storage.html
layout/style/test/test_transitions_per_property.html
layout/style/test/test_value_storage.html
--- a/layout/style/test/ListCSSProperties.cpp
+++ b/layout/style/test/ListCSSProperties.cpp
@@ -57,30 +57,44 @@ const PropertyInfo gShorthandProperties[
     { #name_, LISTCSSPROPERTIES_INNER_MACRO(method_) },
 
 #include "nsCSSPropList.h"
 
 #undef CSS_PROP_SHORTHAND
 #undef LISTCSSPROPERTIES_INNER_MACRO
 #undef CSS_PROP_DOMPROP_PREFIXED
 
+#define CSS_PROP_ALIAS(name_, id_, method_, pref_) \
+    { #name_, #method_ },
+
+#include "nsCSSPropAliasList.h"
+
+#undef CSS_PROP_ALIAS
+
 };
 
 /* see gLonghandPropertiesWithDOMProp */
 const char* gShorthandPropertiesWithDOMProp[] = {
 
 #define CSS_PROP_LIST_EXCLUDE_INTERNAL
 #define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_)	\
     #name_,
 
 #include "nsCSSPropList.h"
 
 #undef CSS_PROP_SHORTHAND
 #undef CSS_PROP_LIST_EXCLUDE_INTERNAL
 
+#define CSS_PROP_ALIAS(name_, id_, method_, pref_) \
+    #name_,
+
+#include "nsCSSPropAliasList.h"
+
+#undef CSS_PROP_ALIAS
+
 };
 
 
 #define ARRAY_LENGTH(a_) (sizeof(a_)/sizeof((a_)[0]))
 
 const char *gInaccessibleProperties[] = {
     // Don't print the properties that aren't accepted by the parser, per
     // CSSParserImpl::ParseProperty
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -14,16 +14,19 @@ const CSS_TYPE_TRUE_SHORTHAND = 1;
 // the current spec or earlier versions of the spec.
 const CSS_TYPE_SHORTHAND_AND_LONGHAND = 2;
 
 // Each property has the following fields:
 //	 domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties
 //	 inherited: Whether the property is inherited by default (stated as
 //	   yes or no in the property header in all CSS specs)
 //	 type: see above
+//	 alias_for: optional, indicates that the property is an alias for
+//	   some other property that is the preferred serialization.  (Type
+//	   must not be CSS_TYPE_LONGHAND.)
 //	 get_computed: if present, the property's computed value shows up on
 //	   another property, and this is a function used to get it
 //	 initial_values: Values whose computed value should be the same as the
 //	   computed value for the property's initial value.
 //	 other_values: Values whose computed value should be different from the
 //	   computed value for the property's initial value.
 //	 XXX Should have a third field for values whose computed value may or
 //	   may not be the same as for the property's initial value.
@@ -1337,59 +1340,59 @@ var gCSSProperties = {
 		].concat(SpecialPowers.getBoolPref("layout.3d-transforms.enabled") ? [
 			"6px 5px 5px",
 			"top center 10px"
 		] : []),
 		invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff",
 						 "border", "center red", "right diagonal",
 						 "#00ffff bottom"]
 	},
-    "perspective-origin": {
-        domProp: "perspectiveOrigin",
-        inherited: false,
-        type: CSS_TYPE_LONGHAND,
-        /* no subproperties */
-        prerequisites: { "width": "10px", "height": "10px", "display": "block"},
-        initial_values: [ "50% 50%", "center", "center center" ],
-        other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
-                        "top", "bottom","top left", "top right",
-                        "top center", "center left", "center right",
-                        "bottom left", "bottom right", "bottom center",
-                        "20% center", "6px center", "13in bottom",
-                        "left 50px", "right 13%", "center 40px",
-                        "calc(20px)",
-                        "calc(20px) 10px",
-                        "10px calc(20px)",
-                        "calc(20px) 25%",
-                        "25% calc(20px)",
-                        "calc(20px) calc(20px)",
-                        "calc(20px + 1em) calc(20px / 2)",
-                        "calc(20px + 50%) calc(50% - 10px)",
-                        "calc(-20px) calc(-50%)",
-                        "calc(-20%) calc(-50%)" ],
-        invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff",
-                          "border", "center red", "right diagonal",
-                          "#00ffff bottom"]
-    },
-    "perspective": {
+	"perspective-origin": {
+		domProp: "perspectiveOrigin",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		/* no subproperties */
+		prerequisites: { "width": "10px", "height": "10px", "display": "block"},
+		initial_values: [ "50% 50%", "center", "center center" ],
+		other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
+		                "top", "bottom","top left", "top right",
+		                "top center", "center left", "center right",
+		                "bottom left", "bottom right", "bottom center",
+		                "20% center", "6px center", "13in bottom",
+		                "left 50px", "right 13%", "center 40px",
+		                "calc(20px)",
+		                "calc(20px) 10px",
+		                "10px calc(20px)",
+		                "calc(20px) 25%",
+		                "25% calc(20px)",
+		                "calc(20px) calc(20px)",
+		                "calc(20px + 1em) calc(20px / 2)",
+		                "calc(20px + 50%) calc(50% - 10px)",
+		                "calc(-20px) calc(-50%)",
+		                "calc(-20%) calc(-50%)" ],
+		invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff",
+		                  "border", "center red", "right diagonal",
+		                  "#00ffff bottom"]
+	},
+	"perspective": {
 		domProp: "perspective",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "1000px", "500.2px" ],
 		invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ]
 	},
-    "backface-visibility": {
-        domProp: "backfaceVisibility",
-        inherited: false,
-        type: CSS_TYPE_LONGHAND,
-        initial_values: [ "visible" ],
-        other_values: [ "hidden" ],
-        invalid_values: [ "collapse" ]
-    },
+	"backface-visibility": {
+		domProp: "backfaceVisibility",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "visible" ],
+		other_values: [ "hidden" ],
+		invalid_values: [ "collapse" ]
+	},
 	"transform-style": {
 		domProp: "transformStyle",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "flat" ],
 		other_values: [ "preserve-3d" ],
 		invalid_values: []
 	},
@@ -3848,16 +3851,354 @@ var gCSSProperties = {
 	},
 	"vector-effect": {
 		domProp: "vectorEffect",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "none" ],
 		other_values: [ "non-scaling-stroke" ],
 		invalid_values: []
+	},
+
+	// Aliases
+	"-moz-transform": {
+		domProp: "MozTransform",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "transform",
+		subproperties: [ "transform" ],
+		prerequisites: { "width": "300px", "height": "50px" },
+		initial_values: [ "none" ],
+		other_values: [ "translatex(1px)", "translatex(4em)",
+			"translatex(-4px)", "translatex(3px)",
+			"translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
+			"translatey(4em)", "translate(3px)", "translate(10px, -3px)",
+			"rotate(45deg)", "rotate(45grad)", "rotate(45rad)",
+			"rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)",
+			"scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)",
+			"skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)",
+			"skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)",
+			"rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)",
+			"translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
+			"translatex(50%)", "translatey(50%)", "translate(50%)",
+			"translate(3%, 5px)", "translate(5px, 3%)",
+			"matrix(1, 2, 3, 4, 5, 6)",
+			/* valid calc() values */
+			"translatex(calc(5px + 10%))",
+			"translatey(calc(0.25 * 5px + 10% / 3))",
+			"translate(calc(5px - 10% * 3))",
+			"translate(calc(5px - 3 * 10%), 50px)",
+			"translate(-50px, calc(5px - 10% * 3))",
+		].concat(SpecialPowers.getBoolPref("layout.3d-transforms.enabled") ? [
+			"translatez(1px)", "translatez(4em)", "translatez(-4px)",
+			"translatez(0px)", "translatez(2px) translatez(5px)",
+			"translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)",
+			"translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
+			"scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)",
+			"scalez(-6)", "rotate3d(2, 3, 4, 45deg)",
+			"rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)",
+			"rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
+		] : []),
+		invalid_values: ["1px", "#0000ff", "red", "auto",
+			"translatex(1)", "translatey(1)", "translate(2)",
+			"translate(-3, -4)",
+			"translatex(1px 1px)", "translatex(translatex(1px))",
+			"translatex(#0000ff)", "translatex(red)", "translatey()",
+			"matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)",
+			"skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)",
+			"matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)",
+			"matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)",
+			"matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)",
+			"matrix(1, 2, 3, 4, 5px, 6em)",
+			/* invalid calc() values */
+			"translatey(-moz-min(5px,10%))",
+			"translatex(-moz-max(5px,10%))",
+			"translate(10px, calc(min(5px,10%)))",
+			"translate(calc(max(5px,10%)), 10%)",
+			"matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))"
+		].concat(SpecialPowers.getBoolPref("layout.3d-transforms.enabled") ? [
+			"perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
+			"rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
+			"matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)"
+		] : [])
+	},
+	"-moz-transform-origin": {
+		domProp: "MozTransformOrigin",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "transform-origin",
+		subproperties: [ "transform-origin" ],
+		prerequisites: { "width": "10px", "height": "10px", "display": "block"},
+		initial_values: [ "50% 50%", "center", "center center" ],
+		other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
+						"top", "bottom","top left", "top right",
+						"top center", "center left", "center right",
+						"bottom left", "bottom right", "bottom center",
+						"20% center", "6px center", "13in bottom",
+						"left 50px", "right 13%", "center 40px",
+			"calc(20px)",
+			"calc(20px) 10px",
+			"10px calc(20px)",
+			"calc(20px) 25%",
+			"25% calc(20px)",
+			"calc(20px) calc(20px)",
+			"calc(20px + 1em) calc(20px / 2)",
+			"calc(20px + 50%) calc(50% - 10px)",
+			"calc(-20px) calc(-50%)",
+			"calc(-20%) calc(-50%)"
+		].concat(SpecialPowers.getBoolPref("layout.3d-transforms.enabled") ? [
+			"6px 5px 5px",
+			"top center 10px"
+		] : []),
+		invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff",
+						 "border", "center red", "right diagonal",
+						 "#00ffff bottom"]
+	},
+	"-moz-perspective-origin": {
+		domProp: "MozPerspectiveOrigin",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "perspective-origin",
+		subproperties: [ "perspective-origin" ],
+		prerequisites: { "width": "10px", "height": "10px", "display": "block"},
+		initial_values: [ "50% 50%", "center", "center center" ],
+		other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
+		                "top", "bottom","top left", "top right",
+		                "top center", "center left", "center right",
+		                "bottom left", "bottom right", "bottom center",
+		                "20% center", "6px center", "13in bottom",
+		                "left 50px", "right 13%", "center 40px",
+		                "calc(20px)",
+		                "calc(20px) 10px",
+		                "10px calc(20px)",
+		                "calc(20px) 25%",
+		                "25% calc(20px)",
+		                "calc(20px) calc(20px)",
+		                "calc(20px + 1em) calc(20px / 2)",
+		                "calc(20px + 50%) calc(50% - 10px)",
+		                "calc(-20px) calc(-50%)",
+		                "calc(-20%) calc(-50%)" ],
+		invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff",
+		                  "border", "center red", "right diagonal",
+		                  "#00ffff bottom"]
+	},
+	"-moz-perspective": {
+		domProp: "MozPerspective",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "perspective",
+		subproperties: [ "perspective" ],
+		initial_values: [ "none" ],
+		other_values: [ "1000px", "500.2px" ],
+		invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ]
+	},
+	"-moz-backface-visibility": {
+		domProp: "MozBackfaceVisibility",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "backface-visibility",
+		subproperties: [ "backface-visibility" ],
+		initial_values: [ "visible" ],
+		other_values: [ "hidden" ],
+		invalid_values: [ "collapse" ]
+	},
+	"-moz-transform-style": {
+		domProp: "MozTransformStyle",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "transform-style",
+		subproperties: [ "transform-style" ],
+		initial_values: [ "flat" ],
+		other_values: [ "preserve-3d" ],
+		invalid_values: []
+	},
+	"-moz-border-image": {
+		domProp: "MozBorderImage",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		alias_for: "border-image",
+		subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
+		initial_values: [ "none" ],
+		other_values: [ "url('border.png') 27 27 27 27",
+						"url('border.png') 27",
+						"stretch url('border.png')",
+						"url('border.png') 27 fill",
+						"url('border.png') 27 27 27 27 repeat",
+						"repeat url('border.png') 27 27 27 27",
+						"url('border.png') repeat 27 27 27 27",
+						"url('border.png') fill 27 27 27 27 repeat",
+						"url('border.png') 27 27 27 27 / 1em",
+						"27 27 27 27 / 1em url('border.png') ",
+						"url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat",
+						"repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')",
+						"url('border.png') 27 27 27 27 / / 10 10 1em",
+						"fill 27 27 27 27 / / 10 10 1em url('border.png')",
+						"url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat",
+						"url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ],
+		invalid_values: [ "url('border.png') 27 27 27 27 27",
+						  "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em",
+						  "url('border.png') 27 27 27 27 /",
+						  "url('border.png') fill",
+						  "url('border.png') fill repeat",
+						  "fill repeat",
+						  "url('border.png') fill / 1em",
+						  "url('border.png') / repeat",
+						  "url('border.png') 1 /",
+						  "url('border.png') 1 / /",
+						  "1 / url('border.png')",
+						  "url('border.png') / 1",
+						  "url('border.png') / / 1"]
+	},
+	"-moz-transition": {
+		domProp: "MozTransition",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		alias_for: "transition",
+		subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ],
+		initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ],
+		other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s" ],
+		invalid_values: [ "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial", "2s all, 1s width", "2s width, 1s all" ]
+	},
+	"-moz-transition-delay": {
+		domProp: "MozTransitionDelay",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "transition-delay",
+		subproperties: [ "transition-delay" ],
+		initial_values: [ "0s", "0ms" ],
+		other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
+		invalid_values: [ "0", "0px" ]
+	},
+	"-moz-transition-duration": {
+		domProp: "MozTransitionDuration",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "transition-duration",
+		subproperties: [ "transition-duration" ],
+		initial_values: [ "0s", "0ms" ],
+		other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"],
+		invalid_values: [ "0", "0px", "-1ms", "-2s" ]
+	},
+	"-moz-transition-property": {
+		domProp: "MozTransitionProperty",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "transition-property",
+		subproperties: [ "transition-property" ],
+		initial_values: [ "all" ],
+		other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width" ],
+		invalid_values: [ "none, none", "all, all", "color, none", "none, color", "all, color", "color, all", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none", "all, color", "color, all" ]
+	},
+	"-moz-transition-timing-function": {
+		domProp: "MozTransitionTimingFunction",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "transition-timing-function",
+		subproperties: [ "transition-timing-function" ],
+		initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
+		other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
+		invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
+	},
+	"-moz-animation": {
+		domProp: "MozAnimation",
+		inherited: false,
+		type: CSS_TYPE_TRUE_SHORTHAND,
+		alias_for: "animation",
+		subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ],
+		initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ],
+		other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ],
+		invalid_values: [  "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial" ]
+	},
+	"-moz-animation-delay": {
+		domProp: "MozAnimationDelay",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "animation-delay",
+		subproperties: [ "animation-delay" ],
+		initial_values: [ "0s", "0ms" ],
+		other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
+		invalid_values: [ "0", "0px" ]
+	},
+	"-moz-animation-direction": {
+		domProp: "MozAnimationDirection",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "animation-direction",
+		subproperties: [ "animation-direction" ],
+		initial_values: [ "normal" ],
+		other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ],
+		invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ]
+	},
+	"-moz-animation-duration": {
+		domProp: "MozAnimationDuration",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "animation-duration",
+		subproperties: [ "animation-duration" ],
+		initial_values: [ "0s", "0ms" ],
+		other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"],
+		invalid_values: [ "0", "0px", "-1ms", "-2s" ]
+	},
+	"-moz-animation-fill-mode": {
+		domProp: "MozAnimationFillMode",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "animation-fill-mode",
+		subproperties: [ "animation-fill-mode" ],
+		initial_values: [ "none" ],
+		other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ],
+		invalid_values: [ "all"]
+	},
+	"-moz-animation-iteration-count": {
+		domProp: "MozAnimationIterationCount",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "animation-iteration-count",
+		subproperties: [ "animation-iteration-count" ],
+		initial_values: [ "1" ],
+		other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ],
+		// negatives forbidden per
+		// http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
+		invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ]
+	},
+	"-moz-animation-name": {
+		domProp: "MozAnimationName",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "animation-name",
+		subproperties: [ "animation-name" ],
+		initial_values: [ "none" ],
+		other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ],
+		invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ]
+	},
+	"-moz-animation-play-state": {
+		domProp: "MozAnimationPlayState",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "animation-play-state",
+		subproperties: [ "animation-play-state" ],
+		initial_values: [ "running" ],
+		other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ],
+		invalid_values: [ "0" ]
+	},
+	"-moz-animation-timing-function": {
+		domProp: "MozAnimationTimingFunction",
+		inherited: false,
+		type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
+		alias_for: "animation-timing-function",
+		subproperties: [ "animation-timing-function" ],
+		initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
+		other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
+		invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
 	}
 }
 
 function logical_box_prop_get_computed(cs, property)
 {
 	if (! /^-moz-/.test(property))
 		throw "Unexpected property";
 	property = property.substring(5);
--- a/layout/style/test/test_garbage_at_end_of_declarations.html
+++ b/layout/style/test/test_garbage_at_end_of_declarations.html
@@ -68,16 +68,19 @@ var gAllowsExtraUnusual = {
                  "linear 1s 2s": true, "linear 1s": true,
                  "1s linear": true, "1s 2s": true, "2s 1s": true,
                  "linear": true, "1s": true, "2s": true,
                  "ease-in-out": true, "2s ease-in": true,
                  "ease-out 2s": true, "1s bounce, 2s": true,
                  "1s bounce, 2s none": true },
 };
 
+gAllowsExtraUnusual["-moz-transition"] = gAllowsExtraUnusual["transition"];
+gAllowsExtraUnusual["-moz-animation"] = gAllowsExtraUnusual["animation"];
+
 function test_property(property)
 {
   var info = gCSSProperties[property];
 
   function test_value(value) {
     if (property in gAllowsExtra &&
         value != "inherit" && value != "-moz-initial" &&
         !(value in gAllowsExtra[property])) {
--- a/layout/style/test/test_inherit_storage.html
+++ b/layout/style/test/test_inherit_storage.html
@@ -53,18 +53,23 @@ function test_property(property)
   }
   check_set(property);
   if ("subproperties" in info)
     for (var idx in info.subproperties)
       check_set(info.subproperties[idx]);
 
   // We don't care particularly about the whitespace or the placement of
   // semicolons, but for simplicity we'll test the current behavior.
-  is(gDeclaration.cssText, property + ": inherit;",
-    "declaration should serialize to exactly what went in (for inherit)");
+  if ("alias_for" in info) {
+    is(gDeclaration.cssText, info.alias_for + ": inherit;",
+      "declaration should serialize to exactly what went in (for inherit)");
+  } else {
+    is(gDeclaration.cssText, property + ": inherit;",
+      "declaration should serialize to exactly what went in (for inherit)");
+  }
 
   gDeclaration.removeProperty(property);
 
   function check_final(sproperty) {
     var sinfo = gCSSProperties[sproperty];
     var val = gDeclaration.getPropertyValue(sproperty);
     is(val, "", "value of '" + sproperty + "' after removal of value");
     is(val, gDeclaration[sinfo.domProp],
--- a/layout/style/test/test_initial_storage.html
+++ b/layout/style/test/test_initial_storage.html
@@ -53,18 +53,23 @@ function test_property(property)
   }
   check_set(property);
   if ("subproperties" in info)
     for (var idx in info.subproperties)
       check_set(info.subproperties[idx]);
 
   // We don't care particularly about the whitespace or the placement of
   // semicolons, but for simplicity we'll test the current behavior.
-  is(gDeclaration.cssText, property + ": -moz-initial;",
-    "declaration should serialize to exactly what went in (for -moz-initial)");
+  if ("alias_for" in info) {
+    is(gDeclaration.cssText, info.alias_for + ": -moz-initial;",
+      "declaration should serialize to exactly what went in (for -moz-initial)");
+  } else {
+    is(gDeclaration.cssText, property + ": -moz-initial;",
+      "declaration should serialize to exactly what went in (for -moz-initial)");
+  }
 
   gDeclaration.removeProperty(property);
 
   function check_final(sproperty) {
     var sinfo = gCSSProperties[sproperty];
     var val = gDeclaration.getPropertyValue(sproperty);
     is(val, "", "value of '" + sproperty + "' after removal of value");
     is(val, gDeclaration[sinfo.domProp],
--- a/layout/style/test/test_transitions_per_property.html
+++ b/layout/style/test/test_transitions_per_property.html
@@ -263,16 +263,17 @@ for (prop in supported_properties) {
 
 // Test that transitions don't do anything (i.e., aren't supported) on
 // the properties not in our test list above (and not transition
 // properties themselves).
 for (prop in gCSSProperties) {
   var info = gCSSProperties[prop];
   if (!(prop in supported_properties) &&
       info.type != CSS_TYPE_TRUE_SHORTHAND &&
+      !("alias_for" in info) &&
       !prop.match(/^transition-/) &&
       // FIXME (Bug 119078): THIS SHOULD REALLY NOT BE NEEDED!
       prop != "-moz-binding") {
 
     if ("prerequisites" in info) {
       var prereqs = info.prerequisites;
       for (var prereq in prereqs) {
         div.style.setProperty(prereq, prereqs[prereq], "");
--- a/layout/style/test/test_value_storage.html
+++ b/layout/style/test/test_value_storage.html
@@ -124,18 +124,23 @@ function test_property(property)
         var subprop = info.subproperties[idx];
         isnot(gDeclaration.getPropertyValue(subprop), "",
               "setting '" + value + "' on '" + property + "'");
       }
 
     // We don't care particularly about the whitespace or the placement of
     // semicolons, but for simplicity we'll test the current behavior.
     var expected_serialization = "";
-    if (step1val != "")
-      expected_serialization = property + ": " + step1val + ";";
+    if (step1val != "") {
+      if ("alias_for" in info) {
+        expected_serialization = info.alias_for + ": " + step1val + ";";
+      } else {
+        expected_serialization = property + ": " + step1val + ";";
+      }
+    }
     is(step1ser, expected_serialization,
        "serialization should match property value");
 
     gDeclaration.removeProperty(property);
     gDeclaration.setProperty(property, step1val, "");
 
     var serialize_func = xfail_serialize(property, value) ? todo_is : is;