Index: Source/core/css/CSSProperty.cpp |
diff --git a/Source/core/css/CSSProperty.cpp b/Source/core/css/CSSProperty.cpp |
index 77428fda786a1db4259d0ad5612bbc10c0547551..844bf6fb961c74921ce905be6a751008dc327379 100644 |
--- a/Source/core/css/CSSProperty.cpp |
+++ b/Source/core/css/CSSProperty.cpp |
@@ -37,6 +37,16 @@ struct SameSizeAsCSSProperty { |
COMPILE_ASSERT(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), CSSProperty_should_stay_small); |
+CSSPropertyID StylePropertyMetadata::shorthandID() const |
Julien - ping for review
2013/06/14 20:09:07
We may want to rename that at some point as it is
|
+{ |
+ if (!m_isSetFromShorthand) |
+ return CSSPropertyInvalid; |
+ |
+ const Vector<StylePropertyShorthand> shorthands = matchingShorthandsForLonghand(static_cast<CSSPropertyID>(m_propertyID)); |
+ ASSERT(shorthands.size() && m_shorthandID >= 0 && m_shorthandID < shorthands.size()); |
+ return shorthands.at(m_shorthandID).id(); |
+} |
+ |
void CSSProperty::wrapValueInCommaSeparatedList() |
{ |
RefPtr<CSSValue> value = m_value.release(); |
@@ -164,7 +174,7 @@ static CSSPropertyID resolveToPhysicalProperty(WritingMode writingMode, LogicalE |
static const StylePropertyShorthand& borderDirections() |
{ |
static const CSSPropertyID properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft }; |
- DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderDirections, (properties, WTF_ARRAY_LENGTH(properties))); |
+ DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderDirections, (CSSPropertyBorder, properties, WTF_ARRAY_LENGTH(properties))); |
return borderDirections; |
} |