| Index: Source/WebCore/css/StylePropertySet.cpp
|
| ===================================================================
|
| --- Source/WebCore/css/StylePropertySet.cpp (revision 145343)
|
| +++ Source/WebCore/css/StylePropertySet.cpp (working copy)
|
| @@ -172,6 +172,8 @@
|
| return getCommonValue(overflowShorthand());
|
| case CSSPropertyPadding:
|
| return get4Values(paddingShorthand());
|
| + case CSSPropertyTransition:
|
| + return getLayeredShorthandValue(transitionShorthand());
|
| case CSSPropertyListStyle:
|
| return getShorthandValue(listStyleShorthand());
|
| case CSSPropertyWebkitMaskPosition:
|
| @@ -578,7 +580,15 @@
|
| StylePropertyShorthand shorthand = shorthandForProperty(propertyID);
|
| if (!shorthand.length())
|
| return false;
|
| - return removePropertiesInSet(shorthand.properties(), shorthand.length());
|
| +
|
| + bool ret = removePropertiesInSet(shorthand.properties(), shorthand.length());
|
| +
|
| + CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(propertyID);
|
| + if (prefixingVariant == propertyID)
|
| + return ret;
|
| +
|
| + StylePropertyShorthand shorthandPrefixingVariant = shorthandForProperty(prefixingVariant);
|
| + return removePropertiesInSet(shorthandPrefixingVariant.properties(), shorthandPrefixingVariant.length());
|
| }
|
|
|
| bool StylePropertySet::removeProperty(CSSPropertyID propertyID, String* returnText)
|
| @@ -604,10 +614,20 @@
|
| // A more efficient removal strategy would involve marking entries as empty
|
| // and sweeping them when the vector grows too big.
|
| mutablePropertyVector().remove(foundPropertyIndex);
|
| -
|
| +
|
| + removePrefixedOrUnprefixedProperty(propertyID);
|
| +
|
| return true;
|
| }
|
|
|
| +void StylePropertySet::removePrefixedOrUnprefixedProperty(CSSPropertyID propertyID)
|
| +{
|
| + int foundPropertyIndex = findPropertyIndex(prefixingVariantForPropertyId(propertyID));
|
| + if (foundPropertyIndex == -1)
|
| + return;
|
| + mutablePropertyVector().remove(foundPropertyIndex);
|
| +}
|
| +
|
| bool StylePropertySet::propertyIsImportant(CSSPropertyID propertyID) const
|
| {
|
| int foundPropertyIndex = findPropertyIndex(propertyID);
|
| @@ -679,12 +699,30 @@
|
| CSSProperty* toReplace = slot ? slot : findMutableCSSPropertyWithID(property.id());
|
| if (toReplace) {
|
| *toReplace = property;
|
| + setPrefixingVariantProperty(property);
|
| return;
|
| }
|
| }
|
| + appendPrefixingVariantProperty(property);
|
| +}
|
| +
|
| +void StylePropertySet::appendPrefixingVariantProperty(const CSSProperty& property)
|
| +{
|
| mutablePropertyVector().append(property);
|
| + CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
|
| + if (prefixingVariant == property.id())
|
| + return;
|
| + mutablePropertyVector().append(CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.shorthandID(), property.metadata().m_implicit));
|
| }
|
|
|
| +void StylePropertySet::setPrefixingVariantProperty(const CSSProperty& property)
|
| +{
|
| + CSSPropertyID prefixingVariant = prefixingVariantForPropertyId(property.id());
|
| + CSSProperty* toReplace = findMutableCSSPropertyWithID(prefixingVariant);
|
| + if (toReplace)
|
| + *toReplace = CSSProperty(prefixingVariant, property.value(), property.isImportant(), property.shorthandID(), property.metadata().m_implicit);
|
| +}
|
| +
|
| bool StylePropertySet::setProperty(CSSPropertyID propertyID, int identifier, bool important)
|
| {
|
| ASSERT(isMutable());
|
| @@ -833,6 +871,12 @@
|
| case CSSPropertyPaddingLeft:
|
| shorthandPropertyID = CSSPropertyPadding;
|
| break;
|
| + case CSSPropertyTransitionProperty:
|
| + case CSSPropertyTransitionDuration:
|
| + case CSSPropertyTransitionTimingFunction:
|
| + case CSSPropertyTransitionDelay:
|
| + shorthandPropertyID = CSSPropertyTransition;
|
| + break;
|
| case CSSPropertyWebkitAnimationName:
|
| case CSSPropertyWebkitAnimationDuration:
|
| case CSSPropertyWebkitAnimationTimingFunction:
|
| @@ -991,7 +1035,7 @@
|
| if (old)
|
| setProperty(toMerge.toCSSProperty(), old);
|
| else
|
| - mutablePropertyVector().append(toMerge.toCSSProperty());
|
| + appendPrefixingVariantProperty(toMerge.toCSSProperty());
|
| }
|
| }
|
|
|
|
|