Bug 451134 (2/2): switch to the official border-radius property names: by-hand changes. r=dbaron a2.0=blocking2.0:beta6

This commit is contained in:
Zack Weinberg 2010-09-09 08:21:48 -07:00
parent e4c76eccb0
commit b8aabe9d10
6 changed files with 79 additions and 79 deletions

View File

@ -50,7 +50,7 @@
* http://www.w3.org/TR/DOM-Level-2-Style
*/
[scriptable, uuid(c8db3d5b-8e11-4219-84ea-d72b565ec738)]
[scriptable, uuid(6e583050-7345-4623-9acf-44dc7136e09f)]
interface nsIDOMCSS2Properties : nsISupports
{
attribute DOMString azimuth;
@ -140,6 +140,21 @@ interface nsIDOMCSS2Properties : nsISupports
attribute DOMString borderWidth;
// raises(DOMException) on setting
attribute DOMString borderRadius;
// raises(DOMException) on setting
attribute DOMString borderTopLeftRadius;
// raises(DOMException) on setting
attribute DOMString borderTopRightRadius;
// raises(DOMException) on setting
attribute DOMString borderBottomLeftRadius;
// raises(DOMException) on setting
attribute DOMString borderBottomRightRadius;
// raises(DOMException) on setting
attribute DOMString bottom;
// raises(DOMException) on setting
@ -540,21 +555,6 @@ interface nsIDOMCSS2Properties : nsISupports
attribute DOMString MozBorderTopColors;
// raises(DOMException) on setting
attribute DOMString MozBorderRadius;
// raises(DOMException) on setting
attribute DOMString MozBorderRadiusTopleft;
// raises(DOMException) on setting
attribute DOMString MozBorderRadiusTopright;
// raises(DOMException) on setting
attribute DOMString MozBorderRadiusBottomleft;
// raises(DOMException) on setting
attribute DOMString MozBorderRadiusBottomright;
// raises(DOMException) on setting
attribute DOMString MozBoxAlign;
// raises(DOMException) on setting

View File

@ -297,51 +297,6 @@ CSS_PROP_DISPLAY(
kAppearanceKTable,
CSS_PROP_NO_OFFSET,
eStyleAnimType_None)
CSS_PROP_SHORTHAND(
border-radius,
border_radius,
MozBorderRadius,
0)
CSS_PROP_BORDER(
border-top-left-radius,
border_top_left_radius,
MozBorderRadiusTopleft,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
Margin,
mBorderRadius.mTopLeft,
nsnull,
offsetof(nsStyleBorder, mBorderRadius),
eStyleAnimType_Corner_TopLeft)
CSS_PROP_BORDER(
border-top-right-radius,
border_top_right_radius,
MozBorderRadiusTopright,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
Margin,
mBorderRadius.mTopRight,
nsnull,
offsetof(nsStyleBorder, mBorderRadius),
eStyleAnimType_Corner_TopRight)
CSS_PROP_BORDER(
border-bottom-right-radius,
border_bottom_right_radius,
MozBorderRadiusBottomright,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
Margin,
mBorderRadius.mBottomRight,
nsnull,
offsetof(nsStyleBorder, mBorderRadius),
eStyleAnimType_Corner_BottomRight)
CSS_PROP_BORDER(
border-bottom-left-radius,
border_bottom_left_radius,
MozBorderRadiusBottomleft,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
Margin,
mBorderRadius.mBottomLeft,
nsnull,
offsetof(nsStyleBorder, mBorderRadius),
eStyleAnimType_Corner_BottomLeft)
CSS_PROP_SHORTHAND(
-moz-outline-radius,
_moz_outline_radius,
@ -1068,6 +1023,51 @@ CSS_PROP_SHORTHAND(
border_width,
BorderWidth,
0)
CSS_PROP_SHORTHAND(
border-radius,
border_radius,
BorderRadius,
0)
CSS_PROP_BORDER(
border-top-left-radius,
border_top_left_radius,
BorderTopLeftRadius,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
Margin,
mBorderRadius.mTopLeft,
nsnull,
offsetof(nsStyleBorder, mBorderRadius),
eStyleAnimType_Corner_TopLeft)
CSS_PROP_BORDER(
border-top-right-radius,
border_top_right_radius,
BorderTopRightRadius,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
Margin,
mBorderRadius.mTopRight,
nsnull,
offsetof(nsStyleBorder, mBorderRadius),
eStyleAnimType_Corner_TopRight)
CSS_PROP_BORDER(
border-bottom-right-radius,
border_bottom_right_radius,
BorderBottomRightRadius,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
Margin,
mBorderRadius.mBottomRight,
nsnull,
offsetof(nsStyleBorder, mBorderRadius),
eStyleAnimType_Corner_BottomRight)
CSS_PROP_BORDER(
border-bottom-left-radius,
border_bottom_left_radius,
BorderBottomLeftRadius,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
Margin,
mBorderRadius.mBottomLeft,
nsnull,
offsetof(nsStyleBorder, mBorderRadius),
eStyleAnimType_Corner_BottomLeft)
CSS_PROP_POSITION(
bottom,
bottom,

View File

@ -1567,7 +1567,7 @@ const PRUint32 nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = {
#undef CSS_PROP_SHORTHAND
};
static const nsCSSProperty gMozBorderRadiusSubpropTable[] = {
static const nsCSSProperty gBorderRadiusSubpropTable[] = {
// Code relies on these being in topleft-topright-bottomright-bottomleft
// order.
eCSSProperty_border_top_left_radius,

View File

@ -2005,28 +2005,28 @@ nsComputedDOMStyle::DoGetBorderTopColors(nsIDOMCSSValue** aValue)
}
nsresult
nsComputedDOMStyle::DoGetBorderRadiusBottomLeft(nsIDOMCSSValue** aValue)
nsComputedDOMStyle::DoGetBorderBottomLeftRadius(nsIDOMCSSValue** aValue)
{
return GetEllipseRadii(GetStyleBorder()->mBorderRadius,
NS_CORNER_BOTTOM_LEFT, aValue);
}
nsresult
nsComputedDOMStyle::DoGetBorderRadiusBottomRight(nsIDOMCSSValue** aValue)
nsComputedDOMStyle::DoGetBorderBottomRightRadius(nsIDOMCSSValue** aValue)
{
return GetEllipseRadii(GetStyleBorder()->mBorderRadius,
NS_CORNER_BOTTOM_RIGHT, aValue);
}
nsresult
nsComputedDOMStyle::DoGetBorderRadiusTopLeft(nsIDOMCSSValue** aValue)
nsComputedDOMStyle::DoGetBorderTopLeftRadius(nsIDOMCSSValue** aValue)
{
return GetEllipseRadii(GetStyleBorder()->mBorderRadius,
NS_CORNER_TOP_LEFT, aValue);
}
nsresult
nsComputedDOMStyle::DoGetBorderRadiusTopRight(nsIDOMCSSValue** aValue)
nsComputedDOMStyle::DoGetBorderTopRightRadius(nsIDOMCSSValue** aValue)
{
return GetEllipseRadii(GetStyleBorder()->mBorderRadius,
NS_CORNER_TOP_RIGHT, aValue);
@ -4844,10 +4844,10 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
COMPUTED_STYLE_MAP_ENTRY(border_left_colors, BorderLeftColors),
COMPUTED_STYLE_MAP_ENTRY(border_right_colors, BorderRightColors),
COMPUTED_STYLE_MAP_ENTRY(border_top_colors, BorderTopColors),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(border_bottom_left_radius, BorderRadiusBottomLeft),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(border_bottom_right_radius,BorderRadiusBottomRight),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(border_top_left_radius, BorderRadiusTopLeft),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(border_top_right_radius, BorderRadiusTopRight),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(border_bottom_left_radius, BorderBottomLeftRadius),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(border_bottom_right_radius,BorderBottomRightRadius),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(border_top_left_radius, BorderTopLeftRadius),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(border_top_right_radius, BorderTopRightRadius),
COMPUTED_STYLE_MAP_ENTRY(box_align, BoxAlign),
COMPUTED_STYLE_MAP_ENTRY(box_direction, BoxDirection),
COMPUTED_STYLE_MAP_ENTRY(box_flex, BoxFlex),

View File

@ -252,10 +252,10 @@ private:
nsresult DoGetBorderLeftColors(nsIDOMCSSValue** aValue);
nsresult DoGetBorderRightColors(nsIDOMCSSValue** aValue);
nsresult DoGetBorderTopColors(nsIDOMCSSValue** aValue);
nsresult DoGetBorderRadiusBottomLeft(nsIDOMCSSValue** aValue);
nsresult DoGetBorderRadiusBottomRight(nsIDOMCSSValue** aValue);
nsresult DoGetBorderRadiusTopLeft(nsIDOMCSSValue** aValue);
nsresult DoGetBorderRadiusTopRight(nsIDOMCSSValue** aValue);
nsresult DoGetBorderBottomLeftRadius(nsIDOMCSSValue** aValue);
nsresult DoGetBorderBottomRightRadius(nsIDOMCSSValue** aValue);
nsresult DoGetBorderTopLeftRadius(nsIDOMCSSValue** aValue);
nsresult DoGetBorderTopRightRadius(nsIDOMCSSValue** aValue);
nsresult DoGetFloatEdge(nsIDOMCSSValue** aValue);
nsresult DoGetBorderImage(nsIDOMCSSValue** aValue);

View File

@ -169,7 +169,7 @@ var gCSSProperties = {
invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red" ]
},
"border-radius": {
domProp: "MozBorderRadius",
domProp: "borderRadius",
inherited: false,
type: CSS_TYPE_TRUE_SHORTHAND,
prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
@ -192,7 +192,7 @@ var gCSSProperties = {
invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px" ]
},
"border-bottom-left-radius": {
domProp: "MozBorderRadiusBottomleft",
domProp: "borderBottomLeftRadius",
inherited: false,
type: CSS_TYPE_LONGHAND,
prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
@ -212,7 +212,7 @@ var gCSSProperties = {
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"border-bottom-right-radius": {
domProp: "MozBorderRadiusBottomright",
domProp: "borderBottomRightRadius",
inherited: false,
type: CSS_TYPE_LONGHAND,
prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
@ -232,7 +232,7 @@ var gCSSProperties = {
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"border-top-left-radius": {
domProp: "MozBorderRadiusTopleft",
domProp: "borderTopLeftRadius",
inherited: false,
type: CSS_TYPE_LONGHAND,
prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
@ -252,7 +252,7 @@ var gCSSProperties = {
invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit" ]
},
"border-top-right-radius": {
domProp: "MozBorderRadiusTopright",
domProp: "borderTopRightRadius",
inherited: false,
type: CSS_TYPE_LONGHAND,
prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},