Bug 745523 - Part a: prepare for unprefixing transforms by removing the prefix from internal APIs; r=dbaron

This commit is contained in:
Ms2ger 2012-05-05 11:00:04 +02:00
parent 8db1c68a9f
commit d2344a53dc
5 changed files with 42 additions and 41 deletions

View File

@ -534,7 +534,7 @@ protected:
bool ParseListStyle();
bool ParseMargin();
bool ParseMarks(nsCSSValue& aValue);
bool ParseMozTransform();
bool ParseTransform();
bool ParseOutline();
bool ParseOverflow();
bool ParsePadding();
@ -618,7 +618,7 @@ protected:
return mParsingCompoundProperty;
}
/* Functions for -moz-transform Parsing */
/* Functions for transform Parsing */
bool ParseSingleTransform(nsCSSValue& aValue, bool& aIs3D);
bool ParseFunction(const nsString &aFunction, const PRInt32 aAllowedTypes[],
PRUint16 aMinElems, PRUint16 aMaxElems,
@ -628,8 +628,8 @@ protected:
PRUint16 aMaxElems,
InfallibleTArray<nsCSSValue>& aOutput);
/* Functions for -moz-transform-origin/-moz-perspective-origin Parsing */
bool ParseMozTransformOrigin(bool aPerspective);
/* Functions for transform-origin/perspective-origin Parsing */
bool ParseTransformOrigin(bool aPerspective);
/* Find and return the namespace ID associated with aPrefix.
If aPrefix has not been declared in an @namespace rule, returns
@ -5623,12 +5623,12 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSProperty aPropID)
return ParseSize();
case eCSSProperty_text_decoration:
return ParseTextDecoration();
case eCSSProperty__moz_transform:
return ParseMozTransform();
case eCSSProperty__moz_transform_origin:
return ParseMozTransformOrigin(false);
case eCSSProperty_transform:
return ParseTransform();
case eCSSProperty_transform_origin:
return ParseTransformOrigin(false);
case eCSSProperty_perspective_origin:
return ParseMozTransformOrigin(true);
return ParseTransformOrigin(true);
case eCSSProperty_transition:
return ParseTransition();
case eCSSProperty_animation:
@ -7721,7 +7721,7 @@ CSSParserImpl::ParseOneFamily(nsAString& aFamily)
}
///////////////////////////////////////////////////////
// -moz-transform Parsing Implementation
// transform Parsing Implementation
/* Reads a function list of arguments. Do not call this function
* directly; it's mean to be caled from ParseFunction.
@ -8057,10 +8057,10 @@ CSSParserImpl::ParseSingleTransform(nsCSSValue& aValue, bool& aIs3D)
return ParseFunction(mToken.mIdent, variantMask, minElems, maxElems, aValue);
}
/* Parses a -moz-transform property list by continuously reading in properties
/* Parses a transform property list by continuously reading in properties
* and constructing a matrix from it.
*/
bool CSSParserImpl::ParseMozTransform()
bool CSSParserImpl::ParseTransform()
{
nsCSSValue value;
if (ParseVariant(value, VARIANT_INHERIT | VARIANT_NONE, nsnull)) {
@ -8085,17 +8085,17 @@ bool CSSParserImpl::ParseMozTransform()
cur = cur->mNext;
}
}
AppendValue(eCSSProperty__moz_transform, value);
AppendValue(eCSSProperty_transform, value);
return true;
}
bool CSSParserImpl::ParseMozTransformOrigin(bool aPerspective)
bool CSSParserImpl::ParseTransformOrigin(bool aPerspective)
{
nsCSSValuePair position;
if (!ParseBoxPositionValues(position, true))
return false;
nsCSSProperty prop = eCSSProperty__moz_transform_origin;
nsCSSProperty prop = eCSSProperty_transform_origin;
if (aPerspective) {
if (!ExpectEndProperty()) {
return false;

View File

@ -57,10 +57,11 @@
lowercase characters.
-. 'id' should be the same as 'name' except that all hyphens ('-')
in 'name' are converted to underscores ('_') in 'id'. This lets us
do nice things with the macros without having to copy/convert strings
at runtime. These are the names used for the enum values of the
nsCSSProperty enumeration defined in nsCSSProps.h.
in 'name' are converted to underscores ('_') in 'id'. For properties
on a standards track, any '-moz-' prefix is removed in 'id'. This
lets us do nice things with the macros without having to copy/convert
strings at runtime. These are the names used for the enum values of
the nsCSSProperty enumeration defined in nsCSSProps.h.
-. 'method' is designed to be as input for CSS2Properties and similar
callers. It must always be the same as 'name' except it must use
@ -2319,7 +2320,7 @@ CSS_PROP_TEXT(
eStyleAnimType_None)
CSS_PROP_DISPLAY(
-moz-transform,
_moz_transform,
transform,
CSS_PROP_DOMPROP_PREFIXED(Transform),
CSS_PROPERTY_PARSE_FUNCTION,
0,
@ -2328,7 +2329,7 @@ CSS_PROP_DISPLAY(
eStyleAnimType_Custom)
CSS_PROP_DISPLAY(
-moz-transform-origin,
_moz_transform_origin,
transform_origin,
CSS_PROP_DOMPROP_PREFIXED(TransformOrigin),
CSS_PROPERTY_PARSE_FUNCTION |
CSS_PROPERTY_STORES_CALC,

View File

@ -948,7 +948,7 @@ nsComputedDOMStyle::DoGetCounterIncrement()
* it back.
*/
nsIDOMCSSValue*
nsComputedDOMStyle::DoGetMozTransformOrigin()
nsComputedDOMStyle::DoGetTransformOrigin()
{
/* We need to build up a list of two values. We'll call them
* width and height.
@ -985,7 +985,7 @@ nsComputedDOMStyle::DoGetMozTransformOrigin()
* it back.
*/
nsIDOMCSSValue*
nsComputedDOMStyle::DoGetMozPerspectiveOrigin()
nsComputedDOMStyle::DoGetPerspectiveOrigin()
{
/* We need to build up a list of two values. We'll call them
* width and height.
@ -1011,7 +1011,7 @@ nsComputedDOMStyle::DoGetMozPerspectiveOrigin()
}
nsIDOMCSSValue*
nsComputedDOMStyle::DoGetMozPerspective()
nsComputedDOMStyle::DoGetPerspective()
{
nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
if (GetStyleDisplay()->mChildPerspective.GetUnit() == eStyleUnit_Coord &&
@ -1024,7 +1024,7 @@ nsComputedDOMStyle::DoGetMozPerspective()
}
nsIDOMCSSValue*
nsComputedDOMStyle::DoGetMozBackfaceVisibility()
nsComputedDOMStyle::DoGetBackfaceVisibility()
{
nsROCSSPrimitiveValue* val = GetROCSSPrimitiveValue();
val->SetIdent(
@ -1034,7 +1034,7 @@ nsComputedDOMStyle::DoGetMozBackfaceVisibility()
}
nsIDOMCSSValue*
nsComputedDOMStyle::DoGetMozTransformStyle()
nsComputedDOMStyle::DoGetTransformStyle()
{
nsROCSSPrimitiveValue *val = GetROCSSPrimitiveValue();
val->SetIdent(
@ -1048,7 +1048,7 @@ nsComputedDOMStyle::DoGetMozTransformStyle()
* "matrix" wrapper.
*/
nsIDOMCSSValue*
nsComputedDOMStyle::DoGetMozTransform()
nsComputedDOMStyle::DoGetTransform()
{
/* First, get the display data. We'll need it. */
const nsStyleDisplay* display = GetStyleDisplay();
@ -4672,7 +4672,7 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
COMPUTED_STYLE_MAP_ENTRY(animation_play_state, AnimationPlayState),
COMPUTED_STYLE_MAP_ENTRY(animation_timing_function, AnimationTimingFunction),
COMPUTED_STYLE_MAP_ENTRY(appearance, Appearance),
COMPUTED_STYLE_MAP_ENTRY(backface_visibility, MozBackfaceVisibility),
COMPUTED_STYLE_MAP_ENTRY(backface_visibility, BackfaceVisibility),
COMPUTED_STYLE_MAP_ENTRY(_moz_background_inline_policy, BackgroundInlinePolicy),
COMPUTED_STYLE_MAP_ENTRY(binding, Binding),
COMPUTED_STYLE_MAP_ENTRY(border_bottom_colors, BorderBottomColors),
@ -4711,8 +4711,8 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_bottomRight,OutlineRadiusBottomRight),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_topLeft, OutlineRadiusTopLeft),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_topRight, OutlineRadiusTopRight),
COMPUTED_STYLE_MAP_ENTRY(perspective, MozPerspective),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(perspective_origin, MozPerspectiveOrigin),
COMPUTED_STYLE_MAP_ENTRY(perspective, Perspective),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(perspective_origin, PerspectiveOrigin),
COMPUTED_STYLE_MAP_ENTRY(stack_sizing, StackSizing),
COMPUTED_STYLE_MAP_ENTRY(_moz_tab_size, MozTabSize),
COMPUTED_STYLE_MAP_ENTRY(text_align_last, TextAlignLast),
@ -4721,9 +4721,9 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength)
COMPUTED_STYLE_MAP_ENTRY(text_decoration_line, MozTextDecorationLine),
COMPUTED_STYLE_MAP_ENTRY(text_decoration_style, MozTextDecorationStyle),
COMPUTED_STYLE_MAP_ENTRY(text_size_adjust, TextSizeAdjust),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_transform, MozTransform),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_transform_origin, MozTransformOrigin),
COMPUTED_STYLE_MAP_ENTRY(transform_style, MozTransformStyle),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(transform, Transform),
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(transform_origin, TransformOrigin),
COMPUTED_STYLE_MAP_ENTRY(transform_style, TransformStyle),
COMPUTED_STYLE_MAP_ENTRY(transition_delay, TransitionDelay),
COMPUTED_STYLE_MAP_ENTRY(transition_duration, TransitionDuration),
COMPUTED_STYLE_MAP_ENTRY(transition_property, TransitionProperty),

View File

@ -353,12 +353,12 @@ private:
nsIDOMCSSValue* DoGetResize();
nsIDOMCSSValue* DoGetPageBreakAfter();
nsIDOMCSSValue* DoGetPageBreakBefore();
nsIDOMCSSValue* DoGetMozTransform();
nsIDOMCSSValue* DoGetMozTransformOrigin();
nsIDOMCSSValue* DoGetMozPerspective();
nsIDOMCSSValue* DoGetMozBackfaceVisibility();
nsIDOMCSSValue* DoGetMozPerspectiveOrigin();
nsIDOMCSSValue* DoGetMozTransformStyle();
nsIDOMCSSValue* DoGetTransform();
nsIDOMCSSValue* DoGetTransformOrigin();
nsIDOMCSSValue* DoGetPerspective();
nsIDOMCSSValue* DoGetBackfaceVisibility();
nsIDOMCSSValue* DoGetPerspectiveOrigin();
nsIDOMCSSValue* DoGetTransformStyle();
nsIDOMCSSValue* DoGetOrient();
/* User interface properties */

View File

@ -2622,7 +2622,7 @@ nsStyleAnimation::ExtractComputedValue(nsCSSProperty aProperty,
break;
}
case eCSSProperty__moz_transform_origin: {
case eCSSProperty_transform_origin: {
const nsStyleDisplay *styleDisplay =
static_cast<const nsStyleDisplay*>(styleStruct);
nsAutoPtr<nsCSSValueTriplet> triplet(new nsCSSValueTriplet);
@ -2905,7 +2905,7 @@ nsStyleAnimation::ExtractComputedValue(nsCSSProperty aProperty,
break;
}
case eCSSProperty__moz_transform: {
case eCSSProperty_transform: {
const nsStyleDisplay *display =
static_cast<const nsStyleDisplay*>(styleStruct);
nsAutoPtr<nsCSSValueList> result;