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 "CSSAspectRatioValue.h"
29 #include "CSSCalculationValue.h"
30 #include "CSSCursorImageValue.h"
31 #include "CSSPrimitiveValueMappings.h"
32 #include "CSSToStyleMap.h"
33 #include "CSSValueList.h"
34 #include "CursorList.h"
39 #include "RenderObject.h"
40 #include "RenderStyle.h"
41 #include "RenderView.h"
43 #include "StyleResolver.h"
44 #include <wtf/StdLibExtras.h>
45 #include <wtf/UnusedParam.h>
47 #if ENABLE(CSS_EXCLUSIONS)
48 #include "BasicShapeFunctions.h"
49 #include "BasicShapes.h"
50 #include "CSSBasicShapes.h"
57 enum ExpandValueBehavior {SuppressValue = 0, ExpandValue};
58 template <ExpandValueBehavior expandValue, CSSPropertyID one = CSSPropertyInvalid, CSSPropertyID two = CSSPropertyInvalid, CSSPropertyID three = CSSPropertyInvalid, CSSPropertyID four = CSSPropertyInvalid, CSSPropertyID five = CSSPropertyInvalid>
59 class ApplyPropertyExpanding {
62 template <CSSPropertyID id>
63 static inline void applyInheritValue(StyleResolver* styleResolver)
65 if (id == CSSPropertyInvalid)
68 const StyleBuilder& table = StyleBuilder::sharedStyleBuilder();
69 const PropertyHandler& handler = table.propertyHandler(id);
70 if (handler.isValid())
71 handler.applyInheritValue(styleResolver);
74 static void applyInheritValue(StyleResolver* styleResolver)
76 applyInheritValue<one>(styleResolver);
77 applyInheritValue<two>(styleResolver);
78 applyInheritValue<three>(styleResolver);
79 applyInheritValue<four>(styleResolver);
80 applyInheritValue<five>(styleResolver);
83 template <CSSPropertyID id>
84 static inline void applyInitialValue(StyleResolver* styleResolver)
86 if (id == CSSPropertyInvalid)
89 const StyleBuilder& table = StyleBuilder::sharedStyleBuilder();
90 const PropertyHandler& handler = table.propertyHandler(id);
91 if (handler.isValid())
92 handler.applyInitialValue(styleResolver);
95 static void applyInitialValue(StyleResolver* styleResolver)
97 applyInitialValue<one>(styleResolver);
98 applyInitialValue<two>(styleResolver);
99 applyInitialValue<three>(styleResolver);
100 applyInitialValue<four>(styleResolver);
101 applyInitialValue<five>(styleResolver);
104 template <CSSPropertyID id>
105 static inline void applyValue(StyleResolver* styleResolver, CSSValue* value)
107 if (id == CSSPropertyInvalid)
110 const StyleBuilder& table = StyleBuilder::sharedStyleBuilder();
111 const PropertyHandler& handler = table.propertyHandler(id);
112 if (handler.isValid())
113 handler.applyValue(styleResolver, value);
116 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
121 applyValue<one>(styleResolver, value);
122 applyValue<two>(styleResolver, value);
123 applyValue<three>(styleResolver, value);
124 applyValue<four>(styleResolver, value);
125 applyValue<five>(styleResolver, value);
127 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
130 template <typename GetterType, GetterType (RenderStyle::*getterFunction)() const, typename SetterType, void (RenderStyle::*setterFunction)(SetterType), typename InitialType, InitialType (*initialFunction)()>
131 class ApplyPropertyDefaultBase {
133 static void setValue(RenderStyle* style, SetterType value) { (style->*setterFunction)(value); }
134 static GetterType value(RenderStyle* style) { return (style->*getterFunction)(); }
135 static InitialType initial() { return (*initialFunction)(); }
136 static void applyInheritValue(StyleResolver* styleResolver) { setValue(styleResolver->style(), value(styleResolver->parentStyle())); }
137 static void applyInitialValue(StyleResolver* styleResolver) { setValue(styleResolver->style(), initial()); }
138 static void applyValue(StyleResolver*, CSSValue*) { }
139 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
142 template <typename GetterType, GetterType (RenderStyle::*getterFunction)() const, typename SetterType, void (RenderStyle::*setterFunction)(SetterType), typename InitialType, InitialType (*initialFunction)()>
143 class ApplyPropertyDefault {
145 static void setValue(RenderStyle* style, SetterType value) { (style->*setterFunction)(value); }
146 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
148 if (value->isPrimitiveValue())
149 setValue(styleResolver->style(), *static_cast<CSSPrimitiveValue*>(value));
151 static PropertyHandler createHandler()
153 PropertyHandler handler = ApplyPropertyDefaultBase<GetterType, getterFunction, SetterType, setterFunction, InitialType, initialFunction>::createHandler();
154 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
158 template <typename NumberType, NumberType (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(NumberType), NumberType (*initialFunction)(), int idMapsToMinusOne = CSSValueAuto>
159 class ApplyPropertyNumber {
161 static void setValue(RenderStyle* style, NumberType value) { (style->*setterFunction)(value); }
162 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
164 if (!value->isPrimitiveValue())
167 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
168 if (primitiveValue->getIdent() == idMapsToMinusOne)
169 setValue(styleResolver->style(), -1);
171 setValue(styleResolver->style(), primitiveValue->getValue<NumberType>(CSSPrimitiveValue::CSS_NUMBER));
173 static PropertyHandler createHandler()
175 PropertyHandler handler = ApplyPropertyDefaultBase<NumberType, getterFunction, NumberType, setterFunction, NumberType, initialFunction>::createHandler();
176 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
180 template <StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<StyleImage>), StyleImage* (*initialFunction)(), CSSPropertyID property>
181 class ApplyPropertyStyleImage {
183 static void applyValue(StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(property, value)); }
184 static PropertyHandler createHandler()
186 PropertyHandler handler = ApplyPropertyDefaultBase<StyleImage*, getterFunction, PassRefPtr<StyleImage>, setterFunction, StyleImage*, initialFunction>::createHandler();
187 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
191 enum AutoValueType {Number = 0, ComputeLength};
192 template <typename T, T (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(T), bool (RenderStyle::*hasAutoFunction)() const, void (RenderStyle::*setAutoFunction)(), AutoValueType valueType = Number, int autoIdentity = CSSValueAuto>
193 class ApplyPropertyAuto {
195 static void setValue(RenderStyle* style, T value) { (style->*setterFunction)(value); }
196 static T value(RenderStyle* style) { return (style->*getterFunction)(); }
197 static bool hasAuto(RenderStyle* style) { return (style->*hasAutoFunction)(); }
198 static void setAuto(RenderStyle* style) { (style->*setAutoFunction)(); }
200 static void applyInheritValue(StyleResolver* styleResolver)
202 if (hasAuto(styleResolver->parentStyle()))
203 setAuto(styleResolver->style());
205 setValue(styleResolver->style(), value(styleResolver->parentStyle()));
208 static void applyInitialValue(StyleResolver* styleResolver) { setAuto(styleResolver->style()); }
210 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
212 if (!value->isPrimitiveValue())
215 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
216 if (primitiveValue->getIdent() == autoIdentity)
217 setAuto(styleResolver->style());
218 else if (valueType == Number)
219 setValue(styleResolver->style(), *primitiveValue);
220 else if (valueType == ComputeLength)
221 setValue(styleResolver->style(), primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom()));
224 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
227 class ApplyPropertyClip {
229 static Length convertToLength(StyleResolver* styleResolver, CSSPrimitiveValue* value)
231 return value->convertToLength<FixedIntegerConversion | PercentConversion | FractionConversion | AutoConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
234 static void applyInheritValue(StyleResolver* styleResolver)
236 RenderStyle* parentStyle = styleResolver->parentStyle();
237 if (!parentStyle->hasClip())
238 return applyInitialValue(styleResolver);
239 styleResolver->style()->setClip(parentStyle->clipTop(), parentStyle->clipRight(), parentStyle->clipBottom(), parentStyle->clipLeft());
240 styleResolver->style()->setHasClip(true);
243 static void applyInitialValue(StyleResolver* styleResolver)
245 styleResolver->style()->setClip(Length(), Length(), Length(), Length());
246 styleResolver->style()->setHasClip(false);
249 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
251 if (!value->isPrimitiveValue())
254 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
256 if (Rect* rect = primitiveValue->getRectValue()) {
257 Length top = convertToLength(styleResolver, rect->top());
258 Length right = convertToLength(styleResolver, rect->right());
259 Length bottom = convertToLength(styleResolver, rect->bottom());
260 Length left = convertToLength(styleResolver, rect->left());
261 styleResolver->style()->setClip(top, right, bottom, left);
262 styleResolver->style()->setHasClip(true);
263 } else if (primitiveValue->getIdent() == CSSValueAuto) {
264 styleResolver->style()->setClip(Length(), Length(), Length(), Length());
265 styleResolver->style()->setHasClip(false);
269 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
272 enum ColorInherit {NoInheritFromParent = 0, InheritFromParent};
273 Color defaultInitialColor();
274 Color defaultInitialColor() { return Color(); }
275 template <ColorInherit inheritColorFromParent,
276 Color (RenderStyle::*getterFunction)() const,
277 void (RenderStyle::*setterFunction)(const Color&),
278 void (RenderStyle::*visitedLinkSetterFunction)(const Color&),
279 Color (RenderStyle::*defaultFunction)() const,
280 Color (*initialFunction)() = &defaultInitialColor>
281 class ApplyPropertyColor {
283 static void applyInheritValue(StyleResolver* styleResolver)
285 // Visited link style can never explicitly inherit from parent visited link style so no separate getters are needed.
286 Color color = (styleResolver->parentStyle()->*getterFunction)();
287 applyColorValue(styleResolver, color.isValid() ? color : (styleResolver->parentStyle()->*defaultFunction)());
290 static void applyInitialValue(StyleResolver* styleResolver)
292 applyColorValue(styleResolver, initialFunction());
295 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
297 if (!value->isPrimitiveValue())
300 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
301 if (inheritColorFromParent && primitiveValue->getIdent() == CSSValueCurrentcolor)
302 applyInheritValue(styleResolver);
304 if (styleResolver->applyPropertyToRegularStyle())
305 (styleResolver->style()->*setterFunction)(styleResolver->colorFromPrimitiveValue(primitiveValue));
306 if (styleResolver->applyPropertyToVisitedLinkStyle())
307 (styleResolver->style()->*visitedLinkSetterFunction)(styleResolver->colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true));
311 static void applyColorValue(StyleResolver* styleResolver, const Color& color)
313 if (styleResolver->applyPropertyToRegularStyle())
314 (styleResolver->style()->*setterFunction)(color);
315 if (styleResolver->applyPropertyToVisitedLinkStyle())
316 (styleResolver->style()->*visitedLinkSetterFunction)(color);
319 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
322 template <TextDirection (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(TextDirection), TextDirection (*initialFunction)()>
323 class ApplyPropertyDirection {
325 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
327 ApplyPropertyDefault<TextDirection, getterFunction, TextDirection, setterFunction, TextDirection, initialFunction>::applyValue(styleResolver, value);
328 Element* element = styleResolver->element();
329 if (element && styleResolver->element() == element->document()->documentElement())
330 element->document()->setDirectionSetOnDocumentElement(true);
333 static PropertyHandler createHandler()
335 PropertyHandler handler = ApplyPropertyDefault<TextDirection, getterFunction, TextDirection, setterFunction, TextDirection, initialFunction>::createHandler();
336 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
340 enum LengthAuto { AutoDisabled = 0, AutoEnabled };
341 enum LengthLegacyIntrinsic { LegacyIntrinsicDisabled = 0, LegacyIntrinsicEnabled };
342 enum LengthIntrinsic { IntrinsicDisabled = 0, IntrinsicEnabled };
343 enum LengthNone { NoneDisabled = 0, NoneEnabled };
344 enum LengthUndefined { UndefinedDisabled = 0, UndefinedEnabled };
345 template <Length (RenderStyle::*getterFunction)() const,
346 void (RenderStyle::*setterFunction)(Length),
347 Length (*initialFunction)(),
348 LengthAuto autoEnabled = AutoDisabled,
349 LengthLegacyIntrinsic legacyIntrinsicEnabled = LegacyIntrinsicDisabled,
350 LengthIntrinsic intrinsicEnabled = IntrinsicDisabled,
351 LengthNone noneEnabled = NoneDisabled,
352 LengthUndefined noneUndefined = UndefinedDisabled>
353 class ApplyPropertyLength {
355 static void setValue(RenderStyle* style, Length value) { (style->*setterFunction)(value); }
356 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
358 if (!value->isPrimitiveValue())
361 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
362 if (noneEnabled && primitiveValue->getIdent() == CSSValueNone) {
364 setValue(styleResolver->style(), Length(Undefined));
366 setValue(styleResolver->style(), Length());
368 if (legacyIntrinsicEnabled) {
369 if (primitiveValue->getIdent() == CSSValueIntrinsic)
370 setValue(styleResolver->style(), Length(Intrinsic));
371 else if (primitiveValue->getIdent() == CSSValueMinIntrinsic)
372 setValue(styleResolver->style(), Length(MinIntrinsic));
374 if (intrinsicEnabled) {
375 if (primitiveValue->getIdent() == CSSValueWebkitMinContent)
376 setValue(styleResolver->style(), Length(MinContent));
377 else if (primitiveValue->getIdent() == CSSValueWebkitMaxContent)
378 setValue(styleResolver->style(), Length(MaxContent));
379 else if (primitiveValue->getIdent() == CSSValueWebkitFillAvailable)
380 setValue(styleResolver->style(), Length(FillAvailable));
381 else if (primitiveValue->getIdent() == CSSValueWebkitFitContent)
382 setValue(styleResolver->style(), Length(FitContent));
385 if (autoEnabled && primitiveValue->getIdent() == CSSValueAuto)
386 setValue(styleResolver->style(), Length());
387 else if (primitiveValue->isLength()) {
388 Length length = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
389 length.setQuirk(primitiveValue->isQuirkValue());
390 setValue(styleResolver->style(), length);
391 } else if (primitiveValue->isPercentage())
392 setValue(styleResolver->style(), Length(primitiveValue->getDoubleValue(), Percent));
393 else if (primitiveValue->isCalculatedPercentageWithLength())
394 setValue(styleResolver->style(), Length(primitiveValue->cssCalcValue()->toCalcValue(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom())));
395 else if (primitiveValue->isViewportPercentageLength())
396 setValue(styleResolver->style(), primitiveValue->viewportPercentageLength());
399 static PropertyHandler createHandler()
401 PropertyHandler handler = ApplyPropertyDefaultBase<Length, getterFunction, Length, setterFunction, Length, initialFunction>::createHandler();
402 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
406 enum StringIdentBehavior { NothingMapsToNull = 0, MapNoneToNull, MapAutoToNull };
407 template <StringIdentBehavior identBehavior, const AtomicString& (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(const AtomicString&), const AtomicString& (*initialFunction)()>
408 class ApplyPropertyString {
410 static void setValue(RenderStyle* style, const AtomicString& value) { (style->*setterFunction)(value); }
411 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
413 if (!value->isPrimitiveValue())
415 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
416 if ((identBehavior == MapNoneToNull && primitiveValue->getIdent() == CSSValueNone)
417 || (identBehavior == MapAutoToNull && primitiveValue->getIdent() == CSSValueAuto))
418 setValue(styleResolver->style(), nullAtom);
420 setValue(styleResolver->style(), primitiveValue->getStringValue());
422 static PropertyHandler createHandler()
424 PropertyHandler handler = ApplyPropertyDefaultBase<const AtomicString&, getterFunction, const AtomicString&, setterFunction, const AtomicString&, initialFunction>::createHandler();
425 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
429 template <LengthSize (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(LengthSize), LengthSize (*initialFunction)()>
430 class ApplyPropertyBorderRadius {
432 static void setValue(RenderStyle* style, LengthSize value) { (style->*setterFunction)(value); }
433 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
435 if (!value->isPrimitiveValue())
438 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
439 Pair* pair = primitiveValue->getPairValue();
440 if (!pair || !pair->first() || !pair->second())
445 if (pair->first()->isPercentage())
446 radiusWidth = Length(pair->first()->getDoubleValue(), Percent);
447 else if (pair->first()->isViewportPercentageLength())
448 radiusWidth = pair->first()->viewportPercentageLength();
449 else if (pair->first()->isCalculatedPercentageWithLength()) {
450 // FIXME calc(): http://webkit.org/b/16662
454 radiusWidth = pair->first()->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
455 if (pair->second()->isPercentage())
456 radiusHeight = Length(pair->second()->getDoubleValue(), Percent);
457 else if (pair->second()->isViewportPercentageLength())
458 radiusHeight = pair->second()->viewportPercentageLength();
459 else if (pair->second()->isCalculatedPercentageWithLength()) {
460 // FIXME calc(): http://webkit.org/b/16662
464 radiusHeight = pair->second()->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom());
465 int width = radiusWidth.value();
466 int height = radiusHeight.value();
467 if (width < 0 || height < 0)
470 radiusHeight = radiusWidth; // Null out the other value.
472 radiusWidth = radiusHeight; // Null out the other value.
474 LengthSize size(radiusWidth, radiusHeight);
475 setValue(styleResolver->style(), size);
477 static PropertyHandler createHandler()
479 PropertyHandler handler = ApplyPropertyDefaultBase<LengthSize, getterFunction, LengthSize, setterFunction, LengthSize, initialFunction>::createHandler();
480 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
484 template <typename T>
485 struct FillLayerAccessorTypes {
491 struct FillLayerAccessorTypes<StyleImage*> {
492 typedef PassRefPtr<StyleImage> Setter;
493 typedef StyleImage* Getter;
496 template <typename T,
497 CSSPropertyID propertyId,
498 EFillLayerType fillLayerType,
499 FillLayer* (RenderStyle::*accessLayersFunction)(),
500 const FillLayer* (RenderStyle::*layersFunction)() const,
501 bool (FillLayer::*testFunction)() const,
502 typename FillLayerAccessorTypes<T>::Getter (FillLayer::*getFunction)() const,
503 void (FillLayer::*setFunction)(typename FillLayerAccessorTypes<T>::Setter),
504 void (FillLayer::*clearFunction)(),
505 typename FillLayerAccessorTypes<T>::Getter (*initialFunction)(EFillLayerType),
506 void (CSSToStyleMap::*mapFillFunction)(CSSPropertyID, FillLayer*, CSSValue*)>
507 class ApplyPropertyFillLayer {
509 static void applyInheritValue(StyleResolver* styleResolver)
511 FillLayer* currChild = (styleResolver->style()->*accessLayersFunction)();
512 FillLayer* prevChild = 0;
513 const FillLayer* currParent = (styleResolver->parentStyle()->*layersFunction)();
514 while (currParent && (currParent->*testFunction)()) {
516 /* Need to make a new layer.*/
517 currChild = new FillLayer(fillLayerType);
518 prevChild->setNext(currChild);
520 (currChild->*setFunction)((currParent->*getFunction)());
521 prevChild = currChild;
522 currChild = prevChild->next();
523 currParent = currParent->next();
527 /* Reset any remaining layers to not have the property set. */
528 (currChild->*clearFunction)();
529 currChild = currChild->next();
533 static void applyInitialValue(StyleResolver* styleResolver)
535 FillLayer* currChild = (styleResolver->style()->*accessLayersFunction)();
536 (currChild->*setFunction)((*initialFunction)(fillLayerType));
537 for (currChild = currChild->next(); currChild; currChild = currChild->next())
538 (currChild->*clearFunction)();
541 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
543 FillLayer* currChild = (styleResolver->style()->*accessLayersFunction)();
544 FillLayer* prevChild = 0;
545 if (value->isValueList()
546 #if ENABLE(CSS_IMAGE_SET)
547 && !value->isImageSetValue()
550 /* Walk each value and put it into a layer, creating new layers as needed. */
551 CSSValueList* valueList = static_cast<CSSValueList*>(value);
552 for (unsigned int i = 0; i < valueList->length(); i++) {
554 /* Need to make a new layer to hold this value */
555 currChild = new FillLayer(fillLayerType);
556 prevChild->setNext(currChild);
558 (styleResolver->styleMap()->*mapFillFunction)(propertyId, currChild, valueList->itemWithoutBoundsCheck(i));
559 prevChild = currChild;
560 currChild = currChild->next();
563 (styleResolver->styleMap()->*mapFillFunction)(propertyId, currChild, value);
564 currChild = currChild->next();
567 /* Reset all remaining layers to not have the property set. */
568 (currChild->*clearFunction)();
569 currChild = currChild->next();
573 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
576 enum ComputeLengthNormal {NormalDisabled = 0, NormalEnabled};
577 enum ComputeLengthThickness {ThicknessDisabled = 0, ThicknessEnabled};
578 enum ComputeLengthSVGZoom {SVGZoomDisabled = 0, SVGZoomEnabled};
579 template <typename T,
580 T (RenderStyle::*getterFunction)() const,
581 void (RenderStyle::*setterFunction)(T),
582 T (*initialFunction)(),
583 ComputeLengthNormal normalEnabled = NormalDisabled,
584 ComputeLengthThickness thicknessEnabled = ThicknessDisabled,
585 ComputeLengthSVGZoom svgZoomEnabled = SVGZoomDisabled>
586 class ApplyPropertyComputeLength {
588 static void setValue(RenderStyle* style, T value) { (style->*setterFunction)(value); }
589 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
591 // note: CSSPropertyLetter/WordSpacing right now sets to zero if it's not a primitive value for some reason...
592 if (!value->isPrimitiveValue())
595 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
597 int ident = primitiveValue->getIdent();
599 if (normalEnabled && ident == CSSValueNormal) {
601 } else if (thicknessEnabled && ident == CSSValueThin) {
603 } else if (thicknessEnabled && ident == CSSValueMedium) {
605 } else if (thicknessEnabled && ident == CSSValueThick) {
607 } else if (ident == CSSValueInvalid) {
608 float zoom = (svgZoomEnabled && styleResolver->useSVGZoomRules()) ? 1.0f : styleResolver->style()->effectiveZoom();
610 // Any original result that was >= 1 should not be allowed to fall below 1.
611 // This keeps border lines from vanishing.
612 length = primitiveValue->computeLength<T>(styleResolver->style(), styleResolver->rootElementStyle(), 1.0);
613 T zoomedLength = length * zoom;
614 if (zoom < 1.0f && zoomedLength < 1.0 && length >= 1.0)
617 length = zoomedLength;
620 ASSERT_NOT_REACHED();
624 setValue(styleResolver->style(), length);
626 static PropertyHandler createHandler()
628 PropertyHandler handler = ApplyPropertyDefaultBase<T, getterFunction, T, setterFunction, T, initialFunction>::createHandler();
629 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
633 template <typename T, T (FontDescription::*getterFunction)() const, void (FontDescription::*setterFunction)(T), T initialValue>
634 class ApplyPropertyFont {
636 static void applyInheritValue(StyleResolver* styleResolver)
638 FontDescription fontDescription = styleResolver->fontDescription();
639 (fontDescription.*setterFunction)((styleResolver->parentFontDescription().*getterFunction)());
640 styleResolver->setFontDescription(fontDescription);
643 static void applyInitialValue(StyleResolver* styleResolver)
645 FontDescription fontDescription = styleResolver->fontDescription();
646 (fontDescription.*setterFunction)(initialValue);
647 styleResolver->setFontDescription(fontDescription);
650 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
652 if (!value->isPrimitiveValue())
654 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
655 FontDescription fontDescription = styleResolver->fontDescription();
656 (fontDescription.*setterFunction)(*primitiveValue);
657 styleResolver->setFontDescription(fontDescription);
660 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
663 class ApplyPropertyFontSize {
665 // When the CSS keyword "larger" is used, this function will attempt to match within the keyword
666 // table, and failing that, will simply multiply by 1.2.
667 static float largerFontSize(float size)
669 // FIXME: Figure out where we fall in the size ranges (xx-small to xxx-large) and scale up to
670 // the next size level.
674 // Like the previous function, but for the keyword "smaller".
675 static float smallerFontSize(float size)
677 // FIXME: Figure out where we fall in the size ranges (xx-small to xxx-large) and scale down to
678 // the next size level.
682 static void applyInheritValue(StyleResolver* styleResolver)
684 float size = styleResolver->parentStyle()->fontDescription().specifiedSize();
689 FontDescription fontDescription = styleResolver->style()->fontDescription();
690 fontDescription.setKeywordSize(styleResolver->parentStyle()->fontDescription().keywordSize());
691 styleResolver->setFontSize(fontDescription, size);
692 styleResolver->setFontDescription(fontDescription);
696 static void applyInitialValue(StyleResolver* styleResolver)
698 FontDescription fontDescription = styleResolver->style()->fontDescription();
699 float size = styleResolver->fontSizeForKeyword(styleResolver->document(), CSSValueMedium, fontDescription.useFixedDefaultSize());
704 fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1);
705 styleResolver->setFontSize(fontDescription, size);
706 styleResolver->setFontDescription(fontDescription);
710 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
712 if (!value->isPrimitiveValue())
715 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
717 FontDescription fontDescription = styleResolver->style()->fontDescription();
718 fontDescription.setKeywordSize(0);
719 float parentSize = 0;
720 bool parentIsAbsoluteSize = false;
723 if (styleResolver->parentStyle()) {
724 parentSize = styleResolver->parentStyle()->fontDescription().specifiedSize();
725 parentIsAbsoluteSize = styleResolver->parentStyle()->fontDescription().isAbsoluteSize();
728 if (int ident = primitiveValue->getIdent()) {
729 // Keywords are being used.
731 case CSSValueXxSmall:
737 case CSSValueXxLarge:
738 case CSSValueWebkitXxxLarge:
739 size = styleResolver->fontSizeForKeyword(styleResolver->document(), ident, fontDescription.useFixedDefaultSize());
740 fontDescription.setKeywordSize(ident - CSSValueXxSmall + 1);
743 size = largerFontSize(parentSize);
745 case CSSValueSmaller:
746 size = smallerFontSize(parentSize);
752 fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize && (ident == CSSValueLarger || ident == CSSValueSmaller));
754 fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize
755 || !(primitiveValue->isPercentage() || primitiveValue->isFontRelativeLength()));
756 if (primitiveValue->isLength())
757 size = primitiveValue->computeLength<float>(styleResolver->parentStyle(), styleResolver->rootElementStyle(), 1.0, true);
758 else if (primitiveValue->isPercentage())
759 size = (primitiveValue->getFloatValue() * parentSize) / 100.0f;
760 else if (primitiveValue->isCalculatedPercentageWithLength())
761 size = primitiveValue->cssCalcValue()->toCalcValue(styleResolver->parentStyle(), styleResolver->rootElementStyle())->evaluate(parentSize);
762 else if (primitiveValue->isViewportPercentageLength())
763 size = valueForLength(primitiveValue->viewportPercentageLength(), 0, styleResolver->document()->renderView());
771 // Overly large font sizes will cause crashes on some platforms (such as Windows).
772 // Cap font size here to make sure that doesn't happen.
773 size = min(1000000.0f, size);
775 styleResolver->setFontSize(fontDescription, size);
776 styleResolver->setFontDescription(fontDescription);
780 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
783 class ApplyPropertyFontWeight {
785 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
787 if (!value->isPrimitiveValue())
789 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
790 FontDescription fontDescription = styleResolver->fontDescription();
791 switch (primitiveValue->getIdent()) {
792 case CSSValueInvalid:
793 ASSERT_NOT_REACHED();
796 fontDescription.setWeight(fontDescription.bolderWeight());
798 case CSSValueLighter:
799 fontDescription.setWeight(fontDescription.lighterWeight());
802 fontDescription.setWeight(*primitiveValue);
804 styleResolver->setFontDescription(fontDescription);
806 static PropertyHandler createHandler()
808 PropertyHandler handler = ApplyPropertyFont<FontWeight, &FontDescription::weight, &FontDescription::setWeight, FontWeightNormal>::createHandler();
809 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
813 class ApplyPropertyFontVariantLigatures {
815 static void applyInheritValue(StyleResolver* styleResolver)
817 const FontDescription& parentFontDescription = styleResolver->parentFontDescription();
818 FontDescription fontDescription = styleResolver->fontDescription();
820 fontDescription.setCommonLigaturesState(parentFontDescription.commonLigaturesState());
821 fontDescription.setDiscretionaryLigaturesState(parentFontDescription.discretionaryLigaturesState());
822 fontDescription.setHistoricalLigaturesState(parentFontDescription.historicalLigaturesState());
824 styleResolver->setFontDescription(fontDescription);
827 static void applyInitialValue(StyleResolver* styleResolver)
829 FontDescription fontDescription = styleResolver->fontDescription();
831 fontDescription.setCommonLigaturesState(FontDescription::NormalLigaturesState);
832 fontDescription.setDiscretionaryLigaturesState(FontDescription::NormalLigaturesState);
833 fontDescription.setHistoricalLigaturesState(FontDescription::NormalLigaturesState);
835 styleResolver->setFontDescription(fontDescription);
838 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
840 FontDescription::LigaturesState commonLigaturesState = FontDescription::NormalLigaturesState;
841 FontDescription::LigaturesState discretionaryLigaturesState = FontDescription::NormalLigaturesState;
842 FontDescription::LigaturesState historicalLigaturesState = FontDescription::NormalLigaturesState;
844 if (value->isValueList()) {
845 CSSValueList* valueList = static_cast<CSSValueList*>(value);
846 for (size_t i = 0; i < valueList->length(); ++i) {
847 CSSValue* item = valueList->itemWithoutBoundsCheck(i);
848 ASSERT(item->isPrimitiveValue());
849 if (item->isPrimitiveValue()) {
850 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
851 switch (primitiveValue->getIdent()) {
852 case CSSValueNoCommonLigatures:
853 commonLigaturesState = FontDescription::DisabledLigaturesState;
855 case CSSValueCommonLigatures:
856 commonLigaturesState = FontDescription::EnabledLigaturesState;
858 case CSSValueNoDiscretionaryLigatures:
859 discretionaryLigaturesState = FontDescription::DisabledLigaturesState;
861 case CSSValueDiscretionaryLigatures:
862 discretionaryLigaturesState = FontDescription::EnabledLigaturesState;
864 case CSSValueNoHistoricalLigatures:
865 historicalLigaturesState = FontDescription::DisabledLigaturesState;
867 case CSSValueHistoricalLigatures:
868 historicalLigaturesState = FontDescription::EnabledLigaturesState;
871 ASSERT_NOT_REACHED();
879 ASSERT(value->isPrimitiveValue());
880 ASSERT(static_cast<CSSPrimitiveValue*>(value)->getIdent() == CSSValueNormal);
884 FontDescription fontDescription = styleResolver->fontDescription();
885 fontDescription.setCommonLigaturesState(commonLigaturesState);
886 fontDescription.setDiscretionaryLigaturesState(discretionaryLigaturesState);
887 fontDescription.setHistoricalLigaturesState(historicalLigaturesState);
888 styleResolver->setFontDescription(fontDescription);
891 static PropertyHandler createHandler()
893 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
897 enum BorderImageType { Image = 0, Mask };
898 template <BorderImageType borderImageType,
899 CSSPropertyID property,
900 const NinePieceImage& (RenderStyle::*getterFunction)() const,
901 void (RenderStyle::*setterFunction)(const NinePieceImage&)>
902 class ApplyPropertyBorderImage {
904 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
906 NinePieceImage image;
907 if (borderImageType == Mask)
908 image.setMaskDefaults();
909 styleResolver->styleMap()->mapNinePieceImage(property, value, image);
910 (styleResolver->style()->*setterFunction)(image);
913 static PropertyHandler createHandler()
915 PropertyHandler handler = ApplyPropertyDefaultBase<const NinePieceImage&, getterFunction, const NinePieceImage&, setterFunction, NinePieceImage, &RenderStyle::initialNinePieceImage>::createHandler();
916 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
920 enum BorderImageModifierType { Outset, Repeat, Slice, Width };
921 template <BorderImageType type, BorderImageModifierType modifier>
922 class ApplyPropertyBorderImageModifier {
924 static inline const NinePieceImage& getValue(RenderStyle* style) { return type == Image ? style->borderImage() : style->maskBoxImage(); }
925 static inline void setValue(RenderStyle* style, const NinePieceImage& value) { return type == Image ? style->setBorderImage(value) : style->setMaskBoxImage(value); }
927 static void applyInheritValue(StyleResolver* styleResolver)
929 NinePieceImage image(getValue(styleResolver->style()));
932 image.copyOutsetFrom(getValue(styleResolver->parentStyle()));
935 image.copyRepeatFrom(getValue(styleResolver->parentStyle()));
938 image.copyImageSlicesFrom(getValue(styleResolver->parentStyle()));
941 image.copyBorderSlicesFrom(getValue(styleResolver->parentStyle()));
944 setValue(styleResolver->style(), image);
947 static void applyInitialValue(StyleResolver* styleResolver)
949 NinePieceImage image(getValue(styleResolver->style()));
952 image.setOutset(LengthBox(0));
955 image.setHorizontalRule(StretchImageRule);
956 image.setVerticalRule(StretchImageRule);
959 // Masks have a different initial value for slices. Preserve the value of 0 for backwards compatibility.
960 image.setImageSlices(type == Image ? LengthBox(Length(100, Percent), Length(100, Percent), Length(100, Percent), Length(100, Percent)) : LengthBox());
961 image.setFill(false);
964 // Masks have a different initial value for widths. They use an 'auto' value rather than trying to fit to the border.
965 image.setBorderSlices(type == Image ? LengthBox(Length(1, Relative), Length(1, Relative), Length(1, Relative), Length(1, Relative)) : LengthBox());
968 setValue(styleResolver->style(), image);
971 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
973 NinePieceImage image(getValue(styleResolver->style()));
976 image.setOutset(styleResolver->styleMap()->mapNinePieceImageQuad(value));
979 styleResolver->styleMap()->mapNinePieceImageRepeat(value, image);
982 styleResolver->styleMap()->mapNinePieceImageSlice(value, image);
985 image.setBorderSlices(styleResolver->styleMap()->mapNinePieceImageQuad(value));
988 setValue(styleResolver->style(), image);
991 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
994 template <CSSPropertyID id, StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<StyleImage>), StyleImage* (*initialFunction)()>
995 class ApplyPropertyBorderImageSource {
997 static void applyValue(StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(id, value)); }
998 static PropertyHandler createHandler()
1000 PropertyHandler handler = ApplyPropertyDefaultBase<StyleImage*, getterFunction, PassRefPtr<StyleImage>, setterFunction, StyleImage*, initialFunction>::createHandler();
1001 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1005 enum CounterBehavior {Increment = 0, Reset};
1006 template <CounterBehavior counterBehavior>
1007 class ApplyPropertyCounter {
1009 static void emptyFunction(StyleResolver*) { }
1010 static void applyInheritValue(StyleResolver* styleResolver)
1012 CounterDirectiveMap& map = styleResolver->style()->accessCounterDirectives();
1013 CounterDirectiveMap& parentMap = styleResolver->parentStyle()->accessCounterDirectives();
1015 typedef CounterDirectiveMap::iterator Iterator;
1016 Iterator end = parentMap.end();
1017 for (Iterator it = parentMap.begin(); it != end; ++it) {
1018 CounterDirectives& directives = map.add(it->first, CounterDirectives()).iterator->second;
1019 if (counterBehavior == Reset) {
1020 directives.m_reset = it->second.m_reset;
1021 directives.m_resetValue = it->second.m_resetValue;
1023 // Inheriting a counter-increment means taking the parent's current value for the counter
1024 // and adding it to itself.
1025 directives.m_increment = it->second.m_increment;
1026 directives.m_incrementValue = 0;
1027 if (directives.m_increment) {
1028 float incrementValue = directives.m_incrementValue;
1029 directives.m_incrementValue = clampToInteger(incrementValue + it->second.m_incrementValue);
1031 directives.m_increment = true;
1032 directives.m_incrementValue = it->second.m_incrementValue;
1037 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1039 if (!value->isValueList())
1042 CSSValueList* list = static_cast<CSSValueList*>(value);
1044 CounterDirectiveMap& map = styleResolver->style()->accessCounterDirectives();
1045 typedef CounterDirectiveMap::iterator Iterator;
1047 Iterator end = map.end();
1048 for (Iterator it = map.begin(); it != end; ++it)
1049 if (counterBehavior == Reset)
1050 it->second.m_reset = false;
1052 it->second.m_increment = false;
1054 int length = list ? list->length() : 0;
1055 for (int i = 0; i < length; ++i) {
1056 CSSValue* currValue = list->itemWithoutBoundsCheck(i);
1057 if (!currValue->isPrimitiveValue())
1060 Pair* pair = static_cast<CSSPrimitiveValue*>(currValue)->getPairValue();
1061 if (!pair || !pair->first() || !pair->second())
1064 AtomicString identifier = static_cast<CSSPrimitiveValue*>(pair->first())->getStringValue();
1065 int value = static_cast<CSSPrimitiveValue*>(pair->second())->getIntValue();
1066 CounterDirectives& directives = map.add(identifier.impl(), CounterDirectives()).iterator->second;
1067 if (counterBehavior == Reset) {
1068 directives.m_reset = true;
1069 directives.m_resetValue = value;
1071 if (directives.m_increment) {
1072 float incrementValue = directives.m_incrementValue;
1073 directives.m_incrementValue = clampToInteger(incrementValue + value);
1075 directives.m_increment = true;
1076 directives.m_incrementValue = value;
1082 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &emptyFunction, &applyValue); }
1086 class ApplyPropertyCursor {
1088 static void applyInheritValue(StyleResolver* styleResolver)
1090 styleResolver->style()->setCursor(styleResolver->parentStyle()->cursor());
1091 styleResolver->style()->setCursorList(styleResolver->parentStyle()->cursors());
1094 static void applyInitialValue(StyleResolver* styleResolver)
1096 styleResolver->style()->clearCursorList();
1097 styleResolver->style()->setCursor(RenderStyle::initialCursor());
1100 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1102 styleResolver->style()->clearCursorList();
1103 if (value->isValueList()) {
1104 CSSValueList* list = static_cast<CSSValueList*>(value);
1105 int len = list->length();
1106 styleResolver->style()->setCursor(CURSOR_AUTO);
1107 for (int i = 0; i < len; i++) {
1108 CSSValue* item = list->itemWithoutBoundsCheck(i);
1109 if (item->isCursorImageValue()) {
1110 CSSCursorImageValue* image = static_cast<CSSCursorImageValue*>(item);
1111 if (image->updateIfSVGCursorIsUsed(styleResolver->element())) // Elements with SVG cursors are not allowed to share style.
1112 styleResolver->style()->setUnique();
1113 styleResolver->style()->addCursor(styleResolver->cachedOrPendingFromValue(CSSPropertyCursor, image), image->hotSpot());
1114 } else if (item->isPrimitiveValue()) {
1115 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
1116 if (primitiveValue->isIdent())
1117 styleResolver->style()->setCursor(*primitiveValue);
1120 } else if (value->isPrimitiveValue()) {
1121 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1122 if (primitiveValue->isIdent() && styleResolver->style()->cursor() != ECursor(*primitiveValue))
1123 styleResolver->style()->setCursor(*primitiveValue);
1127 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1130 class ApplyPropertyTextAlign {
1132 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1134 if (!value->isPrimitiveValue())
1137 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1139 if (primitiveValue->getIdent() != CSSValueWebkitMatchParent)
1140 styleResolver->style()->setTextAlign(*primitiveValue);
1141 else if (styleResolver->parentStyle()->textAlign() == TASTART)
1142 styleResolver->style()->setTextAlign(styleResolver->parentStyle()->isLeftToRightDirection() ? LEFT : RIGHT);
1143 else if (styleResolver->parentStyle()->textAlign() == TAEND)
1144 styleResolver->style()->setTextAlign(styleResolver->parentStyle()->isLeftToRightDirection() ? RIGHT : LEFT);
1146 styleResolver->style()->setTextAlign(styleResolver->parentStyle()->textAlign());
1148 static PropertyHandler createHandler()
1150 PropertyHandler handler = ApplyPropertyDefaultBase<ETextAlign, &RenderStyle::textAlign, ETextAlign, &RenderStyle::setTextAlign, ETextAlign, &RenderStyle::initialTextAlign>::createHandler();
1151 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1155 class ApplyPropertyTextDecoration {
1157 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1159 ETextDecoration t = RenderStyle::initialTextDecoration();
1160 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
1161 CSSValue* item = i.value();
1162 ASSERT(item->isPrimitiveValue());
1163 t |= *static_cast<CSSPrimitiveValue*>(item);
1165 styleResolver->style()->setTextDecoration(t);
1167 static PropertyHandler createHandler()
1169 PropertyHandler handler = ApplyPropertyDefaultBase<ETextDecoration, &RenderStyle::textDecoration, ETextDecoration, &RenderStyle::setTextDecoration, ETextDecoration, &RenderStyle::initialTextDecoration>::createHandler();
1170 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1174 class ApplyPropertyUnicodeBidi {
1176 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1178 if (value->isValueList()) {
1179 EUnicodeBidi rendererUnicodeBidi = RenderStyle::initialUnicodeBidi();
1180 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
1181 CSSValue* item = i.value();
1182 ASSERT(item->isPrimitiveValue());
1183 EUnicodeBidi currentValue = *static_cast<CSSPrimitiveValue*>(item);
1184 ASSERT(currentValue == Override || currentValue == Isolate);
1185 if (currentValue != rendererUnicodeBidi && rendererUnicodeBidi != RenderStyle::initialUnicodeBidi())
1186 rendererUnicodeBidi = OverrideIsolate;
1188 rendererUnicodeBidi = currentValue;
1190 styleResolver->style()->setUnicodeBidi(rendererUnicodeBidi);
1192 if (!value->isPrimitiveValue())
1194 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1195 styleResolver->style()->setUnicodeBidi(*primitiveValue);
1197 static PropertyHandler createHandler()
1199 PropertyHandler handler = ApplyPropertyDefaultBase<EUnicodeBidi, &RenderStyle::unicodeBidi, EUnicodeBidi, &RenderStyle::setUnicodeBidi, EUnicodeBidi, &RenderStyle::initialUnicodeBidi>::createHandler();
1200 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1204 class ApplyPropertyLineHeight {
1206 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1208 if (!value->isPrimitiveValue())
1211 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1214 if (primitiveValue->getIdent() == CSSValueNormal)
1215 lineHeight = RenderStyle::initialLineHeight();
1216 else if (primitiveValue->isLength()) {
1217 double multiplier = styleResolver->style()->effectiveZoom();
1218 if (styleResolver->style()->textSizeAdjust()) {
1219 if (Frame* frame = styleResolver->document()->frame())
1220 multiplier *= frame->textZoomFactor();
1222 lineHeight = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle(), multiplier);
1223 } else if (primitiveValue->isPercentage()) {
1224 // FIXME: percentage should not be restricted to an integer here.
1225 lineHeight = Length((styleResolver->style()->fontSize() * primitiveValue->getIntValue()) / 100, Fixed);
1226 } else if (primitiveValue->isNumber()) {
1227 // FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent).
1228 lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent);
1229 } else if (primitiveValue->isViewportPercentageLength())
1230 lineHeight = primitiveValue->viewportPercentageLength();
1233 styleResolver->style()->setLineHeight(lineHeight);
1235 static PropertyHandler createHandler()
1237 PropertyHandler handler = ApplyPropertyDefaultBase<Length, &RenderStyle::specifiedLineHeight, Length, &RenderStyle::setLineHeight, Length, &RenderStyle::initialLineHeight>::createHandler();
1238 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1242 class ApplyPropertyPageSize {
1244 static Length mmLength(double mm) { return CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM)->computeLength<Length>(0, 0); }
1245 static Length inchLength(double inch) { return CSSPrimitiveValue::create(inch, CSSPrimitiveValue::CSS_IN)->computeLength<Length>(0, 0); }
1246 static bool getPageSizeFromName(CSSPrimitiveValue* pageSizeName, CSSPrimitiveValue* pageOrientation, Length& width, Length& height)
1248 DEFINE_STATIC_LOCAL(Length, a5Width, (mmLength(148)));
1249 DEFINE_STATIC_LOCAL(Length, a5Height, (mmLength(210)));
1250 DEFINE_STATIC_LOCAL(Length, a4Width, (mmLength(210)));
1251 DEFINE_STATIC_LOCAL(Length, a4Height, (mmLength(297)));
1252 DEFINE_STATIC_LOCAL(Length, a3Width, (mmLength(297)));
1253 DEFINE_STATIC_LOCAL(Length, a3Height, (mmLength(420)));
1254 DEFINE_STATIC_LOCAL(Length, b5Width, (mmLength(176)));
1255 DEFINE_STATIC_LOCAL(Length, b5Height, (mmLength(250)));
1256 DEFINE_STATIC_LOCAL(Length, b4Width, (mmLength(250)));
1257 DEFINE_STATIC_LOCAL(Length, b4Height, (mmLength(353)));
1258 DEFINE_STATIC_LOCAL(Length, letterWidth, (inchLength(8.5)));
1259 DEFINE_STATIC_LOCAL(Length, letterHeight, (inchLength(11)));
1260 DEFINE_STATIC_LOCAL(Length, legalWidth, (inchLength(8.5)));
1261 DEFINE_STATIC_LOCAL(Length, legalHeight, (inchLength(14)));
1262 DEFINE_STATIC_LOCAL(Length, ledgerWidth, (inchLength(11)));
1263 DEFINE_STATIC_LOCAL(Length, ledgerHeight, (inchLength(17)));
1268 switch (pageSizeName->getIdent()) {
1289 case CSSValueLetter:
1290 width = letterWidth;
1291 height = letterHeight;
1295 height = legalHeight;
1297 case CSSValueLedger:
1298 width = ledgerWidth;
1299 height = ledgerHeight;
1305 if (pageOrientation) {
1306 switch (pageOrientation->getIdent()) {
1307 case CSSValueLandscape:
1308 std::swap(width, height);
1310 case CSSValuePortrait:
1320 static void applyInheritValue(StyleResolver*) { }
1321 static void applyInitialValue(StyleResolver*) { }
1322 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1324 styleResolver->style()->resetPageSizeType();
1327 PageSizeType pageSizeType = PAGE_SIZE_AUTO;
1328 CSSValueListInspector inspector(value);
1329 switch (inspector.length()) {
1331 // <length>{2} | <page-size> <orientation>
1332 if (!inspector.first()->isPrimitiveValue() || !inspector.second()->isPrimitiveValue())
1334 CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(inspector.first());
1335 CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(inspector.second());
1336 if (first->isLength()) {
1338 if (!second->isLength())
1340 width = first->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
1341 height = second->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
1343 // <page-size> <orientation>
1344 // The value order is guaranteed. See CSSParser::parseSizeParameter.
1345 if (!getPageSizeFromName(first, second, width, height))
1348 pageSizeType = PAGE_SIZE_RESOLVED;
1352 // <length> | auto | <page-size> | [ portrait | landscape]
1353 if (!inspector.first()->isPrimitiveValue())
1355 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(inspector.first());
1356 if (primitiveValue->isLength()) {
1358 pageSizeType = PAGE_SIZE_RESOLVED;
1359 width = height = primitiveValue->computeLength<Length>(styleResolver->style(), styleResolver->rootElementStyle());
1361 switch (primitiveValue->getIdent()) {
1365 pageSizeType = PAGE_SIZE_AUTO;
1367 case CSSValuePortrait:
1368 pageSizeType = PAGE_SIZE_AUTO_PORTRAIT;
1370 case CSSValueLandscape:
1371 pageSizeType = PAGE_SIZE_AUTO_LANDSCAPE;
1375 pageSizeType = PAGE_SIZE_RESOLVED;
1376 if (!getPageSizeFromName(primitiveValue, 0, width, height))
1385 styleResolver->style()->setPageSizeType(pageSizeType);
1386 styleResolver->style()->setPageSize(LengthSize(width, height));
1388 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1391 class ApplyPropertyTextEmphasisStyle {
1393 static void applyInheritValue(StyleResolver* styleResolver)
1395 styleResolver->style()->setTextEmphasisFill(styleResolver->parentStyle()->textEmphasisFill());
1396 styleResolver->style()->setTextEmphasisMark(styleResolver->parentStyle()->textEmphasisMark());
1397 styleResolver->style()->setTextEmphasisCustomMark(styleResolver->parentStyle()->textEmphasisCustomMark());
1400 static void applyInitialValue(StyleResolver* styleResolver)
1402 styleResolver->style()->setTextEmphasisFill(RenderStyle::initialTextEmphasisFill());
1403 styleResolver->style()->setTextEmphasisMark(RenderStyle::initialTextEmphasisMark());
1404 styleResolver->style()->setTextEmphasisCustomMark(RenderStyle::initialTextEmphasisCustomMark());
1407 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1409 if (value->isValueList()) {
1410 CSSValueList* list = static_cast<CSSValueList*>(value);
1411 ASSERT(list->length() == 2);
1412 if (list->length() != 2)
1414 for (unsigned i = 0; i < 2; ++i) {
1415 CSSValue* item = list->itemWithoutBoundsCheck(i);
1416 if (!item->isPrimitiveValue())
1419 CSSPrimitiveValue* value = static_cast<CSSPrimitiveValue*>(item);
1420 if (value->getIdent() == CSSValueFilled || value->getIdent() == CSSValueOpen)
1421 styleResolver->style()->setTextEmphasisFill(*value);
1423 styleResolver->style()->setTextEmphasisMark(*value);
1425 styleResolver->style()->setTextEmphasisCustomMark(nullAtom);
1429 if (!value->isPrimitiveValue())
1431 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1433 if (primitiveValue->isString()) {
1434 styleResolver->style()->setTextEmphasisFill(TextEmphasisFillFilled);
1435 styleResolver->style()->setTextEmphasisMark(TextEmphasisMarkCustom);
1436 styleResolver->style()->setTextEmphasisCustomMark(primitiveValue->getStringValue());
1440 styleResolver->style()->setTextEmphasisCustomMark(nullAtom);
1442 if (primitiveValue->getIdent() == CSSValueFilled || primitiveValue->getIdent() == CSSValueOpen) {
1443 styleResolver->style()->setTextEmphasisFill(*primitiveValue);
1444 styleResolver->style()->setTextEmphasisMark(TextEmphasisMarkAuto);
1446 styleResolver->style()->setTextEmphasisFill(TextEmphasisFillFilled);
1447 styleResolver->style()->setTextEmphasisMark(*primitiveValue);
1451 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1454 template <typename T,
1455 T (Animation::*getterFunction)() const,
1456 void (Animation::*setterFunction)(T),
1457 bool (Animation::*testFunction)() const,
1458 void (Animation::*clearFunction)(),
1459 T (*initialFunction)(),
1460 void (CSSToStyleMap::*mapFunction)(Animation*, CSSValue*),
1461 AnimationList* (RenderStyle::*animationGetterFunction)(),
1462 const AnimationList* (RenderStyle::*immutableAnimationGetterFunction)() const>
1463 class ApplyPropertyAnimation {
1465 static void setValue(Animation* animation, T value) { (animation->*setterFunction)(value); }
1466 static T value(const Animation* animation) { return (animation->*getterFunction)(); }
1467 static bool test(const Animation* animation) { return (animation->*testFunction)(); }
1468 static void clear(Animation* animation) { (animation->*clearFunction)(); }
1469 static T initial() { return (*initialFunction)(); }
1470 static void map(StyleResolver* styleResolver, Animation* animation, CSSValue* value) { (styleResolver->styleMap()->*mapFunction)(animation, value); }
1471 static AnimationList* accessAnimations(RenderStyle* style) { return (style->*animationGetterFunction)(); }
1472 static const AnimationList* animations(RenderStyle* style) { return (style->*immutableAnimationGetterFunction)(); }
1474 static void applyInheritValue(StyleResolver* styleResolver)
1476 AnimationList* list = accessAnimations(styleResolver->style());
1477 const AnimationList* parentList = animations(styleResolver->parentStyle());
1478 size_t i = 0, parentSize = parentList ? parentList->size() : 0;
1479 for ( ; i < parentSize && test(parentList->animation(i)); ++i) {
1480 if (list->size() <= i)
1481 list->append(Animation::create());
1482 setValue(list->animation(i), value(parentList->animation(i)));
1483 list->animation(i)->setAnimationMode(parentList->animation(i)->animationMode());
1486 /* Reset any remaining animations to not have the property set. */
1487 for ( ; i < list->size(); ++i)
1488 clear(list->animation(i));
1491 static void applyInitialValue(StyleResolver* styleResolver)
1493 AnimationList* list = accessAnimations(styleResolver->style());
1494 if (list->isEmpty())
1495 list->append(Animation::create());
1496 setValue(list->animation(0), initial());
1497 for (size_t i = 1; i < list->size(); ++i)
1498 clear(list->animation(i));
1501 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1503 AnimationList* list = accessAnimations(styleResolver->style());
1504 size_t childIndex = 0;
1505 if (value->isValueList()) {
1506 /* Walk each value and put it into an animation, creating new animations as needed. */
1507 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
1508 if (childIndex <= list->size())
1509 list->append(Animation::create());
1510 map(styleResolver, list->animation(childIndex), i.value());
1514 if (list->isEmpty())
1515 list->append(Animation::create());
1516 map(styleResolver, list->animation(childIndex), value);
1519 for ( ; childIndex < list->size(); ++childIndex) {
1520 /* Reset all remaining animations to not have the property set. */
1521 clear(list->animation(childIndex));
1525 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1528 class ApplyPropertyOutlineStyle {
1530 static void applyInheritValue(StyleResolver* styleResolver)
1532 ApplyPropertyDefaultBase<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyInheritValue(styleResolver);
1533 ApplyPropertyDefaultBase<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyInheritValue(styleResolver);
1536 static void applyInitialValue(StyleResolver* styleResolver)
1538 ApplyPropertyDefaultBase<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyInitialValue(styleResolver);
1539 ApplyPropertyDefaultBase<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyInitialValue(styleResolver);
1542 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1544 ApplyPropertyDefault<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyValue(styleResolver, value);
1545 ApplyPropertyDefault<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyValue(styleResolver, value);
1548 static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
1551 class ApplyPropertyResize {
1553 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1555 if (!value->isPrimitiveValue())
1558 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1560 EResize r = RESIZE_NONE;
1561 switch (primitiveValue->getIdent()) {
1565 if (Settings* settings = styleResolver->document()->settings())
1566 r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE;
1569 r = *primitiveValue;
1571 styleResolver->style()->setResize(r);
1574 static PropertyHandler createHandler()
1576 PropertyHandler handler = ApplyPropertyDefaultBase<EResize, &RenderStyle::resize, EResize, &RenderStyle::setResize, EResize, &RenderStyle::initialResize>::createHandler();
1577 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1581 class ApplyPropertyVerticalAlign {
1583 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1585 if (!value->isPrimitiveValue())
1588 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1590 if (primitiveValue->getIdent())
1591 return styleResolver->style()->setVerticalAlign(*primitiveValue);
1593 styleResolver->style()->setVerticalAlignLength(primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion | ViewportPercentageConversion>(styleResolver->style(), styleResolver->rootElementStyle(), styleResolver->style()->effectiveZoom()));
1596 static PropertyHandler createHandler()
1598 PropertyHandler handler = ApplyPropertyDefaultBase<EVerticalAlign, &RenderStyle::verticalAlign, EVerticalAlign, &RenderStyle::setVerticalAlign, EVerticalAlign, &RenderStyle::initialVerticalAlign>::createHandler();
1599 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1603 class ApplyPropertyAspectRatio {
1605 static void applyInheritValue(StyleResolver* styleResolver)
1607 if (!styleResolver->parentStyle()->hasAspectRatio())
1609 styleResolver->style()->setHasAspectRatio(true);
1610 styleResolver->style()->setAspectRatioDenominator(styleResolver->parentStyle()->aspectRatioDenominator());
1611 styleResolver->style()->setAspectRatioNumerator(styleResolver->parentStyle()->aspectRatioNumerator());
1614 static void applyInitialValue(StyleResolver* styleResolver)
1616 styleResolver->style()->setHasAspectRatio(RenderStyle::initialHasAspectRatio());
1617 styleResolver->style()->setAspectRatioDenominator(RenderStyle::initialAspectRatioDenominator());
1618 styleResolver->style()->setAspectRatioNumerator(RenderStyle::initialAspectRatioNumerator());
1621 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1623 if (!value->isAspectRatioValue()) {
1624 styleResolver->style()->setHasAspectRatio(false);
1627 CSSAspectRatioValue* aspectRatioValue = static_cast<CSSAspectRatioValue*>(value);
1628 styleResolver->style()->setHasAspectRatio(true);
1629 styleResolver->style()->setAspectRatioDenominator(aspectRatioValue->denominatorValue());
1630 styleResolver->style()->setAspectRatioNumerator(aspectRatioValue->numeratorValue());
1633 static PropertyHandler createHandler()
1635 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
1639 class ApplyPropertyZoom {
1641 static void resetEffectiveZoom(StyleResolver* styleResolver)
1643 // Reset the zoom in effect. This allows the setZoom method to accurately compute a new zoom in effect.
1644 styleResolver->setEffectiveZoom(styleResolver->parentStyle() ? styleResolver->parentStyle()->effectiveZoom() : RenderStyle::initialZoom());
1648 static void applyInheritValue(StyleResolver* styleResolver)
1650 resetEffectiveZoom(styleResolver);
1651 styleResolver->setZoom(styleResolver->parentStyle()->zoom());
1654 static void applyInitialValue(StyleResolver* styleResolver)
1656 resetEffectiveZoom(styleResolver);
1657 styleResolver->setZoom(RenderStyle::initialZoom());
1660 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1662 ASSERT(value->isPrimitiveValue());
1663 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1665 if (primitiveValue->getIdent() == CSSValueNormal) {
1666 resetEffectiveZoom(styleResolver);
1667 styleResolver->setZoom(RenderStyle::initialZoom());
1668 } else if (primitiveValue->getIdent() == CSSValueReset) {
1669 styleResolver->setEffectiveZoom(RenderStyle::initialZoom());
1670 styleResolver->setZoom(RenderStyle::initialZoom());
1671 } else if (primitiveValue->getIdent() == CSSValueDocument) {
1672 float docZoom = styleResolver->rootElementStyle() ? styleResolver->rootElementStyle()->zoom() : RenderStyle::initialZoom();
1673 styleResolver->setEffectiveZoom(docZoom);
1674 styleResolver->setZoom(docZoom);
1675 } else if (primitiveValue->isPercentage()) {
1676 resetEffectiveZoom(styleResolver);
1677 if (float percent = primitiveValue->getFloatValue())
1678 styleResolver->setZoom(percent / 100.0f);
1679 } else if (primitiveValue->isNumber()) {
1680 resetEffectiveZoom(styleResolver);
1681 if (float number = primitiveValue->getFloatValue())
1682 styleResolver->setZoom(number);
1686 static PropertyHandler createHandler()
1688 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
1692 class ApplyPropertyDisplay {
1694 static inline bool isValidDisplayValue(StyleResolver* styleResolver, EDisplay displayPropertyValue)
1697 if (styleResolver->element() && styleResolver->element()->isSVGElement() && styleResolver->style()->styleType() == NOPSEUDO)
1698 return (displayPropertyValue == INLINE || displayPropertyValue == BLOCK || displayPropertyValue == NONE);
1700 UNUSED_PARAM(styleResolver);
1701 UNUSED_PARAM(displayPropertyValue);
1706 static void applyInheritValue(StyleResolver* styleResolver)
1708 EDisplay display = styleResolver->parentStyle()->display();
1709 if (!isValidDisplayValue(styleResolver, display))
1711 styleResolver->style()->setDisplay(display);
1714 static void applyInitialValue(StyleResolver* styleResolver)
1716 styleResolver->style()->setDisplay(RenderStyle::initialDisplay());
1719 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1721 if (!value->isPrimitiveValue())
1724 EDisplay display = *static_cast<CSSPrimitiveValue*>(value);
1726 if (!isValidDisplayValue(styleResolver, display))
1729 styleResolver->style()->setDisplay(display);
1732 static PropertyHandler createHandler()
1734 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
1738 #if ENABLE(CSS_EXCLUSIONS)
1739 template <WrapShape* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<WrapShape>), WrapShape* (*initialFunction)()>
1740 class ApplyPropertyWrapShape {
1742 static void setValue(RenderStyle* style, PassRefPtr<WrapShape> value) { (style->*setterFunction)(value); }
1743 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1745 if (value->isPrimitiveValue()) {
1746 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
1747 if (primitiveValue->getIdent() == CSSValueAuto)
1748 setValue(styleResolver->style(), 0);
1749 else if (primitiveValue->isShape()) {
1750 RefPtr<WrapShape> wrapShape = wrapShapeForValue(styleResolver, primitiveValue->getShapeValue());
1751 setValue(styleResolver->style(), wrapShape.release());
1755 static PropertyHandler createHandler()
1757 PropertyHandler handler = ApplyPropertyDefaultBase<WrapShape*, getterFunction, PassRefPtr<WrapShape>, setterFunction, WrapShape*, initialFunction>::createHandler();
1758 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
1763 #if ENABLE(CSS_IMAGE_RESOLUTION)
1764 class ApplyPropertyImageResolution {
1766 static void applyInheritValue(StyleResolver* styleResolver)
1768 ApplyPropertyDefaultBase<ImageResolutionSource, &RenderStyle::imageResolutionSource, ImageResolutionSource, &RenderStyle::setImageResolutionSource, ImageResolutionSource, &RenderStyle::initialImageResolutionSource>::applyInheritValue(styleResolver);
1769 ApplyPropertyDefaultBase<ImageResolutionSnap, &RenderStyle::imageResolutionSnap, ImageResolutionSnap, &RenderStyle::setImageResolutionSnap, ImageResolutionSnap, &RenderStyle::initialImageResolutionSnap>::applyInheritValue(styleResolver);
1770 ApplyPropertyDefaultBase<float, &RenderStyle::imageResolution, float, &RenderStyle::setImageResolution, float, &RenderStyle::initialImageResolution>::applyInheritValue(styleResolver);
1773 static void applyInitialValue(StyleResolver* styleResolver)
1775 ApplyPropertyDefaultBase<ImageResolutionSource, &RenderStyle::imageResolutionSource, ImageResolutionSource, &RenderStyle::setImageResolutionSource, ImageResolutionSource, &RenderStyle::initialImageResolutionSource>::applyInitialValue(styleResolver);
1776 ApplyPropertyDefaultBase<ImageResolutionSnap, &RenderStyle::imageResolutionSnap, ImageResolutionSnap, &RenderStyle::setImageResolutionSnap, ImageResolutionSnap, &RenderStyle::initialImageResolutionSnap>::applyInitialValue(styleResolver);
1777 ApplyPropertyDefaultBase<float, &RenderStyle::imageResolution, float, &RenderStyle::setImageResolution, float, &RenderStyle::initialImageResolution>::applyInitialValue(styleResolver);
1780 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
1782 if (!value->isValueList())
1784 CSSValueList* valueList = static_cast<CSSValueList*>(value);
1785 ImageResolutionSource source = RenderStyle::initialImageResolutionSource();
1786 ImageResolutionSnap snap = RenderStyle::initialImageResolutionSnap();
1787 double resolution = RenderStyle::initialImageResolution();
1788 for (size_t i = 0; i < valueList->length(); i++) {
1789 CSSValue* item = valueList->itemWithoutBoundsCheck(i);
1790 if (!item->isPrimitiveValue())
1792 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
1793 if (primitiveValue->getIdent() == CSSValueFromImage)
1794 source = ImageResolutionFromImage;
1795 else if (primitiveValue->getIdent() == CSSValueSnap)
1796 snap = ImageResolutionSnapPixels;
1798 resolution = primitiveValue->getDoubleValue(CSSPrimitiveValue::CSS_DPPX);
1800 styleResolver->style()->setImageResolutionSource(source);
1801 styleResolver->style()->setImageResolutionSnap(snap);
1802 styleResolver->style()->setImageResolution(resolution);
1805 static PropertyHandler createHandler()
1807 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue);
1812 const StyleBuilder& StyleBuilder::sharedStyleBuilder()
1814 DEFINE_STATIC_LOCAL(StyleBuilder, styleBuilderInstance, ());
1815 return styleBuilderInstance;
1818 StyleBuilder::StyleBuilder()
1820 for (int i = 0; i < numCSSProperties; ++i)
1821 m_propertyMap[i] = PropertyHandler();
1823 // Please keep CSS property list in alphabetical order.
1824 setPropertyHandler(CSSPropertyBackgroundAttachment, ApplyPropertyFillLayer<EFillAttachment, CSSPropertyBackgroundAttachment, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isAttachmentSet, &FillLayer::attachment, &FillLayer::setAttachment, &FillLayer::clearAttachment, &FillLayer::initialFillAttachment, &CSSToStyleMap::mapFillAttachment>::createHandler());
1825 setPropertyHandler(CSSPropertyBackgroundClip, ApplyPropertyFillLayer<EFillBox, CSSPropertyBackgroundClip, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSToStyleMap::mapFillClip>::createHandler());
1826 setPropertyHandler(CSSPropertyBackgroundColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::backgroundColor, &RenderStyle::setBackgroundColor, &RenderStyle::setVisitedLinkBackgroundColor, &RenderStyle::invalidColor>::createHandler());
1827 setPropertyHandler(CSSPropertyBackgroundImage, ApplyPropertyFillLayer<StyleImage*, CSSPropertyBackgroundImage, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSToStyleMap::mapFillImage>::createHandler());
1828 setPropertyHandler(CSSPropertyBackgroundOrigin, ApplyPropertyFillLayer<EFillBox, CSSPropertyBackgroundOrigin, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSToStyleMap::mapFillOrigin>::createHandler());
1829 setPropertyHandler(CSSPropertyBackgroundPosition, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundPositionX, CSSPropertyBackgroundPositionY>::createHandler());
1830 setPropertyHandler(CSSPropertyBackgroundPositionX, ApplyPropertyFillLayer<Length, CSSPropertyBackgroundPositionX, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isXPositionSet, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::clearXPosition, &FillLayer::initialFillXPosition, &CSSToStyleMap::mapFillXPosition>::createHandler());
1831 setPropertyHandler(CSSPropertyBackgroundPositionY, ApplyPropertyFillLayer<Length, CSSPropertyBackgroundPositionY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isYPositionSet, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::clearYPosition, &FillLayer::initialFillYPosition, &CSSToStyleMap::mapFillYPosition>::createHandler());
1832 setPropertyHandler(CSSPropertyBackgroundRepeat, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY>::createHandler());
1833 setPropertyHandler(CSSPropertyBackgroundRepeatX, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyBackgroundRepeatX, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSToStyleMap::mapFillRepeatX>::createHandler());
1834 setPropertyHandler(CSSPropertyBackgroundRepeatY, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyBackgroundRepeatY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSToStyleMap::mapFillRepeatY>::createHandler());
1835 setPropertyHandler(CSSPropertyBackgroundSize, ApplyPropertyFillLayer<FillSize, CSSPropertyBackgroundSize, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSToStyleMap::mapFillSize>::createHandler());
1836 setPropertyHandler(CSSPropertyBorder, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderStyle, CSSPropertyBorderWidth, CSSPropertyBorderColor>::createHandler());
1837 setPropertyHandler(CSSPropertyBorderBottom, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderBottomColor, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomWidth>::createHandler());
1838 setPropertyHandler(CSSPropertyBorderBottomColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderBottomColor, &RenderStyle::setBorderBottomColor, &RenderStyle::setVisitedLinkBorderBottomColor, &RenderStyle::color>::createHandler());
1839 setPropertyHandler(CSSPropertyBorderBottomLeftRadius, ApplyPropertyBorderRadius<&RenderStyle::borderBottomLeftRadius, &RenderStyle::setBorderBottomLeftRadius, &RenderStyle::initialBorderRadius>::createHandler());
1840 setPropertyHandler(CSSPropertyBorderBottomRightRadius, ApplyPropertyBorderRadius<&RenderStyle::borderBottomRightRadius, &RenderStyle::setBorderBottomRightRadius, &RenderStyle::initialBorderRadius>::createHandler());
1841 setPropertyHandler(CSSPropertyBorderBottomStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderBottomStyle, EBorderStyle, &RenderStyle::setBorderBottomStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1842 setPropertyHandler(CSSPropertyBorderBottomWidth, ApplyPropertyComputeLength<unsigned, &RenderStyle::borderBottomWidth, &RenderStyle::setBorderBottomWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1843 setPropertyHandler(CSSPropertyBorderCollapse, ApplyPropertyDefault<EBorderCollapse, &RenderStyle::borderCollapse, EBorderCollapse, &RenderStyle::setBorderCollapse, EBorderCollapse, &RenderStyle::initialBorderCollapse>::createHandler());
1844 setPropertyHandler(CSSPropertyBorderColor, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopColor, CSSPropertyBorderRightColor, CSSPropertyBorderBottomColor, CSSPropertyBorderLeftColor>::createHandler());
1845 setPropertyHandler(CSSPropertyBorderImage, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderImageSource, CSSPropertyBorderImageSlice, CSSPropertyBorderImageWidth, CSSPropertyBorderImageOutset, CSSPropertyBorderImageRepeat>::createHandler());
1846 setPropertyHandler(CSSPropertyBorderImageOutset, ApplyPropertyBorderImageModifier<Image, Outset>::createHandler());
1847 setPropertyHandler(CSSPropertyBorderImageRepeat, ApplyPropertyBorderImageModifier<Image, Repeat>::createHandler());
1848 setPropertyHandler(CSSPropertyBorderImageSlice, ApplyPropertyBorderImageModifier<Image, Slice>::createHandler());
1849 setPropertyHandler(CSSPropertyBorderImageSource, ApplyPropertyBorderImageSource<CSSPropertyBorderImageSource, &RenderStyle::borderImageSource, &RenderStyle::setBorderImageSource, &RenderStyle::initialBorderImageSource>::createHandler());
1850 setPropertyHandler(CSSPropertyBorderImageWidth, ApplyPropertyBorderImageModifier<Image, Width>::createHandler());
1851 setPropertyHandler(CSSPropertyBorderLeft, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderLeftColor, CSSPropertyBorderLeftStyle, CSSPropertyBorderLeftWidth>::createHandler());
1852 setPropertyHandler(CSSPropertyBorderLeftColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderLeftColor, &RenderStyle::setBorderLeftColor, &RenderStyle::setVisitedLinkBorderLeftColor, &RenderStyle::color>::createHandler());
1853 setPropertyHandler(CSSPropertyBorderLeftStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderLeftStyle, EBorderStyle, &RenderStyle::setBorderLeftStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1854 setPropertyHandler(CSSPropertyBorderLeftWidth, ApplyPropertyComputeLength<unsigned, &RenderStyle::borderLeftWidth, &RenderStyle::setBorderLeftWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1855 setPropertyHandler(CSSPropertyBorderRadius, ApplyPropertyExpanding<ExpandValue, CSSPropertyBorderTopLeftRadius, CSSPropertyBorderTopRightRadius, CSSPropertyBorderBottomLeftRadius, CSSPropertyBorderBottomRightRadius>::createHandler());
1856 setPropertyHandler(CSSPropertyBorderRight, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderRightColor, CSSPropertyBorderRightStyle, CSSPropertyBorderRightWidth>::createHandler());
1857 setPropertyHandler(CSSPropertyBorderRightColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderRightColor, &RenderStyle::setBorderRightColor, &RenderStyle::setVisitedLinkBorderRightColor, &RenderStyle::color>::createHandler());
1858 setPropertyHandler(CSSPropertyBorderRightStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderRightStyle, EBorderStyle, &RenderStyle::setBorderRightStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1859 setPropertyHandler(CSSPropertyBorderRightWidth, ApplyPropertyComputeLength<unsigned, &RenderStyle::borderRightWidth, &RenderStyle::setBorderRightWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1860 setPropertyHandler(CSSPropertyBorderSpacing, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyWebkitBorderVerticalSpacing>::createHandler());
1861 setPropertyHandler(CSSPropertyBorderStyle, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopStyle, CSSPropertyBorderRightStyle, CSSPropertyBorderBottomStyle, CSSPropertyBorderLeftStyle>::createHandler());
1862 setPropertyHandler(CSSPropertyBorderTop, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopColor, CSSPropertyBorderTopStyle, CSSPropertyBorderTopWidth>::createHandler());
1863 setPropertyHandler(CSSPropertyBorderTopColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderTopColor, &RenderStyle::setBorderTopColor, &RenderStyle::setVisitedLinkBorderTopColor, &RenderStyle::color>::createHandler());
1864 setPropertyHandler(CSSPropertyBorderTopLeftRadius, ApplyPropertyBorderRadius<&RenderStyle::borderTopLeftRadius, &RenderStyle::setBorderTopLeftRadius, &RenderStyle::initialBorderRadius>::createHandler());
1865 setPropertyHandler(CSSPropertyBorderTopRightRadius, ApplyPropertyBorderRadius<&RenderStyle::borderTopRightRadius, &RenderStyle::setBorderTopRightRadius, &RenderStyle::initialBorderRadius>::createHandler());
1866 setPropertyHandler(CSSPropertyBorderTopStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderTopStyle, EBorderStyle, &RenderStyle::setBorderTopStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1867 setPropertyHandler(CSSPropertyBorderTopWidth, ApplyPropertyComputeLength<unsigned, &RenderStyle::borderTopWidth, &RenderStyle::setBorderTopWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1868 setPropertyHandler(CSSPropertyBorderWidth, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopWidth, CSSPropertyBorderRightWidth, CSSPropertyBorderBottomWidth, CSSPropertyBorderLeftWidth>::createHandler());
1869 setPropertyHandler(CSSPropertyBottom, ApplyPropertyLength<&RenderStyle::bottom, &RenderStyle::setBottom, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1870 setPropertyHandler(CSSPropertyBoxSizing, ApplyPropertyDefault<EBoxSizing, &RenderStyle::boxSizing, EBoxSizing, &RenderStyle::setBoxSizing, EBoxSizing, &RenderStyle::initialBoxSizing>::createHandler());
1871 setPropertyHandler(CSSPropertyCaptionSide, ApplyPropertyDefault<ECaptionSide, &RenderStyle::captionSide, ECaptionSide, &RenderStyle::setCaptionSide, ECaptionSide, &RenderStyle::initialCaptionSide>::createHandler());
1872 setPropertyHandler(CSSPropertyClear, ApplyPropertyDefault<EClear, &RenderStyle::clear, EClear, &RenderStyle::setClear, EClear, &RenderStyle::initialClear>::createHandler());
1873 setPropertyHandler(CSSPropertyClip, ApplyPropertyClip::createHandler());
1874 setPropertyHandler(CSSPropertyColor, ApplyPropertyColor<InheritFromParent, &RenderStyle::color, &RenderStyle::setColor, &RenderStyle::setVisitedLinkColor, &RenderStyle::invalidColor, RenderStyle::initialColor>::createHandler());
1875 setPropertyHandler(CSSPropertyCounterIncrement, ApplyPropertyCounter<Increment>::createHandler());
1876 setPropertyHandler(CSSPropertyCounterReset, ApplyPropertyCounter<Reset>::createHandler());
1877 setPropertyHandler(CSSPropertyCursor, ApplyPropertyCursor::createHandler());
1878 setPropertyHandler(CSSPropertyDirection, ApplyPropertyDirection<&RenderStyle::direction, &RenderStyle::setDirection, RenderStyle::initialDirection>::createHandler());
1879 setPropertyHandler(CSSPropertyDisplay, ApplyPropertyDisplay::createHandler());
1880 setPropertyHandler(CSSPropertyEmptyCells, ApplyPropertyDefault<EEmptyCell, &RenderStyle::emptyCells, EEmptyCell, &RenderStyle::setEmptyCells, EEmptyCell, &RenderStyle::initialEmptyCells>::createHandler());
1881 setPropertyHandler(CSSPropertyFloat, ApplyPropertyDefault<EFloat, &RenderStyle::floating, EFloat, &RenderStyle::setFloating, EFloat, &RenderStyle::initialFloating>::createHandler());
1882 setPropertyHandler(CSSPropertyFontSize, ApplyPropertyFontSize::createHandler());
1883 setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont<FontItalic, &FontDescription::italic, &FontDescription::setItalic, FontItalicOff>::createHandler());
1884 setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont<FontSmallCaps, &FontDescription::smallCaps, &FontDescription::setSmallCaps, FontSmallCapsOff>::createHandler());
1885 setPropertyHandler(CSSPropertyFontWeight, ApplyPropertyFontWeight::createHandler());
1886 setPropertyHandler(CSSPropertyHeight, ApplyPropertyLength<&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicDisabled, NoneDisabled, UndefinedDisabled>::createHandler());
1887 #if ENABLE(CSS_IMAGE_ORIENTATION)
1888 setPropertyHandler(CSSPropertyImageOrientation, ApplyPropertyDefault<ImageOrientationEnum, &RenderStyle::imageOrientation, ImageOrientationEnum, &RenderStyle::setImageOrientation, ImageOrientationEnum, &RenderStyle::initialImageOrientation>::createHandler());
1890 setPropertyHandler(CSSPropertyImageRendering, ApplyPropertyDefault<EImageRendering, &RenderStyle::imageRendering, EImageRendering, &RenderStyle::setImageRendering, EImageRendering, &RenderStyle::initialImageRendering>::createHandler());
1891 #if ENABLE(CSS_IMAGE_RESOLUTION)
1892 setPropertyHandler(CSSPropertyImageResolution, ApplyPropertyImageResolution::createHandler());
1894 setPropertyHandler(CSSPropertyLeft, ApplyPropertyLength<&RenderStyle::left, &RenderStyle::setLeft, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1895 setPropertyHandler(CSSPropertyLetterSpacing, ApplyPropertyComputeLength<int, &RenderStyle::letterSpacing, &RenderStyle::setLetterSpacing, &RenderStyle::initialLetterWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler());
1896 setPropertyHandler(CSSPropertyLineHeight, ApplyPropertyLineHeight::createHandler());
1897 setPropertyHandler(CSSPropertyListStyle, ApplyPropertyExpanding<SuppressValue, CSSPropertyListStyleType, CSSPropertyListStyleImage, CSSPropertyListStylePosition>::createHandler());
1898 setPropertyHandler(CSSPropertyListStyleImage, ApplyPropertyStyleImage<&RenderStyle::listStyleImage, &RenderStyle::setListStyleImage, &RenderStyle::initialListStyleImage, CSSPropertyListStyleImage>::createHandler());
1899 setPropertyHandler(CSSPropertyListStylePosition, ApplyPropertyDefault<EListStylePosition, &RenderStyle::listStylePosition, EListStylePosition, &RenderStyle::setListStylePosition, EListStylePosition, &RenderStyle::initialListStylePosition>::createHandler());
1900 setPropertyHandler(CSSPropertyListStyleType, ApplyPropertyDefault<EListStyleType, &RenderStyle::listStyleType, EListStyleType, &RenderStyle::setListStyleType, EListStyleType, &RenderStyle::initialListStyleType>::createHandler());
1901 setPropertyHandler(CSSPropertyMargin, ApplyPropertyExpanding<SuppressValue, CSSPropertyMarginTop, CSSPropertyMarginRight, CSSPropertyMarginBottom, CSSPropertyMarginLeft>::createHandler());
1902 setPropertyHandler(CSSPropertyMarginBottom, ApplyPropertyLength<&RenderStyle::marginBottom, &RenderStyle::setMarginBottom, &RenderStyle::initialMargin, AutoEnabled>::createHandler());
1903 setPropertyHandler(CSSPropertyMarginLeft, ApplyPropertyLength<&RenderStyle::marginLeft, &RenderStyle::setMarginLeft, &RenderStyle::initialMargin, AutoEnabled>::createHandler());
1904 setPropertyHandler(CSSPropertyMarginRight, ApplyPropertyLength<&RenderStyle::marginRight, &RenderStyle::setMarginRight, &RenderStyle::initialMargin, AutoEnabled>::createHandler());
1905 setPropertyHandler(CSSPropertyMarginTop, ApplyPropertyLength<&RenderStyle::marginTop, &RenderStyle::setMarginTop, &RenderStyle::initialMargin, AutoEnabled>::createHandler());
1906 setPropertyHandler(CSSPropertyMaxHeight, ApplyPropertyLength<&RenderStyle::maxHeight, &RenderStyle::setMaxHeight, &RenderStyle::initialMaxSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicDisabled, NoneEnabled, UndefinedEnabled>::createHandler());
1907 setPropertyHandler(CSSPropertyMaxWidth, ApplyPropertyLength<&RenderStyle::maxWidth, &RenderStyle::setMaxWidth, &RenderStyle::initialMaxSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicEnabled, NoneEnabled, UndefinedEnabled>::createHandler());
1908 setPropertyHandler(CSSPropertyMinHeight, ApplyPropertyLength<&RenderStyle::minHeight, &RenderStyle::setMinHeight, &RenderStyle::initialMinSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicDisabled>::createHandler());
1909 setPropertyHandler(CSSPropertyMinWidth, ApplyPropertyLength<&RenderStyle::minWidth, &RenderStyle::setMinWidth, &RenderStyle::initialMinSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicEnabled>::createHandler());
1910 setPropertyHandler(CSSPropertyOrphans, ApplyPropertyDefault<short, &RenderStyle::orphans, short, &RenderStyle::setOrphans, short, &RenderStyle::initialOrphans>::createHandler());
1911 setPropertyHandler(CSSPropertyOutline, ApplyPropertyExpanding<SuppressValue, CSSPropertyOutlineWidth, CSSPropertyOutlineColor, CSSPropertyOutlineStyle>::createHandler());
1912 setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor, &RenderStyle::setVisitedLinkOutlineColor, &RenderStyle::color>::createHandler());
1913 setPropertyHandler(CSSPropertyOutlineOffset, ApplyPropertyComputeLength<int, &RenderStyle::outlineOffset, &RenderStyle::setOutlineOffset, &RenderStyle::initialOutlineOffset>::createHandler());
1914 setPropertyHandler(CSSPropertyOutlineStyle, ApplyPropertyOutlineStyle::createHandler());
1915 setPropertyHandler(CSSPropertyOutlineWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::outlineWidth, &RenderStyle::setOutlineWidth, &RenderStyle::initialOutlineWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1916 setPropertyHandler(CSSPropertyOverflow, ApplyPropertyExpanding<ExpandValue, CSSPropertyOverflowX, CSSPropertyOverflowY>::createHandler());
1917 setPropertyHandler(CSSPropertyOverflowWrap, ApplyPropertyDefault<EOverflowWrap, &RenderStyle::overflowWrap, EOverflowWrap, &RenderStyle::setOverflowWrap, EOverflowWrap, &RenderStyle::initialOverflowWrap>::createHandler());
1918 setPropertyHandler(CSSPropertyOverflowX, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowX, EOverflow, &RenderStyle::setOverflowX, EOverflow, &RenderStyle::initialOverflowX>::createHandler());
1919 setPropertyHandler(CSSPropertyOverflowY, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowY, EOverflow, &RenderStyle::setOverflowY, EOverflow, &RenderStyle::initialOverflowY>::createHandler());
1920 setPropertyHandler(CSSPropertyPadding, ApplyPropertyExpanding<SuppressValue, CSSPropertyPaddingTop, CSSPropertyPaddingRight, CSSPropertyPaddingBottom, CSSPropertyPaddingLeft>::createHandler());
1921 setPropertyHandler(CSSPropertyPaddingBottom, ApplyPropertyLength<&RenderStyle::paddingBottom, &RenderStyle::setPaddingBottom, &RenderStyle::initialPadding>::createHandler());
1922 setPropertyHandler(CSSPropertyPaddingLeft, ApplyPropertyLength<&RenderStyle::paddingLeft, &RenderStyle::setPaddingLeft, &RenderStyle::initialPadding>::createHandler());
1923 setPropertyHandler(CSSPropertyPaddingRight, ApplyPropertyLength<&RenderStyle::paddingRight, &RenderStyle::setPaddingRight, &RenderStyle::initialPadding>::createHandler());
1924 setPropertyHandler(CSSPropertyPaddingTop, ApplyPropertyLength<&RenderStyle::paddingTop, &RenderStyle::setPaddingTop, &RenderStyle::initialPadding>::createHandler());
1925 setPropertyHandler(CSSPropertyPageBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakAfter, EPageBreak, &RenderStyle::setPageBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1926 setPropertyHandler(CSSPropertyPageBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakBefore, EPageBreak, &RenderStyle::setPageBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1927 setPropertyHandler(CSSPropertyPageBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::pageBreakInside, EPageBreak, &RenderStyle::setPageBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1928 setPropertyHandler(CSSPropertyPosition, ApplyPropertyDefault<EPosition, &RenderStyle::position, EPosition, &RenderStyle::setPosition, EPosition, &RenderStyle::initialPosition>::createHandler());
1929 setPropertyHandler(CSSPropertyResize, ApplyPropertyResize::createHandler());
1930 setPropertyHandler(CSSPropertyRight, ApplyPropertyLength<&RenderStyle::right, &RenderStyle::setRight, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1931 setPropertyHandler(CSSPropertySize, ApplyPropertyPageSize::createHandler());
1932 setPropertyHandler(CSSPropertySpeak, ApplyPropertyDefault<ESpeak, &RenderStyle::speak, ESpeak, &RenderStyle::setSpeak, ESpeak, &RenderStyle::initialSpeak>::createHandler());
1933 setPropertyHandler(CSSPropertyTableLayout, ApplyPropertyDefault<ETableLayout, &RenderStyle::tableLayout, ETableLayout, &RenderStyle::setTableLayout, ETableLayout, &RenderStyle::initialTableLayout>::createHandler());
1934 setPropertyHandler(CSSPropertyTabSize, ApplyPropertyDefault<unsigned, &RenderStyle::tabSize, unsigned, &RenderStyle::setTabSize, unsigned, &RenderStyle::initialTabSize>::createHandler());
1935 setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler());
1936 setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler());
1937 #if ENABLE(TIZEN_CSS3_TEXT)
1938 setPropertyHandler(CSSPropertyWebkitTextAlignLast, ApplyPropertyDefault<ETextAlignLast, &RenderStyle::textAlignLast, ETextAlignLast, &RenderStyle::setTextAlignLast, ETextAlignLast, &RenderStyle::initialTextAlignLast>::createHandler());
1939 #endif // TIZEN_CSS3_TEXT
1940 setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler());
1941 setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());
1942 setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont<TextRenderingMode, &FontDescription::textRenderingMode, &FontDescription::setTextRenderingMode, AutoTextRendering>::createHandler());
1943 setPropertyHandler(CSSPropertyTextTransform, ApplyPropertyDefault<ETextTransform, &RenderStyle::textTransform, ETextTransform, &RenderStyle::setTextTransform, ETextTransform, &RenderStyle::initialTextTransform>::createHandler());
1944 setPropertyHandler(CSSPropertyTop, ApplyPropertyLength<&RenderStyle::top, &RenderStyle::setTop, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
1945 setPropertyHandler(CSSPropertyUnicodeBidi, ApplyPropertyUnicodeBidi::createHandler());
1946 setPropertyHandler(CSSPropertyVerticalAlign, ApplyPropertyVerticalAlign::createHandler());
1947 setPropertyHandler(CSSPropertyVisibility, ApplyPropertyDefault<EVisibility, &RenderStyle::visibility, EVisibility, &RenderStyle::setVisibility, EVisibility, &RenderStyle::initialVisibility>::createHandler());
1948 setPropertyHandler(CSSPropertyWebkitAnimationDelay, ApplyPropertyAnimation<double, &Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSToStyleMap::mapAnimationDelay, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1949 setPropertyHandler(CSSPropertyWebkitAnimationDirection, ApplyPropertyAnimation<Animation::AnimationDirection, &Animation::direction, &Animation::setDirection, &Animation::isDirectionSet, &Animation::clearDirection, &Animation::initialAnimationDirection, &CSSToStyleMap::mapAnimationDirection, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1950 setPropertyHandler(CSSPropertyWebkitAnimationDuration, ApplyPropertyAnimation<double, &Animation::duration, &Animation::setDuration, &Animation::isDurationSet, &Animation::clearDuration, &Animation::initialAnimationDuration, &CSSToStyleMap::mapAnimationDuration, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1951 setPropertyHandler(CSSPropertyWebkitAnimationFillMode, ApplyPropertyAnimation<unsigned, &Animation::fillMode, &Animation::setFillMode, &Animation::isFillModeSet, &Animation::clearFillMode, &Animation::initialAnimationFillMode, &CSSToStyleMap::mapAnimationFillMode, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1952 setPropertyHandler(CSSPropertyWebkitAnimationIterationCount, ApplyPropertyAnimation<double, &Animation::iterationCount, &Animation::setIterationCount, &Animation::isIterationCountSet, &Animation::clearIterationCount, &Animation::initialAnimationIterationCount, &CSSToStyleMap::mapAnimationIterationCount, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1953 setPropertyHandler(CSSPropertyWebkitAnimationName, ApplyPropertyAnimation<const String&, &Animation::name, &Animation::setName, &Animation::isNameSet, &Animation::clearName, &Animation::initialAnimationName, &CSSToStyleMap::mapAnimationName, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1954 setPropertyHandler(CSSPropertyWebkitAnimationPlayState, ApplyPropertyAnimation<EAnimPlayState, &Animation::playState, &Animation::setPlayState, &Animation::isPlayStateSet, &Animation::clearPlayState, &Animation::initialAnimationPlayState, &CSSToStyleMap::mapAnimationPlayState, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1955 setPropertyHandler(CSSPropertyWebkitAnimationTimingFunction, ApplyPropertyAnimation<const PassRefPtr<TimingFunction>, &Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSToStyleMap::mapAnimationTimingFunction, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler());
1956 setPropertyHandler(CSSPropertyWebkitAppearance, ApplyPropertyDefault<ControlPart, &RenderStyle::appearance, ControlPart, &RenderStyle::setAppearance, ControlPart, &RenderStyle::initialAppearance>::createHandler());
1957 setPropertyHandler(CSSPropertyWebkitAspectRatio, ApplyPropertyAspectRatio::createHandler());
1958 setPropertyHandler(CSSPropertyWebkitBackfaceVisibility, ApplyPropertyDefault<EBackfaceVisibility, &RenderStyle::backfaceVisibility, EBackfaceVisibility, &RenderStyle::setBackfaceVisibility, EBackfaceVisibility, &RenderStyle::initialBackfaceVisibility>::createHandler());
1959 setPropertyHandler(CSSPropertyWebkitBackgroundClip, CSSPropertyBackgroundClip);
1960 setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitBackgroundComposite, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSToStyleMap::mapFillComposite>::createHandler());
1961 setPropertyHandler(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin);
1962 setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize);
1963 setPropertyHandler(CSSPropertyWebkitBorderFit, ApplyPropertyDefault<EBorderFit, &RenderStyle::borderFit, EBorderFit, &RenderStyle::setBorderFit, EBorderFit, &RenderStyle::initialBorderFit>::createHandler());
1964 setPropertyHandler(CSSPropertyWebkitBorderHorizontalSpacing, ApplyPropertyComputeLength<short, &RenderStyle::horizontalBorderSpacing, &RenderStyle::setHorizontalBorderSpacing, &RenderStyle::initialHorizontalBorderSpacing>::createHandler());
1965 setPropertyHandler(CSSPropertyWebkitBorderImage, ApplyPropertyBorderImage<Image, CSSPropertyWebkitBorderImage, &RenderStyle::borderImage, &RenderStyle::setBorderImage>::createHandler());
1966 setPropertyHandler(CSSPropertyWebkitBorderRadius, CSSPropertyBorderRadius);
1967 setPropertyHandler(CSSPropertyWebkitBorderVerticalSpacing, ApplyPropertyComputeLength<short, &RenderStyle::verticalBorderSpacing, &RenderStyle::setVerticalBorderSpacing, &RenderStyle::initialVerticalBorderSpacing>::createHandler());
1968 setPropertyHandler(CSSPropertyWebkitBoxAlign, ApplyPropertyDefault<EBoxAlignment, &RenderStyle::boxAlign, EBoxAlignment, &RenderStyle::setBoxAlign, EBoxAlignment, &RenderStyle::initialBoxAlign>::createHandler());
1969 #if ENABLE(CSS_BOX_DECORATION_BREAK)
1970 setPropertyHandler(CSSPropertyWebkitBoxDecorationBreak, ApplyPropertyDefault<EBoxDecorationBreak, &RenderStyle::boxDecorationBreak, EBoxDecorationBreak, &RenderStyle::setBoxDecorationBreak, EBoxDecorationBreak, &RenderStyle::initialBoxDecorationBreak>::createHandler());
1972 setPropertyHandler(CSSPropertyWebkitBoxDirection, ApplyPropertyDefault<EBoxDirection, &RenderStyle::boxDirection, EBoxDirection, &RenderStyle::setBoxDirection, EBoxDirection, &RenderStyle::initialBoxDirection>::createHandler());
1973 setPropertyHandler(CSSPropertyWebkitBoxFlex, ApplyPropertyDefault<float, &RenderStyle::boxFlex, float, &RenderStyle::setBoxFlex, float, &RenderStyle::initialBoxFlex>::createHandler());
1974 setPropertyHandler(CSSPropertyWebkitBoxFlexGroup, ApplyPropertyDefault<unsigned int, &RenderStyle::boxFlexGroup, unsigned int, &RenderStyle::setBoxFlexGroup, unsigned int, &RenderStyle::initialBoxFlexGroup>::createHandler());
1975 setPropertyHandler(CSSPropertyWebkitBoxLines, ApplyPropertyDefault<EBoxLines, &RenderStyle::boxLines, EBoxLines, &RenderStyle::setBoxLines, EBoxLines, &RenderStyle::initialBoxLines>::createHandler());
1976 setPropertyHandler(CSSPropertyWebkitBoxOrdinalGroup, ApplyPropertyDefault<unsigned int, &RenderStyle::boxOrdinalGroup, unsigned int, &RenderStyle::setBoxOrdinalGroup, unsigned int, &RenderStyle::initialBoxOrdinalGroup>::createHandler());
1977 setPropertyHandler(CSSPropertyWebkitBoxOrient, ApplyPropertyDefault<EBoxOrient, &RenderStyle::boxOrient, EBoxOrient, &RenderStyle::setBoxOrient, EBoxOrient, &RenderStyle::initialBoxOrient>::createHandler());
1978 setPropertyHandler(CSSPropertyWebkitBoxPack, ApplyPropertyDefault<EBoxPack, &RenderStyle::boxPack, EBoxPack, &RenderStyle::setBoxPack, EBoxPack, &RenderStyle::initialBoxPack>::createHandler());
1979 setPropertyHandler(CSSPropertyWebkitColorCorrection, ApplyPropertyDefault<ColorSpace, &RenderStyle::colorSpace, ColorSpace, &RenderStyle::setColorSpace, ColorSpace, &RenderStyle::initialColorSpace>::createHandler());
1980 setPropertyHandler(CSSPropertyWebkitColumnAxis, ApplyPropertyDefault<ColumnAxis, &RenderStyle::columnAxis, ColumnAxis, &RenderStyle::setColumnAxis, ColumnAxis, &RenderStyle::initialColumnAxis>::createHandler());
1981 setPropertyHandler(CSSPropertyWebkitColumnBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakAfter, EPageBreak, &RenderStyle::setColumnBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1982 setPropertyHandler(CSSPropertyWebkitColumnBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakBefore, EPageBreak, &RenderStyle::setColumnBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1983 setPropertyHandler(CSSPropertyWebkitColumnBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::columnBreakInside, EPageBreak, &RenderStyle::setColumnBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
1984 setPropertyHandler(CSSPropertyWebkitColumnCount, ApplyPropertyAuto<unsigned short, &RenderStyle::columnCount, &RenderStyle::setColumnCount, &RenderStyle::hasAutoColumnCount, &RenderStyle::setHasAutoColumnCount>::createHandler());
1985 setPropertyHandler(CSSPropertyWebkitColumnGap, ApplyPropertyAuto<float, &RenderStyle::columnGap, &RenderStyle::setColumnGap, &RenderStyle::hasNormalColumnGap, &RenderStyle::setHasNormalColumnGap, ComputeLength, CSSValueNormal>::createHandler());
1986 setPropertyHandler(CSSPropertyWebkitColumnProgression, ApplyPropertyDefault<ColumnProgression, &RenderStyle::columnProgression, ColumnProgression, &RenderStyle::setColumnProgression, ColumnProgression, &RenderStyle::initialColumnProgression>::createHandler());
1987 setPropertyHandler(CSSPropertyWebkitColumnRuleColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::columnRuleColor, &RenderStyle::setColumnRuleColor, &RenderStyle::setVisitedLinkColumnRuleColor, &RenderStyle::color>::createHandler());
1988 setPropertyHandler(CSSPropertyWebkitColumnRuleWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWidth, &RenderStyle::initialColumnRuleWidth, NormalDisabled, ThicknessEnabled>::createHandler());
1989 setPropertyHandler(CSSPropertyWebkitColumns, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitColumnWidth, CSSPropertyWebkitColumnCount>::createHandler());
1990 setPropertyHandler(CSSPropertyWebkitColumnSpan, ApplyPropertyDefault<ColumnSpan, &RenderStyle::columnSpan, ColumnSpan, &RenderStyle::setColumnSpan, ColumnSpan, &RenderStyle::initialColumnSpan>::createHandler());
1991 setPropertyHandler(CSSPropertyWebkitColumnRuleStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::columnRuleStyle, EBorderStyle, &RenderStyle::setColumnRuleStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler());
1992 setPropertyHandler(CSSPropertyWebkitColumnWidth, ApplyPropertyAuto<float, &RenderStyle::columnWidth, &RenderStyle::setColumnWidth, &RenderStyle::hasAutoColumnWidth, &RenderStyle::setHasAutoColumnWidth, ComputeLength>::createHandler());
1993 #if ENABLE(CSS3_FLEXBOX)
1994 setPropertyHandler(CSSPropertyWebkitAlignContent, ApplyPropertyDefault<EAlignContent, &RenderStyle::alignContent, EAlignContent, &RenderStyle::setAlignContent, EAlignContent, &RenderStyle::initialAlignContent>::createHandler());
1995 setPropertyHandler(CSSPropertyWebkitAlignItems, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignItems, EAlignItems, &RenderStyle::setAlignItems, EAlignItems, &RenderStyle::initialAlignItems>::createHandler());
1996 setPropertyHandler(CSSPropertyWebkitAlignSelf, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignSelf, EAlignItems, &RenderStyle::setAlignSelf, EAlignItems, &RenderStyle::initialAlignSelf>::createHandler());
1997 setPropertyHandler(CSSPropertyWebkitFlexBasis, ApplyPropertyLength<&RenderStyle::flexBasis, &RenderStyle::setFlexBasis, &RenderStyle::initialFlexBasis, AutoEnabled>::createHandler());
1998 setPropertyHandler(CSSPropertyWebkitFlexDirection, ApplyPropertyDefault<EFlexDirection, &RenderStyle::flexDirection, EFlexDirection, &RenderStyle::setFlexDirection, EFlexDirection, &RenderStyle::initialFlexDirection>::createHandler());
1999 setPropertyHandler(CSSPropertyWebkitFlexGrow, ApplyPropertyDefault<float, &RenderStyle::flexGrow, float, &RenderStyle::setFlexGrow, float, &RenderStyle::initialFlexGrow>::createHandler());
2000 setPropertyHandler(CSSPropertyWebkitFlexShrink, ApplyPropertyDefault<float, &RenderStyle::flexShrink, float, &RenderStyle::setFlexShrink, float, &RenderStyle::initialFlexShrink>::createHandler());
2001 setPropertyHandler(CSSPropertyWebkitFlexWrap, ApplyPropertyDefault<EFlexWrap, &RenderStyle::flexWrap, EFlexWrap, &RenderStyle::setFlexWrap, EFlexWrap, &RenderStyle::initialFlexWrap>::createHandler());
2002 setPropertyHandler(CSSPropertyWebkitJustifyContent, ApplyPropertyDefault<EJustifyContent, &RenderStyle::justifyContent, EJustifyContent, &RenderStyle::setJustifyContent, EJustifyContent, &RenderStyle::initialJustifyContent>::createHandler());
2003 setPropertyHandler(CSSPropertyWebkitOrder, ApplyPropertyDefault<float, &RenderStyle::order, float, &RenderStyle::setOrder, float, &RenderStyle::initialOrder>::createHandler());
2005 #if ENABLE(CSS_REGIONS)
2006 setPropertyHandler(CSSPropertyWebkitFlowFrom, ApplyPropertyString<MapNoneToNull, &RenderStyle::regionThread, &RenderStyle::setRegionThread, &RenderStyle::initialRegionThread>::createHandler());
2007 setPropertyHandler(CSSPropertyWebkitFlowInto, ApplyPropertyString<MapNoneToNull, &RenderStyle::flowThread, &RenderStyle::setFlowThread, &RenderStyle::initialFlowThread>::createHandler());
2009 setPropertyHandler(CSSPropertyWebkitFontKerning, ApplyPropertyFont<FontDescription::Kerning, &FontDescription::kerning, &FontDescription::setKerning, FontDescription::AutoKerning>::createHandler());
2010 setPropertyHandler(CSSPropertyWebkitFontSmoothing, ApplyPropertyFont<FontSmoothingMode, &FontDescription::fontSmoothing, &FontDescription::setFontSmoothing, AutoSmoothing>::createHandler());
2011 setPropertyHandler(CSSPropertyWebkitFontVariantLigatures, ApplyPropertyFontVariantLigatures::createHandler());
2012 setPropertyHandler(CSSPropertyWebkitHighlight, ApplyPropertyString<MapNoneToNull, &RenderStyle::highlight, &RenderStyle::setHighlight, &RenderStyle::initialHighlight>::createHandler());
2013 setPropertyHandler(CSSPropertyWebkitHyphenateCharacter, ApplyPropertyString<MapAutoToNull, &RenderStyle::hyphenationString, &RenderStyle::setHyphenationString, &RenderStyle::initialHyphenationString>::createHandler());
2014 setPropertyHandler(CSSPropertyWebkitHyphenateLimitAfter, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitAfter, &RenderStyle::setHyphenationLimitAfter, &RenderStyle::initialHyphenationLimitAfter>::createHandler());
2015 setPropertyHandler(CSSPropertyWebkitHyphenateLimitBefore, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitBefore, &RenderStyle::setHyphenationLimitBefore, &RenderStyle::initialHyphenationLimitBefore>::createHandler());
2016 setPropertyHandler(CSSPropertyWebkitHyphenateLimitLines, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitLines, &RenderStyle::setHyphenationLimitLines, &RenderStyle::initialHyphenationLimitLines, CSSValueNoLimit>::createHandler());
2017 setPropertyHandler(CSSPropertyWebkitHyphens, ApplyPropertyDefault<Hyphens, &RenderStyle::hyphens, Hyphens, &RenderStyle::setHyphens, Hyphens, &RenderStyle::initialHyphens>::createHandler());
2018 setPropertyHandler(CSSPropertyWebkitLineAlign, ApplyPropertyDefault<LineAlign, &RenderStyle::lineAlign, LineAlign, &RenderStyle::setLineAlign, LineAlign, &RenderStyle::initialLineAlign>::createHandler());
2019 setPropertyHandler(CSSPropertyWebkitLineBreak, ApplyPropertyDefault<EKHTMLLineBreak, &RenderStyle::khtmlLineBreak, EKHTMLLineBreak, &RenderStyle::setKHTMLLineBreak, EKHTMLLineBreak, &RenderStyle::initialKHTMLLineBreak>::createHandler());
2020 setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString<MapNoneToNull, &RenderStyle::lineGrid, &RenderStyle::setLineGrid, &RenderStyle::initialLineGrid>::createHandler());
2021 setPropertyHandler(CSSPropertyWebkitLineSnap, ApplyPropertyDefault<LineSnap, &RenderStyle::lineSnap, LineSnap, &RenderStyle::setLineSnap, LineSnap, &RenderStyle::initialLineSnap>::createHandler());
2022 setPropertyHandler(CSSPropertyWebkitMarginAfterCollapse, ApplyPropertyDefault<EMarginCollapse, &RenderStyle::marginAfterCollapse, EMarginCollapse, &RenderStyle::setMarginAfterCollapse, EMarginCollapse, &RenderStyle::initialMarginAfterCollapse>::createHandler());
2023 setPropertyHandler(CSSPropertyWebkitMarginBeforeCollapse, ApplyPropertyDefault<EMarginCollapse, &RenderStyle::marginBeforeCollapse, EMarginCollapse, &RenderStyle::setMarginBeforeCollapse, EMarginCollapse, &RenderStyle::initialMarginBeforeCollapse>::createHandler());
2024 setPropertyHandler(CSSPropertyWebkitMarginBottomCollapse, CSSPropertyWebkitMarginAfterCollapse);
2025 setPropertyHandler(CSSPropertyWebkitMarginCollapse, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse>::createHandler());
2026 setPropertyHandler(CSSPropertyWebkitMarginTopCollapse, CSSPropertyWebkitMarginBeforeCollapse);
2027 setPropertyHandler(CSSPropertyWebkitMarqueeDirection, ApplyPropertyDefault<EMarqueeDirection, &RenderStyle::marqueeDirection, EMarqueeDirection, &RenderStyle::setMarqueeDirection, EMarqueeDirection, &RenderStyle::initialMarqueeDirection>::createHandler());
2028 setPropertyHandler(CSSPropertyWebkitMarqueeStyle, ApplyPropertyDefault<EMarqueeBehavior, &RenderStyle::marqueeBehavior, EMarqueeBehavior, &RenderStyle::setMarqueeBehavior, EMarqueeBehavior, &RenderStyle::initialMarqueeBehavior>::createHandler());
2029 setPropertyHandler(CSSPropertyWebkitMaskAttachment, ApplyPropertyFillLayer<EFillAttachment, CSSPropertyWebkitMaskAttachment, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isAttachmentSet, &FillLayer::attachment, &FillLayer::setAttachment, &FillLayer::clearAttachment, &FillLayer::initialFillAttachment, &CSSToStyleMap::mapFillAttachment>::createHandler());
2030 setPropertyHandler(CSSPropertyWebkitMaskBoxImage, ApplyPropertyBorderImage<Mask, CSSPropertyWebkitMaskBoxImage, &RenderStyle::maskBoxImage, &RenderStyle::setMaskBoxImage>::createHandler());
2031 setPropertyHandler(CSSPropertyWebkitMaskBoxImageOutset, ApplyPropertyBorderImageModifier<Mask, Outset>::createHandler());
2032 setPropertyHandler(CSSPropertyWebkitMaskBoxImageRepeat, ApplyPropertyBorderImageModifier<Mask, Repeat>::createHandler());
2033 setPropertyHandler(CSSPropertyWebkitMaskBoxImageSlice, ApplyPropertyBorderImageModifier<Mask, Slice>::createHandler());
2034 setPropertyHandler(CSSPropertyWebkitMaskBoxImageSource, ApplyPropertyBorderImageSource<CSSPropertyWebkitMaskBoxImageSource, &RenderStyle::maskBoxImageSource, &RenderStyle::setMaskBoxImageSource, &RenderStyle::initialMaskBoxImageSource>::createHandler());
2035 setPropertyHandler(CSSPropertyWebkitMaskBoxImageWidth, ApplyPropertyBorderImageModifier<Mask, Width>::createHandler());
2036 setPropertyHandler(CSSPropertyWebkitMaskClip, ApplyPropertyFillLayer<EFillBox, CSSPropertyWebkitMaskClip, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSToStyleMap::mapFillClip>::createHandler());
2037 setPropertyHandler(CSSPropertyWebkitMaskComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitMaskComposite, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSToStyleMap::mapFillComposite>::createHandler());
2038 setPropertyHandler(CSSPropertyWebkitMaskImage, ApplyPropertyFillLayer<StyleImage*, CSSPropertyWebkitMaskImage, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSToStyleMap::mapFillImage>::createHandler());
2039 setPropertyHandler(CSSPropertyWebkitMaskOrigin, ApplyPropertyFillLayer<EFillBox, CSSPropertyWebkitMaskOrigin, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSToStyleMap::mapFillOrigin>::createHandler());
2040 setPropertyHandler(CSSPropertyWebkitMaskPosition, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitMaskPositionX, CSSPropertyWebkitMaskPositionY>::createHandler());
2041 setPropertyHandler(CSSPropertyWebkitMaskPositionX, ApplyPropertyFillLayer<Length, CSSPropertyWebkitMaskPositionX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isXPositionSet, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::clearXPosition, &FillLayer::initialFillXPosition, &CSSToStyleMap::mapFillXPosition>::createHandler());
2042 setPropertyHandler(CSSPropertyWebkitMaskPositionY, ApplyPropertyFillLayer<Length, CSSPropertyWebkitMaskPositionY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isYPositionSet, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::clearYPosition, &FillLayer::initialFillYPosition, &CSSToStyleMap::mapFillYPosition>::createHandler());
2043 setPropertyHandler(CSSPropertyWebkitMaskRepeat, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY>::createHandler());
2044 setPropertyHandler(CSSPropertyWebkitMaskRepeatX, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSToStyleMap::mapFillRepeatX>::createHandler());
2045 setPropertyHandler(CSSPropertyWebkitMaskRepeatY, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSToStyleMap::mapFillRepeatY>::createHandler());
2046 setPropertyHandler(CSSPropertyWebkitMaskSize, ApplyPropertyFillLayer<FillSize, CSSPropertyWebkitMaskSize, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSToStyleMap::mapFillSize>::createHandler());
2047 setPropertyHandler(CSSPropertyWebkitNbspMode, ApplyPropertyDefault<ENBSPMode, &RenderStyle::nbspMode, ENBSPMode, &RenderStyle::setNBSPMode, ENBSPMode, &RenderStyle::initialNBSPMode>::createHandler());
2048 setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitPerspectiveOriginX, CSSPropertyWebkitPerspectiveOriginY>::createHandler());
2049 setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, ApplyPropertyLength<&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX>::createHandler());
2050 setPropertyHandler(CSSPropertyWebkitPerspectiveOriginY, ApplyPropertyLength<&RenderStyle::perspectiveOriginY, &RenderStyle::setPerspectiveOriginY, &RenderStyle::initialPerspectiveOriginY>::createHandler());
2051 setPropertyHandler(CSSPropertyWebkitPrintColorAdjust, ApplyPropertyDefault<PrintColorAdjust, &RenderStyle::printColorAdjust, PrintColorAdjust, &RenderStyle::setPrintColorAdjust, PrintColorAdjust, &RenderStyle::initialPrintColorAdjust>::createHandler());
2052 #if ENABLE(CSS_REGIONS)
2053 setPropertyHandler(CSSPropertyWebkitRegionBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakAfter, EPageBreak, &RenderStyle::setRegionBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
2054 setPropertyHandler(CSSPropertyWebkitRegionBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakBefore, EPageBreak, &RenderStyle::setRegionBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
2055 setPropertyHandler(CSSPropertyWebkitRegionBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakInside, EPageBreak, &RenderStyle::setRegionBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
2056 setPropertyHandler(CSSPropertyWebkitRegionOverflow, ApplyPropertyDefault<RegionOverflow, &RenderStyle::regionOverflow, RegionOverflow, &RenderStyle::setRegionOverflow, RegionOverflow, &RenderStyle::initialRegionOverflow>::createHandler());
2058 setPropertyHandler(CSSPropertyWebkitRtlOrdering, ApplyPropertyDefault<Order, &RenderStyle::rtlOrdering, Order, &RenderStyle::setRTLOrdering, Order, &RenderStyle::initialRTLOrdering>::createHandler());
2059 setPropertyHandler(CSSPropertyWebkitTextCombine, ApplyPropertyDefault<TextCombine, &RenderStyle::textCombine, TextCombine, &RenderStyle::setTextCombine, TextCombine, &RenderStyle::initialTextCombine>::createHandler());
2060 setPropertyHandler(CSSPropertyWebkitTextEmphasisColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textEmphasisColor, &RenderStyle::setTextEmphasisColor, &RenderStyle::setVisitedLinkTextEmphasisColor, &RenderStyle::color>::createHandler());
2061 setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, ApplyPropertyDefault<TextEmphasisPosition, &RenderStyle::textEmphasisPosition, TextEmphasisPosition, &RenderStyle::setTextEmphasisPosition, TextEmphasisPosition, &RenderStyle::initialTextEmphasisPosition>::createHandler());
2062 setPropertyHandler(CSSPropertyWebkitTextEmphasisStyle, ApplyPropertyTextEmphasisStyle::createHandler());
2063 setPropertyHandler(CSSPropertyWebkitTextFillColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textFillColor, &RenderStyle::setTextFillColor, &RenderStyle::setVisitedLinkTextFillColor, &RenderStyle::color>::createHandler());
2064 setPropertyHandler(CSSPropertyWebkitTextOrientation, ApplyPropertyFont<TextOrientation, &FontDescription::textOrientation, &FontDescription::setTextOrientation, TextOrientationVerticalRight>::createHandler());
2065 setPropertyHandler(CSSPropertyWebkitTextSecurity, ApplyPropertyDefault<ETextSecurity, &RenderStyle::textSecurity, ETextSecurity, &RenderStyle::setTextSecurity, ETextSecurity, &RenderStyle::initialTextSecurity>::createHandler());
2066 setPropertyHandler(CSSPropertyWebkitTextStrokeColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textStrokeColor, &RenderStyle::setTextStrokeColor, &RenderStyle::setVisitedLinkTextStrokeColor, &RenderStyle::color>::createHandler());
2067 setPropertyHandler(CSSPropertyWebkitTransformOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitTransformOriginX, CSSPropertyWebkitTransformOriginY, CSSPropertyWebkitTransformOriginZ>::createHandler());
2068 setPropertyHandler(CSSPropertyWebkitTransformOriginX, ApplyPropertyLength<&RenderStyle::transformOriginX, &RenderStyle::setTransformOriginX, &RenderStyle::initialTransformOriginX>::createHandler());
2069 setPropertyHandler(CSSPropertyWebkitTransformOriginY, ApplyPropertyLength<&RenderStyle::transformOriginY, &RenderStyle::setTransformOriginY, &RenderStyle::initialTransformOriginY>::createHandler());
2070 setPropertyHandler(CSSPropertyWebkitTransformOriginZ, ApplyPropertyComputeLength<float, &RenderStyle::transformOriginZ, &RenderStyle::setTransformOriginZ, &RenderStyle::initialTransformOriginZ>::createHandler());
2071 setPropertyHandler(CSSPropertyWebkitTransformStyle, ApplyPropertyDefault<ETransformStyle3D, &RenderStyle::transformStyle3D, ETransformStyle3D, &RenderStyle::setTransformStyle3D, ETransformStyle3D, &RenderStyle::initialTransformStyle3D>::createHandler());
2072 setPropertyHandler(CSSPropertyWebkitTransitionDelay, ApplyPropertyAnimation<double, &Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSToStyleMap::mapAnimationDelay, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler());
2073 setPropertyHandler(CSSPropertyWebkitTransitionDuration, ApplyPropertyAnimation<double, &Animation::duration, &Animation::setDuration, &Animation::isDurationSet, &Animation::clearDuration, &Animation::initialAnimationDuration, &CSSToStyleMap::mapAnimationDuration, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler());
2074 setPropertyHandler(CSSPropertyWebkitTransitionProperty, ApplyPropertyAnimation<CSSPropertyID, &Animation::property, &Animation::setProperty, &Animation::isPropertySet, &Animation::clearProperty, &Animation::initialAnimationProperty, &CSSToStyleMap::mapAnimationProperty, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler());
2075 setPropertyHandler(CSSPropertyWebkitTransitionTimingFunction, ApplyPropertyAnimation<const PassRefPtr<TimingFunction>, &Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSToStyleMap::mapAnimationTimingFunction, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler());
2076 setPropertyHandler(CSSPropertyWebkitUserDrag, ApplyPropertyDefault<EUserDrag, &RenderStyle::userDrag, EUserDrag, &RenderStyle::setUserDrag, EUserDrag, &RenderStyle::initialUserDrag>::createHandler());
2077 setPropertyHandler(CSSPropertyWebkitUserModify, ApplyPropertyDefault<EUserModify, &RenderStyle::userModify, EUserModify, &RenderStyle::setUserModify, EUserModify, &RenderStyle::initialUserModify>::createHandler());
2078 setPropertyHandler(CSSPropertyWebkitUserSelect, ApplyPropertyDefault<EUserSelect, &RenderStyle::userSelect, EUserSelect, &RenderStyle::setUserSelect, EUserSelect, &RenderStyle::initialUserSelect>::createHandler());
2079 #if ENABLE(CSS_EXCLUSIONS)
2080 setPropertyHandler(CSSPropertyWebkitWrap, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitWrapFlow, CSSPropertyWebkitWrapMargin, CSSPropertyWebkitWrapPadding>::createHandler());
2081 setPropertyHandler(CSSPropertyWebkitWrapFlow, ApplyPropertyDefault<WrapFlow, &RenderStyle::wrapFlow, WrapFlow, &RenderStyle::setWrapFlow, WrapFlow, &RenderStyle::initialWrapFlow>::createHandler());
2082 setPropertyHandler(CSSPropertyWebkitWrapMargin, ApplyPropertyLength<&RenderStyle::wrapMargin, &RenderStyle::setWrapMargin, &RenderStyle::initialWrapMargin>::createHandler());
2083 setPropertyHandler(CSSPropertyWebkitWrapPadding, ApplyPropertyLength<&RenderStyle::wrapPadding, &RenderStyle::setWrapPadding, &RenderStyle::initialWrapPadding>::createHandler());
2084 setPropertyHandler(CSSPropertyWebkitWrapThrough, ApplyPropertyDefault<WrapThrough, &RenderStyle::wrapThrough, WrapThrough, &RenderStyle::setWrapThrough, WrapThrough, &RenderStyle::initialWrapThrough>::createHandler());
2085 setPropertyHandler(CSSPropertyWebkitShapeInside, ApplyPropertyWrapShape<&RenderStyle::wrapShapeInside, &RenderStyle::setWrapShapeInside, &RenderStyle::initialWrapShapeInside>::createHandler());
2086 setPropertyHandler(CSSPropertyWebkitShapeOutside, ApplyPropertyWrapShape<&RenderStyle::wrapShapeOutside, &RenderStyle::setWrapShapeOutside, &RenderStyle::initialWrapShapeOutside>::createHandler());
2088 setPropertyHandler(CSSPropertyWhiteSpace, ApplyPropertyDefault<EWhiteSpace, &RenderStyle::whiteSpace, EWhiteSpace, &RenderStyle::setWhiteSpace, EWhiteSpace, &RenderStyle::initialWhiteSpace>::createHandler());
2089 setPropertyHandler(CSSPropertyWidows, ApplyPropertyDefault<short, &RenderStyle::widows, short, &RenderStyle::setWidows, short, &RenderStyle::initialWidows>::createHandler());
2090 setPropertyHandler(CSSPropertyWidth, ApplyPropertyLength<&RenderStyle::width, &RenderStyle::setWidth, &RenderStyle::initialSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicEnabled, NoneDisabled, UndefinedDisabled>::createHandler());
2091 setPropertyHandler(CSSPropertyWordBreak, ApplyPropertyDefault<EWordBreak, &RenderStyle::wordBreak, EWordBreak, &RenderStyle::setWordBreak, EWordBreak, &RenderStyle::initialWordBreak>::createHandler());
2092 setPropertyHandler(CSSPropertyWordSpacing, ApplyPropertyComputeLength<int, &RenderStyle::wordSpacing, &RenderStyle::setWordSpacing, &RenderStyle::initialLetterWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler());
2093 // UAs must treat 'word-wrap' as an alternate name for the 'overflow-wrap' property. So using the same handlers.
2094 setPropertyHandler(CSSPropertyWordWrap, ApplyPropertyDefault<EOverflowWrap, &RenderStyle::overflowWrap, EOverflowWrap, &RenderStyle::setOverflowWrap, EOverflowWrap, &RenderStyle::initialOverflowWrap>::createHandler());
2095 setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::zIndex, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHasAutoZIndex>::createHandler());
2096 setPropertyHandler(CSSPropertyZoom, ApplyPropertyZoom::createHandler());