1fb107f05b8ee59742a6526ba545ddd41b67a314
[WebKit-https.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 const StylePropertyShorthand& webkitFlexFlowShorthand()
311 {
312     static const CSSPropertyID flexFlowProperties[] = { CSSPropertyWebkitFlexDirection, CSSPropertyWebkitFlexWrap };
313     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexFlowLonghands, (flexFlowProperties, WTF_ARRAY_LENGTH(flexFlowProperties)));
314     return webkitFlexFlowLonghands;
315 }
316
317 const StylePropertyShorthand& webkitMarginCollapseShorthand()
318 {
319     static const CSSPropertyID marginCollapseProperties[] = { CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse };
320     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarginCollapseLonghands, (marginCollapseProperties, WTF_ARRAY_LENGTH(marginCollapseProperties)));
321     return webkitMarginCollapseLonghands;
322 }
323
324 const StylePropertyShorthand& webkitMarqueeShorthand()
325 {
326     static const CSSPropertyID marqueeProperties[] = {
327         CSSPropertyWebkitMarqueeDirection,
328         CSSPropertyWebkitMarqueeIncrement,
329         CSSPropertyWebkitMarqueeRepetition,
330         CSSPropertyWebkitMarqueeStyle,
331         CSSPropertyWebkitMarqueeSpeed
332     };
333     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMarqueeLonghands, (marqueeProperties, WTF_ARRAY_LENGTH(marqueeProperties)));
334     return webkitMarqueeLonghands;
335 }
336
337 const StylePropertyShorthand& webkitMaskShorthand()
338 {
339     static const CSSPropertyID maskProperties[] = {
340         CSSPropertyWebkitMaskImage,
341         CSSPropertyWebkitMaskRepeatX,
342         CSSPropertyWebkitMaskRepeatY,
343         CSSPropertyWebkitMaskAttachment,
344         CSSPropertyWebkitMaskPositionX,
345         CSSPropertyWebkitMaskPositionY,
346         CSSPropertyWebkitMaskClip,
347         CSSPropertyWebkitMaskOrigin
348     };
349     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskLonghands, (maskProperties, WTF_ARRAY_LENGTH(maskProperties)));
350     return webkitMaskLonghands;
351 }
352
353 const StylePropertyShorthand& webkitMaskPositionShorthand()
354 {
355     static const CSSPropertyID maskPositionProperties[] = { CSSPropertyWebkitMaskPositionX, CSSPropertyWebkitMaskPositionY };
356     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskPositionLonghands, (maskPositionProperties, WTF_ARRAY_LENGTH(maskPositionProperties)));
357     return webkitMaskPositionLonghands;
358 }
359
360 const StylePropertyShorthand& webkitMaskRepeatShorthand()
361 {
362     static const CSSPropertyID maskRepeatProperties[] = { CSSPropertyWebkitMaskRepeatX, CSSPropertyWebkitMaskRepeatY };
363     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitMaskRepeatLonghands, (maskRepeatProperties, WTF_ARRAY_LENGTH(maskRepeatProperties)));
364     return webkitMaskRepeatLonghands;
365 }
366
367 const StylePropertyShorthand& webkitTextEmphasisShorthand()
368 {
369     static const CSSPropertyID textEmphasisProperties[] = {
370         CSSPropertyWebkitTextEmphasisStyle,
371         CSSPropertyWebkitTextEmphasisColor
372     };
373     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTextEmphasisLonghands, (textEmphasisProperties, WTF_ARRAY_LENGTH(textEmphasisProperties)));
374     return webkitTextEmphasisLonghands;
375 }
376
377 const StylePropertyShorthand& webkitTextStrokeShorthand()
378 {
379     static const CSSPropertyID textStrokeProperties[] = { CSSPropertyWebkitTextStrokeWidth, CSSPropertyWebkitTextStrokeColor };
380     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTextStrokeLonghands, (textStrokeProperties, WTF_ARRAY_LENGTH(textStrokeProperties)));
381     return webkitTextStrokeLonghands;
382 }
383
384 const StylePropertyShorthand& webkitTransitionShorthand()
385 {
386     static const CSSPropertyID transitionProperties[] = {
387         CSSPropertyWebkitTransitionProperty,
388         CSSPropertyWebkitTransitionDuration,
389         CSSPropertyWebkitTransitionTimingFunction,
390         CSSPropertyWebkitTransitionDelay
391     };
392     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTransitionLonghands, (transitionProperties, WTF_ARRAY_LENGTH(transitionProperties)));
393     return webkitTransitionLonghands;
394 }
395
396 const StylePropertyShorthand& webkitTransformOriginShorthand()
397 {
398     static const CSSPropertyID transformOriginProperties[] = {
399         CSSPropertyWebkitTransformOriginX,
400         CSSPropertyWebkitTransformOriginY,
401         CSSPropertyWebkitTransformOriginZ
402     };
403     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitTransformOriginLonghands, (transformOriginProperties, WTF_ARRAY_LENGTH(transformOriginProperties)));
404     return webkitTransformOriginLonghands;
405 }
406
407 const StylePropertyShorthand& webkitWrapShorthand()
408 {
409     static const CSSPropertyID webkitWrapProperties[] = {
410         CSSPropertyWebkitWrapFlow,
411         CSSPropertyWebkitWrapMargin,
412         CSSPropertyWebkitWrapPadding
413     };
414     DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitWrapLonghands, (webkitWrapProperties, WTF_ARRAY_LENGTH(webkitWrapProperties)));
415     return webkitWrapLonghands;
416 }
417
418 // Returns an empty list if the property is not a shorthand
419 const StylePropertyShorthand& shorthandForProperty(CSSPropertyID propertyID)
420 {
421     switch (propertyID) {
422     case CSSPropertyBackground:
423         return backgroundShorthand();
424     case CSSPropertyBackgroundPosition:
425         return backgroundPositionShorthand();
426     case CSSPropertyBackgroundRepeat:
427         return backgroundRepeatShorthand();
428     case CSSPropertyBorder:
429         return borderShorthand();
430     case CSSPropertyBorderBottom:
431         return borderBottomShorthand();
432     case CSSPropertyBorderColor:
433         return borderColorShorthand();
434     case CSSPropertyBorderImage:
435         return borderImageShorthand();
436     case CSSPropertyBorderLeft:
437         return borderLeftShorthand();
438     case CSSPropertyBorderRadius:
439         return borderRadiusShorthand();
440     case CSSPropertyBorderRight:
441         return borderRightShorthand();
442     case CSSPropertyBorderSpacing:
443         return borderSpacingShorthand();
444     case CSSPropertyBorderStyle:
445         return borderStyleShorthand();
446     case CSSPropertyBorderTop:
447         return borderTopShorthand();
448     case CSSPropertyBorderWidth:
449         return borderWidthShorthand();
450     case CSSPropertyListStyle:
451         return listStyleShorthand();
452     case CSSPropertyFont:
453         return fontShorthand();
454     case CSSPropertyMargin:
455         return marginShorthand();
456     case CSSPropertyOutline:
457         return outlineShorthand();
458     case CSSPropertyOverflow:
459         return overflowShorthand();
460     case CSSPropertyPadding:
461         return paddingShorthand();
462     case CSSPropertyWebkitAnimation:
463         return webkitAnimationShorthand();
464     case CSSPropertyWebkitBorderAfter:
465         return webkitBorderAfterShorthand();
466     case CSSPropertyWebkitBorderBefore:
467         return webkitBorderBeforeShorthand();
468     case CSSPropertyWebkitBorderEnd:
469         return webkitBorderEndShorthand();
470     case CSSPropertyWebkitBorderStart:
471         return webkitBorderStartShorthand();
472     case CSSPropertyWebkitBorderRadius:
473         return borderRadiusShorthand();
474     case CSSPropertyWebkitColumns:
475         return webkitColumnsShorthand();
476     case CSSPropertyWebkitColumnRule:
477         return webkitColumnRuleShorthand();
478     case CSSPropertyWebkitFlexFlow:
479         return webkitFlexFlowShorthand();
480     case CSSPropertyWebkitMarginCollapse:
481         return webkitMarginCollapseShorthand();
482     case CSSPropertyWebkitMarquee:
483         return webkitMarqueeShorthand();
484     case CSSPropertyWebkitMask:
485         return webkitMaskShorthand();
486     case CSSPropertyWebkitMaskPosition:
487         return webkitMaskPositionShorthand();
488     case CSSPropertyWebkitMaskRepeat:
489         return webkitMaskRepeatShorthand();
490     case CSSPropertyWebkitTextEmphasis:
491         return webkitTextEmphasisShorthand();
492     case CSSPropertyWebkitTextStroke:
493         return webkitTextStrokeShorthand();
494     case CSSPropertyWebkitTransition:
495         return webkitTransitionShorthand();
496     case CSSPropertyWebkitTransformOrigin:
497         return webkitTransformOriginShorthand();
498     case CSSPropertyWebkitWrap:
499         return webkitWrapShorthand();
500     default: {
501         DEFINE_STATIC_LOCAL(StylePropertyShorthand, emptyShorthand, ());
502         return emptyShorthand;
503     }
504     }
505 }
506
507 } // namespace WebCore