| Index: Source/WebCore/css/CSSParser.cpp
|
| ===================================================================
|
| --- Source/WebCore/css/CSSParser.cpp (revision 145343)
|
| +++ Source/WebCore/css/CSSParser.cpp (working copy)
|
| @@ -1475,6 +1475,17 @@
|
| return StylePropertySet::createImmutable(results.data(), results.size(), m_context.mode);
|
| }
|
|
|
| +void CSSParser::addPropertyWithPrefixingVariant(CSSPropertyID propId, PassRefPtr<CSSValue> value, bool important, bool implicit)
|
| +{
|
| + RefPtr<CSSValue> val = value.get();
|
| + addProperty(propId, value, important, implicit);
|
| +
|
| + CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propId);
|
| + if (prefixingVariant == propId)
|
| + return;
|
| + addProperty(prefixingVariant, val.release(), important, implicit);
|
| +}
|
| +
|
| void CSSParser::addProperty(CSSPropertyID propId, PassRefPtr<CSSValue> value, bool important, bool implicit)
|
| {
|
| m_parsedProperties.append(CSSProperty(propId, value, important, m_currentShorthand, m_implicitShorthand || implicit));
|
| @@ -2499,13 +2510,17 @@
|
| case CSSPropertyWebkitAnimationPlayState:
|
| case CSSPropertyWebkitAnimationIterationCount:
|
| case CSSPropertyWebkitAnimationTimingFunction:
|
| + case CSSPropertyTransitionDelay:
|
| + case CSSPropertyTransitionDuration:
|
| + case CSSPropertyTransitionTimingFunction:
|
| + case CSSPropertyTransitionProperty:
|
| case CSSPropertyWebkitTransitionDelay:
|
| case CSSPropertyWebkitTransitionDuration:
|
| case CSSPropertyWebkitTransitionTimingFunction:
|
| case CSSPropertyWebkitTransitionProperty: {
|
| RefPtr<CSSValue> val;
|
| if (parseAnimationProperty(propId, val)) {
|
| - addProperty(propId, val.release(), important);
|
| + addPropertyWithPrefixingVariant(propId, val.release(), important);
|
| return true;
|
| }
|
| return false;
|
| @@ -2744,8 +2759,9 @@
|
| return parseShorthand(propId, webkitTextStrokeShorthand(), important);
|
| case CSSPropertyWebkitAnimation:
|
| return parseAnimationShorthand(important);
|
| + case CSSPropertyTransition:
|
| case CSSPropertyWebkitTransition:
|
| - return parseTransitionShorthand(important);
|
| + return parseTransitionShorthand(propId, important);
|
| case CSSPropertyInvalid:
|
| return false;
|
| case CSSPropertyPage:
|
| @@ -3256,12 +3272,13 @@
|
| return true;
|
| }
|
|
|
| -bool CSSParser::parseTransitionShorthand(bool important)
|
| +bool CSSParser::parseTransitionShorthand(CSSPropertyID propId, bool important)
|
| {
|
| const unsigned numProperties = 4;
|
| - ASSERT(numProperties == webkitTransitionShorthand().length());
|
| + const StylePropertyShorthand& shorthand = shorthandForProperty(propId);
|
| + ASSERT(numProperties == shorthand.length());
|
|
|
| - ShorthandScope scope(this, CSSPropertyWebkitTransition);
|
| + ShorthandScope scope(this, propId);
|
|
|
| bool parsedProperty[numProperties] = { false };
|
| RefPtr<CSSValue> values[numProperties];
|
| @@ -3285,7 +3302,7 @@
|
| for (i = 0; !found && i < numProperties; ++i) {
|
| if (!parsedProperty[i]) {
|
| RefPtr<CSSValue> val;
|
| - if (parseAnimationProperty(webkitTransitionShorthand().properties()[i], val)) {
|
| + if (parseAnimationProperty(shorthand.properties()[i], val)) {
|
| parsedProperty[i] = found = true;
|
| addAnimationValue(values[i], val.release());
|
| }
|
| @@ -3306,7 +3323,7 @@
|
|
|
| // Now add all of the properties we found.
|
| for (i = 0; i < numProperties; i++)
|
| - addProperty(webkitTransitionShorthand().properties()[i], values[i].release(), important);
|
| + addPropertyWithPrefixingVariant(shorthand.properties()[i], values[i].release(), important);
|
|
|
| return true;
|
| }
|
| @@ -4481,6 +4498,7 @@
|
| else {
|
| switch (propId) {
|
| case CSSPropertyWebkitAnimationDelay:
|
| + case CSSPropertyTransitionDelay:
|
| case CSSPropertyWebkitTransitionDelay:
|
| currValue = parseAnimationDelay();
|
| if (currValue)
|
| @@ -4492,6 +4510,7 @@
|
| m_valueList->next();
|
| break;
|
| case CSSPropertyWebkitAnimationDuration:
|
| + case CSSPropertyTransitionDuration:
|
| case CSSPropertyWebkitTransitionDuration:
|
| currValue = parseAnimationDuration();
|
| if (currValue)
|
| @@ -4517,6 +4536,7 @@
|
| if (currValue)
|
| m_valueList->next();
|
| break;
|
| + case CSSPropertyTransitionProperty:
|
| case CSSPropertyWebkitTransitionProperty:
|
| if (allowAnimationProperty)
|
| currValue = parseAnimationProperty(allowAnimationProperty);
|
| @@ -4526,6 +4546,7 @@
|
| m_valueList->next();
|
| break;
|
| case CSSPropertyWebkitAnimationTimingFunction:
|
| + case CSSPropertyTransitionTimingFunction:
|
| case CSSPropertyWebkitTransitionTimingFunction:
|
| currValue = parseAnimationTimingFunction();
|
| if (currValue)
|
|
|