unsigned getIndexInShorthandVectorForPrefixingVariant(const CSSProperty& property, CSSPropertyID prefixingVariant) { if (!property.isSetFromShorthand()) return 0; CSSPropertyID prefixedShorthand = prefixingVariantForPropertyId(property.shorthandID()); Vector<StylePropertyShorthand, 4> shorthands; getMatchingShorthandsForLonghand(prefixingVariant, &shorthands); return indexOfShorthandForLonghand(prefixedShorthand, shorthands); }
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); }
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)); }