From e031591955c446a96d9318ed59db92e3d92bbd65 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Sat, 11 Sep 2010 09:27:13 -0700 Subject: [PATCH] Rename -moz-box-shadow to box-shadow: manual changes. (Bug 590039) r=bzbarsky a2.0=blocking2.0:beta6 --- dom/interfaces/css/nsIDOMCSS2Properties.idl | 8 ++-- layout/style/nsCSSPropList.h | 2 +- layout/style/nsCSSProps.cpp | 1 + layout/style/test/property_database.js | 44 ++++++++++----------- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/dom/interfaces/css/nsIDOMCSS2Properties.idl b/dom/interfaces/css/nsIDOMCSS2Properties.idl index a85c5e446341..46029e5a4494 100644 --- a/dom/interfaces/css/nsIDOMCSS2Properties.idl +++ b/dom/interfaces/css/nsIDOMCSS2Properties.idl @@ -50,7 +50,7 @@ * 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; @@ -158,6 +158,9 @@ interface nsIDOMCSS2Properties : nsISupports attribute DOMString bottom; // raises(DOMException) on setting + attribute DOMString boxShadow; + // raises(DOMException) on setting + attribute DOMString captionSide; // raises(DOMException) on setting @@ -701,9 +704,6 @@ interface nsIDOMCSS2Properties : nsISupports attribute DOMString MozStackSizing; // raises(DOMException) on setting - attribute DOMString boxShadow; - // raises(DOMException) on setting - attribute DOMString MozBorderImage; // raises(DOMException) on setting diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 321af139b243..32de4577e98c 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -1081,7 +1081,7 @@ CSS_PROP_POSITION( 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, diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 7222921054c1..df3088eaf321 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -330,6 +330,7 @@ static const CSSPropertyAlias gAliases[] = { { "-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. }; diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 7b0d817348ae..8d381375da7d 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -376,28 +376,6 @@ var gCSSProperties = { 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, @@ -1524,6 +1502,28 @@ var gCSSProperties = { ], 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,