Rename CSSPropertyLonghand class to StylePropertyShorthand.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2012 14:19:46 +0000 (14:19 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2012 14:19:46 +0000 (14:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82624

Reviewed by Antti Koivisto.

Rename CSSPropertyLonghand to StylePropertyShorthand as what CSSPropertyLonghand
is representing is not a longhand but the list of longhands for a given shorthand.
Also in the same time switch all shorthand declarations to use CSSPropertyID enum
rather than a int so it is clear on what kind of data we are dealing with.

In a following patch I will rename CSSPropertyLonghand file.

No new tests : This is a refactoring, no behaviour change intended

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties):
(WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
(WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
* css/CSSComputedStyleDeclaration.h:
(WebCore):
(CSSComputedStyleDeclaration):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parse4Values):
* css/CSSParser.h:
(WebCore):
(CSSParser):
* css/CSSProperty.cpp:
(WebCore::resolveToPhysicalProperty):
(WebCore::borderDirections):
(WebCore::CSSProperty::resolveDirectionAwareProperty):
* css/CSSPropertyLonghand.cpp:
(WebCore::backgroundShorthand):
(WebCore::backgroundPositionShorthand):
(WebCore::backgroundRepeatShorthand):
(WebCore::borderShorthand):
(WebCore::borderAbridgedShorthand):
(WebCore::borderBottomShorthand):
(WebCore::borderColorShorthand):
(WebCore::borderImageShorthand):
(WebCore::borderLeftShorthand):
(WebCore::borderRadiusShorthand):
(WebCore::borderRightShorthand):
(WebCore::borderSpacingShorthand):
(WebCore::borderStyleShorthand):
(WebCore::borderTopShorthand):
(WebCore::borderWidthShorthand):
(WebCore::listStyleShorthand):
(WebCore::fontShorthand):
(WebCore::marginShorthand):
(WebCore::outlineShorthand):
(WebCore::overflowShorthand):
(WebCore::paddingShorthand):
(WebCore::webkitAnimationShorthand):
(WebCore::webkitBorderAfterShorthand):
(WebCore::webkitBorderBeforeShorthand):
(WebCore::webkitBorderEndShorthand):
(WebCore::webkitBorderStartShorthand):
(WebCore::webkitColumnsShorthand):
(WebCore::webkitColumnRuleShorthand):
(WebCore::webkitFlexFlowShorthand):
(WebCore::webkitMarginCollapseShorthand):
(WebCore::webkitMarqueeShorthand):
(WebCore::webkitMaskShorthand):
(WebCore::webkitMaskPositionShorthand):
(WebCore::webkitMaskRepeatShorthand):
(WebCore::webkitTextEmphasisShorthand):
(WebCore::webkitTextStrokeShorthand):
(WebCore::webkitTransitionShorthand):
(WebCore::webkitTransformOriginShorthand):
(WebCore::webkitWrapShorthand):
(WebCore::shorthandForProperty):
* css/CSSPropertyLonghand.h:
(WebCore::StylePropertyShorthand::StylePropertyShorthand):
(WebCore::StylePropertyShorthand::properties):
(WebCore::StylePropertyShorthand::propertiesForInitialization):
(StylePropertyShorthand):
(WebCore):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
(WebCore::StylePropertySet::borderSpacingValue):
(WebCore::StylePropertySet::get4Values):
(WebCore::StylePropertySet::getLayeredShorthandValue):
(WebCore::StylePropertySet::getShorthandValue):
(WebCore::StylePropertySet::getCommonValue):
(WebCore::StylePropertySet::removeShorthandProperty):
(WebCore::StylePropertySet::propertyIsImportant):
(WebCore::StylePropertySet::setProperty):
(WebCore::StylePropertySet::asText):
(WebCore):
(WebCore::StylePropertySet::removePropertiesInSet):
(WebCore::StylePropertySet::copyPropertiesInSet):
* css/StylePropertySet.h:
(WebCore):
(StylePropertySet):
* editing/EditingStyle.cpp:
(WebCore):
(WebCore::removePropertiesInStyle):
* page/animation/AnimationBase.cpp:
(WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
(WebCore::addShorthandProperties):
* page/animation/CompositeAnimation.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112880 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.h
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyLonghand.cpp
Source/WebCore/css/CSSPropertyLonghand.h
Source/WebCore/css/StylePropertySet.cpp
Source/WebCore/css/StylePropertySet.h
Source/WebCore/editing/EditingStyle.cpp
Source/WebCore/page/animation/AnimationBase.cpp
Source/WebCore/page/animation/CompositeAnimation.cpp

index 5ac9e09..3ff658a 100644 (file)
@@ -1,3 +1,114 @@
+2012-04-02  Alexis Menard  <alexis.menard@openbossa.org>
+
+        Rename CSSPropertyLonghand class to StylePropertyShorthand.
+        https://bugs.webkit.org/show_bug.cgi?id=82624
+
+        Reviewed by Antti Koivisto.
+
+        Rename CSSPropertyLonghand to StylePropertyShorthand as what CSSPropertyLonghand
+        is representing is not a longhand but the list of longhands for a given shorthand.
+        Also in the same time switch all shorthand declarations to use CSSPropertyID enum
+        rather than a int so it is clear on what kind of data we are dealing with.
+
+        In a following patch I will rename CSSPropertyLonghand file.
+
+        No new tests : This is a refactoring, no behaviour change intended
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore):
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties):
+        (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
+        (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
+        * css/CSSComputedStyleDeclaration.h:
+        (WebCore):
+        (CSSComputedStyleDeclaration):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseFillShorthand):
+        (WebCore::CSSParser::parseAnimationShorthand):
+        (WebCore::CSSParser::parseTransitionShorthand):
+        (WebCore::CSSParser::parseShorthand):
+        (WebCore::CSSParser::parse4Values):
+        * css/CSSParser.h:
+        (WebCore):
+        (CSSParser):
+        * css/CSSProperty.cpp:
+        (WebCore::resolveToPhysicalProperty):
+        (WebCore::borderDirections):
+        (WebCore::CSSProperty::resolveDirectionAwareProperty):
+        * css/CSSPropertyLonghand.cpp:
+        (WebCore::backgroundShorthand):
+        (WebCore::backgroundPositionShorthand):
+        (WebCore::backgroundRepeatShorthand):
+        (WebCore::borderShorthand):
+        (WebCore::borderAbridgedShorthand):
+        (WebCore::borderBottomShorthand):
+        (WebCore::borderColorShorthand):
+        (WebCore::borderImageShorthand):
+        (WebCore::borderLeftShorthand):
+        (WebCore::borderRadiusShorthand):
+        (WebCore::borderRightShorthand):
+        (WebCore::borderSpacingShorthand):
+        (WebCore::borderStyleShorthand):
+        (WebCore::borderTopShorthand):
+        (WebCore::borderWidthShorthand):
+        (WebCore::listStyleShorthand):
+        (WebCore::fontShorthand):
+        (WebCore::marginShorthand):
+        (WebCore::outlineShorthand):
+        (WebCore::overflowShorthand):
+        (WebCore::paddingShorthand):
+        (WebCore::webkitAnimationShorthand):
+        (WebCore::webkitBorderAfterShorthand):
+        (WebCore::webkitBorderBeforeShorthand):
+        (WebCore::webkitBorderEndShorthand):
+        (WebCore::webkitBorderStartShorthand):
+        (WebCore::webkitColumnsShorthand):
+        (WebCore::webkitColumnRuleShorthand):
+        (WebCore::webkitFlexFlowShorthand):
+        (WebCore::webkitMarginCollapseShorthand):
+        (WebCore::webkitMarqueeShorthand):
+        (WebCore::webkitMaskShorthand):
+        (WebCore::webkitMaskPositionShorthand):
+        (WebCore::webkitMaskRepeatShorthand):
+        (WebCore::webkitTextEmphasisShorthand):
+        (WebCore::webkitTextStrokeShorthand):
+        (WebCore::webkitTransitionShorthand):
+        (WebCore::webkitTransformOriginShorthand):
+        (WebCore::webkitWrapShorthand):
+        (WebCore::shorthandForProperty):
+        * css/CSSPropertyLonghand.h:
+        (WebCore::StylePropertyShorthand::StylePropertyShorthand):
+        (WebCore::StylePropertyShorthand::properties):
+        (WebCore::StylePropertyShorthand::propertiesForInitialization):
+        (StylePropertyShorthand):
+        (WebCore):
+        * css/StylePropertySet.cpp:
+        (WebCore::StylePropertySet::getPropertyValue):
+        (WebCore::StylePropertySet::borderSpacingValue):
+        (WebCore::StylePropertySet::get4Values):
+        (WebCore::StylePropertySet::getLayeredShorthandValue):
+        (WebCore::StylePropertySet::getShorthandValue):
+        (WebCore::StylePropertySet::getCommonValue):
+        (WebCore::StylePropertySet::removeShorthandProperty):
+        (WebCore::StylePropertySet::propertyIsImportant):
+        (WebCore::StylePropertySet::setProperty):
+        (WebCore::StylePropertySet::asText):
+        (WebCore):
+        (WebCore::StylePropertySet::removePropertiesInSet):
+        (WebCore::StylePropertySet::copyPropertiesInSet):
+        * css/StylePropertySet.h:
+        (WebCore):
+        (StylePropertySet):
+        * editing/EditingStyle.cpp:
+        (WebCore):
+        (WebCore::removePropertiesInStyle):
+        * page/animation/AnimationBase.cpp:
+        (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
+        (WebCore::addShorthandProperties):
+        * page/animation/CompositeAnimation.cpp:
+
 2012-03-28  Pavel Podivilov  <podivilov@chromium.org>
 
         Web Inspector: refactor UI breakpoint listeners.
index 98f78e9..c50b52f 100644 (file)
@@ -74,7 +74,7 @@
 namespace WebCore {
 
 // List of all properties we know how to compute, omitting shorthands.
-static const int computedProperties[] = {
+static const CSSPropertyID computedProperties[] = {
     CSSPropertyBackgroundAttachment,
     CSSPropertyBackgroundClip,
     CSSPropertyBackgroundColor,
@@ -2339,10 +2339,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
             return valueForFilter(style.get());
 #endif
         case CSSPropertyBackground: {
-            const int properties[5] = { CSSPropertyBackgroundColor, CSSPropertyBackgroundImage,
+            const CSSPropertyID properties[5] = { CSSPropertyBackgroundColor, CSSPropertyBackgroundImage,
                                         CSSPropertyBackgroundRepeat, CSSPropertyBackgroundAttachment,
                                         CSSPropertyBackgroundPosition };
-            return getCSSPropertyValuesForShorthandProperties(CSSPropertyLonghand(properties, WTF_ARRAY_LENGTH(properties)));
+            return getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(properties, WTF_ARRAY_LENGTH(properties)));
         }
         case CSSPropertyBorder: {
             RefPtr<CSSValue> value = getPropertyCSSValue(CSSPropertyBorderTop, DoNotUpdateLayout);
@@ -2355,31 +2355,31 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
             return value.release();
         }
         case CSSPropertyBorderBottom:
-            return getCSSPropertyValuesForShorthandProperties(borderBottomLonghand());
+            return getCSSPropertyValuesForShorthandProperties(borderBottomShorthand());
         case CSSPropertyBorderColor:
-            return getCSSPropertyValuesForSidesShorthand(borderColorLonghand());
+            return getCSSPropertyValuesForSidesShorthand(borderColorShorthand());
         case CSSPropertyBorderLeft:
-            return getCSSPropertyValuesForShorthandProperties(borderLeftLonghand());
+            return getCSSPropertyValuesForShorthandProperties(borderLeftShorthand());
         case CSSPropertyBorderImage:
             return valueForNinePieceImage(style->borderImage(), cssValuePool);
         case CSSPropertyBorderRadius:
             return getBorderRadiusShorthandValue(style.get(), cssValuePool, m_node->document()->renderView());
         case CSSPropertyBorderRight:
-            return getCSSPropertyValuesForShorthandProperties(borderRightLonghand());
+            return getCSSPropertyValuesForShorthandProperties(borderRightShorthand());
         case CSSPropertyBorderStyle:
-            return getCSSPropertyValuesForSidesShorthand(borderStyleLonghand());
+            return getCSSPropertyValuesForSidesShorthand(borderStyleShorthand());
         case CSSPropertyBorderTop:
-            return getCSSPropertyValuesForShorthandProperties(borderTopLonghand());
+            return getCSSPropertyValuesForShorthandProperties(borderTopShorthand());
         case CSSPropertyBorderWidth:
-            return getCSSPropertyValuesForSidesShorthand(borderWidthLonghand());
+            return getCSSPropertyValuesForSidesShorthand(borderWidthShorthand());
         case CSSPropertyListStyle:
-            return getCSSPropertyValuesForShorthandProperties(listStyleLonghand());
+            return getCSSPropertyValuesForShorthandProperties(listStyleShorthand());
         case CSSPropertyMargin:
-            return getCSSPropertyValuesForSidesShorthand(marginLonghand());
+            return getCSSPropertyValuesForSidesShorthand(marginShorthand());
         case CSSPropertyOutline:
-            return getCSSPropertyValuesForShorthandProperties(outlineLonghand());
+            return getCSSPropertyValuesForShorthandProperties(outlineShorthand());
         case CSSPropertyPadding:
-            return getCSSPropertyValuesForSidesShorthand(paddingLonghand());
+            return getCSSPropertyValuesForSidesShorthand(paddingShorthand());
         /* Individual properties not part of the spec */
         case CSSPropertyBackgroundRepeatX:
         case CSSPropertyBackgroundRepeatY:
@@ -2576,24 +2576,24 @@ PassRefPtr<StylePropertySet> CSSComputedStyleDeclaration::makeMutable()
     return copy();
 }
 
-PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties(const CSSPropertyLonghand& longhand) const
+PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties(const StylePropertyShorthand& shorthand) const
 {
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-    for (size_t i = 0; i < longhand.length(); ++i) {
-        RefPtr<CSSValue> value = getPropertyCSSValue(longhand.properties()[i], DoNotUpdateLayout);
+    for (size_t i = 0; i < shorthand.length(); ++i) {
+        RefPtr<CSSValue> value = getPropertyCSSValue(shorthand.properties()[i], DoNotUpdateLayout);
         list->append(value);
     }
     return list.release();
 }
 
-PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand(const CSSPropertyLonghand& longhand) const
+PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand(const StylePropertyShorthand& shorthand) const
 {
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     // Assume the properties are in the usual order top, right, bottom, left.
-    RefPtr<CSSValue> topValue = getPropertyCSSValue(longhand.properties()[0], DoNotUpdateLayout);
-    RefPtr<CSSValue> rightValue = getPropertyCSSValue(longhand.properties()[1], DoNotUpdateLayout);
-    RefPtr<CSSValue> bottomValue = getPropertyCSSValue(longhand.properties()[2], DoNotUpdateLayout);
-    RefPtr<CSSValue> leftValue = getPropertyCSSValue(longhand.properties()[3], DoNotUpdateLayout);
+    RefPtr<CSSValue> topValue = getPropertyCSSValue(shorthand.properties()[0], DoNotUpdateLayout);
+    RefPtr<CSSValue> rightValue = getPropertyCSSValue(shorthand.properties()[1], DoNotUpdateLayout);
+    RefPtr<CSSValue> bottomValue = getPropertyCSSValue(shorthand.properties()[2], DoNotUpdateLayout);
+    RefPtr<CSSValue> leftValue = getPropertyCSSValue(shorthand.properties()[3], DoNotUpdateLayout);
 
     // All 4 properties must be specified.
     if (!topValue || !rightValue || !bottomValue || !leftValue)
@@ -2614,7 +2614,7 @@ PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getCSSPropertyValuesForSid
     return list.release();
 }
 
-PassRefPtr<StylePropertySet> CSSComputedStyleDeclaration::copyPropertiesInSet(const int* set, unsigned length) const
+PassRefPtr<StylePropertySet> CSSComputedStyleDeclaration::copyPropertiesInSet(const CSSPropertyID* set, unsigned length) const
 {
     Vector<CSSProperty> list;
     list.reserveInitialCapacity(length);
index e8938d0..8d1b359 100644 (file)
@@ -29,7 +29,6 @@
 namespace WebCore {
 
 class CSSPrimitiveValue;
-class CSSPropertyLonghand;
 class CSSValueList;
 class CSSValuePool;
 class Color;
@@ -38,6 +37,7 @@ class RenderStyle;
 class SVGPaint;
 class ShadowData;
 class StylePropertySet;
+class StylePropertyShorthand;
 
 #if ENABLE(CSS_SHADERS)
 class CustomFilterNumberParameter;
@@ -71,7 +71,7 @@ public:
     PassRefPtr<CSSValue> getSVGPropertyCSSValue(int propertyID, EUpdateLayout) const;
 #endif
 
-    PassRefPtr<StylePropertySet> copyPropertiesInSet(const int* set, unsigned length) const;
+    PassRefPtr<StylePropertySet> copyPropertiesInSet(const CSSPropertyID* set, unsigned length) const;
 
 private:
     CSSComputedStyleDeclaration(PassRefPtr<Node>, bool allowVisitedStyle, const String&);
@@ -110,8 +110,8 @@ private:
     PassRefPtr<CSSValue> valueForFilter(RenderStyle*) const;
 #endif
 
-    PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const CSSPropertyLonghand&) const;
-    PassRefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const CSSPropertyLonghand&) const;
+    PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const StylePropertyShorthand&) const;
+    PassRefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const StylePropertyShorthand&) const;
 
     RefPtr<Node> m_node;
     PseudoId m_pseudoElementSpecifier;
index aed4133..147bbbd 100644 (file)
@@ -49,7 +49,6 @@
 #include "CSSPrimitiveValue.h"
 #include "CSSProperty.h"
 #include "CSSPropertyLonghand.h"
-#include "CSSPropertyNames.h"
 #include "CSSPropertySourceData.h"
 #include "CSSReflectValue.h"
 #include "CSSSelector.h"
@@ -2025,7 +2024,7 @@ bool CSSParser::parseValue(int propId, bool important)
         }
         break;
     case CSSPropertyWebkitMarquee:
-        return parseShorthand(propId, webkitMarqueeLonghand(), important);
+        return parseShorthand(propId, webkitMarqueeShorthand(), important);
     case CSSPropertyWebkitMarqueeIncrement:
         if (id == CSSValueSmall || id == CSSValueLarge || id == CSSValueMedium)
             validPrimitive = true;
@@ -2147,15 +2146,15 @@ bool CSSParser::parseValue(int propId, bool important)
     case CSSPropertyWebkitMarginCollapse: {
         if (num == 1) {
             ShorthandScope scope(this, CSSPropertyWebkitMarginCollapse);
-            if (!parseValue(webkitMarginCollapseLonghand().properties()[0], important))
+            if (!parseValue(webkitMarginCollapseShorthand().properties()[0], important))
                 return false;
             CSSValue* value = m_parsedProperties.last().value();
-            addProperty(webkitMarginCollapseLonghand().properties()[1], value, important);
+            addProperty(webkitMarginCollapseShorthand().properties()[1], value, important);
             return true;
         }
         else if (num == 2) {
             ShorthandScope scope(this, CSSPropertyWebkitMarginCollapse);
-            if (!parseValue(webkitMarginCollapseLonghand().properties()[0], important) || !parseValue(webkitMarginCollapseLonghand().properties()[1], important))
+            if (!parseValue(webkitMarginCollapseShorthand().properties()[0], important) || !parseValue(webkitMarginCollapseShorthand().properties()[1], important))
                 return false;
             return true;
         }
@@ -2275,13 +2274,13 @@ bool CSSParser::parseValue(int propId, bool important)
         // Position must come before color in this array because a plain old "0" is a legal color
         // in quirks mode but it's usually the X coordinate of a position.
         // FIXME: Add CSSPropertyBackgroundSize to the shorthand.
-        const int properties[] = { CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeat,
+        const CSSPropertyID properties[] = { CSSPropertyBackgroundImage, CSSPropertyBackgroundRepeat,
                                    CSSPropertyBackgroundAttachment, CSSPropertyBackgroundPosition, CSSPropertyBackgroundOrigin,
                                    CSSPropertyBackgroundClip, CSSPropertyBackgroundColor };
         return parseFillShorthand(propId, properties, 7, important);
     }
     case CSSPropertyWebkitMask: {
-        const int properties[] = { CSSPropertyWebkitMaskImage, CSSPropertyWebkitMaskRepeat,
+        const CSSPropertyID properties[] = { CSSPropertyWebkitMaskImage, CSSPropertyWebkitMaskRepeat,
                                    CSSPropertyWebkitMaskAttachment, CSSPropertyWebkitMaskPosition,
                                    CSSPropertyWebkitMaskOrigin, CSSPropertyWebkitMaskClip };
         return parseFillShorthand(propId, properties, 6, important);
@@ -2289,7 +2288,7 @@ bool CSSParser::parseValue(int propId, bool important)
     case CSSPropertyBorder:
         // [ 'border-width' || 'border-style' || <color> ] | inherit
     {
-        if (parseShorthand(propId, borderAbridgedLonghand(), important)) {
+        if (parseShorthand(propId, borderAbridgedShorthand(), important)) {
             // The CSS3 Borders and Backgrounds specification says that border also resets border-image. It's as
             // though a value of none was specified for the image.
             addProperty(CSSPropertyBorderImage, cssValuePool()->createImplicitInitialValue(), important);
@@ -2299,44 +2298,44 @@ bool CSSParser::parseValue(int propId, bool important)
     }
     case CSSPropertyBorderTop:
         // [ 'border-top-width' || 'border-style' || <color> ] | inherit
-        return parseShorthand(propId, borderTopLonghand(), important);
+        return parseShorthand(propId, borderTopShorthand(), important);
     case CSSPropertyBorderRight:
         // [ 'border-right-width' || 'border-style' || <color> ] | inherit
-        return parseShorthand(propId, borderRightLonghand(), important);
+        return parseShorthand(propId, borderRightShorthand(), important);
     case CSSPropertyBorderBottom:
         // [ 'border-bottom-width' || 'border-style' || <color> ] | inherit
-        return parseShorthand(propId, borderBottomLonghand(), important);
+        return parseShorthand(propId, borderBottomShorthand(), important);
     case CSSPropertyBorderLeft:
         // [ 'border-left-width' || 'border-style' || <color> ] | inherit
-        return parseShorthand(propId, borderLeftLonghand(), important);
+        return parseShorthand(propId, borderLeftShorthand(), important);
     case CSSPropertyWebkitBorderStart:
-        return parseShorthand(propId, webkitBorderStartLonghand(), important);
+        return parseShorthand(propId, webkitBorderStartShorthand(), important);
     case CSSPropertyWebkitBorderEnd:
-        return parseShorthand(propId, webkitBorderEndLonghand(), important);
+        return parseShorthand(propId, webkitBorderEndShorthand(), important);
     case CSSPropertyWebkitBorderBefore:
-        return parseShorthand(propId, webkitBorderBeforeLonghand(), important);
+        return parseShorthand(propId, webkitBorderBeforeShorthand(), important);
     case CSSPropertyWebkitBorderAfter:
-        return parseShorthand(propId, webkitBorderAfterLonghand(), important);
+        return parseShorthand(propId, webkitBorderAfterShorthand(), important);
     case CSSPropertyOutline:
         // [ 'outline-color' || 'outline-style' || 'outline-width' ] | inherit
-        return parseShorthand(propId, outlineLonghand(), important);
+        return parseShorthand(propId, outlineShorthand(), important);
     case CSSPropertyBorderColor:
         // <color>{1,4} | inherit
-        return parse4Values(propId, borderColorLonghand().properties(), important);
+        return parse4Values(propId, borderColorShorthand().properties(), important);
     case CSSPropertyBorderWidth:
         // <border-width>{1,4} | inherit
-        return parse4Values(propId, borderWidthLonghand().properties(), important);
+        return parse4Values(propId, borderWidthShorthand().properties(), important);
     case CSSPropertyBorderStyle:
         // <border-style>{1,4} | inherit
-        return parse4Values(propId, borderStyleLonghand().properties(), important);
+        return parse4Values(propId, borderStyleShorthand().properties(), important);
     case CSSPropertyMargin:
         // <margin-width>{1,4} | inherit
-        return parse4Values(propId, marginLonghand().properties(), important);
+        return parse4Values(propId, marginShorthand().properties(), important);
     case CSSPropertyPadding:
         // <padding-width>{1,4} | inherit
-        return parse4Values(propId, paddingLonghand().properties(), important);
+        return parse4Values(propId, paddingShorthand().properties(), important);
     case CSSPropertyWebkitFlexFlow:
-        return parseShorthand(propId, webkitFlexFlowLonghand(), important);
+        return parseShorthand(propId, webkitFlexFlowShorthand(), important);
     case CSSPropertyFont:
         // [ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]?
         // 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit
@@ -2346,13 +2345,13 @@ bool CSSParser::parseValue(int propId, bool important)
             return parseFont(important);
         break;
     case CSSPropertyListStyle:
-        return parseShorthand(propId, listStyleLonghand(), important);
+        return parseShorthand(propId, listStyleShorthand(), important);
     case CSSPropertyWebkitColumns:
-        return parseShorthand(propId, webkitColumnsLonghand(), important);
+        return parseShorthand(propId, webkitColumnsShorthand(), important);
     case CSSPropertyWebkitColumnRule:
-        return parseShorthand(propId, webkitColumnRuleLonghand(), important);
+        return parseShorthand(propId, webkitColumnRuleShorthand(), important);
     case CSSPropertyWebkitTextStroke:
-        return parseShorthand(propId, webkitTextStrokeLonghand(), important);
+        return parseShorthand(propId, webkitTextStrokeShorthand(), important);
     case CSSPropertyWebkitAnimation:
         return parseAnimationShorthand(important);
     case CSSPropertyWebkitTransition:
@@ -2368,7 +2367,7 @@ bool CSSParser::parseValue(int propId, bool important)
         return false;
     // CSS Text Layout Module Level 3: Vertical writing support
     case CSSPropertyWebkitTextEmphasis:
-        return parseShorthand(propId, webkitTextEmphasisLonghand(), important);
+        return parseShorthand(propId, webkitTextEmphasisShorthand(), important);
 
     case CSSPropertyWebkitTextEmphasisStyle:
         return parseTextEmphasisStyle(important);
@@ -2411,7 +2410,7 @@ bool CSSParser::parseValue(int propId, bool important)
         validPrimitive = (!id && validUnit(value, FLength | FNonNeg));
         break;
     case CSSPropertyWebkitWrap:
-        return parseShorthand(propId, webkitWrapLonghand(), important);
+        return parseShorthand(propId, webkitWrapShorthand(), important);
     case CSSPropertyBorderBottomStyle:
     case CSSPropertyBorderCollapse:
     case CSSPropertyBorderLeftStyle:
@@ -2551,7 +2550,7 @@ static bool parseBackgroundClip(CSSParserValue* parserValue, RefPtr<CSSValue>& c
 
 const int cMaxFillProperties = 9;
 
-bool CSSParser::parseFillShorthand(int propId, const int* properties, int numProperties, bool important)
+bool CSSParser::parseFillShorthand(int propId, const CSSPropertyID* properties, int numProperties, bool important)
 {
     ASSERT(numProperties <= cMaxFillProperties);
     if (numProperties > cMaxFillProperties)
@@ -2696,7 +2695,7 @@ void CSSParser::addAnimationValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> r
 
 bool CSSParser::parseAnimationShorthand(bool important)
 {
-    const unsigned numProperties = webkitAnimationLonghand().length();
+    const unsigned numProperties = webkitAnimationShorthand().length();
     ShorthandScope scope(this, CSSPropertyWebkitAnimation);
 
     bool parsedProperty[] = { false, false, false, false, false, false, false };
@@ -2723,7 +2722,7 @@ bool CSSParser::parseAnimationShorthand(bool important)
         for (i = initialParsedPropertyIndex; !found && i < numProperties; ++i) {
             if (!parsedProperty[i]) {
                 RefPtr<CSSValue> val;
-                if (parseAnimationProperty(webkitAnimationLonghand().properties()[i], val)) {
+                if (parseAnimationProperty(webkitAnimationShorthand().properties()[i], val)) {
                     parsedProperty[i] = found = true;
                     initialParsedPropertyIndex = 1;
                     addAnimationValue(values[i], val.release());
@@ -2745,14 +2744,14 @@ bool CSSParser::parseAnimationShorthand(bool important)
 
     // Now add all of the properties we found.
     for (i = 0; i < numProperties; i++)
-        addProperty(webkitAnimationLonghand().properties()[i], values[i].release(), important);
+        addProperty(webkitAnimationShorthand().properties()[i], values[i].release(), important);
 
     return true;
 }
 
 bool CSSParser::parseTransitionShorthand(bool important)
 {
-    const unsigned numProperties = webkitTransitionLonghand().length();
+    const unsigned numProperties = webkitTransitionShorthand().length();
 
     ShorthandScope scope(this, CSSPropertyWebkitTransition);
 
@@ -2778,7 +2777,7 @@ bool CSSParser::parseTransitionShorthand(bool important)
         for (i = 0; !found && i < numProperties; ++i) {
             if (!parsedProperty[i]) {
                 RefPtr<CSSValue> val;
-                if (parseAnimationProperty(webkitTransitionLonghand().properties()[i], val)) {
+                if (parseAnimationProperty(webkitTransitionShorthand().properties()[i], val)) {
                     parsedProperty[i] = found = true;
                     addAnimationValue(values[i], val.release());
                 }
@@ -2799,12 +2798,12 @@ bool CSSParser::parseTransitionShorthand(bool important)
 
     // Now add all of the properties we found.
     for (i = 0; i < numProperties; i++)
-        addProperty(webkitTransitionLonghand().properties()[i], values[i].release(), important);
+        addProperty(webkitTransitionShorthand().properties()[i], values[i].release(), important);
 
     return true;
 }
 
-bool CSSParser::parseShorthand(int propId, const CSSPropertyLonghand& longhand, bool important)
+bool CSSParser::parseShorthand(int propId, const StylePropertyShorthand& shorthand, bool important)
 {
     // We try to match as many properties as possible
     // We set up an array of booleans to mark which property has been found,
@@ -2817,8 +2816,8 @@ bool CSSParser::parseShorthand(int propId, const CSSPropertyLonghand& longhand,
 
     while (m_valueList->current()) {
         found = false;
-        for (unsigned propIndex = 0; !found && propIndex < longhand.length(); ++propIndex) {
-            if (!propertyFound[propIndex] && parseValue(longhand.properties()[propIndex], important)) {
+        for (unsigned propIndex = 0; !found && propIndex < shorthand.length(); ++propIndex) {
+            if (!propertyFound[propIndex] && parseValue(shorthand.properties()[propIndex], important)) {
                     propertyFound[propIndex] = found = true;
                     propertiesParsed++;
             }
@@ -2830,28 +2829,28 @@ bool CSSParser::parseShorthand(int propId, const CSSPropertyLonghand& longhand,
             return false;
     }
 
-    if (propertiesParsed == longhand.length())
+    if (propertiesParsed == shorthand.length())
         return true;
 
     // Fill in any remaining properties with the initial value.
     ImplicitScope implicitScope(this, PropertyImplicit);
-    const CSSPropertyLonghand* const* const longhandsForInitialization = longhand.longhandsForInitialization();
-    for (unsigned i = 0; i < longhand.length(); ++i) {
+    const StylePropertyShorthand* const* const propertiesForInitialization = shorthand.propertiesForInitialization();
+    for (unsigned i = 0; i < shorthand.length(); ++i) {
         if (propertyFound[i])
             continue;
 
-        if (longhandsForInitialization) {
-            const CSSPropertyLonghand& initLonghand = *(longhandsForInitialization[i]);
-            for (unsigned propIndex = 0; propIndex < initLonghand.length(); ++propIndex)
-                addProperty(initLonghand.properties()[propIndex], cssValuePool()->createImplicitInitialValue(), important);
+        if (propertiesForInitialization) {
+            const StylePropertyShorthand& initProperties = *(propertiesForInitialization[i]);
+            for (unsigned propIndex = 0; propIndex < initProperties.length(); ++propIndex)
+                addProperty(initProperties.properties()[propIndex], cssValuePool()->createImplicitInitialValue(), important);
         } else
-            addProperty(longhand.properties()[i], cssValuePool()->createImplicitInitialValue(), important);
+            addProperty(shorthand.properties()[i], cssValuePool()->createImplicitInitialValue(), important);
     }
 
     return true;
 }
 
-bool CSSParser::parse4Values(int propId, const int *properties,  bool important)
+bool CSSParser::parse4Values(int propId, const CSSPropertyID *properties,  bool important)
 {
     /* From the CSS 2 specs, 8.3
      * If there is only one value, it applies to all sides. If there are two values, the top and
index c249a82..959db92 100644 (file)
@@ -28,6 +28,7 @@
 #include "CSSParserMode.h"
 #include "CSSParserValues.h"
 #include "CSSProperty.h"
+#include "CSSPropertyNames.h"
 #include "CSSPropertySourceData.h"
 #include "CSSSelector.h"
 #include "Color.h"
@@ -46,7 +47,6 @@ namespace WebCore {
 
 class CSSBorderImageSliceValue;
 class CSSPrimitiveValue;
-class CSSPropertyLonghand;
 class CSSValuePool;
 class CSSProperty;
 class CSSRule;
@@ -59,6 +59,7 @@ class Document;
 class MediaQueryExp;
 class MediaQuerySet;
 class StylePropertySet;
+class StylePropertyShorthand;
 class StyleKeyframe;
 class StyledElement;
 class WebKitCSSKeyframesRule;
@@ -89,8 +90,8 @@ public:
     bool hasProperties() const { return !m_parsedProperties.isEmpty(); }
 
     bool parseValue(int propId, bool important);
-    bool parseShorthand(int, const CSSPropertyLonghand&, bool);
-    bool parse4Values(int propId, const int* properties, bool important);
+    bool parseShorthand(int, const StylePropertyShorthand&, bool);
+    bool parse4Values(int propId, const CSSPropertyID* properties, bool important);
     bool parseContent(int propId, bool important);
     bool parseQuotes(int propId, bool important);
 
@@ -110,7 +111,7 @@ public:
     PassRefPtr<CSSValue> parseFillSize(int propId, bool &allowComma);
 
     bool parseFillProperty(int propId, int& propId1, int& propId2, RefPtr<CSSValue>&, RefPtr<CSSValue>&);
-    bool parseFillShorthand(int propId, const int* properties, int numProperties, bool important);
+    bool parseFillShorthand(int propId, const CSSPropertyID* properties, int numProperties, bool important);
 
     void addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval);
 
index adfa6ec..13bfc64 100644 (file)
@@ -51,26 +51,26 @@ void CSSProperty::wrapValueInCommaSeparatedList()
 enum LogicalBoxSide { BeforeSide, EndSide, AfterSide, StartSide };
 enum PhysicalBoxSide { TopSide, RightSide, BottomSide, LeftSide };
 
-static int resolveToPhysicalProperty(TextDirection direction, WritingMode writingMode, LogicalBoxSide logicalSide, const CSSPropertyLonghand& longhand)
+static int resolveToPhysicalProperty(TextDirection direction, WritingMode writingMode, LogicalBoxSide logicalSide, const StylePropertyShorthand& shorthand)
 {
     if (direction == LTR) {
         if (writingMode == TopToBottomWritingMode) {
             // The common case. The logical and physical box sides match.
             // Left = Start, Right = End, Before = Top, After = Bottom
-            return longhand.properties()[logicalSide];
+            return shorthand.properties()[logicalSide];
         }
 
         if (writingMode == BottomToTopWritingMode) {
             // Start = Left, End = Right, Before = Bottom, After = Top.
             switch (logicalSide) {
             case StartSide:
-                return longhand.properties()[LeftSide];
+                return shorthand.properties()[LeftSide];
             case EndSide:
-                return longhand.properties()[RightSide];
+                return shorthand.properties()[RightSide];
             case BeforeSide:
-                return longhand.properties()[BottomSide];
+                return shorthand.properties()[BottomSide];
             default:
-                return longhand.properties()[TopSide];
+                return shorthand.properties()[TopSide];
             }
         }
 
@@ -78,26 +78,26 @@ static int resolveToPhysicalProperty(TextDirection direction, WritingMode writin
             // Start = Top, End = Bottom, Before = Left, After = Right.
             switch (logicalSide) {
             case StartSide:
-                return longhand.properties()[TopSide];
+                return shorthand.properties()[TopSide];
             case EndSide:
-                return longhand.properties()[BottomSide];
+                return shorthand.properties()[BottomSide];
             case BeforeSide:
-                return longhand.properties()[LeftSide];
+                return shorthand.properties()[LeftSide];
             default:
-                return longhand.properties()[RightSide];
+                return shorthand.properties()[RightSide];
             }
         }
 
         // Start = Top, End = Bottom, Before = Right, After = Left
         switch (logicalSide) {
         case StartSide:
-            return longhand.properties()[TopSide];
+            return shorthand.properties()[TopSide];
         case EndSide:
-            return longhand.properties()[BottomSide];
+            return shorthand.properties()[BottomSide];
         case BeforeSide:
-            return longhand.properties()[RightSide];
+            return shorthand.properties()[RightSide];
         default:
-            return longhand.properties()[LeftSide];
+            return shorthand.properties()[LeftSide];
         }
     }
 
@@ -105,13 +105,13 @@ static int resolveToPhysicalProperty(TextDirection direction, WritingMode writin
         // Start = Right, End = Left, Before = Top, After = Bottom
         switch (logicalSide) {
         case StartSide:
-            return longhand.properties()[RightSide];
+            return shorthand.properties()[RightSide];
         case EndSide:
-            return longhand.properties()[LeftSide];
+            return shorthand.properties()[LeftSide];
         case BeforeSide:
-            return longhand.properties()[TopSide];
+            return shorthand.properties()[TopSide];
         default:
-            return longhand.properties()[BottomSide];
+            return shorthand.properties()[BottomSide];
         }
     }
 
@@ -119,13 +119,13 @@ static int resolveToPhysicalProperty(TextDirection direction, WritingMode writin
         // Start = Right, End = Left, Before = Bottom, After = Top
         switch (logicalSide) {
         case StartSide:
-            return longhand.properties()[RightSide];
+            return shorthand.properties()[RightSide];
         case EndSide:
-            return longhand.properties()[LeftSide];
+            return shorthand.properties()[LeftSide];
         case BeforeSide:
-            return longhand.properties()[BottomSide];
+            return shorthand.properties()[BottomSide];
         default:
-            return longhand.properties()[TopSide];
+            return shorthand.properties()[TopSide];
         }
     }
 
@@ -133,42 +133,42 @@ static int resolveToPhysicalProperty(TextDirection direction, WritingMode writin
         // Start = Bottom, End = Top, Before = Left, After = Right
         switch (logicalSide) {
         case StartSide:
-            return longhand.properties()[BottomSide];
+            return shorthand.properties()[BottomSide];
         case EndSide:
-            return longhand.properties()[TopSide];
+            return shorthand.properties()[TopSide];
         case BeforeSide:
-            return longhand.properties()[LeftSide];
+            return shorthand.properties()[LeftSide];
         default:
-            return longhand.properties()[RightSide];
+            return shorthand.properties()[RightSide];
         }
     }
 
     // Start = Bottom, End = Top, Before = Right, After = Left
     switch (logicalSide) {
     case StartSide:
-        return longhand.properties()[BottomSide];
+        return shorthand.properties()[BottomSide];
     case EndSide:
-        return longhand.properties()[TopSide];
+        return shorthand.properties()[TopSide];
     case BeforeSide:
-        return longhand.properties()[RightSide];
+        return shorthand.properties()[RightSide];
     default:
-        return longhand.properties()[LeftSide];
+        return shorthand.properties()[LeftSide];
     }
 }
 
 enum LogicalExtent { LogicalWidth, LogicalHeight };
 
-static int resolveToPhysicalProperty(WritingMode writingMode, LogicalExtent logicalSide, const int* properties)
+static int resolveToPhysicalProperty(WritingMode writingMode, LogicalExtent logicalSide, const CSSPropertyID* properties)
 {
     if (writingMode == TopToBottomWritingMode || writingMode == BottomToTopWritingMode)
         return properties[logicalSide];
     return logicalSide == LogicalWidth ? properties[1] : properties[0];
 }
 
-static const CSSPropertyLonghand& borderDirections()
+static const StylePropertyShorthand& borderDirections()
 {
-    static const int properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderDirections, (properties, WTF_ARRAY_LENGTH(properties)));
+    static const CSSPropertyID properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderDirections, (properties, WTF_ARRAY_LENGTH(properties)));
     return borderDirections;
 }
 
@@ -176,21 +176,21 @@ int CSSProperty::resolveDirectionAwareProperty(int propertyID, TextDirection dir
 {
     switch (static_cast<CSSPropertyID>(propertyID)) {
     case CSSPropertyWebkitMarginEnd:
-        return resolveToPhysicalProperty(direction, writingMode, EndSide, marginLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, EndSide, marginShorthand());
     case CSSPropertyWebkitMarginStart:
-        return resolveToPhysicalProperty(direction, writingMode, StartSide, marginLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, StartSide, marginShorthand());
     case CSSPropertyWebkitMarginBefore:
-        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, marginLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, marginShorthand());
     case CSSPropertyWebkitMarginAfter:
-        return resolveToPhysicalProperty(direction, writingMode, AfterSide, marginLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, AfterSide, marginShorthand());
     case CSSPropertyWebkitPaddingEnd:
-        return resolveToPhysicalProperty(direction, writingMode, EndSide, paddingLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, EndSide, paddingShorthand());
     case CSSPropertyWebkitPaddingStart:
-        return resolveToPhysicalProperty(direction, writingMode, StartSide, paddingLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, StartSide, paddingShorthand());
     case CSSPropertyWebkitPaddingBefore:
-        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, paddingLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, paddingShorthand());
     case CSSPropertyWebkitPaddingAfter:
-        return resolveToPhysicalProperty(direction, writingMode, AfterSide, paddingLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, AfterSide, paddingShorthand());
     case CSSPropertyWebkitBorderEnd:
         return resolveToPhysicalProperty(direction, writingMode, EndSide, borderDirections());
     case CSSPropertyWebkitBorderStart:
@@ -200,51 +200,51 @@ int CSSProperty::resolveDirectionAwareProperty(int propertyID, TextDirection dir
     case CSSPropertyWebkitBorderAfter:
         return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderDirections());
     case CSSPropertyWebkitBorderEndColor:
-        return resolveToPhysicalProperty(direction, writingMode, EndSide, borderColorLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, EndSide, borderColorShorthand());
     case CSSPropertyWebkitBorderStartColor:
-        return resolveToPhysicalProperty(direction, writingMode, StartSide, borderColorLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, StartSide, borderColorShorthand());
     case CSSPropertyWebkitBorderBeforeColor:
-        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderColorLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderColorShorthand());
     case CSSPropertyWebkitBorderAfterColor:
-        return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderColorLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderColorShorthand());
     case CSSPropertyWebkitBorderEndStyle:
-        return resolveToPhysicalProperty(direction, writingMode, EndSide, borderStyleLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, EndSide, borderStyleShorthand());
     case CSSPropertyWebkitBorderStartStyle:
-        return resolveToPhysicalProperty(direction, writingMode, StartSide, borderStyleLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, StartSide, borderStyleShorthand());
     case CSSPropertyWebkitBorderBeforeStyle:
-        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderStyleLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderStyleShorthand());
     case CSSPropertyWebkitBorderAfterStyle:
-        return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderStyleLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderStyleShorthand());
     case CSSPropertyWebkitBorderEndWidth:
-        return resolveToPhysicalProperty(direction, writingMode, EndSide, borderWidthLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, EndSide, borderWidthShorthand());
     case CSSPropertyWebkitBorderStartWidth:
-        return resolveToPhysicalProperty(direction, writingMode, StartSide, borderWidthLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, StartSide, borderWidthShorthand());
     case CSSPropertyWebkitBorderBeforeWidth:
-        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderWidthLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderWidthShorthand());
     case CSSPropertyWebkitBorderAfterWidth:
-        return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderWidthLonghand());
+        return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderWidthShorthand());
     case CSSPropertyWebkitLogicalWidth: {
-        const int properties[2] = { CSSPropertyWidth, CSSPropertyHeight };
+        const CSSPropertyID properties[2] = { CSSPropertyWidth, CSSPropertyHeight };
         return resolveToPhysicalProperty(writingMode, LogicalWidth, properties);
     }
     case CSSPropertyWebkitLogicalHeight: {
-        const int properties[2] = { CSSPropertyWidth, CSSPropertyHeight };
+        const CSSPropertyID properties[2] = { CSSPropertyWidth, CSSPropertyHeight };
         return resolveToPhysicalProperty(writingMode, LogicalHeight, properties);
     }
     case CSSPropertyWebkitMinLogicalWidth: {
-        const int properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight };
+        const CSSPropertyID properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight };
         return resolveToPhysicalProperty(writingMode, LogicalWidth, properties);
     }
     case CSSPropertyWebkitMinLogicalHeight: {
-        const int properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight };
+        const CSSPropertyID properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight };
         return resolveToPhysicalProperty(writingMode, LogicalHeight, properties);
     }
     case CSSPropertyWebkitMaxLogicalWidth: {
-        const int properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight };
+        const CSSPropertyID properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight };
         return resolveToPhysicalProperty(writingMode, LogicalWidth, properties);
     }
     case CSSPropertyWebkitMaxLogicalHeight: {
-        const int properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight };
+        const CSSPropertyID properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight };
         return resolveToPhysicalProperty(writingMode, LogicalHeight, properties);
     }
     default:
index 7c12d9c..e8f490b 100644 (file)
 #include "config.h"
 #include "CSSPropertyLonghand.h"
 
-#include "CSSPropertyNames.h"
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
 
 // FIXME: Add CSSPropertyBackgroundSize to the shorthand.
-const CSSPropertyLonghand& backgroundLonghand()
+const StylePropertyShorthand& backgroundShorthand()
 {
-    static const int backgroundProperties[] = {
+    static const CSSPropertyID backgroundProperties[] = {
         CSSPropertyBackgroundColor,
         CSSPropertyBackgroundImage,
         CSSPropertyBackgroundRepeatX,
@@ -40,160 +39,160 @@ const CSSPropertyLonghand& backgroundLonghand()
         CSSPropertyBackgroundClip,
         CSSPropertyBackgroundOrigin
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, backgroundLonghand, (backgroundProperties, WTF_ARRAY_LENGTH(backgroundProperties)));
-    return backgroundLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, backgroundShorthand, (backgroundProperties, WTF_ARRAY_LENGTH(backgroundProperties)));
+    return backgroundShorthand;
 }
 
-const CSSPropertyLonghand& backgroundPositionLonghand()
+const StylePropertyShorthand& backgroundPositionShorthand()
 {
-    static const int backgroundPositionProperties[] = { CSSPropertyBackgroundPositionX, CSSPropertyBackgroundPositionY };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, backgroundPositionLonghand, (backgroundPositionProperties, WTF_ARRAY_LENGTH(backgroundPositionProperties)));
-    return backgroundPositionLonghand;
+    static const CSSPropertyID backgroundPositionProperties[] = { CSSPropertyBackgroundPositionX, CSSPropertyBackgroundPositionY };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, backgroundPositionLonghands, (backgroundPositionProperties, WTF_ARRAY_LENGTH(backgroundPositionProperties)));
+    return backgroundPositionLonghands;
 }
 
-const CSSPropertyLonghand& backgroundRepeatLonghand()
+const StylePropertyShorthand& backgroundRepeatShorthand()
 {
-    static const int backgroundRepeatProperties[] = { CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, backgroundRepeatLonghand, (backgroundRepeatProperties, WTF_ARRAY_LENGTH(backgroundRepeatProperties)));
-    return backgroundRepeatLonghand;
+    static const CSSPropertyID backgroundRepeatProperties[] = { CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, backgroundRepeatLonghands, (backgroundRepeatProperties, WTF_ARRAY_LENGTH(backgroundRepeatProperties)));
+    return backgroundRepeatLonghands;
 }
 
-const CSSPropertyLonghand& borderLonghand()
+const StylePropertyShorthand& borderShorthand()
 {
     // Do not change the order of the following four shorthands, and keep them together.
-    static const int borderProperties[4][3] = {
+    static const CSSPropertyID borderProperties[4][3] = {
         { CSSPropertyBorderTopColor, CSSPropertyBorderTopStyle, CSSPropertyBorderTopWidth },
         { CSSPropertyBorderRightColor, CSSPropertyBorderRightStyle, CSSPropertyBorderRightWidth },
         { CSSPropertyBorderBottomColor, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomWidth },
         { CSSPropertyBorderLeftColor, CSSPropertyBorderLeftStyle, CSSPropertyBorderLeftWidth }
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderLonghand, (borderProperties[0], sizeof(borderProperties) / sizeof(borderProperties[0][0])));
-    return borderLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderLonghands, (borderProperties[0], sizeof(borderProperties) / sizeof(borderProperties[0][0])));
+    return borderLonghands;
 }
 
-const CSSPropertyLonghand& borderAbridgedLonghand()
+const StylePropertyShorthand& borderAbridgedShorthand()
 {
-    static const int borderAbridgedProperties[] = { CSSPropertyBorderWidth, CSSPropertyBorderStyle, CSSPropertyBorderColor };
-    static const CSSPropertyLonghand* propertiesForInitialization[] = {
-        &borderWidthLonghand(),
-        &borderStyleLonghand(),
-        &borderColorLonghand(),
+    static const CSSPropertyID borderAbridgedProperties[] = { CSSPropertyBorderWidth, CSSPropertyBorderStyle, CSSPropertyBorderColor };
+    static const StylePropertyShorthand* propertiesForInitialization[] = {
+        &borderWidthShorthand(),
+        &borderStyleShorthand(),
+        &borderColorShorthand(),
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderAbridgedLonghand,
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderAbridgedLonghands,
         (borderAbridgedProperties, propertiesForInitialization, WTF_ARRAY_LENGTH(borderAbridgedProperties)));
-    return borderAbridgedLonghand;
+    return borderAbridgedLonghands;
 }
 
-const CSSPropertyLonghand& borderBottomLonghand()
+const StylePropertyShorthand& borderBottomShorthand()
 {
-    static const int borderBottomProperties[] = { CSSPropertyBorderBottomWidth, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomColor };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderBottomLonghand, (borderBottomProperties, WTF_ARRAY_LENGTH(borderBottomProperties)));
-    return borderBottomLonghand;
+    static const CSSPropertyID borderBottomProperties[] = { CSSPropertyBorderBottomWidth, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomColor };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderBottomLonghands, (borderBottomProperties, WTF_ARRAY_LENGTH(borderBottomProperties)));
+    return borderBottomLonghands;
 }
 
-const CSSPropertyLonghand& borderColorLonghand()
+const StylePropertyShorthand& borderColorShorthand()
 {
-    static const int borderColorProperties[] = {
+    static const CSSPropertyID borderColorProperties[] = {
         CSSPropertyBorderTopColor,
         CSSPropertyBorderRightColor,
         CSSPropertyBorderBottomColor,
         CSSPropertyBorderLeftColor
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderColorLonghand, (borderColorProperties, WTF_ARRAY_LENGTH(borderColorProperties)));
-    return borderColorLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderColorLonghands, (borderColorProperties, WTF_ARRAY_LENGTH(borderColorProperties)));
+    return borderColorLonghands;
 }
 
-const CSSPropertyLonghand& borderImageLonghand()
+const StylePropertyShorthand& borderImageShorthand()
 {
-    static const int borderImageProperties[] = {
+    static const CSSPropertyID borderImageProperties[] = {
         CSSPropertyBorderImageSource,
         CSSPropertyBorderImageSlice,
         CSSPropertyBorderImageWidth,
         CSSPropertyBorderImageOutset,
         CSSPropertyBorderImageRepeat
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderImageLonghand, (borderImageProperties, WTF_ARRAY_LENGTH(borderImageProperties)));
-    return borderImageLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderImageLonghands, (borderImageProperties, WTF_ARRAY_LENGTH(borderImageProperties)));
+    return borderImageLonghands;
 }
 
-const CSSPropertyLonghand& borderLeftLonghand()
+const StylePropertyShorthand& borderLeftShorthand()
 {
-    static const int borderLeftProperties[] = { CSSPropertyBorderLeftWidth, CSSPropertyBorderLeftStyle, CSSPropertyBorderLeftColor };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderLeftLonghand, (borderLeftProperties, WTF_ARRAY_LENGTH(borderLeftProperties)));
-    return borderLeftLonghand;
+    static const CSSPropertyID borderLeftProperties[] = { CSSPropertyBorderLeftWidth, CSSPropertyBorderLeftStyle, CSSPropertyBorderLeftColor };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderLeftLonghands, (borderLeftProperties, WTF_ARRAY_LENGTH(borderLeftProperties)));
+    return borderLeftLonghands;
 }
 
-const CSSPropertyLonghand& borderRadiusLonghand()
+const StylePropertyShorthand& borderRadiusShorthand()
 {
-    static const int borderRadiusProperties[] = {
+    static const CSSPropertyID borderRadiusProperties[] = {
         CSSPropertyBorderTopRightRadius,
         CSSPropertyBorderTopLeftRadius,
         CSSPropertyBorderBottomLeftRadius,
         CSSPropertyBorderBottomRightRadius
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderRadiusLonghand, (borderRadiusProperties, WTF_ARRAY_LENGTH(borderRadiusProperties)));
-    return borderRadiusLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderRadiusLonghands, (borderRadiusProperties, WTF_ARRAY_LENGTH(borderRadiusProperties)));
+    return borderRadiusLonghands;
 }
 
-const CSSPropertyLonghand& borderRightLonghand()
+const StylePropertyShorthand& borderRightShorthand()
 {
-    static const int borderRightProperties[] = { CSSPropertyBorderRightWidth, CSSPropertyBorderRightStyle, CSSPropertyBorderRightColor };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderRightLonghand, (borderRightProperties, WTF_ARRAY_LENGTH(borderRightProperties)));
-    return borderRightLonghand;
+    static const CSSPropertyID borderRightProperties[] = { CSSPropertyBorderRightWidth, CSSPropertyBorderRightStyle, CSSPropertyBorderRightColor };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderRightLonghands, (borderRightProperties, WTF_ARRAY_LENGTH(borderRightProperties)));
+    return borderRightLonghands;
 }
 
-const CSSPropertyLonghand& borderSpacingLonghand()
+const StylePropertyShorthand& borderSpacingShorthand()
 {
-    static const int borderSpacingProperties[] = { CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyWebkitBorderVerticalSpacing };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderSpacingLonghand, (borderSpacingProperties, WTF_ARRAY_LENGTH(borderSpacingProperties)));
-    return borderSpacingLonghand;
+    static const CSSPropertyID borderSpacingProperties[] = { CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyWebkitBorderVerticalSpacing };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderSpacingLonghands, (borderSpacingProperties, WTF_ARRAY_LENGTH(borderSpacingProperties)));
+    return borderSpacingLonghands;
 }
 
-const CSSPropertyLonghand& borderStyleLonghand()
+const StylePropertyShorthand& borderStyleShorthand()
 {
-    static const int borderStyleProperties[] = {
+    static const CSSPropertyID borderStyleProperties[] = {
         CSSPropertyBorderTopStyle,
         CSSPropertyBorderRightStyle,
         CSSPropertyBorderBottomStyle,
         CSSPropertyBorderLeftStyle
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderStyleLonghand, (borderStyleProperties, WTF_ARRAY_LENGTH(borderStyleProperties)));
-    return borderStyleLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderStyleLonghands, (borderStyleProperties, WTF_ARRAY_LENGTH(borderStyleProperties)));
+    return borderStyleLonghands;
 }
 
-const CSSPropertyLonghand& borderTopLonghand()
+const StylePropertyShorthand& borderTopShorthand()
 {
-    static const int borderTopProperties[] = { CSSPropertyBorderTopWidth, CSSPropertyBorderTopStyle, CSSPropertyBorderTopColor };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderTopLonghand, (borderTopProperties, WTF_ARRAY_LENGTH(borderTopProperties)));
-    return borderTopLonghand;
+    static const CSSPropertyID borderTopProperties[] = { CSSPropertyBorderTopWidth, CSSPropertyBorderTopStyle, CSSPropertyBorderTopColor };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderTopLonghands, (borderTopProperties, WTF_ARRAY_LENGTH(borderTopProperties)));
+    return borderTopLonghands;
 }
 
-const CSSPropertyLonghand& borderWidthLonghand()
+const StylePropertyShorthand& borderWidthShorthand()
 {
-    static const int borderWidthProperties[] = {
+    static const CSSPropertyID borderWidthProperties[] = {
         CSSPropertyBorderTopWidth,
         CSSPropertyBorderRightWidth,
         CSSPropertyBorderBottomWidth,
         CSSPropertyBorderLeftWidth
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, borderWidthLonghand, (borderWidthProperties, WTF_ARRAY_LENGTH(borderWidthProperties)));
-    return borderWidthLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderWidthLonghands, (borderWidthProperties, WTF_ARRAY_LENGTH(borderWidthProperties)));
+    return borderWidthLonghands;
 }
 
-const CSSPropertyLonghand& listStyleLonghand()
+const StylePropertyShorthand& listStyleShorthand()
 {
-    static const int listStyleProperties[] = {
+    static const CSSPropertyID listStyleProperties[] = {
         CSSPropertyListStyleType,
         CSSPropertyListStylePosition,
         CSSPropertyListStyleImage
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, listStyleLonghand, (listStyleProperties, WTF_ARRAY_LENGTH(listStyleProperties)));
-    return listStyleLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, listStyleLonghands, (listStyleProperties, WTF_ARRAY_LENGTH(listStyleProperties)));
+    return listStyleLonghands;
 }
 
-const CSSPropertyLonghand& fontLonghand()
+const StylePropertyShorthand& fontShorthand()
 {
-    static const int fontProperties[] = {
+    static const CSSPropertyID fontProperties[] = {
         CSSPropertyFontFamily,
         CSSPropertyFontSize,
         CSSPropertyFontStyle,
@@ -201,55 +200,55 @@ const CSSPropertyLonghand& fontLonghand()
         CSSPropertyFontWeight,
         CSSPropertyLineHeight
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, fontLonghand, (fontProperties, WTF_ARRAY_LENGTH(fontProperties)));
-    return fontLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, fontLonghands, (fontProperties, WTF_ARRAY_LENGTH(fontProperties)));
+    return fontLonghands;
 }
 
-const CSSPropertyLonghand& marginLonghand()
+const StylePropertyShorthand& marginShorthand()
 {
-    static const int marginProperties[] = {
+    static const CSSPropertyID marginProperties[] = {
         CSSPropertyMarginTop,
         CSSPropertyMarginRight,
         CSSPropertyMarginBottom,
         CSSPropertyMarginLeft
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, marginLonghand, (marginProperties, WTF_ARRAY_LENGTH(marginProperties)));
-    return marginLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, marginLonghands, (marginProperties, WTF_ARRAY_LENGTH(marginProperties)));
+    return marginLonghands;
 }
 
-const CSSPropertyLonghand& outlineLonghand()
+const StylePropertyShorthand& outlineShorthand()
 {
-    static const int outlineProperties[] = {
+    static const CSSPropertyID outlineProperties[] = {
         CSSPropertyOutlineColor,
         CSSPropertyOutlineStyle,
         CSSPropertyOutlineWidth
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, outlineLonghand, (outlineProperties, WTF_ARRAY_LENGTH(outlineProperties)));
-    return outlineLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, outlineLonghands, (outlineProperties, WTF_ARRAY_LENGTH(outlineProperties)));
+    return outlineLonghands;
 }
 
-const CSSPropertyLonghand& overflowLonghand()
+const StylePropertyShorthand& overflowShorthand()
 {
-    static const int overflowProperties[] = { CSSPropertyOverflowX, CSSPropertyOverflowY };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, overflowLonghand, (overflowProperties, WTF_ARRAY_LENGTH(overflowProperties)));
-    return overflowLonghand;
+    static const CSSPropertyID overflowProperties[] = { CSSPropertyOverflowX, CSSPropertyOverflowY };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, overflowLonghands, (overflowProperties, WTF_ARRAY_LENGTH(overflowProperties)));
+    return overflowLonghands;
 }
 
-const CSSPropertyLonghand& paddingLonghand()
+const StylePropertyShorthand& paddingShorthand()
 {
-    static const int paddingProperties[] = {
+    static const CSSPropertyID paddingProperties[] = {
         CSSPropertyPaddingTop,
         CSSPropertyPaddingRight,
         CSSPropertyPaddingBottom,
         CSSPropertyPaddingLeft
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, paddingLonghand, (paddingProperties, WTF_ARRAY_LENGTH(paddingProperties)));
-    return paddingLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, paddingLonghands, (paddingProperties, WTF_ARRAY_LENGTH(paddingProperties)));
+    return paddingLonghands;
 }
 
-const CSSPropertyLonghand& webkitAnimationLonghand()
+const StylePropertyShorthand& webkitAnimationShorthand()
 {
-    static const int animationProperties[] = {
+    static const CSSPropertyID animationProperties[] = {
         CSSPropertyWebkitAnimationName,
         CSSPropertyWebkitAnimationDuration,
         CSSPropertyWebkitAnimationTimingFunction,
@@ -258,86 +257,86 @@ const CSSPropertyLonghand& webkitAnimationLonghand()
         CSSPropertyWebkitAnimationDirection,
         CSSPropertyWebkitAnimationFillMode
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitAnimationLonghand, (animationProperties, WTF_ARRAY_LENGTH(animationProperties)));
-    return webkitAnimationLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitAnimationLonghands, (animationProperties, WTF_ARRAY_LENGTH(animationProperties)));
+    return webkitAnimationLonghands;
 }
 
-const CSSPropertyLonghand& webkitBorderAfterLonghand()
+const StylePropertyShorthand& webkitBorderAfterShorthand()
 {
-    static const int borderAfterProperties[] = { CSSPropertyWebkitBorderAfterWidth, CSSPropertyWebkitBorderAfterStyle, CSSPropertyWebkitBorderAfterColor  };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitBorderAfterLonghand, (borderAfterProperties, WTF_ARRAY_LENGTH(borderAfterProperties)));
-    return webkitBorderAfterLonghand;
+    static const CSSPropertyID borderAfterProperties[] = { CSSPropertyWebkitBorderAfterWidth, CSSPropertyWebkitBorderAfterStyle, CSSPropertyWebkitBorderAfterColor  };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitBorderAfterLonghands, (borderAfterProperties, WTF_ARRAY_LENGTH(borderAfterProperties)));
+    return webkitBorderAfterLonghands;
 }
 
-const CSSPropertyLonghand& webkitBorderBeforeLonghand()
+const StylePropertyShorthand& webkitBorderBeforeShorthand()
 {
-    static const int borderBeforeProperties[] = { CSSPropertyWebkitBorderBeforeWidth, CSSPropertyWebkitBorderBeforeStyle, CSSPropertyWebkitBorderBeforeColor  };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitBorderBeforeLonghand, (borderBeforeProperties, WTF_ARRAY_LENGTH(borderBeforeProperties)));
-    return webkitBorderBeforeLonghand;
+    static const CSSPropertyID borderBeforeProperties[] = { CSSPropertyWebkitBorderBeforeWidth, CSSPropertyWebkitBorderBeforeStyle, CSSPropertyWebkitBorderBeforeColor  };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitBorderBeforeLonghands, (borderBeforeProperties, WTF_ARRAY_LENGTH(borderBeforeProperties)));
+    return webkitBorderBeforeLonghands;
 }
 
-const CSSPropertyLonghand& webkitBorderEndLonghand()
+const StylePropertyShorthand& webkitBorderEndShorthand()
 {
-    static const int borderEndProperties[] = { CSSPropertyWebkitBorderEndWidth, CSSPropertyWebkitBorderEndStyle, CSSPropertyWebkitBorderEndColor };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitBorderEndLonghand, (borderEndProperties, WTF_ARRAY_LENGTH(borderEndProperties)));
-    return webkitBorderEndLonghand;
+    static const CSSPropertyID borderEndProperties[] = { CSSPropertyWebkitBorderEndWidth, CSSPropertyWebkitBorderEndStyle, CSSPropertyWebkitBorderEndColor };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitBorderEndLonghands, (borderEndProperties, WTF_ARRAY_LENGTH(borderEndProperties)));
+    return webkitBorderEndLonghands;
 }
 
-const CSSPropertyLonghand& webkitBorderStartLonghand()
+const StylePropertyShorthand& webkitBorderStartShorthand()
 {
-    static const int borderStartProperties[] = { CSSPropertyWebkitBorderStartWidth, CSSPropertyWebkitBorderStartStyle, CSSPropertyWebkitBorderStartColor };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitBorderStartLonghand, (borderStartProperties, WTF_ARRAY_LENGTH(borderStartProperties)));
-    return webkitBorderStartLonghand;
+    static const CSSPropertyID borderStartProperties[] = { CSSPropertyWebkitBorderStartWidth, CSSPropertyWebkitBorderStartStyle, CSSPropertyWebkitBorderStartColor };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitBorderStartLonghands, (borderStartProperties, WTF_ARRAY_LENGTH(borderStartProperties)));
+    return webkitBorderStartLonghands;
 }
 
-const CSSPropertyLonghand& webkitColumnsLonghand()
+const StylePropertyShorthand& webkitColumnsShorthand()
 {
-    static const int columnsProperties[] = { CSSPropertyWebkitColumnWidth, CSSPropertyWebkitColumnCount };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitColumnsLonghand, (columnsProperties, WTF_ARRAY_LENGTH(columnsProperties)));
-    return webkitColumnsLonghand;
+    static const CSSPropertyID columnsProperties[] = { CSSPropertyWebkitColumnWidth, CSSPropertyWebkitColumnCount };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitColumnsLonghands, (columnsProperties, WTF_ARRAY_LENGTH(columnsProperties)));
+    return webkitColumnsLonghands;
 }
 
-const CSSPropertyLonghand& webkitColumnRuleLonghand()
+const StylePropertyShorthand& webkitColumnRuleShorthand()
 {
-    static const int columnRuleProperties[] = {
+    static const CSSPropertyID columnRuleProperties[] = {
         CSSPropertyWebkitColumnRuleWidth,
         CSSPropertyWebkitColumnRuleStyle,
         CSSPropertyWebkitColumnRuleColor,
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitColumnRuleLonghand, (columnRuleProperties, WTF_ARRAY_LENGTH(columnRuleProperties)));
-    return webkitColumnRuleLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitColumnRuleLonghands, (columnRuleProperties, WTF_ARRAY_LENGTH(columnRuleProperties)));
+    return webkitColumnRuleLonghands;
 }
 
-const CSSPropertyLonghand& webkitFlexFlowLonghand()
+const StylePropertyShorthand& webkitFlexFlowShorthand()
 {
-    static const int flexFlowProperties[] = { CSSPropertyWebkitFlexDirection, CSSPropertyWebkitFlexWrap };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitFlexFlowLonghand, (flexFlowProperties, WTF_ARRAY_LENGTH(flexFlowProperties)));
-    return webkitFlexFlowLonghand;
+    static const CSSPropertyID flexFlowProperties[] = { CSSPropertyWebkitFlexDirection, CSSPropertyWebkitFlexWrap };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexFlowLonghands, (flexFlowProperties, WTF_ARRAY_LENGTH(flexFlowProperties)));
+    return webkitFlexFlowLonghands;
 }
 
-const CSSPropertyLonghand& webkitMarginCollapseLonghand()
+const StylePropertyShorthand& webkitMarginCollapseShorthand()
 {
-    static const int marginCollapseProperties[] = { CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitMarginCollapseLonghand, (marginCollapseProperties, WTF_ARRAY_LENGTH(marginCollapseProperties)));
-    return webkitMarginCollapseLonghand;
+    static const CSSPropertyID marginCollapseProperties[] = { CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarginCollapseLonghands, (marginCollapseProperties, WTF_ARRAY_LENGTH(marginCollapseProperties)));
+    return webkitMarginCollapseLonghands;
 }
 
-const CSSPropertyLonghand& webkitMarqueeLonghand()
+const StylePropertyShorthand& webkitMarqueeShorthand()
 {
-    static const int marqueeProperties[] = {
+    static const CSSPropertyID marqueeProperties[] = {
         CSSPropertyWebkitMarqueeDirection,
         CSSPropertyWebkitMarqueeIncrement,
         CSSPropertyWebkitMarqueeRepetition,
         CSSPropertyWebkitMarqueeStyle,
         CSSPropertyWebkitMarqueeSpeed
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitMarqueeLonghand, (marqueeProperties, WTF_ARRAY_LENGTH(marqueeProperties)));
-    return webkitMarqueeLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarqueeLonghands, (marqueeProperties, WTF_ARRAY_LENGTH(marqueeProperties)));
+    return webkitMarqueeLonghands;
 }
 
-const CSSPropertyLonghand& webkitMaskLonghand()
+const StylePropertyShorthand& webkitMaskShorthand()
 {
-    static const int maskProperties[] = {
+    static const CSSPropertyID maskProperties[] = {
         CSSPropertyWebkitMaskImage,
         CSSPropertyWebkitMaskRepeatX,
         CSSPropertyWebkitMaskRepeatY,
@@ -347,160 +346,160 @@ const CSSPropertyLonghand& webkitMaskLonghand()
         CSSPropertyWebkitMaskClip,
         CSSPropertyWebkitMaskOrigin
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitMaskLonghand, (maskProperties, WTF_ARRAY_LENGTH(maskProperties)));
-    return webkitMaskLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskLonghands, (maskProperties, WTF_ARRAY_LENGTH(maskProperties)));
+    return webkitMaskLonghands;
 }
 
-const CSSPropertyLonghand& webkitMaskPositionLonghand()
+const StylePropertyShorthand& webkitMaskPositionShorthand()
 {
-    static const int maskPositionProperties[] = { CSSPropertyWebkitMaskPositionX, CSSPropertyWebkitMaskPositionY };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitMaskPositionLonghand, (maskPositionProperties, WTF_ARRAY_LENGTH(maskPositionProperties)));
-    return webkitMaskPositionLonghand;
+    static const CSSPropertyID maskPositionProperties[] = { CSSPropertyWebkitMaskPositionX, CSSPropertyWebkitMaskPositionY };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskPositionLonghands, (maskPositionProperties, WTF_ARRAY_LENGTH(maskPositionProperties)));
+    return webkitMaskPositionLonghands;
 }
 
-const CSSPropertyLonghand& webkitMaskRepeatLonghand()
+const StylePropertyShorthand& webkitMaskRepeatShorthand()
 {
-    static const int maskRepeatProperties[] = { CSSPropertyWebkitMaskRepeatX, CSSPropertyWebkitMaskRepeatY };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitMaskRepeatLonghand, (maskRepeatProperties, WTF_ARRAY_LENGTH(maskRepeatProperties)));
-    return webkitMaskRepeatLonghand;
+    static const CSSPropertyID maskRepeatProperties[] = { CSSPropertyWebkitMaskRepeatX, CSSPropertyWebkitMaskRepeatY };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskRepeatLonghands, (maskRepeatProperties, WTF_ARRAY_LENGTH(maskRepeatProperties)));
+    return webkitMaskRepeatLonghands;
 }
 
-const CSSPropertyLonghand& webkitTextEmphasisLonghand()
+const StylePropertyShorthand& webkitTextEmphasisShorthand()
 {
-    static const int textEmphasisProperties[] = {
+    static const CSSPropertyID textEmphasisProperties[] = {
         CSSPropertyWebkitTextEmphasisStyle,
         CSSPropertyWebkitTextEmphasisColor
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitTextEmphasisLonghand, (textEmphasisProperties, WTF_ARRAY_LENGTH(textEmphasisProperties)));
-    return webkitTextEmphasisLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTextEmphasisLonghands, (textEmphasisProperties, WTF_ARRAY_LENGTH(textEmphasisProperties)));
+    return webkitTextEmphasisLonghands;
 }
 
-const CSSPropertyLonghand& webkitTextStrokeLonghand()
+const StylePropertyShorthand& webkitTextStrokeShorthand()
 {
-    static const int textStrokeProperties[] = { CSSPropertyWebkitTextStrokeWidth, CSSPropertyWebkitTextStrokeColor };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitTextStrokeLonghand, (textStrokeProperties, WTF_ARRAY_LENGTH(textStrokeProperties)));
-    return webkitTextStrokeLonghand;
+    static const CSSPropertyID textStrokeProperties[] = { CSSPropertyWebkitTextStrokeWidth, CSSPropertyWebkitTextStrokeColor };
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTextStrokeLonghands, (textStrokeProperties, WTF_ARRAY_LENGTH(textStrokeProperties)));
+    return webkitTextStrokeLonghands;
 }
 
-const CSSPropertyLonghand& webkitTransitionLonghand()
+const StylePropertyShorthand& webkitTransitionShorthand()
 {
-    static const int transitionProperties[] = {
+    static const CSSPropertyID transitionProperties[] = {
         CSSPropertyWebkitTransitionProperty,
         CSSPropertyWebkitTransitionDuration,
         CSSPropertyWebkitTransitionTimingFunction,
         CSSPropertyWebkitTransitionDelay
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitTransitionLonghand, (transitionProperties, WTF_ARRAY_LENGTH(transitionProperties)));
-    return webkitTransitionLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTransitionLonghands, (transitionProperties, WTF_ARRAY_LENGTH(transitionProperties)));
+    return webkitTransitionLonghands;
 }
 
-const CSSPropertyLonghand& webkitTransformOriginLonghand()
+const StylePropertyShorthand& webkitTransformOriginShorthand()
 {
-    static const int transformOriginProperties[] = {
+    static const CSSPropertyID transformOriginProperties[] = {
         CSSPropertyWebkitTransformOriginX,
         CSSPropertyWebkitTransformOriginY,
         CSSPropertyWebkitTransformOriginZ
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitTransformOriginLonghand, (transformOriginProperties, WTF_ARRAY_LENGTH(transformOriginProperties)));
-    return webkitTransformOriginLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTransformOriginLonghands, (transformOriginProperties, WTF_ARRAY_LENGTH(transformOriginProperties)));
+    return webkitTransformOriginLonghands;
 }
 
-const CSSPropertyLonghand& webkitWrapLonghand()
+const StylePropertyShorthand& webkitWrapShorthand()
 {
-    static const int webkitWrapProperties[] = {
+    static const CSSPropertyID webkitWrapProperties[] = {
         CSSPropertyWebkitWrapFlow,
         CSSPropertyWebkitWrapMargin,
         CSSPropertyWebkitWrapPadding
     };
-    DEFINE_STATIC_LOCAL(CSSPropertyLonghand, webkitWrapLonghand, (webkitWrapProperties, WTF_ARRAY_LENGTH(webkitWrapProperties)));
-    return webkitWrapLonghand;
+    DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitWrapLonghands, (webkitWrapProperties, WTF_ARRAY_LENGTH(webkitWrapProperties)));
+    return webkitWrapLonghands;
 }
 
 // Returns an empty list if the property is not a shorthand
-const CSSPropertyLonghand& longhandForProperty(int propertyID)
+const StylePropertyShorthand& shorthandForProperty(int propertyID)
 {
     switch (propertyID) {
     case CSSPropertyBackground:
-        return backgroundLonghand();
+        return backgroundShorthand();
     case CSSPropertyBackgroundPosition:
-        return backgroundPositionLonghand();
+        return backgroundPositionShorthand();
     case CSSPropertyBackgroundRepeat:
-        return backgroundRepeatLonghand();
+        return backgroundRepeatShorthand();
     case CSSPropertyBorder:
-        return borderLonghand();
+        return borderShorthand();
     case CSSPropertyBorderBottom:
-        return borderBottomLonghand();
+        return borderBottomShorthand();
     case CSSPropertyBorderColor:
-        return borderColorLonghand();
+        return borderColorShorthand();
     case CSSPropertyBorderImage:
-        return borderImageLonghand();
+        return borderImageShorthand();
     case CSSPropertyBorderLeft:
-        return borderLeftLonghand();
+        return borderLeftShorthand();
     case CSSPropertyBorderRadius:
-        return borderRadiusLonghand();
+        return borderRadiusShorthand();
     case CSSPropertyBorderRight:
-        return borderRightLonghand();
+        return borderRightShorthand();
     case CSSPropertyBorderSpacing:
-        return borderSpacingLonghand();
+        return borderSpacingShorthand();
     case CSSPropertyBorderStyle:
-        return borderStyleLonghand();
+        return borderStyleShorthand();
     case CSSPropertyBorderTop:
-        return borderTopLonghand();
+        return borderTopShorthand();
     case CSSPropertyBorderWidth:
-        return borderWidthLonghand();
+        return borderWidthShorthand();
     case CSSPropertyListStyle:
-        return listStyleLonghand();
+        return listStyleShorthand();
     case CSSPropertyFont:
-        return fontLonghand();
+        return fontShorthand();
     case CSSPropertyMargin:
-        return marginLonghand();
+        return marginShorthand();
     case CSSPropertyOutline:
-        return outlineLonghand();
+        return outlineShorthand();
     case CSSPropertyOverflow:
-        return overflowLonghand();
+        return overflowShorthand();
     case CSSPropertyPadding:
-        return paddingLonghand();
+        return paddingShorthand();
     case CSSPropertyWebkitAnimation:
-        return webkitAnimationLonghand();
+        return webkitAnimationShorthand();
     case CSSPropertyWebkitBorderAfter:
-        return webkitBorderAfterLonghand();
+        return webkitBorderAfterShorthand();
     case CSSPropertyWebkitBorderBefore:
-        return webkitBorderBeforeLonghand();
+        return webkitBorderBeforeShorthand();
     case CSSPropertyWebkitBorderEnd:
-        return webkitBorderEndLonghand();
+        return webkitBorderEndShorthand();
     case CSSPropertyWebkitBorderStart:
-        return webkitBorderStartLonghand();
+        return webkitBorderStartShorthand();
     case CSSPropertyWebkitBorderRadius:
-        return borderRadiusLonghand();
+        return borderRadiusShorthand();
     case CSSPropertyWebkitColumns:
-        return webkitColumnsLonghand();
+        return webkitColumnsShorthand();
     case CSSPropertyWebkitColumnRule:
-        return webkitColumnRuleLonghand();
+        return webkitColumnRuleShorthand();
     case CSSPropertyWebkitFlexFlow:
-        return webkitFlexFlowLonghand();
+        return webkitFlexFlowShorthand();
     case CSSPropertyWebkitMarginCollapse:
-        return webkitMarginCollapseLonghand();
+        return webkitMarginCollapseShorthand();
     case CSSPropertyWebkitMarquee:
-        return webkitMarqueeLonghand();
+        return webkitMarqueeShorthand();
     case CSSPropertyWebkitMask:
-        return webkitMaskLonghand();
+        return webkitMaskShorthand();
     case CSSPropertyWebkitMaskPosition:
-        return webkitMaskPositionLonghand();
+        return webkitMaskPositionShorthand();
     case CSSPropertyWebkitMaskRepeat:
-        return webkitMaskRepeatLonghand();
+        return webkitMaskRepeatShorthand();
     case CSSPropertyWebkitTextEmphasis:
-        return webkitTextEmphasisLonghand();
+        return webkitTextEmphasisShorthand();
     case CSSPropertyWebkitTextStroke:
-        return webkitTextStrokeLonghand();
+        return webkitTextStrokeShorthand();
     case CSSPropertyWebkitTransition:
-        return webkitTransitionLonghand();
+        return webkitTransitionShorthand();
     case CSSPropertyWebkitTransformOrigin:
-        return webkitTransformOriginLonghand();
+        return webkitTransformOriginShorthand();
     case CSSPropertyWebkitWrap:
-        return webkitWrapLonghand();
+        return webkitWrapShorthand();
     default: {
-        DEFINE_STATIC_LOCAL(CSSPropertyLonghand, defaultLonghand, ());
-        return defaultLonghand;
+        DEFINE_STATIC_LOCAL(StylePropertyShorthand, emptyShorthand, ());
+        return emptyShorthand;
     }
     }
 }
index 9170ff6..683c6ec 100644 (file)
 #ifndef CSSPropertyLonghand_h
 #define CSSPropertyLonghand_h
 
+#include "CSSPropertyNames.h"
+
 namespace WebCore {
 
-class CSSPropertyLonghand {
+class StylePropertyShorthand {
 public:
-    CSSPropertyLonghand()
+    StylePropertyShorthand()
         : m_properties(0)
-        , m_longhandsForInitialization(0)
+        , m_propertiesForInitialization(0)
         , m_length(0)
     {
     }
 
-    CSSPropertyLonghand(const int* properties, unsigned numProperties)
+    StylePropertyShorthand(const CSSPropertyID* properties, unsigned numProperties)
         : m_properties(properties)
-        , m_longhandsForInitialization(0)
+        , m_propertiesForInitialization(0)
         , m_length(numProperties)
     {
     }
 
-    CSSPropertyLonghand(const int* properties, const CSSPropertyLonghand** longhandsForInitialization, unsigned numProperties)
+    StylePropertyShorthand(const CSSPropertyID* properties, const StylePropertyShorthand** propertiesForInitialization, unsigned numProperties)
         : m_properties(properties)
-        , m_longhandsForInitialization(longhandsForInitialization)
+        , m_propertiesForInitialization(propertiesForInitialization)
         , m_length(numProperties)
     {
     }
 
-    const int* properties() const { return m_properties; }
-    const CSSPropertyLonghand** longhandsForInitialization() const { return m_longhandsForInitialization; }
+    const CSSPropertyID* properties() const { return m_properties; }
+    const StylePropertyShorthand** propertiesForInitialization() const { return m_propertiesForInitialization; }
     unsigned length() const { return m_length; }
 
 private:
-    const int* m_properties;
-    const CSSPropertyLonghand** m_longhandsForInitialization;
+    const CSSPropertyID* m_properties;
+    const StylePropertyShorthand** m_propertiesForInitialization;
     unsigned m_length;
 };
 
-const CSSPropertyLonghand& backgroundLonghand();
-const CSSPropertyLonghand& backgroundPositionLonghand();
-const CSSPropertyLonghand& backgroundRepeatLonghand();
-const CSSPropertyLonghand& borderLonghand();
-const CSSPropertyLonghand& borderAbridgedLonghand();
-const CSSPropertyLonghand& borderBottomLonghand();
-const CSSPropertyLonghand& borderColorLonghand();
-const CSSPropertyLonghand& borderImageLonghand();
-const CSSPropertyLonghand& borderLeftLonghand();
-const CSSPropertyLonghand& borderRadiusLonghand();
-const CSSPropertyLonghand& borderRightLonghand();
-const CSSPropertyLonghand& borderSpacingLonghand();
-const CSSPropertyLonghand& borderStyleLonghand();
-const CSSPropertyLonghand& borderTopLonghand();
-const CSSPropertyLonghand& borderWidthLonghand();
-const CSSPropertyLonghand& listStyleLonghand();
-const CSSPropertyLonghand& fontLonghand();
-const CSSPropertyLonghand& marginLonghand();
-const CSSPropertyLonghand& outlineLonghand();
-const CSSPropertyLonghand& overflowLonghand();
-const CSSPropertyLonghand& paddingLonghand();
-const CSSPropertyLonghand& webkitAnimationLonghand();
-const CSSPropertyLonghand& webkitBorderAfterLonghand();
-const CSSPropertyLonghand& webkitBorderBeforeLonghand();
-const CSSPropertyLonghand& webkitBorderEndLonghand();
-const CSSPropertyLonghand& webkitBorderStartLonghand();
-const CSSPropertyLonghand& webkitColumnsLonghand();
-const CSSPropertyLonghand& webkitColumnRuleLonghand();
-const CSSPropertyLonghand& webkitFlexFlowLonghand();
-const CSSPropertyLonghand& webkitMarginCollapseLonghand();
-const CSSPropertyLonghand& webkitMarqueeLonghand();
-const CSSPropertyLonghand& webkitMaskLonghand();
-const CSSPropertyLonghand& webkitMaskPositionLonghand();
-const CSSPropertyLonghand& webkitMaskRepeatLonghand();
-const CSSPropertyLonghand& webkitTextEmphasisLonghand();
-const CSSPropertyLonghand& webkitTextStrokeLonghand();
-const CSSPropertyLonghand& webkitTransitionLonghand();
-const CSSPropertyLonghand& webkitTransformOriginLonghand();
-const CSSPropertyLonghand& webkitWrapLonghand();
+const StylePropertyShorthand& backgroundShorthand();
+const StylePropertyShorthand& backgroundPositionShorthand();
+const StylePropertyShorthand& backgroundRepeatShorthand();
+const StylePropertyShorthand& borderShorthand();
+const StylePropertyShorthand& borderAbridgedShorthand();
+const StylePropertyShorthand& borderBottomShorthand();
+const StylePropertyShorthand& borderColorShorthand();
+const StylePropertyShorthand& borderImageShorthand();
+const StylePropertyShorthand& borderLeftShorthand();
+const StylePropertyShorthand& borderRadiusShorthand();
+const StylePropertyShorthand& borderRightShorthand();
+const StylePropertyShorthand& borderSpacingShorthand();
+const StylePropertyShorthand& borderStyleShorthand();
+const StylePropertyShorthand& borderTopShorthand();
+const StylePropertyShorthand& borderWidthShorthand();
+const StylePropertyShorthand& listStyleShorthand();
+const StylePropertyShorthand& fontShorthand();
+const StylePropertyShorthand& marginShorthand();
+const StylePropertyShorthand& outlineShorthand();
+const StylePropertyShorthand& overflowShorthand();
+const StylePropertyShorthand& paddingShorthand();
+const StylePropertyShorthand& webkitAnimationShorthand();
+const StylePropertyShorthand& webkitBorderAfterShorthand();
+const StylePropertyShorthand& webkitBorderBeforeShorthand();
+const StylePropertyShorthand& webkitBorderEndShorthand();
+const StylePropertyShorthand& webkitBorderStartShorthand();
+const StylePropertyShorthand& webkitColumnsShorthand();
+const StylePropertyShorthand& webkitColumnRuleShorthand();
+const StylePropertyShorthand& webkitFlexFlowShorthand();
+const StylePropertyShorthand& webkitMarginCollapseShorthand();
+const StylePropertyShorthand& webkitMarqueeShorthand();
+const StylePropertyShorthand& webkitMaskShorthand();
+const StylePropertyShorthand& webkitMaskPositionShorthand();
+const StylePropertyShorthand& webkitMaskRepeatShorthand();
+const StylePropertyShorthand& webkitTextEmphasisShorthand();
+const StylePropertyShorthand& webkitTextStrokeShorthand();
+const StylePropertyShorthand& webkitTransitionShorthand();
+const StylePropertyShorthand& webkitTransformOriginShorthand();
+const StylePropertyShorthand& webkitWrapShorthand();
 
 // Returns an empty list if the property is not a shorthand
-const CSSPropertyLonghand& longhandForProperty(int);
+const StylePropertyShorthand& shorthandForProperty(int);
 
 } // namespace WebCore
 
index 7f0085e..873498d 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "CSSParser.h"
 #include "CSSPropertyLonghand.h"
-#include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "CSSValueList.h"
 #include "CSSValuePool.h"
@@ -103,15 +102,15 @@ String StylePropertySet::getPropertyValue(int propertyID) const
     // Shorthand and 4-values properties
     switch (propertyID) {
     case CSSPropertyBorderSpacing:
-        return borderSpacingValue(borderSpacingLonghand());
+        return borderSpacingValue(borderSpacingShorthand());
     case CSSPropertyBackgroundPosition:
-        return getLayeredShorthandValue(backgroundPositionLonghand());
+        return getLayeredShorthandValue(backgroundPositionShorthand());
     case CSSPropertyBackgroundRepeat:
-        return getLayeredShorthandValue(backgroundRepeatLonghand());
+        return getLayeredShorthandValue(backgroundRepeatShorthand());
     case CSSPropertyBackground:
-        return getLayeredShorthandValue(backgroundLonghand());
+        return getLayeredShorthandValue(backgroundShorthand());
     case CSSPropertyBorder: {
-        const CSSPropertyLonghand properties[3] = { borderWidthLonghand(), borderStyleLonghand(), borderColorLonghand() };
+        const StylePropertyShorthand properties[3] = { borderWidthShorthand(), borderStyleShorthand(), borderColorShorthand() };
         String res;
         for (size_t i = 0; i < WTF_ARRAY_LENGTH(properties); ++i) {
             String value = getCommonValue(properties[i]);
@@ -124,47 +123,47 @@ String StylePropertySet::getPropertyValue(int propertyID) const
         return res;
     }
     case CSSPropertyBorderTop:
-        return getShorthandValue(borderTopLonghand());
+        return getShorthandValue(borderTopShorthand());
     case CSSPropertyBorderRight:
-        return getShorthandValue(borderRightLonghand());
+        return getShorthandValue(borderRightShorthand());
     case CSSPropertyBorderBottom:
-        return getShorthandValue(borderBottomLonghand());
+        return getShorthandValue(borderBottomShorthand());
     case CSSPropertyBorderLeft:
-        return getShorthandValue(borderLeftLonghand());
+        return getShorthandValue(borderLeftShorthand());
     case CSSPropertyOutline:
-        return getShorthandValue(outlineLonghand());
+        return getShorthandValue(outlineShorthand());
     case CSSPropertyBorderColor:
-        return get4Values(borderColorLonghand());
+        return get4Values(borderColorShorthand());
     case CSSPropertyBorderWidth:
-        return get4Values(borderWidthLonghand());
+        return get4Values(borderWidthShorthand());
     case CSSPropertyBorderStyle:
-        return get4Values(borderStyleLonghand());
+        return get4Values(borderStyleShorthand());
     case CSSPropertyWebkitFlexFlow:
-        return getShorthandValue(webkitFlexFlowLonghand());
+        return getShorthandValue(webkitFlexFlowShorthand());
     case CSSPropertyFont:
         return fontValue();
     case CSSPropertyMargin:
-        return get4Values(marginLonghand());
+        return get4Values(marginShorthand());
     case CSSPropertyOverflow:
-        return getCommonValue(overflowLonghand());
+        return getCommonValue(overflowShorthand());
     case CSSPropertyPadding:
-        return get4Values(paddingLonghand());
+        return get4Values(paddingShorthand());
     case CSSPropertyListStyle:
-        return getShorthandValue(listStyleLonghand());
+        return getShorthandValue(listStyleShorthand());
     case CSSPropertyWebkitMaskPosition:
-        return getLayeredShorthandValue(webkitMaskPositionLonghand());
+        return getLayeredShorthandValue(webkitMaskPositionShorthand());
     case CSSPropertyWebkitMaskRepeat:
-        return getLayeredShorthandValue(webkitMaskRepeatLonghand());
+        return getLayeredShorthandValue(webkitMaskRepeatShorthand());
     case CSSPropertyWebkitMask:
-        return getLayeredShorthandValue(webkitMaskLonghand());
+        return getLayeredShorthandValue(webkitMaskShorthand());
     case CSSPropertyWebkitTransformOrigin:
-        return getShorthandValue(webkitTransformOriginLonghand());
+        return getShorthandValue(webkitTransformOriginShorthand());
     case CSSPropertyWebkitTransition:
-        return getLayeredShorthandValue(webkitTransitionLonghand());
+        return getLayeredShorthandValue(webkitTransitionShorthand());
     case CSSPropertyWebkitAnimation:
-        return getLayeredShorthandValue(webkitAnimationLonghand());
+        return getLayeredShorthandValue(webkitAnimationShorthand());
     case CSSPropertyWebkitWrap:
-        return getShorthandValue(webkitWrapLonghand());
+        return getShorthandValue(webkitWrapShorthand());
 #if ENABLE(SVG)
     case CSSPropertyMarker: {
         RefPtr<CSSValue> value = getPropertyCSSValue(CSSPropertyMarkerStart);
@@ -176,10 +175,10 @@ String StylePropertySet::getPropertyValue(int propertyID) const
     return String();
 }
 
-String StylePropertySet::borderSpacingValue(const CSSPropertyLonghand& longhand) const
+String StylePropertySet::borderSpacingValue(const StylePropertyShorthand& shorthand) const
 {
-    RefPtr<CSSValue> horizontalValue = getPropertyCSSValue(longhand.properties()[0]);
-    RefPtr<CSSValue> verticalValue = getPropertyCSSValue(longhand.properties()[1]);
+    RefPtr<CSSValue> horizontalValue = getPropertyCSSValue(shorthand.properties()[0]);
+    RefPtr<CSSValue> verticalValue = getPropertyCSSValue(shorthand.properties()[1]);
 
     if (!horizontalValue)
         return String();
@@ -248,13 +247,13 @@ String StylePropertySet::fontValue() const
     return result.toString();
 }
 
-String StylePropertySet::get4Values(const CSSPropertyLonghand& longhand) const
+String StylePropertySet::get4Values(const StylePropertyShorthand& shorthand) const
 {
     // Assume the properties are in the usual order top, right, bottom, left.
-    RefPtr<CSSValue> topValue = getPropertyCSSValue(longhand.properties()[0]);
-    RefPtr<CSSValue> rightValue = getPropertyCSSValue(longhand.properties()[1]);
-    RefPtr<CSSValue> bottomValue = getPropertyCSSValue(longhand.properties()[2]);
-    RefPtr<CSSValue> leftValue = getPropertyCSSValue(longhand.properties()[3]);
+    RefPtr<CSSValue> topValue = getPropertyCSSValue(shorthand.properties()[0]);
+    RefPtr<CSSValue> rightValue = getPropertyCSSValue(shorthand.properties()[1]);
+    RefPtr<CSSValue> bottomValue = getPropertyCSSValue(shorthand.properties()[2]);
+    RefPtr<CSSValue> leftValue = getPropertyCSSValue(shorthand.properties()[3]);
 
     // All 4 properties must be specified.
     if (!topValue || !rightValue || !bottomValue || !leftValue)
@@ -275,17 +274,17 @@ String StylePropertySet::get4Values(const CSSPropertyLonghand& longhand) const
     return res;
 }
 
-String StylePropertySet::getLayeredShorthandValue(const CSSPropertyLonghand& longhand) const
+String StylePropertySet::getLayeredShorthandValue(const StylePropertyShorthand& shorthand) const
 {
     String res;
 
-    const unsigned size = longhand.length();
+    const unsigned size = shorthand.length();
     // Begin by collecting the properties into an array.
     Vector< RefPtr<CSSValue> > values(size);
     size_t numLayers = 0;
 
     for (unsigned i = 0; i < size; ++i) {
-        values[i] = getPropertyCSSValue(longhand.properties()[i]);
+        values[i] = getPropertyCSSValue(shorthand.properties()[i]);
         if (values[i]) {
             if (values[i]->isValueList()) {
                 CSSValueList* valueList = static_cast<CSSValueList*>(values[i].get());
@@ -311,7 +310,7 @@ String StylePropertySet::getLayeredShorthandValue(const CSSPropertyLonghand& lon
                     value = values[j];
 
                     // Color only belongs in the last layer.
-                    if (longhand.properties()[j] == CSSPropertyBackgroundColor) {
+                    if (shorthand.properties()[j] == CSSPropertyBackgroundColor) {
                         if (i != numLayers - 1)
                             value = 0;
                     } else if (i != 0) // Other singletons only belong in the first layer.
@@ -322,10 +321,10 @@ String StylePropertySet::getLayeredShorthandValue(const CSSPropertyLonghand& lon
             // We need to report background-repeat as it was written in the CSS. If the property is implicit,
             // then it was written with only one value. Here we figure out which value that was so we can
             // report back correctly.
-            if (longhand.properties()[j] == CSSPropertyBackgroundRepeatX && isPropertyImplicit(longhand.properties()[j])) {
+            if (shorthand.properties()[j] == CSSPropertyBackgroundRepeatX && isPropertyImplicit(shorthand.properties()[j])) {
 
                 // BUG 49055: make sure the value was not reset in the layer check just above.
-                if (j < size - 1 && longhand.properties()[j + 1] == CSSPropertyBackgroundRepeatY && value) {
+                if (j < size - 1 && shorthand.properties()[j + 1] == CSSPropertyBackgroundRepeatY && value) {
                     RefPtr<CSSValue> yValue;
                     RefPtr<CSSValue> nextValue = values[j + 1];
                     if (nextValue->isValueList())
@@ -376,12 +375,12 @@ String StylePropertySet::getLayeredShorthandValue(const CSSPropertyLonghand& lon
     return res;
 }
 
-String StylePropertySet::getShorthandValue(const CSSPropertyLonghand& longhand) const
+String StylePropertySet::getShorthandValue(const StylePropertyShorthand& shorthand) const
 {
     String res;
-    for (unsigned i = 0; i < longhand.length(); ++i) {
-        if (!isPropertyImplicit(longhand.properties()[i])) {
-            RefPtr<CSSValue> value = getPropertyCSSValue(longhand.properties()[i]);
+    for (unsigned i = 0; i < shorthand.length(); ++i) {
+        if (!isPropertyImplicit(shorthand.properties()[i])) {
+            RefPtr<CSSValue> value = getPropertyCSSValue(shorthand.properties()[i]);
             // FIXME: provide default value if !value or value is initial value
             if (value && !value->isInitialValue()) {
                 if (!res.isNull())
@@ -394,11 +393,11 @@ String StylePropertySet::getShorthandValue(const CSSPropertyLonghand& longhand)
 }
 
 // only returns a non-null value if all properties have the same, non-null value
-String StylePropertySet::getCommonValue(const CSSPropertyLonghand& longhand) const
+String StylePropertySet::getCommonValue(const StylePropertyShorthand& shorthand) const
 {
     String res;
-    for (unsigned i = 0; i < longhand.length(); ++i) {
-        RefPtr<CSSValue> value = getPropertyCSSValue(longhand.properties()[i]);
+    for (unsigned i = 0; i < shorthand.length(); ++i) {
+        RefPtr<CSSValue> value = getPropertyCSSValue(shorthand.properties()[i]);
         // FIXME: CSSInitialValue::cssText should generate the right value.
         if (!value || value->isInitialValue())
             return String();
@@ -421,10 +420,10 @@ PassRefPtr<CSSValue> StylePropertySet::getPropertyCSSValue(int propertyID) const
 
 bool StylePropertySet::removeShorthandProperty(int propertyID)
 {
-    CSSPropertyLonghand longhand = longhandForProperty(propertyID);
-    if (!longhand.length())
+    StylePropertyShorthand shorthand = shorthandForProperty(propertyID);
+    if (!shorthand.length())
         return false;
-    return removePropertiesInSet(longhand.properties(), longhand.length());
+    return removePropertiesInSet(shorthand.properties(), shorthand.length());
 }
 
 bool StylePropertySet::removeProperty(int propertyID, String* returnText)
@@ -459,12 +458,12 @@ bool StylePropertySet::propertyIsImportant(int propertyID) const
     if (property)
         return property->isImportant();
 
-    CSSPropertyLonghand longhands = longhandForProperty(propertyID);
-    if (!longhands.length())
+    StylePropertyShorthand shorthand = shorthandForProperty(propertyID);
+    if (!shorthand.length())
         return false;
 
-    for (unsigned i = 0; i < longhands.length(); ++i) {
-        if (!propertyIsImportant(longhands.properties()[i]))
+    for (unsigned i = 0; i < shorthand.length(); ++i) {
+        if (!propertyIsImportant(shorthand.properties()[i]))
             return false;
     }
     return true;
@@ -498,17 +497,17 @@ bool StylePropertySet::setProperty(int propertyID, const String& value, bool imp
 
 void StylePropertySet::setProperty(int propertyID, PassRefPtr<CSSValue> prpValue, bool important)
 {
-    CSSPropertyLonghand longhand = longhandForProperty(propertyID);
-    if (!longhand.length()) {
+    StylePropertyShorthand shorthand = shorthandForProperty(propertyID);
+    if (!shorthand.length()) {
         setProperty(CSSProperty(propertyID, prpValue, important));
         return;
     }
 
-    removePropertiesInSet(longhand.properties(), longhand.length());
+    removePropertiesInSet(shorthand.properties(), shorthand.length());
 
     RefPtr<CSSValue> value = prpValue;
-    for (unsigned i = 0; i < longhand.length(); ++i)
-        m_properties.append(CSSProperty(longhand.properties()[i], value, important));
+    for (unsigned i = 0; i < shorthand.length(); ++i)
+        m_properties.append(CSSProperty(shorthand.properties()[i], value, important));
 }
 
 void StylePropertySet::setProperty(const CSSProperty& property, CSSProperty* slot)
@@ -607,12 +606,12 @@ String StylePropertySet::asText() const
             shorthandPropertyID = CSSPropertyBorder;
             if (shorthandPropertyAppeared.get(CSSPropertyBorder - firstCSSProperty))
                 break;
-            for (unsigned i = 0; i < borderAbridgedLonghand().length() && shorthandPropertyID; i++) {
-                const CSSPropertyLonghand& longhand = *(borderAbridgedLonghand().longhandsForInitialization()[i]);
+            for (unsigned i = 0; i < borderAbridgedShorthand().length() && shorthandPropertyID; i++) {
+                const StylePropertyShorthand& shorthand = *(borderAbridgedShorthand().propertiesForInitialization()[i]);
                 String commonValue;
                 bool commonImportance = false;
-                for (size_t j = 0; j < longhand.length(); ++j) {
-                    int id = longhand.properties()[j];
+                for (size_t j = 0; j < shorthand.length(); ++j) {
+                    int id = shorthand.properties()[j];
                     RefPtr<CSSValue> value = getPropertyCSSValue(id);
                     String currentValue = value ? value->cssText() : String();
                     bool isImportant = propertyIsImportant(id);
@@ -741,7 +740,7 @@ String StylePropertySet::asText() const
     if (positionXProp && positionYProp && positionXProp->isImportant() == positionYProp->isImportant()) {
         result.append("background-position: ");
         if (positionXProp->value()->isValueList() || positionYProp->value()->isValueList())
-            result.append(getLayeredShorthandValue(backgroundPositionLonghand()));
+            result.append(getLayeredShorthandValue(backgroundPositionShorthand()));
         else {
             result.append(positionXProp->value()->cssText());
             result.append(" ");
@@ -761,7 +760,7 @@ String StylePropertySet::asText() const
     if (repeatXProp && repeatYProp && repeatXProp->isImportant() == repeatYProp->isImportant()) {
         result.append("background-repeat: ");
         if (repeatXProp->value()->isValueList() || repeatYProp->value()->isValueList())
-            result.append(getLayeredShorthandValue(backgroundRepeatLonghand()));
+            result.append(getLayeredShorthandValue(backgroundRepeatShorthand()));
         else {
             result.append(repeatXProp->value()->cssText());
             result.append(" ");
@@ -804,7 +803,7 @@ void StylePropertySet::addSubresourceStyleURLs(ListHashSet<KURL>& urls, CSSStyle
 
 // This is the list of properties we want to copy in the copyBlockProperties() function.
 // It is the list of CSS properties that apply specially to block-level elements.
-static const int blockProperties[] = {
+static const CSSPropertyID blockProperties[] = {
     CSSPropertyOrphans,
     CSSPropertyOverflow, // This can be also be applied to replaced elements
     CSSPropertyWebkitAspectRatio,
@@ -840,7 +839,7 @@ void StylePropertySet::removeBlockProperties()
     removePropertiesInSet(blockProperties, numBlockProperties);
 }
 
-bool StylePropertySet::removePropertiesInSet(const int* set, unsigned length)
+bool StylePropertySet::removePropertiesInSet(const CSSPropertyID* set, unsigned length)
 {
     if (m_properties.isEmpty())
         return false;
@@ -926,7 +925,7 @@ PassRefPtr<StylePropertySet> StylePropertySet::copy() const
     return adoptRef(new StylePropertySet(m_properties));
 }
 
-PassRefPtr<StylePropertySet> StylePropertySet::copyPropertiesInSet(const int* set, unsigned length) const
+PassRefPtr<StylePropertySet> StylePropertySet::copyPropertiesInSet(const CSSPropertyID* set, unsigned length) const
 {
     Vector<CSSProperty> list;
     list.reserveInitialCapacity(length);
index 4bff59a..fb10ee5 100644 (file)
@@ -24,6 +24,7 @@
 #include "CSSParserMode.h"
 #include "CSSPrimitiveValue.h"
 #include "CSSProperty.h"
+#include "CSSPropertyNames.h"
 #include <wtf/ListHashSet.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 namespace WebCore {
 
 class CSSRule;
-class CSSPropertyLonghand;
 class CSSStyleDeclaration;
 class KURL;
 class PropertySetCSSStyleDeclaration;
 class StyledElement;
+class StylePropertyShorthand;
 
 class StylePropertySet : public RefCounted<StylePropertySet> {
 public:
@@ -83,7 +84,7 @@ public:
 
     PassRefPtr<StylePropertySet> copyBlockProperties() const;
     void removeBlockProperties();
-    bool removePropertiesInSet(const int* set, unsigned length);
+    bool removePropertiesInSet(const CSSPropertyID* set, unsigned length);
 
     void merge(const StylePropertySet*, bool argOverridesOnConflict = true);
 
@@ -99,7 +100,7 @@ public:
     void removeEquivalentProperties(const StylePropertySet*);
     void removeEquivalentProperties(const CSSStyleDeclaration*);
 
-    PassRefPtr<StylePropertySet> copyPropertiesInSet(const int* set, unsigned length) const;
+    PassRefPtr<StylePropertySet> copyPropertiesInSet(const CSSPropertyID* set, unsigned length) const;
     
     String asText() const;
     
@@ -119,11 +120,11 @@ private:
 
     void setNeedsStyleRecalc();
 
-    String getShorthandValue(const CSSPropertyLonghand&) const;
-    String getCommonValue(const CSSPropertyLonghand&) const;
-    String getLayeredShorthandValue(const CSSPropertyLonghand&) const;
-    String get4Values(const CSSPropertyLonghand&) const;
-    String borderSpacingValue(const CSSPropertyLonghand&) const;
+    String getShorthandValue(const StylePropertyShorthand&) const;
+    String getCommonValue(const StylePropertyShorthand&) const;
+    String getLayeredShorthandValue(const StylePropertyShorthand&) const;
+    String get4Values(const StylePropertyShorthand&) const;
+    String borderSpacingValue(const StylePropertyShorthand&) const;
     String fontValue() const;
     bool appendFontLonghandValueIfExplicit(int propertyID, StringBuilder& result) const;
 
index e67377d..1f10d02 100644 (file)
@@ -55,7 +55,7 @@ namespace WebCore {
 
 // Editing style properties must be preserved during editing operation.
 // e.g. when a user inserts a new paragraph, all properties listed here must be copied to the new paragraph.
-static const int editingProperties[] = {
+static const CSSPropertyID editingProperties[] = {
     CSSPropertyBackgroundColor,
     CSSPropertyTextDecoration,
 
@@ -603,7 +603,7 @@ void EditingStyle::collapseTextDecorationProperties()
 }
 
 // CSS properties that create a visual difference only when applied to text.
-static const int textOnlyProperties[] = {
+static const CSSPropertyID textOnlyProperties[] = {
     CSSPropertyTextDecoration,
     CSSPropertyWebkitTextDecorationsInEffect,
     CSSPropertyFontStyle,
@@ -1084,9 +1084,9 @@ void EditingStyle::mergeStyleFromRulesForSerialization(StyledElement* element)
 static void removePropertiesInStyle(StylePropertySet* styleToRemovePropertiesFrom, StylePropertySet* style)
 {
     unsigned propertyCount = style->propertyCount();
-    Vector<int> propertiesToRemove(propertyCount);
+    Vector<CSSPropertyID> propertiesToRemove(propertyCount);
     for (unsigned i = 0; i < propertyCount; ++i)
-        propertiesToRemove[i] = style->propertyAt(i).id();
+        propertiesToRemove[i] = static_cast<CSSPropertyID>(style->propertyAt(i).id());
 
     styleToRemovePropertiesFrom->removePropertiesInSet(propertiesToRemove.data(), propertiesToRemove.size());
 }
index c59c55d..abdbee7 100644 (file)
@@ -866,11 +866,11 @@ private:
 
 class ShorthandPropertyWrapper : public PropertyWrapperBase {
 public:
-    ShorthandPropertyWrapper(int property, const CSSPropertyLonghand& longhand)
+    ShorthandPropertyWrapper(int property, const StylePropertyShorthand& shorthand)
         : PropertyWrapperBase(property)
     {
-        for (unsigned i = 0; i < longhand.length(); ++i) {
-            PropertyWrapperBase* wrapper = wrapperForProperty(longhand.properties()[i]);
+        for (unsigned i = 0; i < shorthand.length(); ++i) {
+            PropertyWrapperBase* wrapper = wrapperForProperty(shorthand.properties()[i]);
             if (wrapper)
                 m_propertyWrappers.append(wrapper);
         }
@@ -1169,9 +1169,9 @@ static void addShorthandProperties()
 
     for (size_t i = 0; i < WTF_ARRAY_LENGTH(animatableShorthandProperties); ++i) {
         int propertyID = animatableShorthandProperties[i];
-        CSSPropertyLonghand longhand = longhandForProperty(propertyID);
-        if (longhand.length() > 0)
-            addPropertyWrapper(propertyID, new ShorthandPropertyWrapper(propertyID, longhand));
+        StylePropertyShorthand shorthand = shorthandForProperty(propertyID);
+        if (shorthand.length() > 0)
+            addPropertyWrapper(propertyID, new ShorthandPropertyWrapper(propertyID, shorthand));
     }
 }
 
index 70d619b..12f9379 100644 (file)
@@ -30,7 +30,6 @@
 #include "CompositeAnimation.h"
 
 #include "AnimationControllerPrivate.h"
-#include "CSSPropertyLonghand.h"
 #include "CSSPropertyNames.h"
 #include "ImplicitAnimation.h"
 #include "KeyframeAnimation.h"