2 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #include "StyleBuilder.h"
28 #include "BasicShapeFunctions.h"
29 #include "BasicShapes.h"
30 #include "CSSAspectRatioValue.h"
31 #include "CSSCalculationValue.h"
32 #include "CSSCursorImageValue.h"
33 #include "CSSPrimitiveValueMappings.h"
34 #include "CSSToStyleMap.h"
35 #include "CSSValueList.h"
36 #include "ClipPathOperation.h"
37 #include "CursorList.h"
42 #include "RenderObject.h"
43 #include "RenderStyle.h"
44 #include "RenderView.h"
46 #include "StyleResolver.h"
47 #include <wtf/StdLibExtras.h>
48 #include <wtf/UnusedParam.h>
54 enum ExpandValueBehavior {SuppressValue = 0, ExpandValue};
55 template <ExpandValueBehavior expandValue, CSSPropertyID one = CSSPropertyInvalid, CSSPropertyID two = CSSPropertyInvalid, CSSPropertyID three = CSSPropertyInvalid, CSSPropertyID four = CSSPropertyInvalid, CSSPropertyID five = CSSPropertyInvalid>
56 class ApplyPropertyExpanding {
59 template <CSSPropertyID id>
60 static inline void applyInheritValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
62 if (id == CSSPropertyInvalid)
65 const StyleBuilder& table = StyleBuilder::sharedStyleBuilder();
66 const PropertyHandler& handler = table.propertyHandler(id);
67 if (handler.isValid())
68 handler.applyInheritValue(propertyID, styleResolver);
71 static void applyInheritValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
73 applyInheritValue<one>(propertyID, styleResolver);
74 applyInheritValue<two>(propertyID, styleResolver);
75 applyInheritValue<three>(propertyID, styleResolver);
76 applyInheritValue<four>(propertyID, styleResolver);
77 applyInheritValue<five>(propertyID, styleResolver);
80 template <CSSPropertyID id>
81 static inline void applyInitialValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
83 if (id == CSSPropertyInvalid)
86 const StyleBuilder& table = StyleBuilder::sharedStyleBuilder();
87 const PropertyHandler& handler = table.propertyHandler(id);
88 if (handler.isValid())
89 handler.applyInitialValue(propertyID, styleResolver);
92 static void applyInitialValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
94 applyInitialValue<one>(propertyID, styleResolver);
95 applyInitialValue<two>(propertyID, styleResolver);
96 applyInitialValue<three>(propertyID, styleResolver);
97 applyInitialValue<four>(propertyID, styleResolver);
98 applyInitialValue<five>(propertyID, styleResolver);
101 template <CSSPropertyID id>
102 static inline void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
104 if (id == CSSPropertyInvalid)
107 const StyleBuilder& table = StyleBuilder::sharedStyleBuilder();
108 const PropertyHandler& handler = table.propertyHandler(id);
109 if (handler.isValid())
110 handler.applyValue(propertyID, styleResolver, value);
113 static void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
118 applyValue<one>(propertyID, styleResolver, value);
119 applyValue<two>(propertyID, styleResolver, value);
120 applyValue<three>(propertyID, styleResolver, value);
121 applyValue<four>(propertyID, styleResolver, value);
122 applyValue<five>(propertyID, styleResolver, value);
124 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
127 template <typename GetterType, GetterType (RenderStyle::*getterFunction)() const, typename SetterType, void (RenderStyle::*setterFunction)(SetterType), typename InitialType, InitialType (*initialFunction)()>
128 class ApplyPropertyDefaultBase {
130 static void setValue(RenderStyle* style, SetterType value) { (style->*setterFunction)(value); }
131 static GetterType value(RenderStyle* style) { return (style->*getterFunction)(); }
132 static InitialType initial() { return (*initialFunction)(); }
133 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver) { setValue(styleResolver->style(), value(styleResolver->parentStyle())); }
134 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver) { setValue(styleResolver->style(), initial()); }
135 static void applyValue(CSSPropertyID, StyleResolver*, CSSValue*) { }
136 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
139 template <typename GetterType, GetterType (RenderStyle::*getterFunction)() const, typename SetterType, void (RenderStyle::*setterFunction)(SetterType), typename InitialType, InitialType (*initialFunction)()>
140 class ApplyPropertyDefault {
142 static void setValue(RenderStyle* style, SetterType value) { (style->*setterFunction)(value); }
143 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
145 if (value->isPrimitiveValue())
146 setValue(styleResolver->style(), *static_cast<CSSPrimitiveValue*>(value));
148 static PropertyHandler createHandler()
150 PropertyHandler handler = ApplyPropertyDefaultBase<GetterType, getterFunction, SetterType, setterFunction, InitialType, initialFunction>::createHandler();
151 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
155 template <typename NumberType, NumberType (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(NumberType), NumberType (*initialFunction)(), int idMapsToMinusOne = CSSValueAuto>
156 class ApplyPropertyNumber {
158 static void setValue(RenderStyle* style, NumberType value) { (style->*setterFunction)(value); }
159 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
161 if (!value->isPrimitiveValue())
164 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
165 if (primitiveValue->getIdent() == idMapsToMinusOne)
166 setValue(styleResolver->style(), -1);
168 setValue(styleResolver->style(), primitiveValue->getValue<NumberType>(CSSPrimitiveValue::CSS_NUMBER));
170 static PropertyHandler createHandler()
172 PropertyHandler handler = ApplyPropertyDefaultBase<NumberType, getterFunction, NumberType, setterFunction, NumberType, initialFunction>::createHandler();
173 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
177 template <StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<StyleImage>), StyleImage* (*initialFunction)(), CSSPropertyID property>
178 class ApplyPropertyStyleImage {
180 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(property, value)); }
181 static PropertyHandler createHandler()
183 PropertyHandler handler = ApplyPropertyDefaultBase<StyleImage*, getterFunction, PassRefPtr<StyleImage>, setterFunction, StyleImage*, initialFunction>::createHandler();
184 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
188 enum AutoValueType {Number = 0, ComputeLength};
189 template <typename T, T (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(T), bool (RenderStyle::*hasAutoFunction)() const, void (RenderStyle::*setAutoFunction)(), AutoValueType valueType = Number, int autoIdentity = CSSValueAuto>
190 class ApplyPropertyAuto {
192 static void setValue(RenderStyle* style, T value) { (style->*setterFunction)(value); }
193 static T value(RenderStyle* style) { return (style->*getterFunction)(); }
194 static bool hasAuto(RenderStyle* style) { return (style->*hasAutoFunction)(); }
195 static void setAuto(RenderStyle* style) { (style->*setAutoFunction)(); }
197 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
199 if (hasAuto(styleResolver->parentStyle()))
200 setAuto(styleResolver->style());
202 setValue(styleResolver->style(), value(styleResolver->parentStyle()));
205 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver) { setAuto(styleResolver->style()); }
207 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
209 if (!value->isPrimitiveValue())
212 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
213 if (primitiveValue->getIdent() == autoIdentity)
214 setAuto(styleResolver->style());
215 else if (valueType == Number)
216 setValue(styleResolver->style(), *primitiveValue);
217 else if (valueType == ComputeLength)
218 setValue(styleResolver->style(), primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom()));
221 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
224 class ApplyPropertyClip {
226 static Length convertToLength(StyleResolver* styleResolver, CSSPrimitiveValue* value)
228 return value->convertToLength<FixedIntegerConversion | PercentConversion | FractionConversion | AutoConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
231 static void applyInheritValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
233 RenderStyle* parentStyle = styleResolver->parentStyle();
234 if (!parentStyle->hasClip())
235 return applyInitialValue(propertyID, styleResolver);
236 styleResolver->style()->setClip(parentStyle->clipTop(), parentStyle->clipRight(), parentStyle->clipBottom(), parentStyle->clipLeft());
237 styleResolver->style()->setHasClip(true);
240 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
242 styleResolver->style()->setClip(Length(), Length(), Length(), Length());
243 styleResolver->style()->setHasClip(false);
246 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
248 if (!value->isPrimitiveValue())
251 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
253 if (Rect* rect = primitiveValue->getRectValue()) {
254 Length top = convertToLength(styleResolver, rect->top());
255 Length right = convertToLength(styleResolver, rect->right());
256 Length bottom = convertToLength(styleResolver, rect->bottom());
257 Length left = convertToLength(styleResolver, rect->left());
258 styleResolver->style()->setClip(top, right, bottom, left);
259 styleResolver->style()->setHasClip(true);
260 } else if (primitiveValue->getIdent() == CSSValueAuto) {
261 styleResolver->style()->setClip(Length(), Length(), Length(), Length());
262 styleResolver->style()->setHasClip(false);
266 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
269 enum ColorInherit {NoInheritFromParent = 0, InheritFromParent};
270 Color defaultInitialColor();
271 Color defaultInitialColor() { return Color(); }
272 template <ColorInherit inheritColorFromParent,
273 Color (RenderStyle::*getterFunction)() const,
274 void (RenderStyle::*setterFunction)(const Color&),
275 void (RenderStyle::*visitedLinkSetterFunction)(const Color&),
276 Color (RenderStyle::*defaultFunction)() const,
277 Color (*initialFunction)() = &defaultInitialColor>
278 class ApplyPropertyColor {
280 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
282 // Visited link style can never explicitly inherit from parent visited link style so no separate getters are needed.
283 Color color = (styleResolver->parentStyle()->*getterFunction)();
284 applyColorValue(styleResolver, color.isValid() ? color : (styleResolver->parentStyle()->*defaultFunction)());
287 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
289 applyColorValue(styleResolver, initialFunction());
292 static void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
294 if (!value->isPrimitiveValue())
297 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
298 if (inheritColorFromParent && primitiveValue->getIdent() == CSSValueCurrentcolor)
299 applyInheritValue(propertyID, styleResolver);
301 if (styleResolver->applyPropertyToRegularStyle())
302 (styleResolver->style()->*setterFunction)(styleResolver->colorFromPrimitiveValue(primitiveValue));
303 if (styleResolver->applyPropertyToVisitedLinkStyle())
304 (styleResolver->style()->*visitedLinkSetterFunction)(styleResolver->colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true));
308 static void applyColorValue(StyleResolver* styleResolver, const Color& color)
310 if (styleResolver->applyPropertyToRegularStyle())
311 (styleResolver->style()->*setterFunction)(color);
312 if (styleResolver->applyPropertyToVisitedLinkStyle())
313 (styleResolver->style()->*visitedLinkSetterFunction)(color);
316 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
319 template <TextDirection (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(TextDirection), TextDirection (*initialFunction)()>
320 class ApplyPropertyDirection {
322 static void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
324 ApplyPropertyDefault<TextDirection, getterFunction, TextDirection, setterFunction, TextDirection, initialFunction>::applyValue(propertyID, styleResolver, value);
325 Element* element = styleResolver->element();
326 if (element && styleResolver->element() == element->document()->documentElement())
327 element->document()->setDirectionSetOnDocumentElement(true);
330 static PropertyHandler createHandler()
332 PropertyHandler handler = ApplyPropertyDefault<TextDirection, getterFunction, TextDirection, setterFunction, TextDirection, initialFunction>::createHandler();
333 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
337 enum LengthAuto { AutoDisabled = 0, AutoEnabled };
338 enum LengthLegacyIntrinsic { LegacyIntrinsicDisabled = 0, LegacyIntrinsicEnabled };
339 enum LengthIntrinsic { IntrinsicDisabled = 0, IntrinsicEnabled };
340 enum LengthNone { NoneDisabled = 0, NoneEnabled };
341 enum LengthUndefined { UndefinedDisabled = 0, UndefinedEnabled };
342 template <Length (RenderStyle::*getterFunction)() const,
343 void (RenderStyle::*setterFunction)(Length),
344 Length (*initialFunction)(),
345 LengthAuto autoEnabled = AutoDisabled,
346 LengthLegacyIntrinsic legacyIntrinsicEnabled = LegacyIntrinsicDisabled,
347 LengthIntrinsic intrinsicEnabled = IntrinsicDisabled,
348 LengthNone noneEnabled = NoneDisabled,
349 LengthUndefined noneUndefined = UndefinedDisabled>
350 class ApplyPropertyLength {
352 static void setValue(RenderStyle* style, Length value) { (style->*setterFunction)(value); }
353 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
355 if (!value->isPrimitiveValue())
358 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
359 if (noneEnabled && primitiveValue->getIdent() == CSSValueNone) {
361 setValue(styleResolver->style(), Length(Undefined));
363 setValue(styleResolver->style(), Length());
365 if (legacyIntrinsicEnabled) {
366 if (primitiveValue->getIdent() == CSSValueIntrinsic)
367 setValue(styleResolver->style(), Length(Intrinsic));
368 else if (primitiveValue->getIdent() == CSSValueMinIntrinsic)
369 setValue(styleResolver->style(), Length(MinIntrinsic));
371 if (intrinsicEnabled) {
372 if (primitiveValue->getIdent() == CSSValueWebkitMinContent)
373 setValue(styleResolver->style(), Length(MinContent));
374 else if (primitiveValue->getIdent() == CSSValueWebkitMaxContent)
375 setValue(styleResolver->style(), Length(MaxContent));
376 else if (primitiveValue->getIdent() == CSSValueWebkitFillAvailable)
377 setValue(styleResolver->style(), Length(FillAvailable));
378 else if (primitiveValue->getIdent() == CSSValueWebkitFitContent)
379 setValue(styleResolver->style(), Length(FitContent));
382 if (autoEnabled && primitiveValue->getIdent() == CSSValueAuto)
383 setValue(styleResolver->style(), Length());
384 else if (primitiveValue->isLength()) {
385 Length length = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
386 length.setQuirk(primitiveValue->isQuirkValue());
387 setValue(styleResolver->style(), length);
388 } else if (primitiveValue->isPercentage())
389 setValue(styleResolver->style(), Length(primitiveValue->getDoubleValue(), Percent));
390 else if (primitiveValue->isCalculatedPercentageWithLength())
391 setValue(styleResolver->style(), Length(primitiveValue->cssCalcValue()->toCalcValue(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom())));
392 else if (primitiveValue->isViewportPercentageLength())
393 setValue(styleResolver->style(), primitiveValue->viewportPercentageLength());
396 static PropertyHandler createHandler()
398 PropertyHandler handler = ApplyPropertyDefaultBase<Length, getterFunction, Length, setterFunction, Length, initialFunction>::createHandler();
399 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
403 enum StringIdentBehavior { NothingMapsToNull = 0, MapNoneToNull, MapAutoToNull };
404 template <StringIdentBehavior identBehavior, const AtomicString& (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(const AtomicString&), const AtomicString& (*initialFunction)()>
405 class ApplyPropertyString {
407 static void setValue(RenderStyle* style, const AtomicString& value) { (style->*setterFunction)(value); }
408 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
410 if (!value->isPrimitiveValue())
412 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
413 if ((identBehavior == MapNoneToNull && primitiveValue->getIdent() == CSSValueNone)
414 || (identBehavior == MapAutoToNull && primitiveValue->getIdent() == CSSValueAuto))
415 setValue(styleResolver->style(), nullAtom);
417 setValue(styleResolver->style(), primitiveValue->getStringValue());
419 static PropertyHandler createHandler()
421 PropertyHandler handler = ApplyPropertyDefaultBase<const AtomicString&, getterFunction, const AtomicString&, setterFunction, const AtomicString&, initialFunction>::createHandler();
422 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
426 template <LengthSize (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(LengthSize), LengthSize (*initialFunction)()>
427 class ApplyPropertyBorderRadius {
429 static void setValue(RenderStyle* style, LengthSize value) { (style->*setterFunction)(value); }
430 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
432 if (!value->isPrimitiveValue())
435 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
436 Pair* pair = primitiveValue->getPairValue();
437 if (!pair || !pair->first() || !pair->second())
442 if (pair->first()->isPercentage())
443 radiusWidth = Length(pair->first()->getDoubleValue(), Percent);
444 else if (pair->first()->isViewportPercentageLength())
445 radiusWidth = pair->first()->viewportPercentageLength();
446 else if (pair->first()->isCalculatedPercentageWithLength()) {
447 // FIXME calc(): http://webkit.org/b/16662
451 radiusWidth = pair->first()->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
452 if (pair->second()->isPercentage())
453 radiusHeight = Length(pair->second()->getDoubleValue(), Percent);
454 else if (pair->second()->isViewportPercentageLength())
455 radiusHeight = pair->second()->viewportPercentageLength();
456 else if (pair->second()->isCalculatedPercentageWithLength()) {
457 // FIXME calc(): http://webkit.org/b/16662
461 radiusHeight = pair->second()->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
462 int width = radiusWidth.value();
463 int height = radiusHeight.value();
464 if (width < 0 || height < 0)
467 radiusHeight = radiusWidth; // Null out the other value.
469 radiusWidth = radiusHeight; // Null out the other value.
471 LengthSize size(radiusWidth, radiusHeight);
472 setValue(styleResolver->style(), size);
474 static PropertyHandler createHandler()
476 PropertyHandler handler = ApplyPropertyDefaultBase<LengthSize, getterFunction, LengthSize, setterFunction, LengthSize, initialFunction>::createHandler();
477 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
481 template <typename T>
482 struct FillLayerAccessorTypes {
488 struct FillLayerAccessorTypes<StyleImage*> {
489 typedef PassRefPtr<StyleImage> Setter;
490 typedef StyleImage* Getter;
493 template <typename T,
494 CSSPropertyID propertyId,
495 EFillLayerType fillLayerType,
496 FillLayer* (RenderStyle::*accessLayersFunction)(),
497 const FillLayer* (RenderStyle::*layersFunction)() const,
498 bool (FillLayer::*testFunction)() const,
499 typename FillLayerAccessorTypes<T>::Getter (FillLayer::*getFunction)() const,
500 void (FillLayer::*setFunction)(typename FillLayerAccessorTypes<T>::Setter),
501 void (FillLayer::*clearFunction)(),
502 typename FillLayerAccessorTypes<T>::Getter (*initialFunction)(EFillLayerType),
503 void (CSSToStyleMap::*mapFillFunction)(CSSPropertyID, FillLayer*, CSSValue*)>
504 class ApplyPropertyFillLayer {
506 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
508 FillLayer* currChild = (styleResolver->style()->*accessLayersFunction)();
509 FillLayer* prevChild = 0;
510 const FillLayer* currParent = (styleResolver->parentStyle()->*layersFunction)();
511 while (currParent && (currParent->*testFunction)()) {
513 /* Need to make a new layer.*/
514 currChild = new FillLayer(fillLayerType);
515 prevChild->setNext(currChild);
517 (currChild->*setFunction)((currParent->*getFunction)());
518 prevChild = currChild;
519 currChild = prevChild->next();
520 currParent = currParent->next();
524 /* Reset any remaining layers to not have the property set. */
525 (currChild->*clearFunction)();
526 currChild = currChild->next();
530 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
532 FillLayer* currChild = (styleResolver->style()->*accessLayersFunction)();
533 (currChild->*setFunction)((*initialFunction)(fillLayerType));
534 for (currChild = currChild->next(); currChild; currChild = currChild->next())
535 (currChild->*clearFunction)();
538 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
540 FillLayer* currChild = (styleResolver->style()->*accessLayersFunction)();
541 FillLayer* prevChild = 0;
542 if (value->isValueList()
543 #if ENABLE(CSS_IMAGE_SET)
544 && !value->isImageSetValue()
547 /* Walk each value and put it into a layer, creating new layers as needed. */
548 CSSValueList* valueList = static_cast<CSSValueList*>(value);
549 for (unsigned int i = 0; i < valueList->length(); i++) {
551 /* Need to make a new layer to hold this value */
552 currChild = new FillLayer(fillLayerType);
553 prevChild->setNext(currChild);
555 (styleResolver->styleMap()->*mapFillFunction)(propertyId, currChild, valueList->itemWithoutBoundsCheck(i));
556 prevChild = currChild;
557 currChild = currChild->next();
560 (styleResolver->styleMap()->*mapFillFunction)(propertyId, currChild, value);
561 currChild = currChild->next();
564 /* Reset all remaining layers to not have the property set. */
565 (currChild->*clearFunction)();
566 currChild = currChild->next();
570 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
573 enum ComputeLengthNormal {NormalDisabled = 0, NormalEnabled};
574 enum ComputeLengthThickness {ThicknessDisabled = 0, ThicknessEnabled};
575 enum ComputeLengthSVGZoom {SVGZoomDisabled = 0, SVGZoomEnabled};
576 template <typename T,
577 T (RenderStyle::*getterFunction)() const,
578 void (RenderStyle::*setterFunction)(T),
579 T (*initialFunction)(),
580 ComputeLengthNormal normalEnabled = NormalDisabled,
581 ComputeLengthThickness thicknessEnabled = ThicknessDisabled,
582 ComputeLengthSVGZoom svgZoomEnabled = SVGZoomDisabled>
583 class ApplyPropertyComputeLength {
585 static void setValue(RenderStyle* style, T value) { (style->*setterFunction)(value); }
586 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
588 // note: CSSPropertyLetter/WordSpacing right now sets to zero if it's not a primitive value for some reason...
589 if (!value->isPrimitiveValue())
592 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
594 int ident = primitiveValue->getIdent();
596 if (normalEnabled && ident == CSSValueNormal) {
598 } else if (thicknessEnabled && ident == CSSValueThin) {
600 } else if (thicknessEnabled && ident == CSSValueMedium) {
602 } else if (thicknessEnabled && ident == CSSValueThick) {
604 } else if (ident == CSSValueInvalid) {
605 float zoom = (svgZoomEnabled && styleResolver->useSVGZoomRules()) ? 1.0f : styleResolver->style()->effectiveZoom();
607 // Any original result that was >= 1 should not be allowed to fall below 1.
608 // This keeps border lines from vanishing.
609 length = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), 1.0);
610 T zoomedLength = length * zoom;
611 if (zoom < 1.0f && zoomedLength < 1.0 && length >= 1.0)
614 length = zoomedLength;
617 ASSERT_NOT_REACHED();
621 setValue(styleResolver->style(), length);
623 static PropertyHandler createHandler()
625 PropertyHandler handler = ApplyPropertyDefaultBase<T, getterFunction, T, setterFunction, T, initialFunction>::createHandler();
626 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
630 template <typename T, T (FontDescription::*getterFunction)() const, void (FontDescription::*setterFunction)(T), T initialValue>
631 class ApplyPropertyFont {
633 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
635 FontDescription fontDescription = styleResolver->fontDescription();
636 (fontDescription.*setterFunction)((styleResolver->parentFontDescription().*getterFunction)());
637 styleResolver->setFontDescription(fontDescription);
640 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
642 FontDescription fontDescription = styleResolver->fontDescription();
643 (fontDescription.*setterFunction)(initialValue);
644 styleResolver->setFontDescription(fontDescription);
647 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
649 if (!value->isPrimitiveValue())
651 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
652 FontDescription fontDescription = styleResolver->fontDescription();
653 (fontDescription.*setterFunction)(*primitiveValue);
654 styleResolver->setFontDescription(fontDescription);
657 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
660 class ApplyPropertyFontSize {
662 // When the CSS keyword "larger" is used, this function will attempt to match within the keyword
663 // table, and failing that, will simply multiply by 1.2.
664 static float largerFontSize(float size)
666 // FIXME: Figure out where we fall in the size ranges (xx-small to xxx-large) and scale up to
667 // the next size level.
671 // Like the previous function, but for the keyword "smaller".
672 static float smallerFontSize(float size)
674 // FIXME: Figure out where we fall in the size ranges (xx-small to xxx-large) and scale down to
675 // the next size level.
679 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
681 float size = styleResolver->parentStyle()->fontDescription().specifiedSize();
686 FontDescription fontDescription = styleResolver->style()->fontDescription();
687 fontDescription.setKeywordSize(styleResolver->parentStyle()->fontDescription().keywordSize());
688 styleResolver->setFontSize(fontDescription, size);
689 styleResolver->setFontDescription(fontDescription);
693 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
695 FontDescription fontDescription = styleResolver->style()->fontDescription();
696 float size = styleResolver->fontSizeForKeyword(styleResolver->document(), CSSValueMedium, fontDescription.useFixedDefaultSize());
701 fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1);
702 styleResolver->setFontSize(fontDescription, size);
703 styleResolver->setFontDescription(fontDescription);
707 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
709 if (!value->isPrimitiveValue())
712 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
714 FontDescription fontDescription = styleResolver->style()->fontDescription();
715 fontDescription.setKeywordSize(0);
716 float parentSize = 0;
717 bool parentIsAbsoluteSize = false;
720 if (styleResolver->parentStyle()) {
721 parentSize = styleResolver->parentStyle()->fontDescription().specifiedSize();
722 parentIsAbsoluteSize = styleResolver->parentStyle()->fontDescription().isAbsoluteSize();
725 if (int ident = primitiveValue->getIdent()) {
726 // Keywords are being used.
728 case CSSValueXxSmall:
734 case CSSValueXxLarge:
735 case CSSValueWebkitXxxLarge:
736 size = styleResolver->fontSizeForKeyword(styleResolver->document(), ident, fontDescription.useFixedDefaultSize());
737 fontDescription.setKeywordSize(ident - CSSValueXxSmall + 1);
740 size = largerFontSize(parentSize);
742 case CSSValueSmaller:
743 size = smallerFontSize(parentSize);
749 fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize && (ident == CSSValueLarger || ident == CSSValueSmaller));
751 fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize
752 || !(primitiveValue->isPercentage() || primitiveValue->isFontRelativeLength()));
753 if (primitiveValue->isLength())
754 size = primitiveValue->computeLength<float>(styleResolver->parentStyle(), styleResolver->rootElementStyle(), 1.0, true);
755 else if (primitiveValue->isPercentage())
756 size = (primitiveValue->getFloatValue() * parentSize) / 100.0f;
757 else if (primitiveValue->isCalculatedPercentageWithLength())
758 size = primitiveValue->cssCalcValue()->toCalcValue(styleResolver->parentStyle(), styleResolver->rootElementStyle())->evaluate(parentSize);
759 else if (primitiveValue->isViewportPercentageLength())
760 size = valueForLength(primitiveValue->viewportPercentageLength(), 0, styleResolver->document()->renderView());
768 // Overly large font sizes will cause crashes on some platforms (such as Windows).
769 // Cap font size here to make sure that doesn't happen.
770 size = min(1000000.0f, size);
772 styleResolver->setFontSize(fontDescription, size);
773 styleResolver->setFontDescription(fontDescription);
777 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
780 class ApplyPropertyFontWeight {
782 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
784 if (!value->isPrimitiveValue())
786 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
787 FontDescription fontDescription = styleResolver->fontDescription();
788 switch (primitiveValue->getIdent()) {
789 case CSSValueInvalid:
790 ASSERT_NOT_REACHED();
793 fontDescription.setWeight(fontDescription.bolderWeight());
795 case CSSValueLighter:
796 fontDescription.setWeight(fontDescription.lighterWeight());
799 fontDescription.setWeight(*primitiveValue);
801 styleResolver->setFontDescription(fontDescription);
803 static PropertyHandler createHandler()
805 PropertyHandler handler = ApplyPropertyFont<FontWeight, &FontDescription::weight, &FontDescription::setWeight, FontWeightNormal>::createHandler();
806 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
810 class ApplyPropertyFontVariantLigatures {
812 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
814 const FontDescription& parentFontDescription = styleResolver->parentFontDescription();
815 FontDescription fontDescription = styleResolver->fontDescription();
817 fontDescription.setCommonLigaturesState(parentFontDescription.commonLigaturesState());
818 fontDescription.setDiscretionaryLigaturesState(parentFontDescription.discretionaryLigaturesState());
819 fontDescription.setHistoricalLigaturesState(parentFontDescription.historicalLigaturesState());
821 styleResolver->setFontDescription(fontDescription);
824 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
826 FontDescription fontDescription = styleResolver->fontDescription();
828 fontDescription.setCommonLigaturesState(FontDescription::NormalLigaturesState);
829 fontDescription.setDiscretionaryLigaturesState(FontDescription::NormalLigaturesState);
830 fontDescription.setHistoricalLigaturesState(FontDescription::NormalLigaturesState);
832 styleResolver->setFontDescription(fontDescription);
835 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
837 FontDescription::LigaturesState commonLigaturesState = FontDescription::NormalLigaturesState;
838 FontDescription::LigaturesState discretionaryLigaturesState = FontDescription::NormalLigaturesState;
839 FontDescription::LigaturesState historicalLigaturesState = FontDescription::NormalLigaturesState;
841 if (value->isValueList()) {
842 CSSValueList* valueList = static_cast<CSSValueList*>(value);
843 for (size_t i = 0; i < valueList->length(); ++i) {
844 CSSValue* item = valueList->itemWithoutBoundsCheck(i);
845 ASSERT(item->isPrimitiveValue());
846 if (item->isPrimitiveValue()) {
847 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
848 switch (primitiveValue->getIdent()) {
849 case CSSValueNoCommonLigatures:
850 commonLigaturesState = FontDescription::DisabledLigaturesState;
852 case CSSValueCommonLigatures:
853 commonLigaturesState = FontDescription::EnabledLigaturesState;
855 case CSSValueNoDiscretionaryLigatures:
856 discretionaryLigaturesState = FontDescription::DisabledLigaturesState;
858 case CSSValueDiscretionaryLigatures:
859 discretionaryLigaturesState = FontDescription::EnabledLigaturesState;
861 case CSSValueNoHistoricalLigatures:
862 historicalLigaturesState = FontDescription::DisabledLigaturesState;
864 case CSSValueHistoricalLigatures:
865 historicalLigaturesState = FontDescription::EnabledLigaturesState;
868 ASSERT_NOT_REACHED();
876 ASSERT(value->isPrimitiveValue());
877 ASSERT(static_cast<CSSPrimitiveValue*>(value)->getIdent() == CSSValueNormal);
881 FontDescription fontDescription = styleResolver->fontDescription();
882 fontDescription.setCommonLigaturesState(commonLigaturesState);
883 fontDescription.setDiscretionaryLigaturesState(discretionaryLigaturesState);
884 fontDescription.setHistoricalLigaturesState(historicalLigaturesState);
885 styleResolver->setFontDescription(fontDescription);
888 static PropertyHandler createHandler()
890 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
894 enum BorderImageType { BorderImage = 0, BorderMask };
895 template <BorderImageType borderImageType,
896 CSSPropertyID property,
897 const NinePieceImage& (RenderStyle::*getterFunction)() const,
898 void (RenderStyle::*setterFunction)(const NinePieceImage&)>
899 class ApplyPropertyBorderImage {
901 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
903 NinePieceImage image;
904 if (borderImageType == BorderMask)
905 image.setMaskDefaults();
906 styleResolver->styleMap()->mapNinePieceImage(property, value, image);
907 (styleResolver->style()->*setterFunction)(image);
910 static PropertyHandler createHandler()
912 PropertyHandler handler = ApplyPropertyDefaultBase<const NinePieceImage&, getterFunction, const NinePieceImage&, setterFunction, NinePieceImage, &RenderStyle::initialNinePieceImage>::createHandler();
913 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
917 enum BorderImageModifierType { Outset, Repeat, Slice, Width };
918 template <BorderImageType type, BorderImageModifierType modifier>
919 class ApplyPropertyBorderImageModifier {
921 static inline const NinePieceImage& getValue(RenderStyle* style) { return type == BorderImage ? style->borderImage() : style->maskBoxImage(); }
922 static inline void setValue(RenderStyle* style, const NinePieceImage& value) { return type == BorderImage ? style->setBorderImage(value) : style->setMaskBoxImage(value); }
924 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
926 NinePieceImage image(getValue(styleResolver->style()));
929 image.copyOutsetFrom(getValue(styleResolver->parentStyle()));
932 image.copyRepeatFrom(getValue(styleResolver->parentStyle()));
935 image.copyImageSlicesFrom(getValue(styleResolver->parentStyle()));
938 image.copyBorderSlicesFrom(getValue(styleResolver->parentStyle()));
941 setValue(styleResolver->style(), image);
944 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
946 NinePieceImage image(getValue(styleResolver->style()));
949 image.setOutset(LengthBox(0));
952 image.setHorizontalRule(StretchImageRule);
953 image.setVerticalRule(StretchImageRule);
956 // Masks have a different initial value for slices. Preserve the value of 0 for backwards compatibility.
957 image.setImageSlices(type == BorderImage ? LengthBox(Length(100, Percent), Length(100, Percent), Length(100, Percent), Length(100, Percent)) : LengthBox());
958 image.setFill(false);
961 // Masks have a different initial value for widths. They use an 'auto' value rather than trying to fit to the border.
962 image.setBorderSlices(type == BorderImage ? LengthBox(Length(1, Relative), Length(1, Relative), Length(1, Relative), Length(1, Relative)) : LengthBox());
965 setValue(styleResolver->style(), image);
968 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
970 NinePieceImage image(getValue(styleResolver->style()));
973 image.setOutset(styleResolver->styleMap()->mapNinePieceImageQuad(value));
976 styleResolver->styleMap()->mapNinePieceImageRepeat(value, image);
979 styleResolver->styleMap()->mapNinePieceImageSlice(value, image);
982 image.setBorderSlices(styleResolver->styleMap()->mapNinePieceImageQuad(value));
985 setValue(styleResolver->style(), image);
988 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
991 template <CSSPropertyID id, StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<StyleImage>), StyleImage* (*initialFunction)()>
992 class ApplyPropertyBorderImageSource {
994 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(id, value)); }
995 static PropertyHandler createHandler()
997 PropertyHandler handler = ApplyPropertyDefaultBase<StyleImage*, getterFunction, PassRefPtr<StyleImage>, setterFunction, StyleImage*, initialFunction>::createHandler();
998 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1002 enum CounterBehavior {Increment = 0, Reset};
1003 template <CounterBehavior counterBehavior>
1004 class ApplyPropertyCounter {
1006 static void emptyFunction(CSSPropertyID, StyleResolver*) { }
1007 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
1009 CounterDirectiveMap& map = styleResolver->style()->accessCounterDirectives();
1010 CounterDirectiveMap& parentMap = styleResolver->parentStyle()->accessCounterDirectives();
1012 typedef CounterDirectiveMap::iterator Iterator;
1013 Iterator end = parentMap.end();
1014 for (Iterator it = parentMap.begin(); it != end; ++it) {
1015 CounterDirectives& directives = map.add(it->key, CounterDirectives()).iterator->value;
1016 if (counterBehavior == Reset) {
1017 directives.inheritReset(it->value);
1019 directives.inheritIncrement(it->value);
1023 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1025 if (!value->isValueList())
1028 CSSValueList* list = static_cast<CSSValueList*>(value);
1030 CounterDirectiveMap& map = styleResolver->style()->accessCounterDirectives();
1031 typedef CounterDirectiveMap::iterator Iterator;
1033 Iterator end = map.end();
1034 for (Iterator it = map.begin(); it != end; ++it)
1035 if (counterBehavior == Reset)
1036 it->value.clearReset();
1038 it->value.clearIncrement();
1040 int length = list ? list->length() : 0;
1041 for (int i = 0; i < length; ++i) {
1042 CSSValue* currValue = list->itemWithoutBoundsCheck(i);
1043 if (!currValue->isPrimitiveValue())
1046 Pair* pair = static_cast<CSSPrimitiveValue*>(currValue)->getPairValue();
1047 if (!pair || !pair->first() || !pair->second())
1050 AtomicString identifier = static_cast<CSSPrimitiveValue*>(pair->first())->getStringValue();
1051 int value = static_cast<CSSPrimitiveValue*>(pair->second())->getIntValue();
1052 CounterDirectives& directives = map.add(identifier, CounterDirectives()).iterator->value;
1053 if (counterBehavior == Reset) {
1054 directives.setResetValue(value);
1056 directives.addIncrementValue(value);
1060 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &emptyFunction, &applyValue); }
1064 class ApplyPropertyCursor {
1066 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
1068 styleResolver->style()->setCursor(styleResolver->parentStyle()->cursor());
1069 styleResolver->style()->setCursorList(styleResolver->parentStyle()->cursors());
1072 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
1074 styleResolver->style()->clearCursorList();
1075 styleResolver->style()->setCursor(RenderStyle::initialCursor());
1078 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1080 styleResolver->style()->clearCursorList();
1081 if (value->isValueList()) {
1082 CSSValueList* list = static_cast<CSSValueList*>(value);
1083 int len = list->length();
1084 styleResolver->style()->setCursor(CURSOR_AUTO);
1085 for (int i = 0; i < len; i++) {
1086 CSSValue* item = list->itemWithoutBoundsCheck(i);
1087 if (item->isCursorImageValue()) {
1088 CSSCursorImageValue* image = static_cast<CSSCursorImageValue*>(item);
1089 if (image->updateIfSVGCursorIsUsed(styleResolver->element())) // Elements with SVG cursors are not allowed to share style.
1090 styleResolver->style()->setUnique();
1091 styleResolver->style()->addCursor(styleResolver->cachedOrPendingFromValue(CSSPropertyCursor, image), image->hotSpot());
1092 } else if (item->isPrimitiveValue()) {
1093 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
1094 if (primitiveValue->isIdent())
1095 styleResolver->style()->setCursor(*primitiveValue);
1098 } else if (value->isPrimitiveValue()) {
1099 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1100 if (primitiveValue->isIdent() && styleResolver->style()->cursor() != ECursor(*primitiveValue))
1101 styleResolver->style()->setCursor(*primitiveValue);
1105 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1108 class ApplyPropertyTextAlign {
1110 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1112 if (!value->isPrimitiveValue())
1115 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1117 if (primitiveValue->getIdent() != CSSValueWebkitMatchParent)
1118 styleResolver->style()->setTextAlign(*primitiveValue);
1119 else if (styleResolver->parentStyle()->textAlign() == TASTART)
1120 styleResolver->style()->setTextAlign(styleResolver->parentStyle()->isLeftToRightDirection() ? LEFT : RIGHT);
1121 else if (styleResolver->parentStyle()->textAlign() == TAEND)
1122 styleResolver->style()->setTextAlign(styleResolver->parentStyle()->isLeftToRightDirection() ? RIGHT : LEFT);
1124 styleResolver->style()->setTextAlign(styleResolver->parentStyle()->textAlign());
1126 static PropertyHandler createHandler()
1128 PropertyHandler handler = ApplyPropertyDefaultBase<ETextAlign, &RenderStyle::textAlign, ETextAlign, &RenderStyle::setTextAlign, ETextAlign, &RenderStyle::initialTextAlign>::createHandler();
1129 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1133 class ApplyPropertyTextDecoration {
1135 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1137 ETextDecoration t = RenderStyle::initialTextDecoration();
1138 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
1139 CSSValue* item = i.value();
1140 ASSERT(item->isPrimitiveValue());
1141 t |= *static_cast<CSSPrimitiveValue*>(item);
1143 styleResolver->style()->setTextDecoration(t);
1145 static PropertyHandler createHandler()
1147 PropertyHandler handler = ApplyPropertyDefaultBase<ETextDecoration, &RenderStyle::textDecoration, ETextDecoration, &RenderStyle::setTextDecoration, ETextDecoration, &RenderStyle::initialTextDecoration>::createHandler();
1148 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1152 class ApplyPropertyLineHeight {
1154 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1156 if (!value->isPrimitiveValue())
1159 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1162 if (primitiveValue->getIdent() == CSSValueNormal)
1163 lineHeight = RenderStyle::initialLineHeight();
1164 else if (primitiveValue->isLength()) {
1165 double multiplier = styleResolver->style()->effectiveZoom();
1166 if (styleResolver->style()->textSizeAdjust()) {
1167 if (Frame* frame = styleResolver->document()->frame())
1168 multiplier *= frame->textZoomFactor();
1170 lineHeight = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), multiplier);
1171 } else if (primitiveValue->isPercentage()) {
1172 // FIXME: percentage should not be restricted to an integer here.
1173 lineHeight = Length((styleResolver->style()->fontSize() * primitiveValue->getIntValue()) / 100, Fixed);
1174 } else if (primitiveValue->isNumber()) {
1175 // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
1176 lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
1177 } else if (primitiveValue->isViewportPercentageLength())
1178 lineHeight = primitiveValue->viewportPercentageLength();
1181 styleResolver->style()->setLineHeight(lineHeight);
1183 static PropertyHandler createHandler()
1185 PropertyHandler handler = ApplyPropertyDefaultBase<Length, &RenderStyle::specifiedLineHeight, Length, &RenderStyle::setLineHeight, Length, &RenderStyle::initialLineHeight>::createHandler();
1186 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1190 class ApplyPropertyPageSize {
1192 static Length mmLength(double mm) { return CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM)->computeLength<Length>(0, 0); }
1193 static Length inchLength(double inch) { return CSSPrimitiveValue::create(inch, CSSPrimitiveValue::CSS_IN)->computeLength<Length>(0, 0); }
1194 static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveValue* pageOrientation, Length& width, Length& height)
1196 DEFINE_STATIC_LOCAL(Length, a5Width, (mmLength(148)));
1197 DEFINE_STATIC_LOCAL(Length, a5Height, (mmLength(210)));
1198 DEFINE_STATIC_LOCAL(Length, a4Width, (mmLength(210)));
1199 DEFINE_STATIC_LOCAL(Length, a4Height, (mmLength(297)));
1200 DEFINE_STATIC_LOCAL(Length, a3Width, (mmLength(297)));
1201 DEFINE_STATIC_LOCAL(Length, a3Height, (mmLength(420)));
1202 DEFINE_STATIC_LOCAL(Length, b5Width, (mmLength(176)));
1203 DEFINE_STATIC_LOCAL(Length, b5Height, (mmLength(250)));
1204 DEFINE_STATIC_LOCAL(Length, b4Width, (mmLength(250)));
1205 DEFINE_STATIC_LOCAL(Length, b4Height, (mmLength(353)));
1206 DEFINE_STATIC_LOCAL(Length, letterWidth, (inchLength(8.5)));
1207 DEFINE_STATIC_LOCAL(Length, letterHeight, (inchLength(11)));
1208 DEFINE_STATIC_LOCAL(Length, legalWidth, (inchLength(8.5)));
1209 DEFINE_STATIC_LOCAL(Length, legalHeight, (inchLength(14)));
1210 DEFINE_STATIC_LOCAL(Length, ledgerWidth, (inchLength(11)));
1211 DEFINE_STATIC_LOCAL(Length, ledgerHeight, (inchLength(17)));
1216 switch (pageSizeName->getIdent()) {
1237 case CSSValueLetter:
1238 width = letterWidth;
1239 height = letterHeight;
1243 height = legalHeight;
1245 case CSSValueLedger:
1246 width = ledgerWidth;
1247 height = ledgerHeight;
1253 if (pageOrientation) {
1254 switch (pageOrientation->getIdent()) {
1255 case CSSValueLandscape:
1256 std::swap(width, height);
1258 case CSSValuePortrait:
1268 static void applyInheritValue(CSSPropertyID, StyleResolver*) { }
1269 static void applyInitialValue(CSSPropertyID, StyleResolver*) { }
1270 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1272 styleResolver->style()->resetPageSizeType();
1275 PageSizeType pageSizeType = PAGE_SIZE_AUTO;
1276 CSSValueListInspector inspector(value);
1277 switch (inspector.length()) {
1279 // <length>{2} | <page-size> <orientation>
1280 if (!inspector.first()->isPrimitiveValue() || !inspector.second()->isPrimitiveValue())
1282 CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(inspector.first());
1283 CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(inspector.second());
1284 if (first->isLength()) {
1286 if (!second->isLength())
1288 width = first->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
1289 height = second->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
1291 // <page-size> <orientation>
1292 // The value order is guaranteed. See CSSParser::parseSizeParameter.
1293 if (!getPageSizeFromName(first, second, width, height))
1296 pageSizeType = PAGE_SIZE_RESOLVED;
1300 // <length> | auto | <page-size> | [ portrait | landscape]
1301 if (!inspector.first()->isPrimitiveValue())
1303 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(inspector.first());
1304 if (primitiveValue->isLength()) {
1306 pageSizeType = PAGE_SIZE_RESOLVED;
1307 width = height = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
1309 switch (primitiveValue->getIdent()) {
1313 pageSizeType = PAGE_SIZE_AUTO;
1315 case CSSValuePortrait:
1316 pageSizeType = PAGE_SIZE_AUTO_PORTRAIT;
1318 case CSSValueLandscape:
1319 pageSizeType = PAGE_SIZE_AUTO_LANDSCAPE;
1323 pageSizeType = PAGE_SIZE_RESOLVED;
1324 if (!getPageSizeFromName(primitiveValue, 0, width, height))
1333 styleResolver->style()->setPageSizeType(pageSizeType);
1334 styleResolver->style()->setPageSize(LengthSize(width, height));
1336 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1339 class ApplyPropertyTextEmphasisStyle {
1341 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
1343 styleResolver->style()->setTextEmphasisFill(styleResolver->parentStyle()->textEmphasisFill());
1344 styleResolver->style()->setTextEmphasisMark(styleResolver->parentStyle()->textEmphasisMark());
1345 styleResolver->style()->setTextEmphasisCustomMark(styleResolver->parentStyle()->textEmphasisCustomMark());
1348 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
1350 styleResolver->style()->setTextEmphasisFill(RenderStyle::initialTextEmphasisFill());
1351 styleResolver->style()->setTextEmphasisMark(RenderStyle::initialTextEmphasisMark());
1352 styleResolver->style()->setTextEmphasisCustomMark(RenderStyle::initialTextEmphasisCustomMark());
1355 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1357 if (value->isValueList()) {
1358 CSSValueList* list = static_cast<CSSValueList*>(value);
1359 ASSERT(list->length() == 2);
1360 if (list->length() != 2)
1362 for (unsigned i = 0; i < 2; ++i) {
1363 CSSValue* item = list->itemWithoutBoundsCheck(i);
1364 if (!item->isPrimitiveValue())
1367 CSSPrimitiveValue* value = static_cast<CSSPrimitiveValue*>(item);
1368 if (value->getIdent() == CSSValueFilled || value->getIdent() == CSSValueOpen)
1369 styleResolver->style()->setTextEmphasisFill(*value);
1371 styleResolver->style()->setTextEmphasisMark(*value);
1373 styleResolver->style()->setTextEmphasisCustomMark(nullAtom);
1377 if (!value->isPrimitiveValue())
1379 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1381 if (primitiveValue->isString()) {
1382 styleResolver->style()->setTextEmphasisFill(TextEmphasisFillFilled);
1383 styleResolver->style()->setTextEmphasisMark(TextEmphasisMarkCustom);
1384 styleResolver->style()->setTextEmphasisCustomMark(primitiveValue->getStringValue());
1388 styleResolver->style()->setTextEmphasisCustomMark(nullAtom);
1390 if (primitiveValue->getIdent() == CSSValueFilled || primitiveValue->getIdent() == CSSValueOpen) {
1391 styleResolver->style()->setTextEmphasisFill(*primitiveValue);
1392 styleResolver->style()->setTextEmphasisMark(TextEmphasisMarkAuto);
1394 styleResolver->style()->setTextEmphasisFill(TextEmphasisFillFilled);
1395 styleResolver->style()->setTextEmphasisMark(*primitiveValue);
1399 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1402 template <typename T,
1403 T (Animation::*getterFunction)() const,
1404 void (Animation::*setterFunction)(T),
1405 bool (Animation::*testFunction)() const,
1406 void (Animation::*clearFunction)(),
1407 T (*initialFunction)(),
1408 void (CSSToStyleMap::*mapFunction)(Animation*, CSSValue*),
1409 AnimationList* (RenderStyle::*animationGetterFunction)(),
1410 const AnimationList* (RenderStyle::*immutableAnimationGetterFunction)() const>
1411 class ApplyPropertyAnimation {
1413 static void setValue(Animation* animation, T value) { (animation->*setterFunction)(value); }
1414 static T value(const Animation* animation) { return (animation->*getterFunction)(); }
1415 static bool test(const Animation* animation) { return (animation->*testFunction)(); }
1416 static void clear(Animation* animation) { (animation->*clearFunction)(); }
1417 static T initial() { return (*initialFunction)(); }
1418 static void map(StyleResolver* styleResolver, Animation* animation, CSSValue* value) { (styleResolver->styleMap()->*mapFunction)(animation, value); }
1419 static AnimationList* accessAnimations(RenderStyle* style) { return (style->*animationGetterFunction)(); }
1420 static const AnimationList* animations(RenderStyle* style) { return (style->*immutableAnimationGetterFunction)(); }
1422 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
1424 AnimationList* list = accessAnimations(styleResolver->style());
1425 const AnimationList* parentList = animations(styleResolver->parentStyle());
1426 size_t i = 0, parentSize = parentList ? parentList->size() : 0;
1427 for ( ; i < parentSize && test(parentList->animation(i)); ++i) {
1428 if (list->size() <= i)
1429 list->append(Animation::create());
1430 setValue(list->animation(i), value(parentList->animation(i)));
1431 list->animation(i)->setAnimationMode(parentList->animation(i)->animationMode());
1434 /* Reset any remaining animations to not have the property set. */
1435 for ( ; i < list->size(); ++i)
1436 clear(list->animation(i));
1439 static void applyInitialValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
1441 AnimationList* list = accessAnimations(styleResolver->style());
1442 if (list->isEmpty())
1443 list->append(Animation::create());
1444 setValue(list->animation(0), initial());
1445 if (propertyID == CSSPropertyWebkitTransitionProperty)
1446 list->animation(0)->setAnimationMode(Animation::AnimateAll);
1447 for (size_t i = 1; i < list->size(); ++i)
1448 clear(list->animation(i));
1451 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1453 AnimationList* list = accessAnimations(styleResolver->style());
1454 size_t childIndex = 0;
1455 if (value->isValueList()) {
1456 /* Walk each value and put it into an animation, creating new animations as needed. */
1457 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
1458 if (childIndex <= list->size())
1459 list->append(Animation::create());
1460 map(styleResolver, list->animation(childIndex), i.value());
1464 if (list->isEmpty())
1465 list->append(Animation::create());
1466 map(styleResolver, list->animation(childIndex), value);
1469 for ( ; childIndex < list->size(); ++childIndex) {
1470 /* Reset all remaining animations to not have the property set. */
1471 clear(list->animation(childIndex));
1475 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1478 class ApplyPropertyOutlineStyle {
1480 static void applyInheritValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
1482 ApplyPropertyDefaultBase<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyInheritValue(propertyID, styleResolver);
1483 ApplyPropertyDefaultBase<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyInheritValue(propertyID, styleResolver);
1486 static void applyInitialValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
1488 ApplyPropertyDefaultBase<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyInitialValue(propertyID, styleResolver);
1489 ApplyPropertyDefaultBase<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyInitialValue(propertyID, styleResolver);
1492 static void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
1494 ApplyPropertyDefault<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyValue(propertyID, styleResolver, value);
1495 ApplyPropertyDefault<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyValue(propertyID, styleResolver, value);
1498 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1501 class ApplyPropertyResize {
1503 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1505 if (!value->isPrimitiveValue())
1508 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1510 EResize r = RESIZE_NONE;
1511 switch (primitiveValue->getIdent()) {
1515 if (Settings* settings = styleResolver->document()->settings())
1516 r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE;
1519 r = *primitiveValue;
1521 styleResolver->style()->setResize(r);
1524 static PropertyHandler createHandler()
1526 PropertyHandler handler = ApplyPropertyDefaultBase<EResize, &RenderStyle::resize, EResize, &RenderStyle::setResize, EResize, &RenderStyle::initialResize>::createHandler();
1527 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1531 class ApplyPropertyVerticalAlign {
1533 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1535 if (!value->isPrimitiveValue())
1538 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1540 if (primitiveValue->getIdent())
1541 return styleResolver->style()->setVerticalAlign(*primitiveValue);
1543 styleResolver->style()->setVerticalAlignLength(primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion | ViewportPercentageConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom()));
1546 static PropertyHandler createHandler()
1548 PropertyHandler handler = ApplyPropertyDefaultBase<EVerticalAlign, &RenderStyle::verticalAlign, EVerticalAlign, &RenderStyle::setVerticalAlign, EVerticalAlign, &RenderStyle::initialVerticalAlign>::createHandler();
1549 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1553 class ApplyPropertyAspectRatio {
1555 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
1557 if (!styleResolver->parentStyle()->hasAspectRatio())
1559 styleResolver->style()->setHasAspectRatio(true);
1560 styleResolver->style()->setAspectRatioDenominator(styleResolver->parentStyle()->aspectRatioDenominator());
1561 styleResolver->style()->setAspectRatioNumerator(styleResolver->parentStyle()->aspectRatioNumerator());
1564 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
1566 styleResolver->style()->setHasAspectRatio(RenderStyle::initialHasAspectRatio());
1567 styleResolver->style()->setAspectRatioDenominator(RenderStyle::initialAspectRatioDenominator());
1568 styleResolver->style()->setAspectRatioNumerator(RenderStyle::initialAspectRatioNumerator());
1571 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1573 if (!value->isAspectRatioValue()) {
1574 styleResolver->style()->setHasAspectRatio(false);
1577 CSSAspectRatioValue* aspectRatioValue = static_cast<CSSAspectRatioValue*>(value);
1578 styleResolver->style()->setHasAspectRatio(true);
1579 styleResolver->style()->setAspectRatioDenominator(aspectRatioValue->denominatorValue());
1580 styleResolver->style()->setAspectRatioNumerator(aspectRatioValue->numeratorValue());
1583 static PropertyHandler createHandler()
1585 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
1589 class ApplyPropertyZoom {
1591 static void resetEffectiveZoom(StyleResolver* styleResolver)
1593 // Reset the zoom in effect. This allows the setZoom method to accurately compute a new zoom in effect.
1594 styleResolver->setEffectiveZoom(styleResolver->parentStyle() ? styleResolver->parentStyle()->effectiveZoom() : RenderStyle::initialZoom());
1598 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
1600 resetEffectiveZoom(styleResolver);
1601 styleResolver->setZoom(styleResolver->parentStyle()->zoom());
1604 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
1606 resetEffectiveZoom(styleResolver);
1607 styleResolver->setZoom(RenderStyle::initialZoom());
1610 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1612 ASSERT(value->isPrimitiveValue());
1613 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1615 if (primitiveValue->getIdent() == CSSValueNormal) {
1616 resetEffectiveZoom(styleResolver);
1617 styleResolver->setZoom(RenderStyle::initialZoom());
1618 } else if (primitiveValue->getIdent() == CSSValueReset) {
1619 styleResolver->setEffectiveZoom(RenderStyle::initialZoom());
1620 styleResolver->setZoom(RenderStyle::initialZoom());
1621 } else if (primitiveValue->getIdent() == CSSValueDocument) {
1622 float docZoom = styleResolver->rootElementStyle() ? styleResolver->rootElementStyle()->zoom() : RenderStyle::initialZoom();
1623 styleResolver->setEffectiveZoom(docZoom);
1624 styleResolver->setZoom(docZoom);
1625 } else if (primitiveValue->isPercentage()) {
1626 resetEffectiveZoom(styleResolver);
1627 if (float percent = primitiveValue->getFloatValue())
1628 styleResolver->setZoom(percent / 100.0f);
1629 } else if (primitiveValue->isNumber()) {
1630 resetEffectiveZoom(styleResolver);
1631 if (float number = primitiveValue->getFloatValue())
1632 styleResolver->setZoom(number);
1636 static PropertyHandler createHandler()
1638 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
1642 class ApplyPropertyDisplay {
1644 static inline bool isValidDisplayValue(StyleResolver* styleResolver, EDisplay displayPropertyValue)
1647 if (styleResolver->element() && styleResolver->element()->isSVGElement() && styleResolver->style()->styleType() == NOPSEUDO)
1648 return (displayPropertyValue == INLINE || displayPropertyValue == BLOCK || displayPropertyValue == NONE);
1650 UNUSED_PARAM(styleResolver);
1651 UNUSED_PARAM(displayPropertyValue);
1656 static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
1658 EDisplay display = styleResolver->parentStyle()->display();
1659 if (!isValidDisplayValue(styleResolver, display))
1661 styleResolver->style()->setDisplay(display);
1664 static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
1666 styleResolver->style()->setDisplay(RenderStyle::initialDisplay());
1669 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1671 if (!value->isPrimitiveValue())
1674 EDisplay display = *static_cast<CSSPrimitiveValue*>(value);
1676 if (!isValidDisplayValue(styleResolver, display))
1679 styleResolver->style()->setDisplay(display);
1682 static PropertyHandler createHandler()
1684 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
1688 template <ClipPathOperation* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<ClipPathOperation>), ClipPathOperation* (*initialFunction)()>
1689 class ApplyPropertyClipPath {
1691 static void setValue(RenderStyle* style, PassRefPtr<ClipPathOperation> value) { (style->*setterFunction)(value); }
1692 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1694 if (value->isPrimitiveValue()) {
1695 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1696 if (primitiveValue->getIdent() == CSSValueNone)
1697 setValue(styleResolver->style(), 0);
1698 else if (primitiveValue->isShape()) {
1699 setValue(styleResolver->style(), ShapeClipPathOperation::create(basicShapeForValue(styleResolver, primitiveValue->getShapeValue())));
1702 else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_URI) {
1703 String cssURLValue = primitiveValue->getStringValue();
1704 KURL url = styleResolver->document()->completeURL(cssURLValue);
1705 // FIXME: It doesn't work with forward or external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=90405)
1706 setValue(styleResolver->style(), ReferenceClipPathOperation::create(cssURLValue, url.fragmentIdentifier()));
1711 static PropertyHandler createHandler()
1713 PropertyHandler handler = ApplyPropertyDefaultBase<ClipPathOperation*, getterFunction, PassRefPtr<ClipPathOperation>, setterFunction, ClipPathOperation*, initialFunction>::createHandler();
1714 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1718 #if ENABLE(CSS_EXCLUSIONS)
1719 template <BasicShape* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<BasicShape>), BasicShape* (*initialFunction)()>
1720 class ApplyPropertyExclusionShape {
1722 static void setValue(RenderStyle* style, PassRefPtr<BasicShape> value) { (style->*setterFunction)(value); }
1723 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1725 if (value->isPrimitiveValue()) {
1726 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1727 if (primitiveValue->getIdent() == CSSValueAuto)
1728 setValue(styleResolver->style(), 0);
1729 else if (primitiveValue->isShape()) {
1730 RefPtr<BasicShape> shape = basicShapeForValue(styleResolver, primitiveValue->getShapeValue());
1731 setValue(styleResolver->style(), shape.release());
1735 static PropertyHandler createHandler()
1737 PropertyHandler handler = ApplyPropertyDefaultBase<BasicShape*, getterFunction, PassRefPtr<BasicShape>, setterFunction, BasicShape*, initialFunction>::createHandler();
1738 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1743 #if ENABLE(CSS_IMAGE_RESOLUTION)
1744 class ApplyPropertyImageResolution {
1746 static void applyInheritValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
1748 ApplyPropertyDefaultBase<ImageResolutionSource, &RenderStyle::imageResolutionSource, ImageResolutionSource, &RenderStyle::setImageResolutionSource, ImageResolutionSource, &RenderStyle::initialImageResolutionSource>::applyInheritValue(propertyID, styleResolver);
1749 ApplyPropertyDefaultBase<ImageResolutionSnap, &RenderStyle::imageResolutionSnap, ImageResolutionSnap, &RenderStyle::setImageResolutionSnap, ImageResolutionSnap, &RenderStyle::initialImageResolutionSnap>::applyInheritValue(propertyID, styleResolver);
1750 ApplyPropertyDefaultBase<float, &RenderStyle::imageResolution, float, &RenderStyle::setImageResolution, float, &RenderStyle::initialImageResolution>::applyInheritValue(propertyID, styleResolver);
1753 static void applyInitialValue(CSSPropertyID propertyID, StyleResolver* styleResolver)
1755 ApplyPropertyDefaultBase<ImageResolutionSource, &RenderStyle::imageResolutionSource, ImageResolutionSource, &RenderStyle::setImageResolutionSource, ImageResolutionSource, &RenderStyle::initialImageResolutionSource>::applyInitialValue(propertyID, styleResolver);
1756 ApplyPropertyDefaultBase<ImageResolutionSnap, &RenderStyle::imageResolutionSnap, ImageResolutionSnap, &RenderStyle::setImageResolutionSnap, ImageResolutionSnap, &RenderStyle::initialImageResolutionSnap>::applyInitialValue(propertyID, styleResolver);
1757 ApplyPropertyDefaultBase<float, &RenderStyle::imageResolution, float, &RenderStyle::setImageResolution, float, &RenderStyle::initialImageResolution>::applyInitialValue(propertyID, styleResolver);
1760 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
1762 if (!value->isValueList())
1764 CSSValueList* valueList = static_cast<CSSValueList*>(value);
1765 ImageResolutionSource source = RenderStyle::initialImageResolutionSource();
1766 ImageResolutionSnap snap = RenderStyle::initialImageResolutionSnap();
1767 double resolution = RenderStyle::initialImageResolution();
1768 for (size_t i = 0; i < valueList->length(); i++) {
1769 CSSValue* item = valueList->itemWithoutBoundsCheck(i);
1770 if (!item->isPrimitiveValue())
1772 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
1773 if (primitiveValue->getIdent() == CSSValueFromImage)
1774 source = ImageResolutionFromImage;
1775 else if (primitiveValue->getIdent() == CSSValueSnap)
1776 snap = ImageResolutionSnapPixels;
1778 resolution = primitiveValue->getDoubleValue(CSSPrimitiveValue::CSS_DPPX);
1780 styleResolver->style()->setImageResolutionSource(source);
1781 styleResolver->style()->setImageResolutionSnap(snap);
1782 styleResolver->style()->setImageResolution(resolution);
1785 static PropertyHandler createHandler()
1787 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
1792 const StyleBuilder& StyleBuilder::sharedStyleBuilder()
1794 DEFINE_STATIC_LOCAL(StyleBuilder, styleBuilderInstance, ());
1795 return styleBuilderInstance;
1798 StyleBuilder::StyleBuilder()
1800 for (int i = 0; i < numCSSProperties; ++i)
1801 m_propertyMap[i] = PropertyHandler();
1803 // Please keep CSS property list in alphabetical order.
1804 setPropertyHandler(CSSPropertyBackgroundAttachment, ApplyPropertyFillLayer<EFillAttachment, CSSPropertyBackgroundAttachment, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isAttachmentSet, &FillLayer::attachment, &FillLayer::setAttachment, &FillLayer::clearAttachment, &FillLayer::initialFillAttachment, &CSSToStyleMap::mapFillAttachment>::createHandler());
1805 setPropertyHandler(CSSPropertyBackgroundClip, ApplyPropertyFillLayer<EFillBox, CSSPropertyBackgroundClip, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSToStyleMap::mapFillClip>::createHandler());
1806 setPropertyHandler(CSSPropertyBackgroundColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::backgroundColor, &RenderStyle::setBackgroundColor, &RenderStyle::setVisitedLinkBackgroundColor, &RenderStyle::invalidColor>::createHandler());
1807 setPropertyHandler(CSSPropertyBackgroundImage, ApplyPropertyFillLayer<StyleImage*, CSSPropertyBackgroundImage, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSToStyleMap::mapFillImage>::createHandler());
1808 setPropertyHandler(CSSPropertyBackgroundOrigin, ApplyPropertyFillLayer<EFillBox, CSSPropertyBackgroundOrigin, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSToStyleMap::mapFillOrigin>::createHandler());
1809 setPropertyHandler(CSSPropertyBackgroundPosition, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundPositionX, CSSPropertyBackgroundPositionY>::createHandler());
1810 setPropertyHandler(CSSPropertyBackgroundPositionX, ApplyPropertyFillLayer<Length, CSSPropertyBackgroundPositionX, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isXPositionSet, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::clearXPosition, &FillLayer::initialFillXPosition, &CSSToStyleMap::mapFillXPosition>::createHandler());
1811 setPropertyHandler(CSSPropertyBackgroundPositionY, ApplyPropertyFillLayer<Length, CSSPropertyBackgroundPositionY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isYPositionSet, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::clearYPosition, &FillLayer::initialFillYPosition, &CSSToStyleMap::mapFillYPosition>::createHandler());
1812 setPropertyHandler(CSSPropertyBackgroundRepeat, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY>::createHandler());
1813 setPropertyHandler(CSSPropertyBackgroundRepeatX, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyBackgroundRepeatX, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSToStyleMap::mapFillRepeatX>::createHandler());
1814 setPropertyHandler(CSSPropertyBackgroundRepeatY, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyBackgroundRepeatY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSToStyleMap::mapFillRepeatY>::createHandler());
1815 setPropertyHandler(CSSPropertyBackgroundSize, ApplyPropertyFillLayer<FillSize, CSSPropertyBackgroundSize, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSToStyleMap::mapFillSize>::createHandler());
1816 setPropertyHandler(CSSPropertyBorder, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderStyle, CSSPropertyBorderWidth, CSSPropertyBorderColor>::createHandler());
1817 setPropertyHandler(CSSPropertyBorderBottom, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderBottomColor, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomWidth>::createHandler());
1818 setPropertyHandler(CSSPropertyBorderBottomColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderBottomColor, &RenderStyle::setBorderBottomColor, &RenderStyle::setVisitedLinkBorderBottomColor, &RenderStyle::color>::createHandler());
1819 setPropertyHandler(CSSPropertyBorderBottomLeftRadius, ApplyPropertyBorderRadius<&RenderStyle::borderBottomLeftRadius, &RenderStyle::setBorderBottomLeftRadius, &RenderStyle::initialBorderRadius>::createHandler());
1820 setPropertyHandler(CSSPropertyBorderBottomRightRadius, ApplyPropertyBorderRadius<&RenderStyle::borderBottomRightRadius, &RenderStyle::setBorderBottomRightRadius, &RenderStyle::initialBorderRadius>::createHandler());
1821 setPropertyHandler(CSSPropertyBorderBottomStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderBottomStyle, EBorderStyle, &RenderStyle::setBorderBottomStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1822 setPropertyHandler(CSSPropertyBorderBottomWidth, ApplyPropertyComputeLength<unsigned, &RenderStyle::borderBottomWidth, &RenderStyle::setBorderBottomWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1823 setPropertyHandler(CSSPropertyBorderCollapse, ApplyPropertyDefault<EBorderCollapse, &RenderStyle::borderCollapse, EBorderCollapse, &RenderStyle::setBorderCollapse, EBorderCollapse, &RenderStyle::initialBorderCollapse>::createHandler());
1824 setPropertyHandler(CSSPropertyBorderColor, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopColor, CSSPropertyBorderRightColor, CSSPropertyBorderBottomColor, CSSPropertyBorderLeftColor>::createHandler());
1825 setPropertyHandler(CSSPropertyBorderImage, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderImageSource, CSSPropertyBorderImageSlice, CSSPropertyBorderImageWidth, CSSPropertyBorderImageOutset, CSSPropertyBorderImageRepeat>::createHandler());
1826 setPropertyHandler(CSSPropertyBorderImageOutset, ApplyPropertyBorderImageModifier<BorderImage, Outset>::createHandler());
1827 setPropertyHandler(CSSPropertyBorderImageRepeat, ApplyPropertyBorderImageModifier<BorderImage, Repeat>::createHandler());
1828 setPropertyHandler(CSSPropertyBorderImageSlice, ApplyPropertyBorderImageModifier<BorderImage, Slice>::createHandler());
1829 setPropertyHandler(CSSPropertyBorderImageSource, ApplyPropertyBorderImageSource<CSSPropertyBorderImageSource, &RenderStyle::borderImageSource, &RenderStyle::setBorderImageSource, &RenderStyle::initialBorderImageSource>::createHandler());
1830 setPropertyHandler(CSSPropertyBorderImageWidth, ApplyPropertyBorderImageModifier<BorderImage, Width>::createHandler());
1831 setPropertyHandler(CSSPropertyBorderLeft, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderLeftColor, CSSPropertyBorderLeftStyle, CSSPropertyBorderLeftWidth>::createHandler());
1832 setPropertyHandler(CSSPropertyBorderLeftColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderLeftColor, &RenderStyle::setBorderLeftColor, &RenderStyle::setVisitedLinkBorderLeftColor, &RenderStyle::color>::createHandler());
1833 setPropertyHandler(CSSPropertyBorderLeftStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderLeftStyle, EBorderStyle, &RenderStyle::setBorderLeftStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1834 setPropertyHandler(CSSPropertyBorderLeftWidth, ApplyPropertyComputeLength<unsigned, &RenderStyle::borderLeftWidth, &RenderStyle::setBorderLeftWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1835 setPropertyHandler(CSSPropertyBorderRadius, ApplyPropertyExpanding<ExpandValue, CSSPropertyBorderTopLeftRadius, CSSPropertyBorderTopRightRadius, CSSPropertyBorderBottomLeftRadius, CSSPropertyBorderBottomRightRadius>::createHandler());
1836 setPropertyHandler(CSSPropertyBorderRight, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderRightColor, CSSPropertyBorderRightStyle, CSSPropertyBorderRightWidth>::createHandler());
1837 setPropertyHandler(CSSPropertyBorderRightColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderRightColor, &RenderStyle::setBorderRightColor, &RenderStyle::setVisitedLinkBorderRightColor, &RenderStyle::color>::createHandler());
1838 setPropertyHandler(CSSPropertyBorderRightStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderRightStyle, EBorderStyle, &RenderStyle::setBorderRightStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1839 setPropertyHandler(CSSPropertyBorderRightWidth, ApplyPropertyComputeLength<unsigned, &RenderStyle::borderRightWidth, &RenderStyle::setBorderRightWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1840 setPropertyHandler(CSSPropertyBorderSpacing, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyWebkitBorderVerticalSpacing>::createHandler());
1841 setPropertyHandler(CSSPropertyBorderStyle, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopStyle, CSSPropertyBorderRightStyle, CSSPropertyBorderBottomStyle, CSSPropertyBorderLeftStyle>::createHandler());
1842 setPropertyHandler(CSSPropertyBorderTop, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopColor, CSSPropertyBorderTopStyle, CSSPropertyBorderTopWidth>::createHandler());
1843 setPropertyHandler(CSSPropertyBorderTopColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderTopColor, &RenderStyle::setBorderTopColor, &RenderStyle::setVisitedLinkBorderTopColor, &RenderStyle::color>::createHandler());
1844 setPropertyHandler(CSSPropertyBorderTopLeftRadius, ApplyPropertyBorderRadius<&RenderStyle::borderTopLeftRadius, &RenderStyle::setBorderTopLeftRadius, &RenderStyle::initialBorderRadius>::createHandler());
1845 setPropertyHandler(CSSPropertyBorderTopRightRadius, ApplyPropertyBorderRadius<&RenderStyle::borderTopRightRadius, &RenderStyle::setBorderTopRightRadius, &RenderStyle::initialBorderRadius>::createHandler());
1846 setPropertyHandler(CSSPropertyBorderTopStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderTopStyle, EBorderStyle, &RenderStyle::setBorderTopStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1847 setPropertyHandler(CSSPropertyBorderTopWidth, ApplyPropertyComputeLength<unsigned, &RenderStyle::borderTopWidth, &RenderStyle::setBorderTopWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1848 setPropertyHandler(CSSPropertyBorderWidth, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopWidth, CSSPropertyBorderRightWidth, CSSPropertyBorderBottomWidth, CSSPropertyBorderLeftWidth>::createHandler());
1849 setPropertyHandler(CSSPropertyBottom, ApplyPropertyLength<&RenderStyle::bottom, &RenderStyle::setBottom, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1850 setPropertyHandler(CSSPropertyBoxSizing, ApplyPropertyDefault<EBoxSizing, &RenderStyle::boxSizing, EBoxSizing, &RenderStyle::setBoxSizing, EBoxSizing, &RenderStyle::initialBoxSizing>::createHandler());
1851 setPropertyHandler(CSSPropertyCaptionSide, ApplyPropertyDefault<ECaptionSide, &RenderStyle::captionSide, ECaptionSide, &RenderStyle::setCaptionSide, ECaptionSide, &RenderStyle::initialCaptionSide>::createHandler());
1852 setPropertyHandler(CSSPropertyClear, ApplyPropertyDefault<EClear, &RenderStyle::clear, EClear, &RenderStyle::setClear, EClear, &RenderStyle::initialClear>::createHandler());
1853 setPropertyHandler(CSSPropertyClip, ApplyPropertyClip::createHandler());
1854 setPropertyHandler(CSSPropertyColor, ApplyPropertyColor<InheritFromParent, &RenderStyle::color, &RenderStyle::setColor, &RenderStyle::setVisitedLinkColor, &RenderStyle::invalidColor, RenderStyle::initialColor>::createHandler());
1855 setPropertyHandler(CSSPropertyCounterIncrement, ApplyPropertyCounter<Increment>::createHandler());
1856 setPropertyHandler(CSSPropertyCounterReset, ApplyPropertyCounter<Reset>::createHandler());
1857 setPropertyHandler(CSSPropertyCursor, ApplyPropertyCursor::createHandler());
1858 setPropertyHandler(CSSPropertyDirection, ApplyPropertyDirection<&RenderStyle::direction, &RenderStyle::setDirection, RenderStyle::initialDirection>::createHandler());
1859 setPropertyHandler(CSSPropertyDisplay, ApplyPropertyDisplay::createHandler());
1860 setPropertyHandler(CSSPropertyEmptyCells, ApplyPropertyDefault<EEmptyCell, &RenderStyle::emptyCells, EEmptyCell, &RenderStyle::setEmptyCells, EEmptyCell, &RenderStyle::initialEmptyCells>::createHandler());
1861 setPropertyHandler(CSSPropertyFloat, ApplyPropertyDefault<EFloat, &RenderStyle::floating, EFloat, &RenderStyle::setFloating, EFloat, &RenderStyle::initialFloating>::createHandler());
1862 setPropertyHandler(CSSPropertyFontSize, ApplyPropertyFontSize::createHandler());
1863 setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont<FontItalic, &FontDescription::italic, &FontDescription::setItalic, FontItalicOff>::createHandler());
1864 setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont<FontSmallCaps, &FontDescription::smallCaps, &FontDescription::setSmallCaps, FontSmallCapsOff>::createHandler());
1865 setPropertyHandler(CSSPropertyFontWeight, ApplyPropertyFontWeight::createHandler());
1866 setPropertyHandler(CSSPropertyHeight, ApplyPropertyLength<&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicDisabled, NoneDisabled, UndefinedDisabled>::createHandler());
1867 #if ENABLE(CSS_IMAGE_ORIENTATION)
1868 setPropertyHandler(CSSPropertyImageOrientation, ApplyPropertyDefault<ImageOrientationEnum, &RenderStyle::imageOrientation, ImageOrientationEnum, &RenderStyle::setImageOrientation, ImageOrientationEnum, &RenderStyle::initialImageOrientation>::createHandler());
1870 setPropertyHandler(CSSPropertyImageRendering, ApplyPropertyDefault<EImageRendering, &RenderStyle::imageRendering, EImageRendering, &RenderStyle::setImageRendering, EImageRendering, &RenderStyle::initialImageRendering>::createHandler());
1871 #if ENABLE(CSS_IMAGE_RESOLUTION)
1872 setPropertyHandler(CSSPropertyImageResolution, ApplyPropertyImageResolution::createHandler());
1874 setPropertyHandler(CSSPropertyLeft, ApplyPropertyLength<&RenderStyle::left, &RenderStyle::setLeft, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1875 setPropertyHandler(CSSPropertyLetterSpacing, ApplyPropertyComputeLength<int, &RenderStyle::letterSpacing, &RenderStyle::setLetterSpacing, &RenderStyle::initialLetterWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler());
1876 setPropertyHandler(CSSPropertyLineHeight, ApplyPropertyLineHeight::createHandler());
1877 setPropertyHandler(CSSPropertyListStyle, ApplyPropertyExpanding<SuppressValue, CSSPropertyListStyleType, CSSPropertyListStyleImage, CSSPropertyListStylePosition>::createHandler());
1878 setPropertyHandler(CSSPropertyListStyleImage, ApplyPropertyStyleImage<&RenderStyle::listStyleImage, &RenderStyle::setListStyleImage, &RenderStyle::initialListStyleImage, CSSPropertyListStyleImage>::createHandler());
1879 setPropertyHandler(CSSPropertyListStylePosition, ApplyPropertyDefault<EListStylePosition, &RenderStyle::listStylePosition, EListStylePosition, &RenderStyle::setListStylePosition, EListStylePosition, &RenderStyle::initialListStylePosition>::createHandler());
1880 setPropertyHandler(CSSPropertyListStyleType, ApplyPropertyDefault<EListStyleType, &RenderStyle::listStyleType, EListStyleType, &RenderStyle::setListStyleType, EListStyleType, &RenderStyle::initialListStyleType>::createHandler());
1881 setPropertyHandler(CSSPropertyMargin, ApplyPropertyExpanding<SuppressValue, CSSPropertyMarginTop, CSSPropertyMarginRight, CSSPropertyMarginBottom, CSSPropertyMarginLeft>::createHandler());
1882 setPropertyHandler(CSSPropertyMarginBottom, ApplyPropertyLength<&RenderStyle::marginBottom, &RenderStyle::setMarginBottom, &RenderStyle::initialMargin, AutoEnabled>::createHandler());
1883 setPropertyHandler(CSSPropertyMarginLeft, ApplyPropertyLength<&RenderStyle::marginLeft, &RenderStyle::setMarginLeft, &RenderStyle::initialMargin, AutoEnabled>::createHandler());
1884 setPropertyHandler(CSSPropertyMarginRight, ApplyPropertyLength<&RenderStyle::marginRight, &RenderStyle::setMarginRight, &RenderStyle::initialMargin, AutoEnabled>::createHandler());
1885 setPropertyHandler(CSSPropertyMarginTop, ApplyPropertyLength<&RenderStyle::marginTop, &RenderStyle::setMarginTop, &RenderStyle::initialMargin, AutoEnabled>::createHandler());
1886 setPropertyHandler(CSSPropertyMaxHeight, ApplyPropertyLength<&RenderStyle::maxHeight, &RenderStyle::setMaxHeight, &RenderStyle::initialMaxSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicDisabled, NoneEnabled, UndefinedEnabled>::createHandler());
1887 setPropertyHandler(CSSPropertyMaxWidth, ApplyPropertyLength<&RenderStyle::maxWidth, &RenderStyle::setMaxWidth, &RenderStyle::initialMaxSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicEnabled, NoneEnabled, UndefinedEnabled>::createHandler());
1888 setPropertyHandler(CSSPropertyMinHeight, ApplyPropertyLength<&RenderStyle::minHeight, &RenderStyle::setMinHeight, &RenderStyle::initialMinSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicDisabled>::createHandler());
1889 setPropertyHandler(CSSPropertyMinWidth, ApplyPropertyLength<&RenderStyle::minWidth, &RenderStyle::setMinWidth, &RenderStyle::initialMinSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicEnabled>::createHandler());
1890 setPropertyHandler(CSSPropertyOpacity, ApplyPropertyDefault<float, &RenderStyle::opacity, float, &RenderStyle::setOpacity, float, &RenderStyle::initialOpacity>::createHandler());
1891 setPropertyHandler(CSSPropertyOrphans, ApplyPropertyDefault<short, &RenderStyle::orphans, short, &RenderStyle::setOrphans, short, &RenderStyle::initialOrphans>::createHandler());
1892 setPropertyHandler(CSSPropertyOutline, ApplyPropertyExpanding<SuppressValue, CSSPropertyOutlineWidth, CSSPropertyOutlineColor, CSSPropertyOutlineStyle>::createHandler());
1893 setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor, &RenderStyle::setVisitedLinkOutlineColor, &RenderStyle::color>::createHandler());
1894 setPropertyHandler(CSSPropertyOutlineOffset, ApplyPropertyComputeLength<int, &RenderStyle::outlineOffset, &RenderStyle::setOutlineOffset, &RenderStyle::initialOutlineOffset>::createHandler());
1895 setPropertyHandler(CSSPropertyOutlineStyle, ApplyPropertyOutlineStyle::createHandler());
1896 setPropertyHandler(CSSPropertyOutlineWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::outlineWidth, &RenderStyle::setOutlineWidth, &RenderStyle::initialOutlineWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1897 setPropertyHandler(CSSPropertyOverflow, ApplyPropertyExpanding<ExpandValue, CSSPropertyOverflowX, CSSPropertyOverflowY>::createHandler());
1898 setPropertyHandler(CSSPropertyOverflowWrap, ApplyPropertyDefault<EOverflowWrap, &RenderStyle::overflowWrap, EOverflowWrap, &RenderStyle::setOverflowWrap, EOverflowWrap, &RenderStyle::initialOverflowWrap>::createHandler());
1899 setPropertyHandler(CSSPropertyOverflowX, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowX, EOverflow, &RenderStyle::setOverflowX, EOverflow, &RenderStyle::initialOverflowX>::createHandler());
1900 setPropertyHandler(CSSPropertyOverflowY, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowY, EOverflow, &RenderStyle::setOverflowY, EOverflow, &RenderStyle::initialOverflowY>::createHandler());
1901 setPropertyHandler(CSSPropertyPadding, ApplyPropertyExpanding<SuppressValue, CSSPropertyPaddingTop, CSSPropertyPaddingRight, CSSPropertyPaddingBottom, CSSPropertyPaddingLeft>::createHandler());
1902 setPropertyHandler(CSSPropertyPaddingBottom, ApplyPropertyLength<&RenderStyle::paddingBottom, &RenderStyle::setPaddingBottom, &RenderStyle::initialPadding>::createHandler());
1903 setPropertyHandler(CSSPropertyPaddingLeft, ApplyPropertyLength<&RenderStyle::paddingLeft, &RenderStyle::setPaddingLeft, &RenderStyle::initialPadding>::createHandler());
1904 setPropertyHandler(CSSPropertyPaddingRight, ApplyPropertyLength<&RenderStyle::paddingRight, &RenderStyle::setPaddingRight, &RenderStyle::initialPadding>::createHandler());
1905 setPropertyHandler(CSSPropertyPaddingTop, ApplyPropertyLength<&RenderStyle::paddingTop, &RenderStyle::setPaddingTop, &RenderStyle::initialPadding>::createHandler());
1906 setPropertyHandler(CSSPropertyPageBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakAfter, EPageBreak, &RenderStyle::setPageBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1907 setPropertyHandler(CSSPropertyPageBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakBefore, EPageBreak, &RenderStyle::setPageBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1908 setPropertyHandler(CSSPropertyPageBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakInside, EPageBreak, &RenderStyle::setPageBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1909 setPropertyHandler(CSSPropertyPointerEvents, ApplyPropertyDefault<EPointerEvents, &RenderStyle::pointerEvents, EPointerEvents, &RenderStyle::setPointerEvents, EPointerEvents, &RenderStyle::initialPointerEvents>::createHandler());
1910 setPropertyHandler(CSSPropertyPosition, ApplyPropertyDefault<EPosition, &RenderStyle::position, EPosition, &RenderStyle::setPosition, EPosition, &RenderStyle::initialPosition>::createHandler());
1911 setPropertyHandler(CSSPropertyResize, ApplyPropertyResize::createHandler());
1912 setPropertyHandler(CSSPropertyRight, ApplyPropertyLength<&RenderStyle::right, &RenderStyle::setRight, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1913 setPropertyHandler(CSSPropertySize, ApplyPropertyPageSize::createHandler());
1914 setPropertyHandler(CSSPropertySpeak, ApplyPropertyDefault<ESpeak, &RenderStyle::speak, ESpeak, &RenderStyle::setSpeak, ESpeak, &RenderStyle::initialSpeak>::createHandler());
1915 setPropertyHandler(CSSPropertyTableLayout, ApplyPropertyDefault<ETableLayout, &RenderStyle::tableLayout, ETableLayout, &RenderStyle::setTableLayout, ETableLayout, &RenderStyle::initialTableLayout>::createHandler());
1916 setPropertyHandler(CSSPropertyTabSize, ApplyPropertyDefault<unsigned, &RenderStyle::tabSize, unsigned, &RenderStyle::setTabSize, unsigned, &RenderStyle::initialTabSize>::createHandler());
1917 setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler());
1918 setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler());
1919 #if ENABLE(CSS3_TEXT)
1920 setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
1921 setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
1922 setPropertyHandler(CSSPropertyWebkitTextAlignLast, ApplyPropertyDefault<ETextAlignLast, &RenderStyle::textAlignLast, ETextAlignLast, &RenderStyle::setTextAlignLast, ETextAlignLast, &RenderStyle::initialTextAlignLast>::createHandler());
1924 setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler());
1925 setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());
1926 setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont<TextRenderingMode, &FontDescription::textRenderingMode, &FontDescription::setTextRenderingMode, AutoTextRendering>::createHandler());
1927 setPropertyHandler(CSSPropertyTextTransform, ApplyPropertyDefault<ETextTransform, &RenderStyle::textTransform, ETextTransform, &RenderStyle::setTextTransform, ETextTransform, &RenderStyle::initialTextTransform>::createHandler());
1928 setPropertyHandler(CSSPropertyTop, ApplyPropertyLength<&RenderStyle::top, &RenderStyle::setTop, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1929 setPropertyHandler(CSSPropertyUnicodeBidi, ApplyPropertyDefault<EUnicodeBidi, &RenderStyle::unicodeBidi, EUnicodeBidi, &RenderStyle::setUnicodeBidi, EUnicodeBidi, &RenderStyle::initialUnicodeBidi>::createHandler());
1930 setPropertyHandler(CSSPropertyVerticalAlign, ApplyPropertyVerticalAlign::createHandler());
1931 setPropertyHandler(CSSPropertyVisibility, ApplyPropertyDefault<EVisibility, &RenderStyle::visibility, EVisibility, &RenderStyle::setVisibility, EVisibility, &RenderStyle::initialVisibility>::createHandler());
1932 setPropertyHandler(CSSPropertyWebkitAnimationDelay, ApplyPropertyAnimation<double, &Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSToStyleMap::mapAnimationDelay, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1933 setPropertyHandler(CSSPropertyWebkitAnimationDirection, ApplyPropertyAnimation<Animation::AnimationDirection, &Animation::direction, &Animation::setDirection, &Animation::isDirectionSet, &Animation::clearDirection, &Animation::initialAnimationDirection, &CSSToStyleMap::mapAnimationDirection, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1934 setPropertyHandler(CSSPropertyWebkitAnimationDuration, ApplyPropertyAnimation<double, &Animation::duration, &Animation::setDuration, &Animation::isDurationSet, &Animation::clearDuration, &Animation::initialAnimationDuration, &CSSToStyleMap::mapAnimationDuration, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1935 setPropertyHandler(CSSPropertyWebkitAnimationFillMode, ApplyPropertyAnimation<unsigned, &Animation::fillMode, &Animation::setFillMode, &Animation::isFillModeSet, &Animation::clearFillMode, &Animation::initialAnimationFillMode, &CSSToStyleMap::mapAnimationFillMode, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1936 setPropertyHandler(CSSPropertyWebkitAnimationIterationCount, ApplyPropertyAnimation<double, &Animation::iterationCount, &Animation::setIterationCount, &Animation::isIterationCountSet, &Animation::clearIterationCount, &Animation::initialAnimationIterationCount, &CSSToStyleMap::mapAnimationIterationCount, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1937 setPropertyHandler(CSSPropertyWebkitAnimationName, ApplyPropertyAnimation<const String&, &Animation::name, &Animation::setName, &Animation::isNameSet, &Animation::clearName, &Animation::initialAnimationName, &CSSToStyleMap::mapAnimationName, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1938 setPropertyHandler(CSSPropertyWebkitAnimationPlayState, ApplyPropertyAnimation<EAnimPlayState, &Animation::playState, &Animation::setPlayState, &Animation::isPlayStateSet, &Animation::clearPlayState, &Animation::initialAnimationPlayState, &CSSToStyleMap::mapAnimationPlayState, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1939 setPropertyHandler(CSSPropertyWebkitAnimationTimingFunction, ApplyPropertyAnimation<const PassRefPtr<TimingFunction>, &Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSToStyleMap::mapAnimationTimingFunction, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1940 setPropertyHandler(CSSPropertyWebkitAppearance, ApplyPropertyDefault<ControlPart, &RenderStyle::appearance, ControlPart, &RenderStyle::setAppearance, ControlPart, &RenderStyle::initialAppearance>::createHandler());
1941 setPropertyHandler(CSSPropertyWebkitAspectRatio, ApplyPropertyAspectRatio::createHandler());
1942 setPropertyHandler(CSSPropertyWebkitBackfaceVisibility, ApplyPropertyDefault<EBackfaceVisibility, &RenderStyle::backfaceVisibility, EBackfaceVisibility, &RenderStyle::setBackfaceVisibility, EBackfaceVisibility, &RenderStyle::initialBackfaceVisibility>::createHandler());
1943 setPropertyHandler(CSSPropertyWebkitBackgroundClip, CSSPropertyBackgroundClip);
1944 setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitBackgroundComposite, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSToStyleMap::mapFillComposite>::createHandler());
1945 setPropertyHandler(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin);
1946 setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize);
1947 #if ENABLE(CSS_COMPOSITING)
1948 setPropertyHandler(CSSPropertyWebkitBlendMode, ApplyPropertyDefault<BlendMode, &RenderStyle::blendMode, BlendMode, &RenderStyle::setBlendMode, BlendMode, &RenderStyle::initialBlendMode>::createHandler());
1950 setPropertyHandler(CSSPropertyWebkitBorderFit, ApplyPropertyDefault<EBorderFit, &RenderStyle::borderFit, EBorderFit, &RenderStyle::setBorderFit, EBorderFit, &RenderStyle::initialBorderFit>::createHandler());
1951 setPropertyHandler(CSSPropertyWebkitBorderHorizontalSpacing, ApplyPropertyComputeLength<short, &RenderStyle::horizontalBorderSpacing, &RenderStyle::setHorizontalBorderSpacing, &RenderStyle::initialHorizontalBorderSpacing>::createHandler());
1952 setPropertyHandler(CSSPropertyWebkitBorderImage, ApplyPropertyBorderImage<BorderImage, CSSPropertyWebkitBorderImage, &RenderStyle::borderImage, &RenderStyle::setBorderImage>::createHandler());
1953 setPropertyHandler(CSSPropertyWebkitBorderRadius, CSSPropertyBorderRadius);
1954 setPropertyHandler(CSSPropertyWebkitBorderVerticalSpacing, ApplyPropertyComputeLength<short, &RenderStyle::verticalBorderSpacing, &RenderStyle::setVerticalBorderSpacing, &RenderStyle::initialVerticalBorderSpacing>::createHandler());
1955 setPropertyHandler(CSSPropertyWebkitBoxAlign, ApplyPropertyDefault<EBoxAlignment, &RenderStyle::boxAlign, EBoxAlignment, &RenderStyle::setBoxAlign, EBoxAlignment, &RenderStyle::initialBoxAlign>::createHandler());
1956 #if ENABLE(CSS_BOX_DECORATION_BREAK)
1957 setPropertyHandler(CSSPropertyWebkitBoxDecorationBreak, ApplyPropertyDefault<EBoxDecorationBreak, &RenderStyle::boxDecorationBreak, EBoxDecorationBreak, &RenderStyle::setBoxDecorationBreak, EBoxDecorationBreak, &RenderStyle::initialBoxDecorationBreak>::createHandler());
1959 setPropertyHandler(CSSPropertyWebkitBoxDirection, ApplyPropertyDefault<EBoxDirection, &RenderStyle::boxDirection, EBoxDirection, &RenderStyle::setBoxDirection, EBoxDirection, &RenderStyle::initialBoxDirection>::createHandler());
1960 setPropertyHandler(CSSPropertyWebkitBoxFlex, ApplyPropertyDefault<float, &RenderStyle::boxFlex, float, &RenderStyle::setBoxFlex, float, &RenderStyle::initialBoxFlex>::createHandler());
1961 setPropertyHandler(CSSPropertyWebkitBoxFlexGroup, ApplyPropertyDefault<unsigned int, &RenderStyle::boxFlexGroup, unsigned int, &RenderStyle::setBoxFlexGroup, unsigned int, &RenderStyle::initialBoxFlexGroup>::createHandler());
1962 setPropertyHandler(CSSPropertyWebkitBoxLines, ApplyPropertyDefault<EBoxLines, &RenderStyle::boxLines, EBoxLines, &RenderStyle::setBoxLines, EBoxLines, &RenderStyle::initialBoxLines>::createHandler());
1963 setPropertyHandler(CSSPropertyWebkitBoxOrdinalGroup, ApplyPropertyDefault<unsigned int, &RenderStyle::boxOrdinalGroup, unsigned int, &RenderStyle::setBoxOrdinalGroup, unsigned int, &RenderStyle::initialBoxOrdinalGroup>::createHandler());
1964 setPropertyHandler(CSSPropertyWebkitBoxOrient, ApplyPropertyDefault<EBoxOrient, &RenderStyle::boxOrient, EBoxOrient, &RenderStyle::setBoxOrient, EBoxOrient, &RenderStyle::initialBoxOrient>::createHandler());
1965 setPropertyHandler(CSSPropertyWebkitBoxPack, ApplyPropertyDefault<EBoxPack, &RenderStyle::boxPack, EBoxPack, &RenderStyle::setBoxPack, EBoxPack, &RenderStyle::initialBoxPack>::createHandler());
1966 setPropertyHandler(CSSPropertyWebkitColorCorrection, ApplyPropertyDefault<ColorSpace, &RenderStyle::colorSpace, ColorSpace, &RenderStyle::setColorSpace, ColorSpace, &RenderStyle::initialColorSpace>::createHandler());
1967 setPropertyHandler(CSSPropertyWebkitColumnAxis, ApplyPropertyDefault<ColumnAxis, &RenderStyle::columnAxis, ColumnAxis, &RenderStyle::setColumnAxis, ColumnAxis, &RenderStyle::initialColumnAxis>::createHandler());
1968 setPropertyHandler(CSSPropertyWebkitColumnBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakAfter, EPageBreak, &RenderStyle::setColumnBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1969 setPropertyHandler(CSSPropertyWebkitColumnBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakBefore, EPageBreak, &RenderStyle::setColumnBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1970 setPropertyHandler(CSSPropertyWebkitColumnBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakInside, EPageBreak, &RenderStyle::setColumnBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1971 setPropertyHandler(CSSPropertyWebkitColumnCount, ApplyPropertyAuto<unsigned short, &RenderStyle::columnCount, &RenderStyle::setColumnCount, &RenderStyle::hasAutoColumnCount, &RenderStyle::setHasAutoColumnCount>::createHandler());
1972 setPropertyHandler(CSSPropertyWebkitColumnGap, ApplyPropertyAuto<float, &RenderStyle::columnGap, &RenderStyle::setColumnGap, &RenderStyle::hasNormalColumnGap, &RenderStyle::setHasNormalColumnGap, ComputeLength, CSSValueNormal>::createHandler());
1973 setPropertyHandler(CSSPropertyWebkitColumnProgression, ApplyPropertyDefault<ColumnProgression, &RenderStyle::columnProgression, ColumnProgression, &RenderStyle::setColumnProgression, ColumnProgression, &RenderStyle::initialColumnProgression>::createHandler());
1974 setPropertyHandler(CSSPropertyWebkitColumnRuleColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::columnRuleColor, &RenderStyle::setColumnRuleColor, &RenderStyle::setVisitedLinkColumnRuleColor, &RenderStyle::color>::createHandler());
1975 setPropertyHandler(CSSPropertyWebkitColumnRuleWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWidth, &RenderStyle::initialColumnRuleWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1976 setPropertyHandler(CSSPropertyWebkitColumns, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitColumnWidth, CSSPropertyWebkitColumnCount>::createHandler());
1977 setPropertyHandler(CSSPropertyWebkitColumnSpan, ApplyPropertyDefault<ColumnSpan, &RenderStyle::columnSpan, ColumnSpan, &RenderStyle::setColumnSpan, ColumnSpan, &RenderStyle::initialColumnSpan>::createHandler());
1978 setPropertyHandler(CSSPropertyWebkitColumnRuleStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::columnRuleStyle, EBorderStyle, &RenderStyle::setColumnRuleStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1979 setPropertyHandler(CSSPropertyWebkitColumnWidth, ApplyPropertyAuto<float, &RenderStyle::columnWidth, &RenderStyle::setColumnWidth, &RenderStyle::hasAutoColumnWidth, &RenderStyle::setHasAutoColumnWidth, ComputeLength>::createHandler());
1980 setPropertyHandler(CSSPropertyWebkitAlignContent, ApplyPropertyDefault<EAlignContent, &RenderStyle::alignContent, EAlignContent, &RenderStyle::setAlignContent, EAlignContent, &RenderStyle::initialAlignContent>::createHandler());
1981 setPropertyHandler(CSSPropertyWebkitAlignItems, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignItems, EAlignItems, &RenderStyle::setAlignItems, EAlignItems, &RenderStyle::initialAlignItems>::createHandler());
1982 setPropertyHandler(CSSPropertyWebkitAlignSelf, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignSelf, EAlignItems, &RenderStyle::setAlignSelf, EAlignItems, &RenderStyle::initialAlignSelf>::createHandler());
1983 setPropertyHandler(CSSPropertyWebkitFlex, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitFlexGrow, CSSPropertyWebkitFlexShrink, CSSPropertyWebkitFlexBasis>::createHandler());
1984 setPropertyHandler(CSSPropertyWebkitFlexBasis, ApplyPropertyLength<&RenderStyle::flexBasis, &RenderStyle::setFlexBasis, &RenderStyle::initialFlexBasis, AutoEnabled>::createHandler());
1985 setPropertyHandler(CSSPropertyWebkitFlexDirection, ApplyPropertyDefault<EFlexDirection, &RenderStyle::flexDirection, EFlexDirection, &RenderStyle::setFlexDirection, EFlexDirection, &RenderStyle::initialFlexDirection>::createHandler());
1986 setPropertyHandler(CSSPropertyWebkitFlexFlow, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitFlexDirection, CSSPropertyWebkitFlexWrap>::createHandler());
1987 setPropertyHandler(CSSPropertyWebkitFlexGrow, ApplyPropertyDefault<float, &RenderStyle::flexGrow, float, &RenderStyle::setFlexGrow, float, &RenderStyle::initialFlexGrow>::createHandler());
1988 setPropertyHandler(CSSPropertyWebkitFlexShrink, ApplyPropertyDefault<float, &RenderStyle::flexShrink, float, &RenderStyle::setFlexShrink, float, &RenderStyle::initialFlexShrink>::createHandler());
1989 setPropertyHandler(CSSPropertyWebkitFlexWrap, ApplyPropertyDefault<EFlexWrap, &RenderStyle::flexWrap, EFlexWrap, &RenderStyle::setFlexWrap, EFlexWrap, &RenderStyle::initialFlexWrap>::createHandler());
1990 setPropertyHandler(CSSPropertyWebkitJustifyContent, ApplyPropertyDefault<EJustifyContent, &RenderStyle::justifyContent, EJustifyContent, &RenderStyle::setJustifyContent, EJustifyContent, &RenderStyle::initialJustifyContent>::createHandler());
1991 setPropertyHandler(CSSPropertyWebkitOrder, ApplyPropertyDefault<int, &RenderStyle::order, int, &RenderStyle::setOrder, int, &RenderStyle::initialOrder>::createHandler());
1992 #if ENABLE(CSS_REGIONS)
1993 setPropertyHandler(CSSPropertyWebkitFlowFrom, ApplyPropertyString<MapNoneToNull, &RenderStyle::regionThread, &RenderStyle::setRegionThread, &RenderStyle::initialRegionThread>::createHandler());
1994 setPropertyHandler(CSSPropertyWebkitFlowInto, ApplyPropertyString<MapNoneToNull, &RenderStyle::flowThread, &RenderStyle::setFlowThread, &RenderStyle::initialFlowThread>::createHandler());
1996 setPropertyHandler(CSSPropertyWebkitFontKerning, ApplyPropertyFont<FontDescription::Kerning, &FontDescription::kerning, &FontDescription::setKerning, FontDescription::AutoKerning>::createHandler());
1997 setPropertyHandler(CSSPropertyWebkitFontSmoothing, ApplyPropertyFont<FontSmoothingMode, &FontDescription::fontSmoothing, &FontDescription::setFontSmoothing, AutoSmoothing>::createHandler());
1998 setPropertyHandler(CSSPropertyWebkitFontVariantLigatures, ApplyPropertyFontVariantLigatures::createHandler());
1999 setPropertyHandler(CSSPropertyWebkitHighlight, ApplyPropertyString<MapNoneToNull, &RenderStyle::highlight, &RenderStyle::setHighlight, &RenderStyle::initialHighlight>::createHandler());
2000 setPropertyHandler(CSSPropertyWebkitHyphenateCharacter, ApplyPropertyString<MapAutoToNull, &RenderStyle::hyphenationString, &RenderStyle::setHyphenationString, &RenderStyle::initialHyphenationString>::createHandler());
2001 setPropertyHandler(CSSPropertyWebkitHyphenateLimitAfter, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitAfter, &RenderStyle::setHyphenationLimitAfter, &RenderStyle::initialHyphenationLimitAfter>::createHandler());
2002 setPropertyHandler(CSSPropertyWebkitHyphenateLimitBefore, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitBefore, &RenderStyle::setHyphenationLimitBefore, &RenderStyle::initialHyphenationLimitBefore>::createHandler());
2003 setPropertyHandler(CSSPropertyWebkitHyphenateLimitLines, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitLines, &RenderStyle::setHyphenationLimitLines, &RenderStyle::initialHyphenationLimitLines, CSSValueNoLimit>::createHandler());
2004 setPropertyHandler(CSSPropertyWebkitHyphens, ApplyPropertyDefault<Hyphens, &RenderStyle::hyphens, Hyphens, &RenderStyle::setHyphens, Hyphens, &RenderStyle::initialHyphens>::createHandler());
2005 setPropertyHandler(CSSPropertyWebkitLineAlign, ApplyPropertyDefault<LineAlign, &RenderStyle::lineAlign, LineAlign, &RenderStyle::setLineAlign, LineAlign, &RenderStyle::initialLineAlign>::createHandler());
2006 setPropertyHandler(CSSPropertyWebkitLineBreak, ApplyPropertyDefault<LineBreak, &RenderStyle::lineBreak, LineBreak, &RenderStyle::setLineBreak, LineBreak, &RenderStyle::initialLineBreak>::createHandler());
2007 setPropertyHandler(CSSPropertyWebkitLineClamp, ApplyPropertyDefault<const LineClampValue&, &RenderStyle::lineClamp, LineClampValue, &RenderStyle::setLineClamp, LineClampValue, &RenderStyle::initialLineClamp>::createHandler());
2008 setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString<MapNoneToNull, &RenderStyle::lineGrid, &RenderStyle::setLineGrid, &RenderStyle::initialLineGrid>::createHandler());
2009 setPropertyHandler(CSSPropertyWebkitLineSnap, ApplyPropertyDefault<LineSnap, &RenderStyle::lineSnap, LineSnap, &RenderStyle::setLineSnap, LineSnap, &RenderStyle::initialLineSnap>::createHandler());
2010 setPropertyHandler(CSSPropertyWebkitMarginAfterCollapse, ApplyPropertyDefault<EMarginCollapse, &RenderStyle::marginAfterCollapse, EMarginCollapse, &RenderStyle::setMarginAfterCollapse, EMarginCollapse, &RenderStyle::initialMarginAfterCollapse>::createHandler());
2011 setPropertyHandler(CSSPropertyWebkitMarginBeforeCollapse, ApplyPropertyDefault<EMarginCollapse, &RenderStyle::marginBeforeCollapse, EMarginCollapse, &RenderStyle::setMarginBeforeCollapse, EMarginCollapse, &RenderStyle::initialMarginBeforeCollapse>::createHandler());
2012 setPropertyHandler(CSSPropertyWebkitMarginBottomCollapse, CSSPropertyWebkitMarginAfterCollapse);
2013 setPropertyHandler(CSSPropertyWebkitMarginCollapse, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse>::createHandler());
2014 setPropertyHandler(CSSPropertyWebkitMarginTopCollapse, CSSPropertyWebkitMarginBeforeCollapse);
2015 setPropertyHandler(CSSPropertyWebkitMarqueeDirection, ApplyPropertyDefault<EMarqueeDirection, &RenderStyle::marqueeDirection, EMarqueeDirection, &RenderStyle::setMarqueeDirection, EMarqueeDirection, &RenderStyle::initialMarqueeDirection>::createHandler());
2016 setPropertyHandler(CSSPropertyWebkitMarqueeStyle, ApplyPropertyDefault<EMarqueeBehavior, &RenderStyle::marqueeBehavior, EMarqueeBehavior, &RenderStyle::setMarqueeBehavior, EMarqueeBehavior, &RenderStyle::initialMarqueeBehavior>::createHandler());
2017 setPropertyHandler(CSSPropertyWebkitMaskAttachment, ApplyPropertyFillLayer<EFillAttachment, CSSPropertyWebkitMaskAttachment, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isAttachmentSet, &FillLayer::attachment, &FillLayer::setAttachment, &FillLayer::clearAttachment, &FillLayer::initialFillAttachment, &CSSToStyleMap::mapFillAttachment>::createHandler());
2018 setPropertyHandler(CSSPropertyWebkitMaskBoxImage, ApplyPropertyBorderImage<BorderMask, CSSPropertyWebkitMaskBoxImage, &RenderStyle::maskBoxImage, &RenderStyle::setMaskBoxImage>::createHandler());
2019 setPropertyHandler(CSSPropertyWebkitMaskBoxImageOutset, ApplyPropertyBorderImageModifier<BorderMask, Outset>::createHandler());
2020 setPropertyHandler(CSSPropertyWebkitMaskBoxImageRepeat, ApplyPropertyBorderImageModifier<BorderMask, Repeat>::createHandler());
2021 setPropertyHandler(CSSPropertyWebkitMaskBoxImageSlice, ApplyPropertyBorderImageModifier<BorderMask, Slice>::createHandler());
2022 setPropertyHandler(CSSPropertyWebkitMaskBoxImageSource, ApplyPropertyBorderImageSource<CSSPropertyWebkitMaskBoxImageSource, &RenderStyle::maskBoxImageSource, &RenderStyle::setMaskBoxImageSource, &RenderStyle::initialMaskBoxImageSource>::createHandler());
2023 setPropertyHandler(CSSPropertyWebkitMaskBoxImageWidth, ApplyPropertyBorderImageModifier<BorderMask, Width>::createHandler());
2024 setPropertyHandler(CSSPropertyWebkitMaskClip, ApplyPropertyFillLayer<EFillBox, CSSPropertyWebkitMaskClip, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSToStyleMap::mapFillClip>::createHandler());
2025 setPropertyHandler(CSSPropertyWebkitMaskComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitMaskComposite, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSToStyleMap::mapFillComposite>::createHandler());
2026 setPropertyHandler(CSSPropertyWebkitMaskImage, ApplyPropertyFillLayer<StyleImage*, CSSPropertyWebkitMaskImage, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSToStyleMap::mapFillImage>::createHandler());
2027 setPropertyHandler(CSSPropertyWebkitMaskOrigin, ApplyPropertyFillLayer<EFillBox, CSSPropertyWebkitMaskOrigin, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSToStyleMap::mapFillOrigin>::createHandler());
2028 setPropertyHandler(CSSPropertyWebkitMaskPosition, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitMaskPositionX, CSSPropertyWebkitMaskPositionY>::createHandler());
2029 setPropertyHandler(CSSPropertyWebkitMaskPositionX, ApplyPropertyFillLayer<Length, CSSPropertyWebkitMaskPositionX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isXPositionSet, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::clearXPosition, &FillLayer::initialFillXPosition, &CSSToStyleMap::mapFillXPosition>::createHandler());
2030 setPropertyHandler(CSSPropertyWebkitMaskPositionY, ApplyPropertyFillLayer<Length, CSSPropertyWebkitMaskPositionY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isYPositionSet, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::clearYPosition, &FillLayer::initialFillYPosition, &CSSToStyleMap::mapFillYPosition>::createHandler());
2031 setPropertyHandler(CSSPropertyWebkitMaskRepeat, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY>::createHandler());
2032 setPropertyHandler(CSSPropertyWebkitMaskRepeatX, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSToStyleMap::mapFillRepeatX>::createHandler());
2033 setPropertyHandler(CSSPropertyWebkitMaskRepeatY, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSToStyleMap::mapFillRepeatY>::createHandler());
2034 setPropertyHandler(CSSPropertyWebkitMaskSize, ApplyPropertyFillLayer<FillSize, CSSPropertyWebkitMaskSize, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSToStyleMap::mapFillSize>::createHandler());
2035 setPropertyHandler(CSSPropertyWebkitNbspMode, ApplyPropertyDefault<ENBSPMode, &RenderStyle::nbspMode, ENBSPMode, &RenderStyle::setNBSPMode, ENBSPMode, &RenderStyle::initialNBSPMode>::createHandler());
2036 setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitPerspectiveOriginX, CSSPropertyWebkitPerspectiveOriginY>::createHandler());
2037 setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, ApplyPropertyLength<&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX>::createHandler());
2038 setPropertyHandler(CSSPropertyWebkitPerspectiveOriginY, ApplyPropertyLength<&RenderStyle::perspectiveOriginY, &RenderStyle::setPerspectiveOriginY, &RenderStyle::initialPerspectiveOriginY>::createHandler());
2039 setPropertyHandler(CSSPropertyWebkitPrintColorAdjust, ApplyPropertyDefault<PrintColorAdjust, &RenderStyle::printColorAdjust, PrintColorAdjust, &RenderStyle::setPrintColorAdjust, PrintColorAdjust, &RenderStyle::initialPrintColorAdjust>::createHandler());
2040 #if ENABLE(CSS_REGIONS)
2041 setPropertyHandler(CSSPropertyWebkitRegionBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakAfter, EPageBreak, &RenderStyle::setRegionBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
2042 setPropertyHandler(CSSPropertyWebkitRegionBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakBefore, EPageBreak, &RenderStyle::setRegionBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
2043 setPropertyHandler(CSSPropertyWebkitRegionBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakInside, EPageBreak, &RenderStyle::setRegionBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
2044 setPropertyHandler(CSSPropertyWebkitRegionOverflow, ApplyPropertyDefault<RegionOverflow, &RenderStyle::regionOverflow, RegionOverflow, &RenderStyle::setRegionOverflow, RegionOverflow, &RenderStyle::initialRegionOverflow>::createHandler());
2046 setPropertyHandler(CSSPropertyWebkitRtlOrdering, ApplyPropertyDefault<Order, &RenderStyle::rtlOrdering, Order, &RenderStyle::setRTLOrdering, Order, &RenderStyle::initialRTLOrdering>::createHandler());
2047 setPropertyHandler(CSSPropertyWebkitTextCombine, ApplyPropertyDefault<TextCombine, &RenderStyle::textCombine, TextCombine, &RenderStyle::setTextCombine, TextCombine, &RenderStyle::initialTextCombine>::createHandler());
2048 setPropertyHandler(CSSPropertyWebkitTextEmphasisColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textEmphasisColor, &RenderStyle::setTextEmphasisColor, &RenderStyle::setVisitedLinkTextEmphasisColor, &RenderStyle::color>::createHandler());
2049 setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, ApplyPropertyDefault<TextEmphasisPosition, &RenderStyle::textEmphasisPosition, TextEmphasisPosition, &RenderStyle::setTextEmphasisPosition, TextEmphasisPosition, &RenderStyle::initialTextEmphasisPosition>::createHandler());
2050 setPropertyHandler(CSSPropertyWebkitTextEmphasisStyle, ApplyPropertyTextEmphasisStyle::createHandler());
2051 setPropertyHandler(CSSPropertyWebkitTextFillColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textFillColor, &RenderStyle::setTextFillColor, &RenderStyle::setVisitedLinkTextFillColor, &RenderStyle::color>::createHandler());
2052 setPropertyHandler(CSSPropertyWebkitTextOrientation, ApplyPropertyFont<TextOrientation, &FontDescription::textOrientation, &FontDescription::setTextOrientation, TextOrientationVerticalRight>::createHandler());
2053 setPropertyHandler(CSSPropertyWebkitTextSecurity, ApplyPropertyDefault<ETextSecurity, &RenderStyle::textSecurity, ETextSecurity, &RenderStyle::setTextSecurity, ETextSecurity, &RenderStyle::initialTextSecurity>::createHandler());
2054 setPropertyHandler(CSSPropertyWebkitTextStrokeColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textStrokeColor, &RenderStyle::setTextStrokeColor, &RenderStyle::setVisitedLinkTextStrokeColor, &RenderStyle::color>::createHandler());
2055 setPropertyHandler(CSSPropertyWebkitTransformOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitTransformOriginX, CSSPropertyWebkitTransformOriginY, CSSPropertyWebkitTransformOriginZ>::createHandler());
2056 setPropertyHandler(CSSPropertyWebkitTransformOriginX, ApplyPropertyLength<&RenderStyle::transformOriginX, &RenderStyle::setTransformOriginX, &RenderStyle::initialTransformOriginX>::createHandler());
2057 setPropertyHandler(CSSPropertyWebkitTransformOriginY, ApplyPropertyLength<&RenderStyle::transformOriginY, &RenderStyle::setTransformOriginY, &RenderStyle::initialTransformOriginY>::createHandler());
2058 setPropertyHandler(CSSPropertyWebkitTransformOriginZ, ApplyPropertyComputeLength<float, &RenderStyle::transformOriginZ, &RenderStyle::setTransformOriginZ, &RenderStyle::initialTransformOriginZ>::createHandler());
2059 setPropertyHandler(CSSPropertyWebkitTransformStyle, ApplyPropertyDefault<ETransformStyle3D, &RenderStyle::transformStyle3D, ETransformStyle3D, &RenderStyle::setTransformStyle3D, ETransformStyle3D, &RenderStyle::initialTransformStyle3D>::createHandler());
2060 setPropertyHandler(CSSPropertyWebkitTransitionDelay, ApplyPropertyAnimation<double, &Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSToStyleMap::mapAnimationDelay, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler());
2061 setPropertyHandler(CSSPropertyWebkitTransitionDuration, ApplyPropertyAnimation<double, &Animation::duration, &Animation::setDuration, &Animation::isDurationSet, &Animation::clearDuration, &Animation::initialAnimationDuration, &CSSToStyleMap::mapAnimationDuration, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler());
2062 setPropertyHandler(CSSPropertyWebkitTransitionProperty, ApplyPropertyAnimation<CSSPropertyID, &Animation::property, &Animation::setProperty, &Animation::isPropertySet, &Animation::clearProperty, &Animation::initialAnimationProperty, &CSSToStyleMap::mapAnimationProperty, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler());
2063 setPropertyHandler(CSSPropertyWebkitTransitionTimingFunction, ApplyPropertyAnimation<const PassRefPtr<TimingFunction>, &Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSToStyleMap::mapAnimationTimingFunction, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler());
2064 setPropertyHandler(CSSPropertyWebkitUserDrag, ApplyPropertyDefault<EUserDrag, &RenderStyle::userDrag, EUserDrag, &RenderStyle::setUserDrag, EUserDrag, &RenderStyle::initialUserDrag>::createHandler());
2065 setPropertyHandler(CSSPropertyWebkitUserModify, ApplyPropertyDefault<EUserModify, &RenderStyle::userModify, EUserModify, &RenderStyle::setUserModify, EUserModify, &RenderStyle::initialUserModify>::createHandler());
2066 setPropertyHandler(CSSPropertyWebkitUserSelect, ApplyPropertyDefault<EUserSelect, &RenderStyle::userSelect, EUserSelect, &RenderStyle::setUserSelect, EUserSelect, &RenderStyle::initialUserSelect>::createHandler());
2067 setPropertyHandler(CSSPropertyWebkitClipPath, ApplyPropertyClipPath<&RenderStyle::clipPath, &RenderStyle::setClipPath, &RenderStyle::initialClipPath>::createHandler());
2069 #if ENABLE(CSS_EXCLUSIONS)
2070 setPropertyHandler(CSSPropertyWebkitWrap, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitWrapFlow, CSSPropertyWebkitShapeMargin, CSSPropertyWebkitShapePadding>::createHandler());
2071 setPropertyHandler(CSSPropertyWebkitWrapFlow, ApplyPropertyDefault<WrapFlow, &RenderStyle::wrapFlow, WrapFlow, &RenderStyle::setWrapFlow, WrapFlow, &RenderStyle::initialWrapFlow>::createHandler());
2072 setPropertyHandler(CSSPropertyWebkitShapeMargin, ApplyPropertyLength<&RenderStyle::shapeMargin, &RenderStyle::setShapeMargin, &RenderStyle::initialShapeMargin>::createHandler());
2073 setPropertyHandler(CSSPropertyWebkitShapePadding, ApplyPropertyLength<&RenderStyle::shapePadding, &RenderStyle::setShapePadding, &RenderStyle::initialShapePadding>::createHandler());
2074 setPropertyHandler(CSSPropertyWebkitWrapThrough, ApplyPropertyDefault<WrapThrough, &RenderStyle::wrapThrough, WrapThrough, &RenderStyle::setWrapThrough, WrapThrough, &RenderStyle::initialWrapThrough>::createHandler());
2075 setPropertyHandler(CSSPropertyWebkitShapeInside, ApplyPropertyExclusionShape<&RenderStyle::shapeInside, &RenderStyle::setShapeInside, &RenderStyle::initialShapeInside>::createHandler());
2076 setPropertyHandler(CSSPropertyWebkitShapeOutside, ApplyPropertyExclusionShape<&RenderStyle::shapeOutside, &RenderStyle::setShapeOutside, &RenderStyle::initialShapeOutside>::createHandler());
2078 setPropertyHandler(CSSPropertyWhiteSpace, ApplyPropertyDefault<EWhiteSpace, &RenderStyle::whiteSpace, EWhiteSpace, &RenderStyle::setWhiteSpace, EWhiteSpace, &RenderStyle::initialWhiteSpace>::createHandler());
2079 setPropertyHandler(CSSPropertyWidows, ApplyPropertyDefault<short, &RenderStyle::widows, short, &RenderStyle::setWidows, short, &RenderStyle::initialWidows>::createHandler());
2080 setPropertyHandler(CSSPropertyWidth, ApplyPropertyLength<&RenderStyle::width, &RenderStyle::setWidth, &RenderStyle::initialSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicEnabled, NoneDisabled, UndefinedDisabled>::createHandler());
2081 setPropertyHandler(CSSPropertyWordBreak, ApplyPropertyDefault<EWordBreak, &RenderStyle::wordBreak, EWordBreak, &RenderStyle::setWordBreak, EWordBreak, &RenderStyle::initialWordBreak>::createHandler());
2082 setPropertyHandler(CSSPropertyWordSpacing, ApplyPropertyComputeLength<int, &RenderStyle::wordSpacing, &RenderStyle::setWordSpacing, &RenderStyle::initialLetterWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler());
2083 // UAs must treat 'word-wrap' as an alternate name for the 'overflow-wrap' property. So using the same handlers.
2084 setPropertyHandler(CSSPropertyWordWrap, ApplyPropertyDefault<EOverflowWrap, &RenderStyle::overflowWrap, EOverflowWrap, &RenderStyle::setOverflowWrap, EOverflowWrap, &RenderStyle::initialOverflowWrap>::createHandler());
2085 setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::zIndex, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHasAutoZIndex>::createHandler());
2086 setPropertyHandler(CSSPropertyZoom, ApplyPropertyZoom::createHandler());