Rename -moz-box-shadow to box-shadow: manual changes. (Bug 590039) r=bzbarsky a2.0=blocking2.0:beta6
authorL. David Baron <dbaron@dbaron.org>
Sat, 11 Sep 2010 09:27:13 -0700
changeset 52480 83a79e1e035bbba5d59f26984523b16e85e3c40c
parent 52479 11cf38adabf37a0232c13ac7593ae89006234b21
child 52481 26bfc086082229a29d14fa8f1d45b73c98f3af7e
push idunknown
push userunknown
push dateunknown
reviewersbzbarsky
bugs590039
milestone2.0b6pre
Rename -moz-box-shadow to box-shadow: manual changes. (Bug 590039) r=bzbarsky a2.0=blocking2.0:beta6
dom/interfaces/css/nsIDOMCSS2Properties.idl
layout/style/nsCSSPropList.h
layout/style/nsCSSProps.cpp
layout/style/test/property_database.js
--- a/dom/interfaces/css/nsIDOMCSS2Properties.idl
+++ b/dom/interfaces/css/nsIDOMCSS2Properties.idl
@@ -45,17 +45,17 @@
  * The nsIDOMCSS2Properties interface is a datatype for additional
  * reflection of data already provided in nsIDOMCSSStyleDeclaration in
  * the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[scriptable, uuid(6e583050-7345-4623-9acf-44dc7136e09f)]
+[scriptable, uuid(abedfd52-9821-4311-b50c-7ef229b43abf)]
 interface nsIDOMCSS2Properties : nsISupports
 {
            attribute DOMString        azimuth;
                                         // raises(DOMException) on setting
 
            attribute DOMString        background;
                                         // raises(DOMException) on setting
 
@@ -153,16 +153,19 @@ interface nsIDOMCSS2Properties : nsISupp
                                         // raises(DOMException) on setting
 
            attribute DOMString        borderBottomRightRadius;
                                         // raises(DOMException) on setting
 
            attribute DOMString        bottom;
                                         // raises(DOMException) on setting
 
+           attribute DOMString        boxShadow;
+                                        // raises(DOMException) on setting
+
            attribute DOMString        captionSide;
                                         // raises(DOMException) on setting
 
            attribute DOMString        clear;
                                         // raises(DOMException) on setting
 
            attribute DOMString        clip;
                                         // raises(DOMException) on setting
@@ -696,19 +699,16 @@ interface nsIDOMCSS2Properties : nsISupp
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozBorderStartWidth;
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozStackSizing;
                                         // raises(DOMException) on setting
 
-           attribute DOMString        boxShadow;
-                                        // raises(DOMException) on setting
-
            attribute DOMString        MozBorderImage;
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozColumnRule;
                                         // raises(DOMException) on setting
 
            attribute DOMString        MozColumnRuleWidth;
                                         // raises(DOMException) on setting
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -1076,17 +1076,17 @@ CSS_PROP_POSITION(
     Position,
     mOffset.mBottom,
     nsnull,
     offsetof(nsStylePosition, mOffset),
     eStyleAnimType_Sides_Bottom)
 CSS_PROP_BORDER(
     box-shadow,
     box_shadow,
-    boxShadow,
+    BoxShadow,
     CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
         CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
     Margin,
     mBoxShadow,
     kBoxShadowTypeKTable,
     offsetof(nsStyleBorder, mBoxShadow),
     eStyleAnimType_Shadow)
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -325,16 +325,17 @@ struct CSSPropertyAlias {
 };
 
 static const CSSPropertyAlias gAliases[] = {
   { "-moz-border-radius", eCSSProperty_border_radius },
   { "-moz-border-radius-bottomleft", eCSSProperty_border_bottom_left_radius },
   { "-moz-border-radius-bottomright", eCSSProperty_border_bottom_right_radius },
   { "-moz-border-radius-topleft", eCSSProperty_border_top_left_radius },
   { "-moz-border-radius-topright", eCSSProperty_border_top_right_radius },
+  { "-moz-box-shadow", eCSSProperty_box_shadow },
   // Don't forget to update the sizeof in CSSPropertyAlias above with the
   // longest string when you add stuff here.
 };
 
 nsCSSProperty
 nsCSSProps::LookupProperty(const nsACString& aProperty)
 {
   NS_ABORT_IF_FALSE(gPropertyTable, "no lookup table, needs addref");
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -371,38 +371,16 @@ var gCSSProperties = {
 	"-moz-box-pack": {
 		domProp: "MozBoxPack",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "start" ],
 		other_values: [ "center", "end", "justify" ],
 		invalid_values: []
 	},
-	"box-shadow": {
-		domProp: "boxShadow",
-		inherited: false,
-		type: CSS_TYPE_LONGHAND,
-		initial_values: [ "none" ],
-		prerequisites: { "color": "blue" },
-		other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px",
-			/* calc() values */
-			"2px 2px -moz-calc(-5px)", /* clamped */
-			"-moz-calc(3em - 2px) 2px green",
-			"green -moz-calc(3em - 2px) 2px",
-			"2px -moz-calc(2px + 0.2em)",
-			"blue 2px -moz-calc(2px + 0.2em)",
-			"2px -moz-calc(2px + 0.2em) blue",
-			"-moz-calc(-2px) -moz-calc(-2px)",
-			"-2px -2px",
-			"-moz-calc(2px) -moz-calc(2px)",
-			"-moz-calc(2px) -moz-calc(2px) -moz-calc(2px)",
-			"-moz-calc(2px) -moz-calc(2px) -moz-calc(2px) -moz-calc(2px)"
-		],
-		invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none" ]
-	},
 	"-moz-box-sizing": {
 		domProp: "MozBoxSizing",
 		inherited: false,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "content-box" ],
 		other_values: [ "border-box", "padding-box" ],
 		invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
 	},
@@ -1519,16 +1497,38 @@ var gCSSProperties = {
 			"-moz-calc(-2px)",
 			"-moz-calc(50%)",
 			"-moz-calc(3*25px)",
 			"-moz-calc(25px*3)",
 			"-moz-calc(3*25px + 50%)",
 		],
 		invalid_values: []
 	},
+	"box-shadow": {
+		domProp: "boxShadow",
+		inherited: false,
+		type: CSS_TYPE_LONGHAND,
+		initial_values: [ "none" ],
+		prerequisites: { "color": "blue" },
+		other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px",
+			/* calc() values */
+			"2px 2px -moz-calc(-5px)", /* clamped */
+			"-moz-calc(3em - 2px) 2px green",
+			"green -moz-calc(3em - 2px) 2px",
+			"2px -moz-calc(2px + 0.2em)",
+			"blue 2px -moz-calc(2px + 0.2em)",
+			"2px -moz-calc(2px + 0.2em) blue",
+			"-moz-calc(-2px) -moz-calc(-2px)",
+			"-2px -2px",
+			"-moz-calc(2px) -moz-calc(2px)",
+			"-moz-calc(2px) -moz-calc(2px) -moz-calc(2px)",
+			"-moz-calc(2px) -moz-calc(2px) -moz-calc(2px) -moz-calc(2px)"
+		],
+		invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none" ]
+	},
 	"caption-side": {
 		domProp: "captionSide",
 		inherited: true,
 		type: CSS_TYPE_LONGHAND,
 		initial_values: [ "top" ],
 		other_values: [ "right", "left", "bottom", "top-outside", "bottom-outside" ],
 		invalid_values: []
 	},