Add CSS property bit for which properties have stored calc() in style structs. (Bug 520234) r=bzbarsky a=blocking2.0:beta7

This commit is contained in:
L. David Baron 2010-09-15 08:11:26 -07:00
parent 5c9c223438
commit 5b3f530df7
2 changed files with 60 additions and 35 deletions

View File

@ -306,7 +306,7 @@ CSS_PROP_OUTLINE(
-moz-outline-radius-topleft,
_moz_outline_radius_topLeft,
MozOutlineRadiusTopleft,
0,
CSS_PROPERTY_STORES_CALC,
Margin,
mOutlineRadius.mTopLeft,
nsnull,
@ -316,7 +316,7 @@ CSS_PROP_OUTLINE(
-moz-outline-radius-topright,
_moz_outline_radius_topRight,
MozOutlineRadiusTopright,
0,
CSS_PROPERTY_STORES_CALC,
Margin,
mOutlineRadius.mTopRight,
nsnull,
@ -326,7 +326,7 @@ CSS_PROP_OUTLINE(
-moz-outline-radius-bottomright,
_moz_outline_radius_bottomRight,
MozOutlineRadiusBottomright,
0,
CSS_PROPERTY_STORES_CALC,
Margin,
mOutlineRadius.mBottomRight,
nsnull,
@ -336,7 +336,7 @@ CSS_PROP_OUTLINE(
-moz-outline-radius-bottomleft,
_moz_outline_radius_bottomLeft,
MozOutlineRadiusBottomleft,
0,
CSS_PROPERTY_STORES_CALC,
Margin,
mOutlineRadius.mBottomLeft,
nsnull,
@ -449,7 +449,8 @@ CSS_PROP_BACKGROUND(
background_position,
BackgroundPosition,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
CSS_PROPERTY_STORES_CALC,
Color,
mBackPosition,
kBackgroundPositionKTable,
@ -471,7 +472,8 @@ CSS_PROP_BACKGROUND(
background_size,
BackgroundSize,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
CSS_PROPERTY_VALUE_LIST_USES_COMMAS,
CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
CSS_PROPERTY_STORES_CALC,
Color,
mBackSize,
kBackgroundSizeKTable,
@ -1032,7 +1034,8 @@ CSS_PROP_BORDER(
border-top-left-radius,
border_top_left_radius,
BorderTopLeftRadius,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mBorderRadius.mTopLeft,
nsnull,
@ -1042,7 +1045,8 @@ CSS_PROP_BORDER(
border-top-right-radius,
border_top_right_radius,
BorderTopRightRadius,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mBorderRadius.mTopRight,
nsnull,
@ -1052,7 +1056,8 @@ CSS_PROP_BORDER(
border-bottom-right-radius,
border_bottom_right_radius,
BorderBottomRightRadius,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mBorderRadius.mBottomRight,
nsnull,
@ -1062,7 +1067,8 @@ CSS_PROP_BORDER(
border-bottom-left-radius,
border_bottom_left_radius,
BorderBottomLeftRadius,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mBorderRadius.mBottomLeft,
nsnull,
@ -1072,7 +1078,7 @@ CSS_PROP_POSITION(
bottom,
bottom,
Bottom,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mOffset.mBottom,
nsnull,
@ -1438,7 +1444,7 @@ CSS_PROP_POSITION(
height,
height,
Height,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mHeight,
nsnull,
@ -1468,7 +1474,7 @@ CSS_PROP_POSITION(
left,
left,
Left,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mOffset.mLeft,
nsnull,
@ -1538,7 +1544,8 @@ CSS_PROP_MARGIN(
margin-bottom,
margin_bottom,
MarginBottom,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mMargin.mBottom,
nsnull,
@ -1554,7 +1561,8 @@ CSS_PROP_MARGIN(
margin-end-value,
margin_end_value,
X,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mMarginEnd,
nsnull,
@ -1572,7 +1580,8 @@ CSS_PROP_MARGIN(
margin_left_value,
X,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_REPORT_OTHER_NAME,
CSS_PROPERTY_REPORT_OTHER_NAME |
CSS_PROPERTY_STORES_CALC,
Margin,
mMargin.mLeft,
nsnull,
@ -1612,7 +1621,8 @@ CSS_PROP_MARGIN(
margin_right_value,
X,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_REPORT_OTHER_NAME,
CSS_PROPERTY_REPORT_OTHER_NAME |
CSS_PROPERTY_STORES_CALC,
Margin,
mMargin.mRight,
nsnull,
@ -1651,7 +1661,8 @@ CSS_PROP_MARGIN(
margin-start-value,
margin_start_value,
X,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mMarginStart,
nsnull,
@ -1662,7 +1673,8 @@ CSS_PROP_MARGIN(
margin-top,
margin_top,
MarginTop,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mMargin.mTop,
nsnull,
@ -1690,7 +1702,7 @@ CSS_PROP_POSITION(
max-height,
max_height,
MaxHeight,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mMaxHeight,
nsnull,
@ -1700,7 +1712,7 @@ CSS_PROP_POSITION(
max-width,
max_width,
MaxWidth,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mMaxWidth,
kWidthKTable,
@ -1710,7 +1722,7 @@ CSS_PROP_POSITION(
min-height,
min_height,
MinHeight,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mMinHeight,
nsnull,
@ -1720,7 +1732,7 @@ CSS_PROP_POSITION(
min-width,
min_width,
MinWidth,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mMinWidth,
kWidthKTable,
@ -1823,7 +1835,8 @@ CSS_PROP_PADDING(
padding-bottom,
padding_bottom,
PaddingBottom,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mPadding.mBottom,
nsnull,
@ -1839,7 +1852,8 @@ CSS_PROP_PADDING(
padding-end-value,
padding_end_value,
X,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mPaddingEnd,
nsnull,
@ -1857,7 +1871,8 @@ CSS_PROP_PADDING(
padding_left_value,
X,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_REPORT_OTHER_NAME,
CSS_PROPERTY_REPORT_OTHER_NAME |
CSS_PROPERTY_STORES_CALC,
Margin,
mPadding.mLeft,
nsnull,
@ -1897,7 +1912,8 @@ CSS_PROP_PADDING(
padding_right_value,
X,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_REPORT_OTHER_NAME,
CSS_PROPERTY_REPORT_OTHER_NAME |
CSS_PROPERTY_STORES_CALC,
Margin,
mPadding.mRight,
nsnull,
@ -1936,7 +1952,8 @@ CSS_PROP_PADDING(
padding-start-value,
padding_start_value,
X,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mPaddingStart,
nsnull,
@ -1947,7 +1964,8 @@ CSS_PROP_PADDING(
padding-top,
padding_top,
PaddingTop,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER |
CSS_PROPERTY_STORES_CALC,
Margin,
mPadding.mTop,
nsnull,
@ -2078,7 +2096,7 @@ CSS_PROP_POSITION(
right,
right,
Right,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mOffset.mRight,
nsnull,
@ -2174,7 +2192,7 @@ CSS_PROP_TEXT(
text-indent,
text_indent,
TextIndent,
0,
CSS_PROPERTY_STORES_CALC,
Text,
mTextIndent,
nsnull,
@ -2216,7 +2234,7 @@ CSS_PROP_DISPLAY(
-moz-transform-origin,
_moz_transform_origin,
MozTransformOrigin,
0,
CSS_PROPERTY_STORES_CALC,
Display,
mTransformOrigin,
kBackgroundPositionKTable,
@ -2226,7 +2244,7 @@ CSS_PROP_POSITION(
top,
top,
Top,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mOffset.mTop,
nsnull,
@ -2334,7 +2352,8 @@ CSS_PROP_TEXTRESET(
vertical-align,
vertical_align,
VerticalAlign,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE,
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
CSS_PROPERTY_STORES_CALC,
Text,
mVerticalAlign,
kVerticalAlignKTable,
@ -2388,7 +2407,7 @@ CSS_PROP_POSITION(
width,
width,
Width,
0,
CSS_PROPERTY_STORES_CALC,
Position,
mWidth,
kWidthKTable,

View File

@ -88,6 +88,12 @@
// nsCSSProps::OtherNameFor to get the other property.
#define CSS_PROPERTY_REPORT_OTHER_NAME (1<<7)
// This property allows calc() between lengths and percentages and
// stores such calc() expressions in its style structs (typically in an
// nsStyleCoord, although this is not the case for 'background-position'
// and 'background-size').
#define CSS_PROPERTY_STORES_CALC (1<<8)
/**
* Types of animatable values.
*/