Merge "[CherryPick] [WEBGL] Rename WEBKIT_WEBGL_lose_context to WEBGL_lose_context...
[framework/web/webkit-efl.git] / Source / WebCore / css / StylePropertyShorthand.cpp
1 /*
2  * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3  * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB.  If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 #include "config.h"
22 #include "StylePropertyShorthand.h"
23
24 #include <wtf/StdLibExtras.h>
25
26 namespace WebCore {
27
28 const StylePropertyShorthand& backgroundShorthand()
29 {
30     static const CSSPropertyID backgroundProperties[] = {
31         CSSPropertyBackgroundImage,
32         CSSPropertyBackgroundPositionX,
33         CSSPropertyBackgroundPositionY,
34         CSSPropertyBackgroundSize,
35         CSSPropertyBackgroundRepeatX,
36         CSSPropertyBackgroundRepeatY,
37         CSSPropertyBackgroundAttachment,
38         CSSPropertyBackgroundOrigin,
39         CSSPropertyBackgroundClip,
40         CSSPropertyBackgroundColor
41     };
42     DEFINE_STATIC_LOCAL(StylePropertyShorthand, backgroundShorthand, (backgroundProperties, WTF_ARRAY_LENGTH(backgroundProperties)));
43     return backgroundShorthand;
44 }
45
46 const StylePropertyShorthand& backgroundPositionShorthand()
47 {
48     static const CSSPropertyID backgroundPositionProperties[] = { CSSPropertyBackgroundPositionX, CSSPropertyBackgroundPositionY };
49     DEFINE_STATIC_LOCAL(StylePropertyShorthand, backgroundPositionLonghands, (backgroundPositionProperties, WTF_ARRAY_LENGTH(backgroundPositionProperties)));
50     return backgroundPositionLonghands;
51 }
52
53 const StylePropertyShorthand& backgroundRepeatShorthand()
54 {
55     static const CSSPropertyID backgroundRepeatProperties[] = { CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY };
56     DEFINE_STATIC_LOCAL(StylePropertyShorthand, backgroundRepeatLonghands, (backgroundRepeatProperties, WTF_ARRAY_LENGTH(backgroundRepeatProperties)));
57     return backgroundRepeatLonghands;
58 }
59
60 const StylePropertyShorthand& borderShorthand()
61 {
62     // Do not change the order of the following four shorthands, and keep them together.
63     static const CSSPropertyID borderProperties[4][3] = {
64         { CSSPropertyBorderTopColor, CSSPropertyBorderTopStyle, CSSPropertyBorderTopWidth },
65         { CSSPropertyBorderRightColor, CSSPropertyBorderRightStyle, CSSPropertyBorderRightWidth },
66         { CSSPropertyBorderBottomColor, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomWidth },
67         { CSSPropertyBorderLeftColor, CSSPropertyBorderLeftStyle, CSSPropertyBorderLeftWidth }
68     };
69     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderLonghands, (borderProperties[0], sizeof(borderProperties) / sizeof(borderProperties[0][0])));
70     return borderLonghands;
71 }
72
73 const StylePropertyShorthand& borderAbridgedShorthand()
74 {
75     static const CSSPropertyID borderAbridgedProperties[] = { CSSPropertyBorderWidth, CSSPropertyBorderStyle, CSSPropertyBorderColor };
76     static const StylePropertyShorthand* propertiesForInitialization[] = {
77         &borderWidthShorthand(),
78         &borderStyleShorthand(),
79         &borderColorShorthand(),
80     };
81     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderAbridgedLonghands,
82         (borderAbridgedProperties, propertiesForInitialization, WTF_ARRAY_LENGTH(borderAbridgedProperties)));
83     return borderAbridgedLonghands;
84 }
85
86 const StylePropertyShorthand& borderBottomShorthand()
87 {
88     static const CSSPropertyID borderBottomProperties[] = { CSSPropertyBorderBottomWidth, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomColor };
89     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderBottomLonghands, (borderBottomProperties, WTF_ARRAY_LENGTH(borderBottomProperties)));
90     return borderBottomLonghands;
91 }
92
93 const StylePropertyShorthand& borderColorShorthand()
94 {
95     static const CSSPropertyID borderColorProperties[] = {
96         CSSPropertyBorderTopColor,
97         CSSPropertyBorderRightColor,
98         CSSPropertyBorderBottomColor,
99         CSSPropertyBorderLeftColor
100     };
101     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderColorLonghands, (borderColorProperties, WTF_ARRAY_LENGTH(borderColorProperties)));
102     return borderColorLonghands;
103 }
104
105 const StylePropertyShorthand& borderImageShorthand()
106 {
107     static const CSSPropertyID borderImageProperties[] = {
108         CSSPropertyBorderImageSource,
109         CSSPropertyBorderImageSlice,
110         CSSPropertyBorderImageWidth,
111         CSSPropertyBorderImageOutset,
112         CSSPropertyBorderImageRepeat
113     };
114     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderImageLonghands, (borderImageProperties, WTF_ARRAY_LENGTH(borderImageProperties)));
115     return borderImageLonghands;
116 }
117
118 const StylePropertyShorthand& borderLeftShorthand()
119 {
120     static const CSSPropertyID borderLeftProperties[] = { CSSPropertyBorderLeftWidth, CSSPropertyBorderLeftStyle, CSSPropertyBorderLeftColor };
121     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderLeftLonghands, (borderLeftProperties, WTF_ARRAY_LENGTH(borderLeftProperties)));
122     return borderLeftLonghands;
123 }
124
125 const StylePropertyShorthand& borderRadiusShorthand()
126 {
127     static const CSSPropertyID borderRadiusProperties[] = {
128         CSSPropertyBorderTopRightRadius,
129         CSSPropertyBorderTopLeftRadius,
130         CSSPropertyBorderBottomLeftRadius,
131         CSSPropertyBorderBottomRightRadius
132     };
133     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderRadiusLonghands, (borderRadiusProperties, WTF_ARRAY_LENGTH(borderRadiusProperties)));
134     return borderRadiusLonghands;
135 }
136
137 const StylePropertyShorthand& borderRightShorthand()
138 {
139     static const CSSPropertyID borderRightProperties[] = { CSSPropertyBorderRightWidth, CSSPropertyBorderRightStyle, CSSPropertyBorderRightColor };
140     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderRightLonghands, (borderRightProperties, WTF_ARRAY_LENGTH(borderRightProperties)));
141     return borderRightLonghands;
142 }
143
144 const StylePropertyShorthand& borderSpacingShorthand()
145 {
146     static const CSSPropertyID borderSpacingProperties[] = { CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyWebkitBorderVerticalSpacing };
147     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderSpacingLonghands, (borderSpacingProperties, WTF_ARRAY_LENGTH(borderSpacingProperties)));
148     return borderSpacingLonghands;
149 }
150
151 const StylePropertyShorthand& borderStyleShorthand()
152 {
153     static const CSSPropertyID borderStyleProperties[] = {
154         CSSPropertyBorderTopStyle,
155         CSSPropertyBorderRightStyle,
156         CSSPropertyBorderBottomStyle,
157         CSSPropertyBorderLeftStyle
158     };
159     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderStyleLonghands, (borderStyleProperties, WTF_ARRAY_LENGTH(borderStyleProperties)));
160     return borderStyleLonghands;
161 }
162
163 const StylePropertyShorthand& borderTopShorthand()
164 {
165     static const CSSPropertyID borderTopProperties[] = { CSSPropertyBorderTopWidth, CSSPropertyBorderTopStyle, CSSPropertyBorderTopColor };
166     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderTopLonghands, (borderTopProperties, WTF_ARRAY_LENGTH(borderTopProperties)));
167     return borderTopLonghands;
168 }
169
170 const StylePropertyShorthand& borderWidthShorthand()
171 {
172     static const CSSPropertyID borderWidthProperties[] = {
173         CSSPropertyBorderTopWidth,
174         CSSPropertyBorderRightWidth,
175         CSSPropertyBorderBottomWidth,
176         CSSPropertyBorderLeftWidth
177     };
178     DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderWidthLonghands, (borderWidthProperties, WTF_ARRAY_LENGTH(borderWidthProperties)));
179     return borderWidthLonghands;
180 }
181
182 const StylePropertyShorthand& listStyleShorthand()
183 {
184     static const CSSPropertyID listStyleProperties[] = {
185         CSSPropertyListStyleType,
186         CSSPropertyListStylePosition,
187         CSSPropertyListStyleImage
188     };
189     DEFINE_STATIC_LOCAL(StylePropertyShorthand, listStyleLonghands, (listStyleProperties, WTF_ARRAY_LENGTH(listStyleProperties)));
190     return listStyleLonghands;
191 }
192
193 const StylePropertyShorthand& fontShorthand()
194 {
195     static const CSSPropertyID fontProperties[] = {
196         CSSPropertyFontFamily,
197         CSSPropertyFontSize,
198         CSSPropertyFontStyle,
199         CSSPropertyFontVariant,
200         CSSPropertyFontWeight,
201         CSSPropertyLineHeight
202     };
203     DEFINE_STATIC_LOCAL(StylePropertyShorthand, fontLonghands, (fontProperties, WTF_ARRAY_LENGTH(fontProperties)));
204     return fontLonghands;
205 }
206
207 const StylePropertyShorthand& marginShorthand()
208 {
209     static const CSSPropertyID marginProperties[] = {
210         CSSPropertyMarginTop,
211         CSSPropertyMarginRight,
212         CSSPropertyMarginBottom,
213         CSSPropertyMarginLeft
214     };
215     DEFINE_STATIC_LOCAL(StylePropertyShorthand, marginLonghands, (marginProperties, WTF_ARRAY_LENGTH(marginProperties)));
216     return marginLonghands;
217 }
218
219 const StylePropertyShorthand& outlineShorthand()
220 {
221     static const CSSPropertyID outlineProperties[] = {
222         CSSPropertyOutlineColor,
223         CSSPropertyOutlineStyle,
224         CSSPropertyOutlineWidth
225     };
226     DEFINE_STATIC_LOCAL(StylePropertyShorthand, outlineLonghands, (outlineProperties, WTF_ARRAY_LENGTH(outlineProperties)));
227     return outlineLonghands;
228 }
229
230 const StylePropertyShorthand& overflowShorthand()
231 {
232     static const CSSPropertyID overflowProperties[] = { CSSPropertyOverflowX, CSSPropertyOverflowY };
233     DEFINE_STATIC_LOCAL(StylePropertyShorthand, overflowLonghands, (overflowProperties, WTF_ARRAY_LENGTH(overflowProperties)));
234     return overflowLonghands;
235 }
236
237 const StylePropertyShorthand& paddingShorthand()
238 {
239     static const CSSPropertyID paddingProperties[] = {
240         CSSPropertyPaddingTop,
241         CSSPropertyPaddingRight,
242         CSSPropertyPaddingBottom,
243         CSSPropertyPaddingLeft
244     };
245     DEFINE_STATIC_LOCAL(StylePropertyShorthand, paddingLonghands, (paddingProperties, WTF_ARRAY_LENGTH(paddingProperties)));
246     return paddingLonghands;
247 }
248
249 const StylePropertyShorthand& webkitAnimationShorthand()
250 {
251     static const CSSPropertyID animationProperties[] = {
252         CSSPropertyWebkitAnimationName,
253         CSSPropertyWebkitAnimationDuration,
254         CSSPropertyWebkitAnimationTimingFunction,
255         CSSPropertyWebkitAnimationDelay,
256         CSSPropertyWebkitAnimationIterationCount,
257         CSSPropertyWebkitAnimationDirection,
258         CSSPropertyWebkitAnimationFillMode
259     };
260     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitAnimationLonghands, (animationProperties, WTF_ARRAY_LENGTH(animationProperties)));
261     return webkitAnimationLonghands;
262 }
263
264 const StylePropertyShorthand& webkitBorderAfterShorthand()
265 {
266     static const CSSPropertyID borderAfterProperties[] = { CSSPropertyWebkitBorderAfterWidth, CSSPropertyWebkitBorderAfterStyle, CSSPropertyWebkitBorderAfterColor  };
267     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitBorderAfterLonghands, (borderAfterProperties, WTF_ARRAY_LENGTH(borderAfterProperties)));
268     return webkitBorderAfterLonghands;
269 }
270
271 const StylePropertyShorthand& webkitBorderBeforeShorthand()
272 {
273     static const CSSPropertyID borderBeforeProperties[] = { CSSPropertyWebkitBorderBeforeWidth, CSSPropertyWebkitBorderBeforeStyle, CSSPropertyWebkitBorderBeforeColor  };
274     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitBorderBeforeLonghands, (borderBeforeProperties, WTF_ARRAY_LENGTH(borderBeforeProperties)));
275     return webkitBorderBeforeLonghands;
276 }
277
278 const StylePropertyShorthand& webkitBorderEndShorthand()
279 {
280     static const CSSPropertyID borderEndProperties[] = { CSSPropertyWebkitBorderEndWidth, CSSPropertyWebkitBorderEndStyle, CSSPropertyWebkitBorderEndColor };
281     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitBorderEndLonghands, (borderEndProperties, WTF_ARRAY_LENGTH(borderEndProperties)));
282     return webkitBorderEndLonghands;
283 }
284
285 const StylePropertyShorthand& webkitBorderStartShorthand()
286 {
287     static const CSSPropertyID borderStartProperties[] = { CSSPropertyWebkitBorderStartWidth, CSSPropertyWebkitBorderStartStyle, CSSPropertyWebkitBorderStartColor };
288     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitBorderStartLonghands, (borderStartProperties, WTF_ARRAY_LENGTH(borderStartProperties)));
289     return webkitBorderStartLonghands;
290 }
291
292 const StylePropertyShorthand& webkitColumnsShorthand()
293 {
294     static const CSSPropertyID columnsProperties[] = { CSSPropertyWebkitColumnWidth, CSSPropertyWebkitColumnCount };
295     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitColumnsLonghands, (columnsProperties, WTF_ARRAY_LENGTH(columnsProperties)));
296     return webkitColumnsLonghands;
297 }
298
299 const StylePropertyShorthand& webkitColumnRuleShorthand()
300 {
301     static const CSSPropertyID columnRuleProperties[] = {
302         CSSPropertyWebkitColumnRuleWidth,
303         CSSPropertyWebkitColumnRuleStyle,
304         CSSPropertyWebkitColumnRuleColor,
305     };
306     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitColumnRuleLonghands, (columnRuleProperties, WTF_ARRAY_LENGTH(columnRuleProperties)));
307     return webkitColumnRuleLonghands;
308 }
309
310 #if ENABLE(CSS3_FLEXBOX)
311 const StylePropertyShorthand& webkitFlexFlowShorthand()
312 {
313     static const CSSPropertyID flexFlowProperties[] = { CSSPropertyWebkitFlexDirection, CSSPropertyWebkitFlexWrap };
314     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexFlowLonghands, (flexFlowProperties, WTF_ARRAY_LENGTH(flexFlowProperties)));
315     return webkitFlexFlowLonghands;
316 }
317
318 const StylePropertyShorthand& webkitFlexShorthand()
319 {
320     static const CSSPropertyID flexProperties[] = { CSSPropertyWebkitFlexGrow, CSSPropertyWebkitFlexShrink, CSSPropertyWebkitFlexBasis };
321     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexLonghands, (flexProperties, WTF_ARRAY_LENGTH(flexProperties)));
322     return webkitFlexLonghands;
323 }
324 #endif
325
326 const StylePropertyShorthand& webkitMarginCollapseShorthand()
327 {
328     static const CSSPropertyID marginCollapseProperties[] = { CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse };
329     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarginCollapseLonghands, (marginCollapseProperties, WTF_ARRAY_LENGTH(marginCollapseProperties)));
330     return webkitMarginCollapseLonghands;
331 }
332
333 const StylePropertyShorthand& webkitMarqueeShorthand()
334 {
335     static const CSSPropertyID marqueeProperties[] = {
336         CSSPropertyWebkitMarqueeDirection,
337         CSSPropertyWebkitMarqueeIncrement,
338         CSSPropertyWebkitMarqueeRepetition,
339         CSSPropertyWebkitMarqueeStyle,
340         CSSPropertyWebkitMarqueeSpeed
341     };
342     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarqueeLonghands, (marqueeProperties, WTF_ARRAY_LENGTH(marqueeProperties)));
343     return webkitMarqueeLonghands;
344 }
345
346 const StylePropertyShorthand& webkitMaskShorthand()
347 {
348     static const CSSPropertyID maskProperties[] = {
349         CSSPropertyWebkitMaskImage,
350         CSSPropertyWebkitMaskRepeatX,
351         CSSPropertyWebkitMaskRepeatY,
352         CSSPropertyWebkitMaskAttachment,
353         CSSPropertyWebkitMaskPositionX,
354         CSSPropertyWebkitMaskPositionY,
355         CSSPropertyWebkitMaskClip,
356         CSSPropertyWebkitMaskOrigin
357     };
358     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskLonghands, (maskProperties, WTF_ARRAY_LENGTH(maskProperties)));
359     return webkitMaskLonghands;
360 }
361
362 const StylePropertyShorthand& webkitMaskPositionShorthand()
363 {
364     static const CSSPropertyID maskPositionProperties[] = { CSSPropertyWebkitMaskPositionX, CSSPropertyWebkitMaskPositionY };
365     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskPositionLonghands, (maskPositionProperties, WTF_ARRAY_LENGTH(maskPositionProperties)));
366     return webkitMaskPositionLonghands;
367 }
368
369 const StylePropertyShorthand& webkitMaskRepeatShorthand()
370 {
371     static const CSSPropertyID maskRepeatProperties[] = { CSSPropertyWebkitMaskRepeatX, CSSPropertyWebkitMaskRepeatY };
372     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskRepeatLonghands, (maskRepeatProperties, WTF_ARRAY_LENGTH(maskRepeatProperties)));
373     return webkitMaskRepeatLonghands;
374 }
375
376 const StylePropertyShorthand& webkitTextEmphasisShorthand()
377 {
378     static const CSSPropertyID textEmphasisProperties[] = {
379         CSSPropertyWebkitTextEmphasisStyle,
380         CSSPropertyWebkitTextEmphasisColor
381     };
382     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTextEmphasisLonghands, (textEmphasisProperties, WTF_ARRAY_LENGTH(textEmphasisProperties)));
383     return webkitTextEmphasisLonghands;
384 }
385
386 const StylePropertyShorthand& webkitTextStrokeShorthand()
387 {
388     static const CSSPropertyID textStrokeProperties[] = { CSSPropertyWebkitTextStrokeWidth, CSSPropertyWebkitTextStrokeColor };
389     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTextStrokeLonghands, (textStrokeProperties, WTF_ARRAY_LENGTH(textStrokeProperties)));
390     return webkitTextStrokeLonghands;
391 }
392
393 const StylePropertyShorthand& webkitTransitionShorthand()
394 {
395     static const CSSPropertyID transitionProperties[] = {
396         CSSPropertyWebkitTransitionProperty,
397         CSSPropertyWebkitTransitionDuration,
398         CSSPropertyWebkitTransitionTimingFunction,
399         CSSPropertyWebkitTransitionDelay
400     };
401     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTransitionLonghands, (transitionProperties, WTF_ARRAY_LENGTH(transitionProperties)));
402     return webkitTransitionLonghands;
403 }
404
405 const StylePropertyShorthand& webkitTransformOriginShorthand()
406 {
407     static const CSSPropertyID transformOriginProperties[] = {
408         CSSPropertyWebkitTransformOriginX,
409         CSSPropertyWebkitTransformOriginY,
410         CSSPropertyWebkitTransformOriginZ
411     };
412     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTransformOriginLonghands, (transformOriginProperties, WTF_ARRAY_LENGTH(transformOriginProperties)));
413     return webkitTransformOriginLonghands;
414 }
415
416 #if ENABLE(CSS_EXCLUSIONS)
417 const StylePropertyShorthand& webkitWrapShorthand()
418 {
419     static const CSSPropertyID webkitWrapProperties[] = {
420         CSSPropertyWebkitWrapFlow,
421         CSSPropertyWebkitWrapMargin,
422         CSSPropertyWebkitWrapPadding
423     };
424     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitWrapLonghands, (webkitWrapProperties, WTF_ARRAY_LENGTH(webkitWrapProperties)));
425     return webkitWrapLonghands;
426 }
427 #endif
428
429 // Returns an empty list if the property is not a shorthand
430 const StylePropertyShorthand& shorthandForProperty(CSSPropertyID propertyID)
431 {
432     switch (propertyID) {
433     case CSSPropertyBackground:
434         return backgroundShorthand();
435     case CSSPropertyBackgroundPosition:
436         return backgroundPositionShorthand();
437     case CSSPropertyBackgroundRepeat:
438         return backgroundRepeatShorthand();
439     case CSSPropertyBorder:
440         return borderShorthand();
441     case CSSPropertyBorderBottom:
442         return borderBottomShorthand();
443     case CSSPropertyBorderColor:
444         return borderColorShorthand();
445     case CSSPropertyBorderImage:
446         return borderImageShorthand();
447     case CSSPropertyBorderLeft:
448         return borderLeftShorthand();
449     case CSSPropertyBorderRadius:
450         return borderRadiusShorthand();
451     case CSSPropertyBorderRight:
452         return borderRightShorthand();
453     case CSSPropertyBorderSpacing:
454         return borderSpacingShorthand();
455     case CSSPropertyBorderStyle:
456         return borderStyleShorthand();
457     case CSSPropertyBorderTop:
458         return borderTopShorthand();
459     case CSSPropertyBorderWidth:
460         return borderWidthShorthand();
461     case CSSPropertyListStyle:
462         return listStyleShorthand();
463     case CSSPropertyFont:
464         return fontShorthand();
465     case CSSPropertyMargin:
466         return marginShorthand();
467     case CSSPropertyOutline:
468         return outlineShorthand();
469     case CSSPropertyOverflow:
470         return overflowShorthand();
471     case CSSPropertyPadding:
472         return paddingShorthand();
473     case CSSPropertyWebkitAnimation:
474         return webkitAnimationShorthand();
475     case CSSPropertyWebkitBorderAfter:
476         return webkitBorderAfterShorthand();
477     case CSSPropertyWebkitBorderBefore:
478         return webkitBorderBeforeShorthand();
479     case CSSPropertyWebkitBorderEnd:
480         return webkitBorderEndShorthand();
481     case CSSPropertyWebkitBorderStart:
482         return webkitBorderStartShorthand();
483     case CSSPropertyWebkitBorderRadius:
484         return borderRadiusShorthand();
485     case CSSPropertyWebkitColumns:
486         return webkitColumnsShorthand();
487     case CSSPropertyWebkitColumnRule:
488         return webkitColumnRuleShorthand();
489 #if ENABLE(CSS3_FLEXBOX)
490     case CSSPropertyWebkitFlex:
491         return webkitFlexShorthand();
492     case CSSPropertyWebkitFlexFlow:
493         return webkitFlexFlowShorthand();
494 #endif
495     case CSSPropertyWebkitMarginCollapse:
496         return webkitMarginCollapseShorthand();
497     case CSSPropertyWebkitMarquee:
498         return webkitMarqueeShorthand();
499     case CSSPropertyWebkitMask:
500         return webkitMaskShorthand();
501     case CSSPropertyWebkitMaskPosition:
502         return webkitMaskPositionShorthand();
503     case CSSPropertyWebkitMaskRepeat:
504         return webkitMaskRepeatShorthand();
505     case CSSPropertyWebkitTextEmphasis:
506         return webkitTextEmphasisShorthand();
507     case CSSPropertyWebkitTextStroke:
508         return webkitTextStrokeShorthand();
509     case CSSPropertyWebkitTransition:
510         return webkitTransitionShorthand();
511     case CSSPropertyWebkitTransformOrigin:
512         return webkitTransformOriginShorthand();
513 #if ENABLE(CSS_EXCLUSIONS)
514     case CSSPropertyWebkitWrap:
515         return webkitWrapShorthand();
516 #endif
517     default: {
518         DEFINE_STATIC_LOCAL(StylePropertyShorthand, emptyShorthand, ());
519         return emptyShorthand;
520     }
521     }
522 }
523
524 } // namespace WebCore