WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-68944-20111020135803.patch (text/plain), 130.61 KB, created by
Luke Macpherson
on 2011-10-19 19:58:06 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Luke Macpherson
Created:
2011-10-19 19:58:06 PDT
Size:
130.61 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 97893) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,114 @@ >+2011-10-19 Luke Macpherson <macpherson@chromium.org> >+ >+ REGRESSION(80893): HTML5 spec takes 2s longer to load due to time spent in CSSStyleSelector >+ https://bugs.webkit.org/show_bug.cgi?id=68944 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests / Covered by existing tests. >+ >+ Removes all virtual dispatch from CSSStyleApplyProperty by converting to use static function pointers for dispatch. >+ Uses class templates instead of function templates to allow default parameters and also to share parameter declarations across static functions. >+ All constructor parameters become template parameters. This improves the level of compiler optimization that can be achieved. >+ >+ * css/CSSStyleApplyProperty.cpp: >+ (WebCore::ApplyPropertyExpanding::applyInheritValue): >+ (WebCore::ApplyPropertyExpanding::applyInitialValue): >+ (WebCore::ApplyPropertyExpanding::applyValue): >+ (WebCore::ApplyPropertyExpanding::createHandler): >+ (WebCore::ApplyPropertyDefaultBase::setValue): >+ (WebCore::ApplyPropertyDefaultBase::value): >+ (WebCore::ApplyPropertyDefaultBase::initial): >+ (WebCore::ApplyPropertyDefaultBase::applyInheritValue): >+ (WebCore::ApplyPropertyDefaultBase::applyInitialValue): >+ (WebCore::ApplyPropertyDefaultBase::applyValue): >+ (WebCore::ApplyPropertyDefaultBase::createHandler): >+ (WebCore::ApplyPropertyDefault::setValue): >+ (WebCore::ApplyPropertyDefault::applyValue): >+ (WebCore::ApplyPropertyDefault::createHandler): >+ (WebCore::ApplyPropertyStyleImage::applyValue): >+ (WebCore::ApplyPropertyStyleImage::createHandler): >+ (WebCore::ApplyPropertyAuto::setValue): >+ (WebCore::ApplyPropertyAuto::value): >+ (WebCore::ApplyPropertyAuto::hasAuto): >+ (WebCore::ApplyPropertyAuto::setAuto): >+ (WebCore::ApplyPropertyAuto::applyInheritValue): >+ (WebCore::ApplyPropertyAuto::applyInitialValue): >+ (WebCore::ApplyPropertyAuto::applyValue): >+ (WebCore::ApplyPropertyAuto::createHandler): >+ (WebCore::defaultInitialColor): >+ (WebCore::ApplyPropertyColor::applyInheritValue): >+ (WebCore::ApplyPropertyColor::applyInitialValue): >+ (WebCore::ApplyPropertyColor::applyValue): >+ (WebCore::ApplyPropertyColor::createHandler): >+ (WebCore::ApplyPropertyDirection::applyValue): >+ (WebCore::ApplyPropertyDirection::createHandler): >+ (WebCore::ApplyPropertyLength::setValue): >+ (WebCore::ApplyPropertyLength::applyValue): >+ (WebCore::ApplyPropertyLength::createHandler): >+ (WebCore::ApplyPropertyString::setValue): >+ (WebCore::ApplyPropertyString::applyValue): >+ (WebCore::ApplyPropertyString::createHandler): >+ (WebCore::ApplyPropertyBorderRadius::setValue): >+ (WebCore::ApplyPropertyBorderRadius::applyValue): >+ (WebCore::ApplyPropertyBorderRadius::createHandler): >+ (WebCore::ApplyPropertyFillLayer::applyInheritValue): >+ (WebCore::ApplyPropertyFillLayer::applyInitialValue): >+ (WebCore::ApplyPropertyFillLayer::applyValue): >+ (WebCore::ApplyPropertyFillLayer::createHandler): >+ (WebCore::ApplyPropertyComputeLength::setValue): >+ (WebCore::ApplyPropertyComputeLength::applyValue): >+ (WebCore::ApplyPropertyComputeLength::createHandler): >+ (WebCore::ApplyPropertyFont::applyInheritValue): >+ (WebCore::ApplyPropertyFont::applyInitialValue): >+ (WebCore::ApplyPropertyFont::applyValue): >+ (WebCore::ApplyPropertyFont::createHandler): >+ (WebCore::ApplyPropertyFontWeight::applyValue): >+ (WebCore::ApplyPropertyFontWeight::createHandler): >+ (WebCore::ApplyPropertyCounter::emptyFunction): >+ (WebCore::ApplyPropertyCounter::applyValue): >+ (WebCore::ApplyPropertyCounter::createHandler): >+ (WebCore::ApplyPropertyCursor::applyInheritValue): >+ (WebCore::ApplyPropertyCursor::applyInitialValue): >+ (WebCore::ApplyPropertyCursor::applyValue): >+ (WebCore::ApplyPropertyCursor::createHandler): >+ (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): >+ (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): >+ (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): >+ (WebCore::ApplyPropertyTextEmphasisStyle::createHandler): >+ (WebCore::ApplyPropertyAnimation::setValue): >+ (WebCore::ApplyPropertyAnimation::value): >+ (WebCore::ApplyPropertyAnimation::test): >+ (WebCore::ApplyPropertyAnimation::clear): >+ (WebCore::ApplyPropertyAnimation::initial): >+ (WebCore::ApplyPropertyAnimation::map): >+ (WebCore::ApplyPropertyAnimation::accessAnimations): >+ (WebCore::ApplyPropertyAnimation::animations): >+ (WebCore::ApplyPropertyAnimation::applyInheritValue): >+ (WebCore::ApplyPropertyAnimation::applyInitialValue): >+ (WebCore::ApplyPropertyAnimation::applyValue): >+ (WebCore::ApplyPropertyAnimation::createHandler): >+ (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): >+ (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): >+ (WebCore::ApplyPropertyOutlineStyle::applyValue): >+ (WebCore::ApplyPropertyOutlineStyle::createHandler): >+ (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): >+ * css/CSSStyleApplyProperty.h: >+ (WebCore::PropertyHandler::PropertyHandler): >+ (WebCore::PropertyHandler::applyInheritValue): >+ (WebCore::PropertyHandler::applyInitialValue): >+ (WebCore::PropertyHandler::applyValue): >+ (WebCore::PropertyHandler::isValid): >+ (WebCore::PropertyHandler::inheritFunction): >+ (WebCore::PropertyHandler::initialFunction): >+ (WebCore::PropertyHandler::applyFunction): >+ (WebCore::CSSStyleApplyProperty::propertyHandler): >+ (WebCore::CSSStyleApplyProperty::setPropertyHandler): >+ * css/CSSStyleSelector.cpp: >+ (WebCore::CSSStyleSelector::applyProperty): >+ * rendering/style/RenderStyle.h: >+ (WebCore::InheritedFlags::invalidColor): >+ > 2011-10-19 Shinya Kawanaka <shinyak@google.com> > > ArrayBuffer should have slice method. >Index: Source/WebCore/css/CSSStyleApplyProperty.cpp >=================================================================== >--- Source/WebCore/css/CSSStyleApplyProperty.cpp (revision 97893) >+++ Source/WebCore/css/CSSStyleApplyProperty.cpp (working copy) >@@ -43,151 +43,134 @@ using namespace std; > namespace WebCore { > > enum ExpandValueBehavior {SuppressValue = 0, ExpandValue}; >-template <ExpandValueBehavior expandValue> >-class ApplyPropertyExpanding : public ApplyPropertyBase { >+template <ExpandValueBehavior expandValue, CSSPropertyID one = CSSPropertyInvalid, CSSPropertyID two = CSSPropertyInvalid, CSSPropertyID three = CSSPropertyInvalid, CSSPropertyID four = CSSPropertyInvalid> >+class ApplyPropertyExpanding { > public: >- ApplyPropertyExpanding(ApplyPropertyBase* one = 0, ApplyPropertyBase* two = 0, ApplyPropertyBase *three = 0, ApplyPropertyBase* four = 0) >- { >- m_propertyMap[0] = one; >- m_propertyMap[1] = two; >- m_propertyMap[2] = three; >- m_propertyMap[3] = four; >- m_propertyMap[4] = 0; // always null terminated >- } > >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+ template <CSSPropertyID id> >+ static inline void applyInheritValue(CSSStyleSelector* selector) > { >- for (ApplyPropertyBase* const* e = m_propertyMap; *e; e++) >- (*e)->applyInheritValue(selector); >+ if (id == CSSPropertyInvalid) >+ return; >+ >+ const CSSStyleApplyProperty& table = CSSStyleApplyProperty::sharedCSSStyleApplyProperty(); >+ const PropertyHandler& handler = table.propertyHandler(id); >+ if (handler.isValid()) >+ handler.applyInheritValue(selector); > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >+ static void applyInheritValue(CSSStyleSelector* selector) > { >- for (ApplyPropertyBase* const* e = m_propertyMap; *e; e++) >- (*e)->applyInitialValue(selector); >+ applyInheritValue<one>(selector); >+ applyInheritValue<two>(selector); >+ applyInheritValue<three>(selector); >+ applyInheritValue<four>(selector); > } > >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ template <CSSPropertyID id> >+ static inline void applyInitialValue(CSSStyleSelector* selector) > { >- if (!expandValue) >+ if (id == CSSPropertyInvalid) > return; > >- for (ApplyPropertyBase* const* e = m_propertyMap; *e; e++) >- (*e)->applyValue(selector, value); >- } >-private: >- ApplyPropertyBase* m_propertyMap[5]; >-}; >- >-template <typename GetterType, typename SetterType = GetterType, typename InitialType = GetterType> >-class ApplyPropertyDefaultBase : public ApplyPropertyBase { >-public: >- typedef GetterType (RenderStyle::*GetterFunction)() const; >- typedef void (RenderStyle::*SetterFunction)(SetterType); >- typedef InitialType (*InitialFunction)(); >- >- ApplyPropertyDefaultBase(GetterFunction getter, SetterFunction setter, InitialFunction initial) >- : m_getter(getter) >- , m_setter(setter) >- , m_initial(initial) >- { >+ const CSSStyleApplyProperty& table = CSSStyleApplyProperty::sharedCSSStyleApplyProperty(); >+ const PropertyHandler& handler = table.propertyHandler(id); >+ if (handler.isValid()) >+ handler.applyInitialValue(selector); > } > >-private: >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+ static void applyInitialValue(CSSStyleSelector* selector) > { >- setValue(selector->style(), value(selector->parentStyle())); >+ applyInitialValue<one>(selector); >+ applyInitialValue<two>(selector); >+ applyInitialValue<three>(selector); >+ applyInitialValue<four>(selector); > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >+ template <CSSPropertyID id> >+ static inline void applyValue(CSSStyleSelector* selector, CSSValue* value) > { >- setValue(selector->style(), initial()); >- } >+ if (id == CSSPropertyInvalid) >+ return; > >-protected: >- void setValue(RenderStyle* style, SetterType value) const >- { >- (style->*m_setter)(value); >+ const CSSStyleApplyProperty& table = CSSStyleApplyProperty::sharedCSSStyleApplyProperty(); >+ const PropertyHandler& handler = table.propertyHandler(id); >+ if (handler.isValid()) >+ handler.applyValue(selector, value); > } > >- GetterType value(RenderStyle* style) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { >- return (style->*m_getter)(); >- } >+ if (!expandValue) >+ return; > >- InitialType initial() const >- { >- return (*m_initial)(); >+ applyValue<one>(selector, value); >+ applyValue<two>(selector, value); >+ applyValue<three>(selector, value); >+ applyValue<four>(selector, value); > } >- >- GetterFunction m_getter; >- SetterFunction m_setter; >- InitialFunction m_initial; >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } > }; > >+template <typename GetterType, GetterType (RenderStyle::*getterFunction)() const, typename SetterType, void (RenderStyle::*setterFunction)(SetterType), typename InitialType, InitialType (*initialFunction)()> >+class ApplyPropertyDefaultBase { >+public: >+ static void setValue(RenderStyle* style, SetterType value) { (style->*setterFunction)(value); } >+ static GetterType value(RenderStyle* style) { return (style->*getterFunction)(); } >+ static InitialType initial() { return (*initialFunction)(); } >+ static void applyInheritValue(CSSStyleSelector* selector) { setValue(selector->style(), value(selector->parentStyle())); } >+ static void applyInitialValue(CSSStyleSelector* selector) { setValue(selector->style(), initial()); } >+ static void applyValue(CSSStyleSelector*, CSSValue*) { } >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } >+}; > >-template <typename T> >-class ApplyPropertyDefault : public ApplyPropertyDefaultBase<T> { >+template <typename GetterType, GetterType (RenderStyle::*getterFunction)() const, typename SetterType, void (RenderStyle::*setterFunction)(SetterType), typename InitialType, InitialType (*initialFunction)()> >+class ApplyPropertyDefault { > public: >- ApplyPropertyDefault(typename ApplyPropertyDefaultBase<T>::GetterFunction getter, typename ApplyPropertyDefaultBase<T>::SetterFunction setter, typename ApplyPropertyDefaultBase<T>::InitialFunction initial) >- : ApplyPropertyDefaultBase<T>(getter, setter, initial) >+ static void setValue(RenderStyle* style, SetterType value) { (style->*setterFunction)(value); } >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { >+ if (value->isPrimitiveValue()) >+ setValue(selector->style(), *static_cast<CSSPrimitiveValue*>(value)); > } >- >-protected: >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static PropertyHandler createHandler() > { >- if (value->isPrimitiveValue()) >- ApplyPropertyDefaultBase<T>::setValue(selector->style(), *static_cast<CSSPrimitiveValue*>(value)); >+ PropertyHandler handler = ApplyPropertyDefaultBase<GetterType, getterFunction, SetterType, setterFunction, InitialType, initialFunction>::createHandler(); >+ return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); > } > }; > >-class ApplyPropertyStyleImage : public ApplyPropertyDefaultBase<StyleImage*, PassRefPtr<StyleImage> > { >+template <StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<StyleImage>), StyleImage* (*initialFunction)(), CSSPropertyID property> >+class ApplyPropertyStyleImage { > public: >- ApplyPropertyStyleImage(GetterFunction getter, SetterFunction setter, InitialFunction initial, CSSPropertyID property) >- : ApplyPropertyDefaultBase<StyleImage*, PassRefPtr<StyleImage> >(getter, setter, initial) >- , m_property(property) >- { >- } >- >-private: >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) { (selector->style()->*setterFunction)(selector->styleImage(property, value)); } >+ static PropertyHandler createHandler() > { >- setValue(selector->style(), selector->styleImage(m_property, value)); >+ PropertyHandler handler = ApplyPropertyDefaultBase<StyleImage*, getterFunction, PassRefPtr<StyleImage>, setterFunction, StyleImage*, initialFunction>::createHandler(); >+ return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); > } >- >- CSSPropertyID m_property; > }; > > enum AutoValueType {Number = 0, ComputeLength}; >-template <typename T, AutoValueType valueType = Number, int autoIdentity = CSSValueAuto> >-class ApplyPropertyAuto : public ApplyPropertyDefaultBase<T> { >+template <typename T, T (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(T), bool (RenderStyle::*hasAutoFunction)() const, void (RenderStyle::*setAutoFunction)(), AutoValueType valueType = Number, int autoIdentity = CSSValueAuto> >+class ApplyPropertyAuto { > public: >- typedef bool (RenderStyle::*HasAutoFunction)() const; >- typedef void (RenderStyle::*SetAutoFunction)(); >- >- ApplyPropertyAuto(typename ApplyPropertyDefaultBase<T>::GetterFunction getter, typename ApplyPropertyDefaultBase<T>::SetterFunction setter, HasAutoFunction hasAuto, SetAutoFunction setAuto) >- : ApplyPropertyDefaultBase<T>(getter, setter, 0) >- , m_hasAuto(hasAuto) >- , m_setAuto(setAuto) >- { >- } >+ static void setValue(RenderStyle* style, T value) { (style->*setterFunction)(value); } >+ static T value(RenderStyle* style) { return (style->*getterFunction)(); } >+ static bool hasAuto(RenderStyle* style) { return (style->*hasAutoFunction)(); } >+ static void setAuto(RenderStyle* style) { (style->*setAutoFunction)(); } > >-protected: >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+ static void applyInheritValue(CSSStyleSelector* selector) > { > if (hasAuto(selector->parentStyle())) > setAuto(selector->style()); > else >- ApplyPropertyDefaultBase<T>::setValue(selector->style(), ApplyPropertyDefaultBase<T>::value(selector->parentStyle())); >+ setValue(selector->style(), value(selector->parentStyle())); > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >- { >- setAuto(selector->style()); >- } >+ static void applyInitialValue(CSSStyleSelector* selector) { setAuto(selector->style()); } > >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > if (!value->isPrimitiveValue()) > return; >@@ -196,60 +179,38 @@ protected: > if (primitiveValue->getIdent() == autoIdentity) > setAuto(selector->style()); > else if (valueType == Number) >- ApplyPropertyDefaultBase<T>::setValue(selector->style(), *primitiveValue); >+ setValue(selector->style(), *primitiveValue); > else if (valueType == ComputeLength) >- ApplyPropertyDefaultBase<T>::setValue(selector->style(), primitiveValue->computeLength<T>(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom())); >+ setValue(selector->style(), primitiveValue->computeLength<T>(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom())); > } > >- bool hasAuto(RenderStyle* style) const >- { >- return (style->*m_hasAuto)(); >- } >- >- void setAuto(RenderStyle* style) const >- { >- (style->*m_setAuto)(); >- } >- >- HasAutoFunction m_hasAuto; >- SetAutoFunction m_setAuto; >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } > }; > > enum ColorInherit {NoInheritFromParent = 0, InheritFromParent}; >-template <ColorInherit inheritColorFromParent> >-class ApplyPropertyColor : public ApplyPropertyBase { >+Color defaultInitialColor(); >+Color defaultInitialColor() { return Color(); } >+template <ColorInherit inheritColorFromParent, >+ const Color& (RenderStyle::*getterFunction)() const, >+ void (RenderStyle::*setterFunction)(const Color&), >+ void (RenderStyle::*visitedLinkSetterFunction)(const Color&), >+ const Color& (RenderStyle::*defaultFunction)() const, >+ Color (*initialFunction)() = &defaultInitialColor> >+class ApplyPropertyColor { > public: >- typedef const Color& (RenderStyle::*GetterFunction)() const; >- typedef void (RenderStyle::*SetterFunction)(const Color&); >- typedef const Color& (RenderStyle::*DefaultFunction)() const; >- typedef Color (*InitialFunction)(); >- >- ApplyPropertyColor(GetterFunction getter, SetterFunction setter, SetterFunction visitedLinkSetter, DefaultFunction defaultFunction, InitialFunction initialFunction = 0) >- : m_getter(getter) >- , m_setter(setter) >- , m_visitedLinkSetter(visitedLinkSetter) >- , m_default(defaultFunction) >- , m_initial(initialFunction) >- { >- } >- >-private: >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+ static void applyInheritValue(CSSStyleSelector* selector) > { > // Visited link style can never explicitly inherit from parent visited link style so no separate getters are needed. >- const Color& color = (selector->parentStyle()->*m_getter)(); >- if (m_default && !color.isValid()) >- applyColorValue(selector, (selector->parentStyle()->*m_default)()); >- else >- applyColorValue(selector, color); >+ const Color& color = (selector->parentStyle()->*getterFunction)(); >+ applyColorValue(selector, color.isValid() ? color : (selector->parentStyle()->*defaultFunction)()); > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >+ static void applyInitialValue(CSSStyleSelector* selector) > { >- applyColorValue(selector, m_initial ? m_initial() : Color()); >+ applyColorValue(selector, initialFunction()); > } > >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > if (!value->isPrimitiveValue()) > return; >@@ -259,42 +220,39 @@ private: > applyInheritValue(selector); > else { > if (selector->applyPropertyToRegularStyle()) >- (selector->style()->*m_setter)(selector->getColorFromPrimitiveValue(primitiveValue, false)); >- if (selector->applyPropertyToVisitedLinkStyle() && m_visitedLinkSetter) >- (selector->style()->*m_visitedLinkSetter)(selector->getColorFromPrimitiveValue(primitiveValue, true)); >+ (selector->style()->*setterFunction)(selector->getColorFromPrimitiveValue(primitiveValue, false)); >+ if (selector->applyPropertyToVisitedLinkStyle()) >+ (selector->style()->*visitedLinkSetterFunction)(selector->getColorFromPrimitiveValue(primitiveValue, true)); > } > } > >- void applyColorValue(CSSStyleSelector* selector, const Color& color) const >+ static void applyColorValue(CSSStyleSelector* selector, const Color& color) > { > if (selector->applyPropertyToRegularStyle()) >- (selector->style()->*m_setter)(color); >- if (selector->applyPropertyToVisitedLinkStyle() && m_visitedLinkSetter) >- (selector->style()->*m_visitedLinkSetter)(color); >+ (selector->style()->*setterFunction)(color); >+ if (selector->applyPropertyToVisitedLinkStyle()) >+ (selector->style()->*visitedLinkSetterFunction)(color); > } > >- GetterFunction m_getter; >- SetterFunction m_setter; >- SetterFunction m_visitedLinkSetter; >- DefaultFunction m_default; >- InitialFunction m_initial; >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } > }; > >-class ApplyPropertyDirection : public ApplyPropertyDefault<TextDirection> { >+template <TextDirection (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(TextDirection), TextDirection (*initialFunction)()> >+class ApplyPropertyDirection { > public: >- ApplyPropertyDirection(GetterFunction getter, SetterFunction setter, InitialFunction initial) >- : ApplyPropertyDefault<TextDirection>(getter, setter, initial) >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { >- } >- >-private: >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >- { >- ApplyPropertyDefault<TextDirection>::applyValue(selector, value); >+ ApplyPropertyDefault<TextDirection, getterFunction, TextDirection, setterFunction, TextDirection, initialFunction>::applyValue(selector, value); > Element* element = selector->element(); > if (element && selector->element() == element->document()->documentElement()) > element->document()->setDirectionSetOnDocumentElement(true); > } >+ >+ static PropertyHandler createHandler() >+ { >+ PropertyHandler handler = ApplyPropertyDefault<TextDirection, getterFunction, TextDirection, setterFunction, TextDirection, initialFunction>::createHandler(); >+ return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); >+ } > }; > > enum LengthAuto { AutoDisabled = 0, AutoEnabled }; >@@ -303,21 +261,19 @@ enum LengthMinIntrinsic { MinIntrinsicDi > enum LengthNone { NoneDisabled = 0, NoneEnabled }; > enum LengthUndefined { UndefinedDisabled = 0, UndefinedEnabled }; > enum LengthFlexDirection { FlexDirectionDisabled = 0, FlexWidth, FlexHeight }; >-template <LengthAuto autoEnabled = AutoDisabled, >+template <Length (RenderStyle::*getterFunction)() const, >+ void (RenderStyle::*setterFunction)(Length), >+ Length (*initialFunction)(), >+ LengthAuto autoEnabled = AutoDisabled, > LengthIntrinsic intrinsicEnabled = IntrinsicDisabled, > LengthMinIntrinsic minIntrinsicEnabled = MinIntrinsicDisabled, > LengthNone noneEnabled = NoneDisabled, > LengthUndefined noneUndefined = UndefinedDisabled, > LengthFlexDirection flexDirection = FlexDirectionDisabled> >-class ApplyPropertyLength : public ApplyPropertyDefaultBase<Length> { >+class ApplyPropertyLength { > public: >- ApplyPropertyLength(GetterFunction getter, SetterFunction setter, InitialFunction initial) >- : ApplyPropertyDefaultBase<Length>(getter, setter, initial) >- { >- } >- >-private: >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void setValue(RenderStyle* style, Length value) { (style->*setterFunction)(value); } >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > #if ENABLE(CSS3_FLEXBOX) > if (!value->isPrimitiveValue()) { >@@ -362,19 +318,20 @@ private: > setValue(selector->style(), Length(primitiveValue->getDoubleValue(), Percent)); > } > } >-}; > >-enum StringIdentBehavior { NothingMapsToNull = 0, MapNoneToNull, MapAutoToNull }; >-template <StringIdentBehavior identBehavior = NothingMapsToNull> >-class ApplyPropertyString : public ApplyPropertyDefaultBase<const AtomicString&> { >-public: >- ApplyPropertyString(GetterFunction getter, SetterFunction setter, InitialFunction initial) >- : ApplyPropertyDefaultBase<const AtomicString&>(getter, setter, initial) >+ static PropertyHandler createHandler() > { >+ PropertyHandler handler = ApplyPropertyDefaultBase<Length, getterFunction, Length, setterFunction, Length, initialFunction>::createHandler(); >+ return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); > } >+}; > >-private: >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+enum StringIdentBehavior { NothingMapsToNull = 0, MapNoneToNull, MapAutoToNull }; >+template <StringIdentBehavior identBehavior, const AtomicString& (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(const AtomicString&), const AtomicString& (*initialFunction)()> >+class ApplyPropertyString { >+public: >+ static void setValue(RenderStyle* style, const AtomicString& value) { (style->*setterFunction)(value); } >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > if (!value->isPrimitiveValue()) > return; >@@ -385,16 +342,18 @@ private: > else > setValue(selector->style(), primitiveValue->getStringValue()); > } >+ static PropertyHandler createHandler() >+ { >+ PropertyHandler handler = ApplyPropertyDefaultBase<const AtomicString&, getterFunction, const AtomicString&, setterFunction, const AtomicString&, initialFunction>::createHandler(); >+ return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); >+ } > }; > >-class ApplyPropertyBorderRadius : public ApplyPropertyDefaultBase<LengthSize> { >+template <LengthSize (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(LengthSize), LengthSize (*initialFunction)()> >+class ApplyPropertyBorderRadius { > public: >- ApplyPropertyBorderRadius(GetterFunction getter, SetterFunction setter, InitialFunction initial) >- : ApplyPropertyDefaultBase<LengthSize>(getter, setter, initial) >- { >- } >-private: >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void setValue(RenderStyle* style, LengthSize value) { (style->*setterFunction)(value); } >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > if (!value->isPrimitiveValue()) > return; >@@ -426,41 +385,38 @@ private: > LengthSize size(radiusWidth, radiusHeight); > setValue(selector->style(), size); > } >-}; >- >-template <typename T> >-class ApplyPropertyFillLayer : public ApplyPropertyBase { >-public: >- ApplyPropertyFillLayer(CSSPropertyID propertyId, EFillLayerType fillLayerType, FillLayer* (RenderStyle::*accessLayers)(), >- const FillLayer* (RenderStyle::*layers)() const, bool (FillLayer::*test)() const, T (FillLayer::*get)() const, >- void (FillLayer::*set)(T), void (FillLayer::*clear)(), T (*initial)(EFillLayerType), >- void (CSSStyleSelector::*mapFill)(CSSPropertyID, FillLayer*, CSSValue*)) >- : m_propertyId(propertyId) >- , m_fillLayerType(fillLayerType) >- , m_accessLayers(accessLayers) >- , m_layers(layers) >- , m_test(test) >- , m_get(get) >- , m_set(set) >- , m_clear(clear) >- , m_initial(initial) >- , m_mapFill(mapFill) >+ static PropertyHandler createHandler() > { >+ PropertyHandler handler = ApplyPropertyDefaultBase<LengthSize, getterFunction, LengthSize, setterFunction, LengthSize, initialFunction>::createHandler(); >+ return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); > } >+}; > >-private: >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+template <typename T, >+ CSSPropertyID propertyId, >+ EFillLayerType fillLayerType, >+ FillLayer* (RenderStyle::*accessLayersFunction)(), >+ const FillLayer* (RenderStyle::*layersFunction)() const, >+ bool (FillLayer::*testFunction)() const, >+ T (FillLayer::*getFunction)() const, >+ void (FillLayer::*setFunction)(T), >+ void (FillLayer::*clearFunction)(), >+ T (*initialFunction)(EFillLayerType), >+ void (CSSStyleSelector::*mapFillFunction)(CSSPropertyID, FillLayer*, CSSValue*)> >+class ApplyPropertyFillLayer { >+public: >+ static void applyInheritValue(CSSStyleSelector* selector) > { >- FillLayer* currChild = (selector->style()->*m_accessLayers)(); >+ FillLayer* currChild = (selector->style()->*accessLayersFunction)(); > FillLayer* prevChild = 0; >- const FillLayer* currParent = (selector->parentStyle()->*m_layers)(); >- while (currParent && (currParent->*m_test)()) { >+ const FillLayer* currParent = (selector->parentStyle()->*layersFunction)(); >+ while (currParent && (currParent->*testFunction)()) { > if (!currChild) { > /* Need to make a new layer.*/ >- currChild = new FillLayer(m_fillLayerType); >+ currChild = new FillLayer(fillLayerType); > prevChild->setNext(currChild); > } >- (currChild->*m_set)((currParent->*m_get)()); >+ (currChild->*setFunction)((currParent->*getFunction)()); > prevChild = currChild; > currChild = prevChild->next(); > currParent = currParent->next(); >@@ -468,22 +424,22 @@ private: > > while (currChild) { > /* Reset any remaining layers to not have the property set. */ >- (currChild->*m_clear)(); >+ (currChild->*clearFunction)(); > currChild = currChild->next(); > } > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >+ static void applyInitialValue(CSSStyleSelector* selector) > { >- FillLayer* currChild = (selector->style()->*m_accessLayers)(); >- (currChild->*m_set)((*m_initial)(m_fillLayerType)); >+ FillLayer* currChild = (selector->style()->*accessLayersFunction)(); >+ (currChild->*setFunction)((*initialFunction)(fillLayerType)); > for (currChild = currChild->next(); currChild; currChild = currChild->next()) >- (currChild->*m_clear)(); >+ (currChild->*clearFunction)(); > } > >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { >- FillLayer* currChild = (selector->style()->*m_accessLayers)(); >+ FillLayer* currChild = (selector->style()->*accessLayersFunction)(); > FillLayer* prevChild = 0; > if (value->isValueList()) { > /* Walk each value and put it into a layer, creating new layers as needed. */ >@@ -491,53 +447,41 @@ private: > for (unsigned int i = 0; i < valueList->length(); i++) { > if (!currChild) { > /* Need to make a new layer to hold this value */ >- currChild = new FillLayer(m_fillLayerType); >+ currChild = new FillLayer(fillLayerType); > prevChild->setNext(currChild); > } >- (selector->*m_mapFill)(m_propertyId, currChild, valueList->itemWithoutBoundsCheck(i)); >+ (selector->*mapFillFunction)(propertyId, currChild, valueList->itemWithoutBoundsCheck(i)); > prevChild = currChild; > currChild = currChild->next(); > } > } else { >- (selector->*m_mapFill)(m_propertyId, currChild, value); >+ (selector->*mapFillFunction)(propertyId, currChild, value); > currChild = currChild->next(); > } > while (currChild) { > /* Reset all remaining layers to not have the property set. */ >- (currChild->*m_clear)(); >+ (currChild->*clearFunction)(); > currChild = currChild->next(); > } > } > >-protected: >- CSSPropertyID m_propertyId; >- EFillLayerType m_fillLayerType; >- FillLayer* (RenderStyle::*m_accessLayers)(); >- const FillLayer* (RenderStyle::*m_layers)() const; >- bool (FillLayer::*m_test)() const; >- T (FillLayer::*m_get)() const; >- void (FillLayer::*m_set)(T); >- void (FillLayer::*m_clear)(); >- T (*m_initial)(EFillLayerType); >- void (CSSStyleSelector::*m_mapFill)(CSSPropertyID, FillLayer*, CSSValue*); >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } > }; > > enum ComputeLengthNormal {NormalDisabled = 0, NormalEnabled}; > enum ComputeLengthThickness {ThicknessDisabled = 0, ThicknessEnabled}; > enum ComputeLengthSVGZoom {SVGZoomDisabled = 0, SVGZoomEnabled}; > template <typename T, >+ T (RenderStyle::*getterFunction)() const, >+ void (RenderStyle::*setterFunction)(T), >+ T (*initialFunction)(), > ComputeLengthNormal normalEnabled = NormalDisabled, > ComputeLengthThickness thicknessEnabled = ThicknessDisabled, > ComputeLengthSVGZoom svgZoomEnabled = SVGZoomDisabled> >-class ApplyPropertyComputeLength : public ApplyPropertyDefaultBase<T> { >+class ApplyPropertyComputeLength { > public: >- ApplyPropertyComputeLength(typename ApplyPropertyDefaultBase<T>::GetterFunction getter, typename ApplyPropertyDefaultBase<T>::SetterFunction setter, typename ApplyPropertyDefaultBase<T>::InitialFunction initial) >- : ApplyPropertyDefaultBase<T>(getter, setter, initial) >- { >- } >- >-private: >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void setValue(RenderStyle* style, T value) { (style->*setterFunction)(value); } >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > // note: CSSPropertyLetter/WordSpacing right now sets to zero if it's not a primitive value for some reason... > if (!value->isPrimitiveValue()) >@@ -563,61 +507,48 @@ private: > length = 0; > } > >- this->setValue(selector->style(), length); >+ setValue(selector->style(), length); > } >-}; >- >-template <typename T> >-class ApplyPropertyFont : public ApplyPropertyBase { >-public: >- typedef T (FontDescription::*GetterFunction)() const; >- typedef void (FontDescription::*SetterFunction)(T); >- >- ApplyPropertyFont(GetterFunction getter, SetterFunction setter, T initial) >- : m_getter(getter) >- , m_setter(setter) >- , m_initial(initial) >+ static PropertyHandler createHandler() > { >+ PropertyHandler handler = ApplyPropertyDefaultBase<T, getterFunction, T, setterFunction, T, initialFunction>::createHandler(); >+ return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); > } >+}; > >-private: >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+template <typename T, T (FontDescription::*getterFunction)() const, void (FontDescription::*setterFunction)(T), T initialValue> >+class ApplyPropertyFont { >+public: >+ static void applyInheritValue(CSSStyleSelector* selector) > { > FontDescription fontDescription = selector->fontDescription(); >- (fontDescription.*m_setter)((selector->parentFontDescription().*m_getter)()); >+ (fontDescription.*setterFunction)((selector->parentFontDescription().*getterFunction)()); > selector->setFontDescription(fontDescription); > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >+ static void applyInitialValue(CSSStyleSelector* selector) > { > FontDescription fontDescription = selector->fontDescription(); >- (fontDescription.*m_setter)(m_initial); >+ (fontDescription.*setterFunction)(initialValue); > selector->setFontDescription(fontDescription); > } > >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > if (!value->isPrimitiveValue()) > return; > CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value); > FontDescription fontDescription = selector->fontDescription(); >- (fontDescription.*m_setter)(*primitiveValue); >+ (fontDescription.*setterFunction)(*primitiveValue); > selector->setFontDescription(fontDescription); > } > >- GetterFunction m_getter; >- SetterFunction m_setter; >- T m_initial; >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } > }; > >-class ApplyPropertyFontWeight : public ApplyPropertyFont<FontWeight> { >+class ApplyPropertyFontWeight { > public: >- ApplyPropertyFontWeight() >- : ApplyPropertyFont<FontWeight>(&FontDescription::weight, &FontDescription::setWeight, FontWeightNormal) >- { >- } >- >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > if (!value->isPrimitiveValue()) > return; >@@ -638,16 +569,19 @@ public: > } > selector->setFontDescription(fontDescription); > } >+ static PropertyHandler createHandler() >+ { >+ PropertyHandler handler = ApplyPropertyFont<FontWeight, &FontDescription::weight, &FontDescription::setWeight, FontWeightNormal>::createHandler(); >+ return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); >+ } > }; > > enum CounterBehavior {Increment = 0, Reset}; > template <CounterBehavior counterBehavior> >-class ApplyPropertyCounter : public ApplyPropertyBase { >-private: >- virtual void applyInheritValue(CSSStyleSelector*) const { } >- virtual void applyInitialValue(CSSStyleSelector*) const { } >- >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+class ApplyPropertyCounter { >+public: >+ static void emptyFunction(CSSStyleSelector*) { } >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > if (!value->isValueList()) > return; >@@ -691,24 +625,25 @@ private: > } > } > } >+ static PropertyHandler createHandler() { return PropertyHandler(&emptyFunction, &emptyFunction, &applyValue); } > }; > > >-class ApplyPropertyCursor : public ApplyPropertyBase { >-private: >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+class ApplyPropertyCursor { >+public: >+ static void applyInheritValue(CSSStyleSelector* selector) > { > selector->style()->setCursor(selector->parentStyle()->cursor()); > selector->style()->setCursorList(selector->parentStyle()->cursors()); > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >+ static void applyInitialValue(CSSStyleSelector* selector) > { > selector->style()->clearCursorList(); > selector->style()->setCursor(RenderStyle::initialCursor()); > } > >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > selector->style()->clearCursorList(); > if (value->isValueList()) { >@@ -738,25 +673,27 @@ private: > selector->style()->setCursor(*primitiveValue); > } > } >+ >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } > }; > >-class ApplyPropertyTextEmphasisStyle : public ApplyPropertyBase { >-private: >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+class ApplyPropertyTextEmphasisStyle { >+public: >+ static void applyInheritValue(CSSStyleSelector* selector) > { > selector->style()->setTextEmphasisFill(selector->parentStyle()->textEmphasisFill()); > selector->style()->setTextEmphasisMark(selector->parentStyle()->textEmphasisMark()); > selector->style()->setTextEmphasisCustomMark(selector->parentStyle()->textEmphasisCustomMark()); > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >+ static void applyInitialValue(CSSStyleSelector* selector) > { > selector->style()->setTextEmphasisFill(RenderStyle::initialTextEmphasisFill()); > selector->style()->setTextEmphasisMark(RenderStyle::initialTextEmphasisMark()); > selector->style()->setTextEmphasisCustomMark(RenderStyle::initialTextEmphasisCustomMark()); > } > >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > if (value->isValueList()) { > CSSValueList* list = static_cast<CSSValueList*>(value); >@@ -798,37 +735,32 @@ private: > selector->style()->setTextEmphasisFill(TextEmphasisFillFilled); > selector->style()->setTextEmphasisMark(*primitiveValue); > } >- > } >+ >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } > }; > >-template <typename T> >-class ApplyPropertyAnimation : public ApplyPropertyBase { >-public: >- typedef T (Animation::*GetterFunction)() const; >- typedef void (Animation::*SetterFunction)(T); >- typedef bool (Animation::*TestFunction)() const; >- typedef void (Animation::*ClearFunction)(); >- typedef T (*InitialFunction)(); >- typedef void (CSSStyleSelector::*MapFunction)(Animation*, CSSValue*); >- typedef AnimationList* (RenderStyle::*AnimationGetter)(); >- typedef const AnimationList* (RenderStyle::*ImmutableAnimationGetter)() const; >- >- ApplyPropertyAnimation(GetterFunction getter, SetterFunction setter, TestFunction test, ClearFunction clear, InitialFunction initial, MapFunction map, >- AnimationGetter animationGetter, ImmutableAnimationGetter immutableAnimationGetter) >- : m_getter(getter) >- , m_setter(setter) >- , m_test(test) >- , m_clear(clear) >- , m_initial(initial) >- , m_map(map) >- , m_animationGetter(animationGetter) >- , m_immutableAnimationGetter(immutableAnimationGetter) >- { >- } >+template <typename T, >+ T (Animation::*getterFunction)() const, >+ void (Animation::*setterFunction)(T), >+ bool (Animation::*testFunction)() const, >+ void (Animation::*clearFunction)(), >+ T (*initialFunction)(), >+ void (CSSStyleSelector::*mapFunction)(Animation*, CSSValue*), >+ AnimationList* (RenderStyle::*animationGetterFunction)(), >+ const AnimationList* (RenderStyle::*immutableAnimationGetterFunction)() const> >+class ApplyPropertyAnimation { >+public: >+ static void setValue(Animation* animation, T value) { (animation->*setterFunction)(value); } >+ static T value(const Animation* animation) { return (animation->*getterFunction)(); } >+ static bool test(const Animation* animation) { return (animation->*testFunction)(); } >+ static void clear(Animation* animation) { (animation->*clearFunction)(); } >+ static T initial() { return (*initialFunction)(); } >+ static void map(CSSStyleSelector* selector, Animation* animation, CSSValue* value) { (selector->*mapFunction)(animation, value); } >+ static AnimationList* accessAnimations(RenderStyle* style) { return (style->*animationGetterFunction)(); } >+ static const AnimationList* animations(RenderStyle* style) { return (style->*immutableAnimationGetterFunction)(); } > >-private: >- virtual void applyInheritValue(CSSStyleSelector* selector) const >+ static void applyInheritValue(CSSStyleSelector* selector) > { > AnimationList* list = accessAnimations(selector->style()); > const AnimationList* parentList = animations(selector->parentStyle()); >@@ -844,7 +776,7 @@ private: > clear(list->animation(i)); > } > >- virtual void applyInitialValue(CSSStyleSelector* selector) const >+ static void applyInitialValue(CSSStyleSelector* selector) > { > AnimationList* list = accessAnimations(selector->style()); > if (list->isEmpty()) >@@ -854,7 +786,7 @@ private: > clear(list->animation(i)); > } > >- virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) > { > AnimationList* list = accessAnimations(selector->style()); > size_t childIndex = 0; >@@ -878,23 +810,30 @@ private: > } > } > >- void setValue(Animation* animation, T value) const { (animation->*m_setter)(value); } >- T value(const Animation* animation) const { return (animation->*m_getter)(); } >- bool test(const Animation* animation) const { return (animation->*m_test)(); } >- void clear(Animation* animation) const { (animation->*m_clear)(); } >- T initial() const { return (*m_initial)(); } >- void map(CSSStyleSelector* selector, Animation* animation, CSSValue* value) const { (selector->*m_map)(animation, value); } >- AnimationList* accessAnimations(RenderStyle* style) const { return (style->*m_animationGetter)(); } >- const AnimationList* animations(RenderStyle* style) const { return (style->*m_immutableAnimationGetter)(); } >- >- GetterFunction m_getter; >- SetterFunction m_setter; >- TestFunction m_test; >- ClearFunction m_clear; >- InitialFunction m_initial; >- MapFunction m_map; >- AnimationGetter m_animationGetter; >- ImmutableAnimationGetter m_immutableAnimationGetter; >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } >+}; >+ >+class ApplyPropertyOutlineStyle { >+public: >+ static void applyInheritValue(CSSStyleSelector* selector) >+ { >+ ApplyPropertyDefaultBase<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyInheritValue(selector); >+ ApplyPropertyDefaultBase<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyInheritValue(selector); >+ } >+ >+ static void applyInitialValue(CSSStyleSelector* selector) >+ { >+ ApplyPropertyDefaultBase<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyInitialValue(selector); >+ ApplyPropertyDefaultBase<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyInitialValue(selector); >+ } >+ >+ static void applyValue(CSSStyleSelector* selector, CSSValue* value) >+ { >+ ApplyPropertyDefault<OutlineIsAuto, &RenderStyle::outlineStyleIsAuto, OutlineIsAuto, &RenderStyle::setOutlineStyleIsAuto, OutlineIsAuto, &RenderStyle::initialOutlineStyleIsAuto>::applyValue(selector, value); >+ ApplyPropertyDefault<EBorderStyle, &RenderStyle::outlineStyle, EBorderStyle, &RenderStyle::setOutlineStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::applyValue(selector, value); >+ } >+ >+ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } > }; > > const CSSStyleApplyProperty& CSSStyleApplyProperty::sharedCSSStyleApplyProperty() >@@ -906,217 +845,216 @@ const CSSStyleApplyProperty& CSSStyleApp > CSSStyleApplyProperty::CSSStyleApplyProperty() > { > for (int i = 0; i < numCSSProperties; ++i) >- m_propertyMap[i] = 0; >+ m_propertyMap[i] = PropertyHandler(); > >- setPropertyHandler(CSSPropertyColor, new ApplyPropertyColor<InheritFromParent>(&RenderStyle::color, &RenderStyle::setColor, &RenderStyle::setVisitedLinkColor, 0, RenderStyle::initialColor)); >- setPropertyHandler(CSSPropertyDirection, new ApplyPropertyDirection(&RenderStyle::direction, &RenderStyle::setDirection, RenderStyle::initialDirection)); >+ setPropertyHandler(CSSPropertyColor, ApplyPropertyColor<InheritFromParent, &RenderStyle::color, &RenderStyle::setColor, &RenderStyle::setVisitedLinkColor, &RenderStyle::invalidColor, RenderStyle::initialColor>::createHandler()); >+ setPropertyHandler(CSSPropertyDirection, ApplyPropertyDirection<&RenderStyle::direction, &RenderStyle::setDirection, RenderStyle::initialDirection>::createHandler()); > >- setPropertyHandler(CSSPropertyBackgroundAttachment, new ApplyPropertyFillLayer<EFillAttachment>(CSSPropertyBackgroundAttachment, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isAttachmentSet, &FillLayer::attachment, &FillLayer::setAttachment, &FillLayer::clearAttachment, &FillLayer::initialFillAttachment, &CSSStyleSelector::mapFillAttachment)); >- setPropertyHandler(CSSPropertyBackgroundClip, new ApplyPropertyFillLayer<EFillBox>(CSSPropertyBackgroundClip, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSStyleSelector::mapFillClip)); >+ setPropertyHandler(CSSPropertyBackgroundAttachment, ApplyPropertyFillLayer<EFillAttachment, CSSPropertyBackgroundAttachment, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isAttachmentSet, &FillLayer::attachment, &FillLayer::setAttachment, &FillLayer::clearAttachment, &FillLayer::initialFillAttachment, &CSSStyleSelector::mapFillAttachment>::createHandler()); >+ setPropertyHandler(CSSPropertyBackgroundClip, ApplyPropertyFillLayer<EFillBox, CSSPropertyBackgroundClip, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSStyleSelector::mapFillClip>::createHandler()); > setPropertyHandler(CSSPropertyWebkitBackgroundClip, CSSPropertyBackgroundClip); >- setPropertyHandler(CSSPropertyWebkitBackgroundComposite, new ApplyPropertyFillLayer<CompositeOperator>(CSSPropertyWebkitBackgroundComposite, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSStyleSelector::mapFillComposite)); >+ setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitBackgroundComposite, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSStyleSelector::mapFillComposite>::createHandler()); > >- setPropertyHandler(CSSPropertyBackgroundImage, new ApplyPropertyFillLayer<StyleImage*>(CSSPropertyBackgroundImage, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSStyleSelector::mapFillImage)); >+ setPropertyHandler(CSSPropertyBackgroundImage, ApplyPropertyFillLayer<StyleImage*, CSSPropertyBackgroundImage, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSStyleSelector::mapFillImage>::createHandler()); > >- setPropertyHandler(CSSPropertyBackgroundOrigin, new ApplyPropertyFillLayer<EFillBox>(CSSPropertyBackgroundOrigin, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSStyleSelector::mapFillOrigin)); >+ setPropertyHandler(CSSPropertyBackgroundOrigin, ApplyPropertyFillLayer<EFillBox, CSSPropertyBackgroundOrigin, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSStyleSelector::mapFillOrigin>::createHandler()); > setPropertyHandler(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin); > >- setPropertyHandler(CSSPropertyBackgroundPositionX, new ApplyPropertyFillLayer<Length>(CSSPropertyBackgroundPositionX, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isXPositionSet, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::clearXPosition, &FillLayer::initialFillXPosition, &CSSStyleSelector::mapFillXPosition)); >- setPropertyHandler(CSSPropertyBackgroundPositionY, new ApplyPropertyFillLayer<Length>(CSSPropertyBackgroundPositionY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isYPositionSet, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::clearYPosition, &FillLayer::initialFillYPosition, &CSSStyleSelector::mapFillYPosition)); >- setPropertyHandler(CSSPropertyBackgroundPosition, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBackgroundPositionX), propertyHandler(CSSPropertyBackgroundPositionY))); >- >- setPropertyHandler(CSSPropertyBackgroundRepeatX, new ApplyPropertyFillLayer<EFillRepeat>(CSSPropertyBackgroundRepeatX, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSStyleSelector::mapFillRepeatX)); >- setPropertyHandler(CSSPropertyBackgroundRepeatY, new ApplyPropertyFillLayer<EFillRepeat>(CSSPropertyBackgroundRepeatY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSStyleSelector::mapFillRepeatY)); >- setPropertyHandler(CSSPropertyBackgroundRepeat, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBackgroundRepeatX), propertyHandler(CSSPropertyBackgroundRepeatY))); >+ setPropertyHandler(CSSPropertyBackgroundPositionX, ApplyPropertyFillLayer<Length, CSSPropertyBackgroundPositionX, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isXPositionSet, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::clearXPosition, &FillLayer::initialFillXPosition, &CSSStyleSelector::mapFillXPosition>::createHandler()); >+ setPropertyHandler(CSSPropertyBackgroundPositionY, ApplyPropertyFillLayer<Length, CSSPropertyBackgroundPositionY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isYPositionSet, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::clearYPosition, &FillLayer::initialFillYPosition, &CSSStyleSelector::mapFillYPosition>::createHandler()); >+ setPropertyHandler(CSSPropertyBackgroundPosition, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundPositionX, CSSPropertyBackgroundPositionY>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyBackgroundRepeatX, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyBackgroundRepeatX, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSStyleSelector::mapFillRepeatX>::createHandler()); >+ setPropertyHandler(CSSPropertyBackgroundRepeatY, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyBackgroundRepeatY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSStyleSelector::mapFillRepeatY>::createHandler()); >+ setPropertyHandler(CSSPropertyBackgroundRepeat, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY>::createHandler()); > >- setPropertyHandler(CSSPropertyBackgroundSize, new ApplyPropertyFillLayer<FillSize>(CSSPropertyBackgroundSize, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >- &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSStyleSelector::mapFillSize)); >+ setPropertyHandler(CSSPropertyBackgroundSize, ApplyPropertyFillLayer<FillSize, CSSPropertyBackgroundSize, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, >+ &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSStyleSelector::mapFillSize>::createHandler()); > setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize); > >- setPropertyHandler(CSSPropertyWebkitMaskAttachment, new ApplyPropertyFillLayer<EFillAttachment>(CSSPropertyWebkitMaskAttachment, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isAttachmentSet, &FillLayer::attachment, &FillLayer::setAttachment, &FillLayer::clearAttachment, &FillLayer::initialFillAttachment, &CSSStyleSelector::mapFillAttachment)); >- setPropertyHandler(CSSPropertyWebkitMaskClip, new ApplyPropertyFillLayer<EFillBox>(CSSPropertyWebkitMaskClip, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSStyleSelector::mapFillClip)); >- setPropertyHandler(CSSPropertyWebkitMaskComposite, new ApplyPropertyFillLayer<CompositeOperator>(CSSPropertyWebkitMaskComposite, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSStyleSelector::mapFillComposite)); >- >- setPropertyHandler(CSSPropertyWebkitMaskImage, new ApplyPropertyFillLayer<StyleImage*>(CSSPropertyWebkitMaskImage, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSStyleSelector::mapFillImage)); >- >- setPropertyHandler(CSSPropertyWebkitMaskOrigin, new ApplyPropertyFillLayer<EFillBox>(CSSPropertyWebkitMaskOrigin, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSStyleSelector::mapFillOrigin)); >- setPropertyHandler(CSSPropertyWebkitMaskSize, new ApplyPropertyFillLayer<FillSize>(CSSPropertyWebkitMaskSize, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSStyleSelector::mapFillSize)); >- >- setPropertyHandler(CSSPropertyWebkitMaskPositionX, new ApplyPropertyFillLayer<Length>(CSSPropertyWebkitMaskPositionX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isXPositionSet, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::clearXPosition, &FillLayer::initialFillXPosition, &CSSStyleSelector::mapFillXPosition)); >- setPropertyHandler(CSSPropertyWebkitMaskPositionY, new ApplyPropertyFillLayer<Length>(CSSPropertyWebkitMaskPositionY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isYPositionSet, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::clearYPosition, &FillLayer::initialFillYPosition, &CSSStyleSelector::mapFillYPosition)); >- setPropertyHandler(CSSPropertyWebkitMaskPosition, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyWebkitMaskPositionX), propertyHandler(CSSPropertyWebkitMaskPositionY))); >- >- setPropertyHandler(CSSPropertyWebkitMaskRepeatX, new ApplyPropertyFillLayer<EFillRepeat>(CSSPropertyWebkitMaskRepeatX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSStyleSelector::mapFillRepeatX)); >- setPropertyHandler(CSSPropertyWebkitMaskRepeatY, new ApplyPropertyFillLayer<EFillRepeat>(CSSPropertyWebkitMaskRepeatY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >- &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSStyleSelector::mapFillRepeatY)); >- setPropertyHandler(CSSPropertyWebkitMaskRepeat, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBackgroundRepeatX), propertyHandler(CSSPropertyBackgroundRepeatY))); >- >- setPropertyHandler(CSSPropertyBackgroundColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::backgroundColor, &RenderStyle::setBackgroundColor, &RenderStyle::setVisitedLinkBackgroundColor, 0)); >- setPropertyHandler(CSSPropertyBorderBottomColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::borderBottomColor, &RenderStyle::setBorderBottomColor, &RenderStyle::setVisitedLinkBorderBottomColor, &RenderStyle::color)); >- setPropertyHandler(CSSPropertyBorderLeftColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::borderLeftColor, &RenderStyle::setBorderLeftColor, &RenderStyle::setVisitedLinkBorderLeftColor, &RenderStyle::color)); >- setPropertyHandler(CSSPropertyBorderRightColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::borderRightColor, &RenderStyle::setBorderRightColor, &RenderStyle::setVisitedLinkBorderRightColor, &RenderStyle::color)); >- setPropertyHandler(CSSPropertyBorderTopColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::borderTopColor, &RenderStyle::setBorderTopColor, &RenderStyle::setVisitedLinkBorderTopColor, &RenderStyle::color)); >- >- setPropertyHandler(CSSPropertyBorderTopStyle, new ApplyPropertyDefault<EBorderStyle>(&RenderStyle::borderTopStyle, &RenderStyle::setBorderTopStyle, &RenderStyle::initialBorderStyle)); >- setPropertyHandler(CSSPropertyBorderRightStyle, new ApplyPropertyDefault<EBorderStyle>(&RenderStyle::borderRightStyle, &RenderStyle::setBorderRightStyle, &RenderStyle::initialBorderStyle)); >- setPropertyHandler(CSSPropertyBorderBottomStyle, new ApplyPropertyDefault<EBorderStyle>(&RenderStyle::borderBottomStyle, &RenderStyle::setBorderBottomStyle, &RenderStyle::initialBorderStyle)); >- setPropertyHandler(CSSPropertyBorderLeftStyle, new ApplyPropertyDefault<EBorderStyle>(&RenderStyle::borderLeftStyle, &RenderStyle::setBorderLeftStyle, &RenderStyle::initialBorderStyle)); >- >- setPropertyHandler(CSSPropertyBorderTopWidth, new ApplyPropertyComputeLength<unsigned short, NormalDisabled, ThicknessEnabled>(&RenderStyle::borderTopWidth, &RenderStyle::setBorderTopWidth, &RenderStyle::initialBorderWidth)); >- setPropertyHandler(CSSPropertyBorderRightWidth, new ApplyPropertyComputeLength<unsigned short, NormalDisabled, ThicknessEnabled>(&RenderStyle::borderRightWidth, &RenderStyle::setBorderRightWidth, &RenderStyle::initialBorderWidth)); >- setPropertyHandler(CSSPropertyBorderBottomWidth, new ApplyPropertyComputeLength<unsigned short, NormalDisabled, ThicknessEnabled>(&RenderStyle::borderBottomWidth, &RenderStyle::setBorderBottomWidth, &RenderStyle::initialBorderWidth)); >- setPropertyHandler(CSSPropertyBorderLeftWidth, new ApplyPropertyComputeLength<unsigned short, NormalDisabled, ThicknessEnabled>(&RenderStyle::borderLeftWidth, &RenderStyle::setBorderLeftWidth, &RenderStyle::initialBorderWidth)); >- setPropertyHandler(CSSPropertyOutlineWidth, new ApplyPropertyComputeLength<unsigned short, NormalDisabled, ThicknessEnabled>(&RenderStyle::outlineWidth, &RenderStyle::setOutlineWidth, &RenderStyle::initialBorderWidth)); >- setPropertyHandler(CSSPropertyWebkitColumnRuleWidth, new ApplyPropertyComputeLength<unsigned short, NormalDisabled, ThicknessEnabled>(&RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWidth, &RenderStyle::initialBorderWidth)); >- >- setPropertyHandler(CSSPropertyBorderTop, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBorderTopColor), propertyHandler(CSSPropertyBorderTopStyle), propertyHandler(CSSPropertyBorderTopWidth))); >- setPropertyHandler(CSSPropertyBorderRight, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBorderRightColor), propertyHandler(CSSPropertyBorderRightStyle), propertyHandler(CSSPropertyBorderRightWidth))); >- setPropertyHandler(CSSPropertyBorderBottom, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBorderBottomColor), propertyHandler(CSSPropertyBorderBottomStyle), propertyHandler(CSSPropertyBorderBottomWidth))); >- setPropertyHandler(CSSPropertyBorderLeft, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBorderLeftColor), propertyHandler(CSSPropertyBorderLeftStyle), propertyHandler(CSSPropertyBorderLeftWidth))); >- >- setPropertyHandler(CSSPropertyBorderStyle, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBorderTopStyle), propertyHandler(CSSPropertyBorderRightStyle), propertyHandler(CSSPropertyBorderBottomStyle), propertyHandler(CSSPropertyBorderLeftStyle))); >- setPropertyHandler(CSSPropertyBorderWidth, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBorderTopWidth), propertyHandler(CSSPropertyBorderRightWidth), propertyHandler(CSSPropertyBorderBottomWidth), propertyHandler(CSSPropertyBorderLeftWidth))); >- setPropertyHandler(CSSPropertyBorderColor, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBorderTopColor), propertyHandler(CSSPropertyBorderRightColor), propertyHandler(CSSPropertyBorderBottomColor), propertyHandler(CSSPropertyBorderLeftColor))); >- setPropertyHandler(CSSPropertyBorder, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyBorderStyle), propertyHandler(CSSPropertyBorderWidth), propertyHandler(CSSPropertyBorderColor))); >- >- setPropertyHandler(CSSPropertyBorderTopLeftRadius, new ApplyPropertyBorderRadius(&RenderStyle::borderTopLeftRadius, &RenderStyle::setBorderTopLeftRadius, &RenderStyle::initialBorderRadius)); >- setPropertyHandler(CSSPropertyBorderTopRightRadius, new ApplyPropertyBorderRadius(&RenderStyle::borderTopRightRadius, &RenderStyle::setBorderTopRightRadius, &RenderStyle::initialBorderRadius)); >- setPropertyHandler(CSSPropertyBorderBottomLeftRadius, new ApplyPropertyBorderRadius(&RenderStyle::borderBottomLeftRadius, &RenderStyle::setBorderBottomLeftRadius, &RenderStyle::initialBorderRadius)); >- setPropertyHandler(CSSPropertyBorderBottomRightRadius, new ApplyPropertyBorderRadius(&RenderStyle::borderBottomRightRadius, &RenderStyle::setBorderBottomRightRadius, &RenderStyle::initialBorderRadius)); >- setPropertyHandler(CSSPropertyBorderRadius, new ApplyPropertyExpanding<ExpandValue>(propertyHandler(CSSPropertyBorderTopLeftRadius), propertyHandler(CSSPropertyBorderTopRightRadius), propertyHandler(CSSPropertyBorderBottomLeftRadius), propertyHandler(CSSPropertyBorderBottomRightRadius))); >+ setPropertyHandler(CSSPropertyWebkitMaskAttachment, ApplyPropertyFillLayer<EFillAttachment, CSSPropertyWebkitMaskAttachment, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isAttachmentSet, &FillLayer::attachment, &FillLayer::setAttachment, &FillLayer::clearAttachment, &FillLayer::initialFillAttachment, &CSSStyleSelector::mapFillAttachment>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitMaskClip, ApplyPropertyFillLayer<EFillBox, CSSPropertyWebkitMaskClip, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSStyleSelector::mapFillClip>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitMaskComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitMaskComposite, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSStyleSelector::mapFillComposite>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitMaskImage, ApplyPropertyFillLayer<StyleImage*, CSSPropertyWebkitMaskImage, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSStyleSelector::mapFillImage>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitMaskOrigin, ApplyPropertyFillLayer<EFillBox, CSSPropertyWebkitMaskOrigin, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSStyleSelector::mapFillOrigin>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitMaskSize, ApplyPropertyFillLayer<FillSize, CSSPropertyWebkitMaskSize, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSStyleSelector::mapFillSize>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitMaskPositionX, ApplyPropertyFillLayer<Length, CSSPropertyWebkitMaskPositionX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isXPositionSet, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::clearXPosition, &FillLayer::initialFillXPosition, &CSSStyleSelector::mapFillXPosition>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitMaskPositionY, ApplyPropertyFillLayer<Length, CSSPropertyWebkitMaskPositionY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isYPositionSet, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::clearYPosition, &FillLayer::initialFillYPosition, &CSSStyleSelector::mapFillYPosition>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitMaskPosition, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitMaskPositionX, CSSPropertyWebkitMaskPositionY>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitMaskRepeatX, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSStyleSelector::mapFillRepeatX>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitMaskRepeatY, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, >+ &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSStyleSelector::mapFillRepeatY>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitMaskRepeat, ApplyPropertyExpanding<SuppressValue, CSSPropertyBackgroundRepeatX, CSSPropertyBackgroundRepeatY>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyBackgroundColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::backgroundColor, &RenderStyle::setBackgroundColor, &RenderStyle::setVisitedLinkBackgroundColor, &RenderStyle::invalidColor>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderBottomColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderBottomColor, &RenderStyle::setBorderBottomColor, &RenderStyle::setVisitedLinkBorderBottomColor, &RenderStyle::color>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderLeftColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderLeftColor, &RenderStyle::setBorderLeftColor, &RenderStyle::setVisitedLinkBorderLeftColor, &RenderStyle::color>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderRightColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderRightColor, &RenderStyle::setBorderRightColor, &RenderStyle::setVisitedLinkBorderRightColor, &RenderStyle::color>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderTopColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::borderTopColor, &RenderStyle::setBorderTopColor, &RenderStyle::setVisitedLinkBorderTopColor, &RenderStyle::color>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyBorderTopStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderTopStyle, EBorderStyle, &RenderStyle::setBorderTopStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderRightStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderRightStyle, EBorderStyle, &RenderStyle::setBorderRightStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderBottomStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderBottomStyle, EBorderStyle, &RenderStyle::setBorderBottomStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderLeftStyle, ApplyPropertyDefault<EBorderStyle, &RenderStyle::borderLeftStyle, EBorderStyle, &RenderStyle::setBorderLeftStyle, EBorderStyle, &RenderStyle::initialBorderStyle>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyBorderTopWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::borderTopWidth, &RenderStyle::setBorderTopWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderRightWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::borderRightWidth, &RenderStyle::setBorderRightWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderBottomWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::borderBottomWidth, &RenderStyle::setBorderBottomWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderLeftWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::borderLeftWidth, &RenderStyle::setBorderLeftWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyOutlineWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::outlineWidth, &RenderStyle::setOutlineWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitColumnRuleWidth, ApplyPropertyComputeLength<unsigned short, &RenderStyle::columnRuleWidth, &RenderStyle::setColumnRuleWidth, &RenderStyle::initialBorderWidth, NormalDisabled, ThicknessEnabled>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyBorderTop, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopColor, CSSPropertyBorderTopStyle, CSSPropertyBorderTopWidth>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderRight, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderRightColor, CSSPropertyBorderRightStyle, CSSPropertyBorderRightWidth>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderBottom, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderBottomColor, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomWidth>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderLeft, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderLeftColor, CSSPropertyBorderLeftStyle, CSSPropertyBorderLeftWidth>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyBorderStyle, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopStyle, CSSPropertyBorderRightStyle, CSSPropertyBorderBottomStyle, CSSPropertyBorderLeftStyle>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderWidth, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopWidth, CSSPropertyBorderRightWidth, CSSPropertyBorderBottomWidth, CSSPropertyBorderLeftWidth>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderColor, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderTopColor, CSSPropertyBorderRightColor, CSSPropertyBorderBottomColor, CSSPropertyBorderLeftColor>::createHandler()); >+ setPropertyHandler(CSSPropertyBorder, ApplyPropertyExpanding<SuppressValue, CSSPropertyBorderStyle, CSSPropertyBorderWidth, CSSPropertyBorderColor>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyBorderTopLeftRadius, ApplyPropertyBorderRadius<&RenderStyle::borderTopLeftRadius, &RenderStyle::setBorderTopLeftRadius, &RenderStyle::initialBorderRadius>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderTopRightRadius, ApplyPropertyBorderRadius<&RenderStyle::borderTopRightRadius, &RenderStyle::setBorderTopRightRadius, &RenderStyle::initialBorderRadius>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderBottomLeftRadius, ApplyPropertyBorderRadius<&RenderStyle::borderBottomLeftRadius, &RenderStyle::setBorderBottomLeftRadius, &RenderStyle::initialBorderRadius>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderBottomRightRadius, ApplyPropertyBorderRadius<&RenderStyle::borderBottomRightRadius, &RenderStyle::setBorderBottomRightRadius, &RenderStyle::initialBorderRadius>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderRadius, ApplyPropertyExpanding<ExpandValue, CSSPropertyBorderTopLeftRadius, CSSPropertyBorderTopRightRadius, CSSPropertyBorderBottomLeftRadius, CSSPropertyBorderBottomRightRadius>::createHandler()); > setPropertyHandler(CSSPropertyWebkitBorderRadius, CSSPropertyBorderRadius); > >- setPropertyHandler(CSSPropertyWebkitBorderHorizontalSpacing, new ApplyPropertyComputeLength<short>(&RenderStyle::horizontalBorderSpacing, &RenderStyle::setHorizontalBorderSpacing, &RenderStyle::initialHorizontalBorderSpacing)); >- setPropertyHandler(CSSPropertyWebkitBorderVerticalSpacing, new ApplyPropertyComputeLength<short>(&RenderStyle::verticalBorderSpacing, &RenderStyle::setVerticalBorderSpacing, &RenderStyle::initialVerticalBorderSpacing)); >- setPropertyHandler(CSSPropertyBorderSpacing, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyWebkitBorderHorizontalSpacing), propertyHandler(CSSPropertyWebkitBorderVerticalSpacing))); >+ setPropertyHandler(CSSPropertyWebkitBorderHorizontalSpacing, ApplyPropertyComputeLength<short, &RenderStyle::horizontalBorderSpacing, &RenderStyle::setHorizontalBorderSpacing, &RenderStyle::initialHorizontalBorderSpacing>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitBorderVerticalSpacing, ApplyPropertyComputeLength<short, &RenderStyle::verticalBorderSpacing, &RenderStyle::setVerticalBorderSpacing, &RenderStyle::initialVerticalBorderSpacing>::createHandler()); >+ setPropertyHandler(CSSPropertyBorderSpacing, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyWebkitBorderVerticalSpacing>::createHandler()); > >- setPropertyHandler(CSSPropertyLetterSpacing, new ApplyPropertyComputeLength<int, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>(&RenderStyle::letterSpacing, &RenderStyle::setLetterSpacing, &RenderStyle::initialLetterWordSpacing)); >- setPropertyHandler(CSSPropertyWordSpacing, new ApplyPropertyComputeLength<int, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>(&RenderStyle::wordSpacing, &RenderStyle::setWordSpacing, &RenderStyle::initialLetterWordSpacing)); >+ setPropertyHandler(CSSPropertyLetterSpacing, ApplyPropertyComputeLength<int, &RenderStyle::letterSpacing, &RenderStyle::setLetterSpacing, &RenderStyle::initialLetterWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyWordSpacing, ApplyPropertyComputeLength<int, &RenderStyle::wordSpacing, &RenderStyle::setWordSpacing, &RenderStyle::initialLetterWordSpacing, NormalEnabled, ThicknessDisabled, SVGZoomEnabled>::createHandler()); > >- setPropertyHandler(CSSPropertyCursor, new ApplyPropertyCursor()); >+ setPropertyHandler(CSSPropertyCursor, ApplyPropertyCursor::createHandler()); > >- setPropertyHandler(CSSPropertyCounterIncrement, new ApplyPropertyCounter<Increment>()); >- setPropertyHandler(CSSPropertyCounterReset, new ApplyPropertyCounter<Reset>()); >+ setPropertyHandler(CSSPropertyCounterIncrement, ApplyPropertyCounter<Increment>::createHandler()); >+ setPropertyHandler(CSSPropertyCounterReset, ApplyPropertyCounter<Reset>::createHandler()); > > #if ENABLE(CSS3_FLEXBOX) >- setPropertyHandler(CSSPropertyWebkitFlexOrder, new ApplyPropertyDefault<int>(&RenderStyle::flexOrder, &RenderStyle::setFlexOrder, &RenderStyle::initialFlexOrder)); >- setPropertyHandler(CSSPropertyWebkitFlexPack, new ApplyPropertyDefault<EFlexPack>(&RenderStyle::flexPack, &RenderStyle::setFlexPack, &RenderStyle::initialFlexPack)); >- setPropertyHandler(CSSPropertyWebkitFlexAlign, new ApplyPropertyDefault<EFlexAlign>(&RenderStyle::flexAlign, &RenderStyle::setFlexAlign, &RenderStyle::initialFlexAlign)); >- setPropertyHandler(CSSPropertyWebkitFlexFlow, new ApplyPropertyDefault<EFlexFlow>(&RenderStyle::flexFlow, &RenderStyle::setFlexFlow, &RenderStyle::initialFlexFlow)); >+ setPropertyHandler(CSSPropertyWebkitFlexOrder, ApplyPropertyDefault<int, &RenderStyle::flexOrder, int, &RenderStyle::setFlexOrder, int, &RenderStyle::initialFlexOrder>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitFlexPack, ApplyPropertyDefault<EFlexPack, &RenderStyle::flexPack, EFlexPack, &RenderStyle::setFlexPack, EFlexPack, &RenderStyle::initialFlexPack>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitFlexAlign, ApplyPropertyDefault<EFlexAlign, &RenderStyle::flexAlign, EFlexAlign, &RenderStyle::setFlexAlign, EFlexAlign, &RenderStyle::initialFlexAlign>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitFlexFlow, ApplyPropertyDefault<EFlexFlow, &RenderStyle::flexFlow, EFlexFlow, &RenderStyle::setFlexFlow, EFlexFlow, &RenderStyle::initialFlexFlow>::createHandler()); > #endif > >- setPropertyHandler(CSSPropertyFontStyle, new ApplyPropertyFont<FontItalic>(&FontDescription::italic, &FontDescription::setItalic, FontItalicOff)); >- setPropertyHandler(CSSPropertyFontVariant, new ApplyPropertyFont<FontSmallCaps>(&FontDescription::smallCaps, &FontDescription::setSmallCaps, FontSmallCapsOff)); >- setPropertyHandler(CSSPropertyTextRendering, new ApplyPropertyFont<TextRenderingMode>(&FontDescription::textRenderingMode, &FontDescription::setTextRenderingMode, AutoTextRendering)); >- setPropertyHandler(CSSPropertyWebkitFontSmoothing, new ApplyPropertyFont<FontSmoothingMode>(&FontDescription::fontSmoothing, &FontDescription::setFontSmoothing, AutoSmoothing)); >- setPropertyHandler(CSSPropertyWebkitTextOrientation, new ApplyPropertyFont<TextOrientation>(&FontDescription::textOrientation, &FontDescription::setTextOrientation, RenderStyle::initialTextOrientation())); >- setPropertyHandler(CSSPropertyFontWeight, new ApplyPropertyFontWeight()); >- >- setPropertyHandler(CSSPropertyOutlineStyle, new ApplyPropertyExpanding<ExpandValue>(new ApplyPropertyDefault<OutlineIsAuto>(&RenderStyle::outlineStyleIsAuto, &RenderStyle::setOutlineStyleIsAuto, &RenderStyle::initialOutlineStyleIsAuto), new ApplyPropertyDefault<EBorderStyle>(&RenderStyle::outlineStyle, &RenderStyle::setOutlineStyle, &RenderStyle::initialBorderStyle))); >- setPropertyHandler(CSSPropertyOutlineColor, new ApplyPropertyColor<InheritFromParent>(&RenderStyle::outlineColor, &RenderStyle::setOutlineColor, &RenderStyle::setVisitedLinkOutlineColor, &RenderStyle::color)); >- setPropertyHandler(CSSPropertyOutlineOffset, new ApplyPropertyComputeLength<int>(&RenderStyle::outlineOffset, &RenderStyle::setOutlineOffset, &RenderStyle::initialOutlineOffset)); >- >- setPropertyHandler(CSSPropertyOverflowX, new ApplyPropertyDefault<EOverflow>(&RenderStyle::overflowX, &RenderStyle::setOverflowX, &RenderStyle::initialOverflowX)); >- setPropertyHandler(CSSPropertyOverflowY, new ApplyPropertyDefault<EOverflow>(&RenderStyle::overflowY, &RenderStyle::setOverflowY, &RenderStyle::initialOverflowY)); >- setPropertyHandler(CSSPropertyOverflow, new ApplyPropertyExpanding<ExpandValue>(propertyHandler(CSSPropertyOverflowX), propertyHandler(CSSPropertyOverflowY))); >- >- setPropertyHandler(CSSPropertyWebkitColumnRuleColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::columnRuleColor, &RenderStyle::setColumnRuleColor, &RenderStyle::setVisitedLinkColumnRuleColor, &RenderStyle::color)); >- setPropertyHandler(CSSPropertyWebkitTextEmphasisColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::textEmphasisColor, &RenderStyle::setTextEmphasisColor, &RenderStyle::setVisitedLinkTextEmphasisColor, &RenderStyle::color)); >- setPropertyHandler(CSSPropertyWebkitTextFillColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::textFillColor, &RenderStyle::setTextFillColor, &RenderStyle::setVisitedLinkTextFillColor, &RenderStyle::color)); >- setPropertyHandler(CSSPropertyWebkitTextStrokeColor, new ApplyPropertyColor<NoInheritFromParent>(&RenderStyle::textStrokeColor, &RenderStyle::setTextStrokeColor, &RenderStyle::setVisitedLinkTextStrokeColor, &RenderStyle::color)); >- >- setPropertyHandler(CSSPropertyTop, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::top, &RenderStyle::setTop, &RenderStyle::initialOffset)); >- setPropertyHandler(CSSPropertyRight, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::right, &RenderStyle::setRight, &RenderStyle::initialOffset)); >- setPropertyHandler(CSSPropertyBottom, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::bottom, &RenderStyle::setBottom, &RenderStyle::initialOffset)); >- setPropertyHandler(CSSPropertyLeft, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::left, &RenderStyle::setLeft, &RenderStyle::initialOffset)); >- >- setPropertyHandler(CSSPropertyWidth, new ApplyPropertyLength<AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexWidth>(&RenderStyle::width, &RenderStyle::setWidth, &RenderStyle::initialSize)); >- setPropertyHandler(CSSPropertyHeight, new ApplyPropertyLength<AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexHeight>(&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize)); >- >- setPropertyHandler(CSSPropertyTextIndent, new ApplyPropertyLength<>(&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent)); >- >- setPropertyHandler(CSSPropertyListStyleImage, new ApplyPropertyStyleImage(&RenderStyle::listStyleImage, &RenderStyle::setListStyleImage, &RenderStyle::initialListStyleImage, CSSPropertyListStyleImage)); >- setPropertyHandler(CSSPropertyListStylePosition, new ApplyPropertyDefault<EListStylePosition>(&RenderStyle::listStylePosition, &RenderStyle::setListStylePosition, &RenderStyle::initialListStylePosition)); >- setPropertyHandler(CSSPropertyListStyleType, new ApplyPropertyDefault<EListStyleType>(&RenderStyle::listStyleType, &RenderStyle::setListStyleType, &RenderStyle::initialListStyleType)); >- setPropertyHandler(CSSPropertyListStyle, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyListStyleType), propertyHandler(CSSPropertyListStyleImage), propertyHandler(CSSPropertyListStylePosition))); >- >- setPropertyHandler(CSSPropertyMaxHeight, new ApplyPropertyLength<AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneEnabled, UndefinedEnabled>(&RenderStyle::maxHeight, &RenderStyle::setMaxHeight, &RenderStyle::initialMaxSize)); >- setPropertyHandler(CSSPropertyMaxWidth, new ApplyPropertyLength<AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneEnabled, UndefinedEnabled>(&RenderStyle::maxWidth, &RenderStyle::setMaxWidth, &RenderStyle::initialMaxSize)); >- setPropertyHandler(CSSPropertyMinHeight, new ApplyPropertyLength<AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled>(&RenderStyle::minHeight, &RenderStyle::setMinHeight, &RenderStyle::initialMinSize)); >- setPropertyHandler(CSSPropertyMinWidth, new ApplyPropertyLength<AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled>(&RenderStyle::minWidth, &RenderStyle::setMinWidth, &RenderStyle::initialMinSize)); >- >- setPropertyHandler(CSSPropertyMarginTop, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::marginTop, &RenderStyle::setMarginTop, &RenderStyle::initialMargin)); >- setPropertyHandler(CSSPropertyMarginRight, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::marginRight, &RenderStyle::setMarginRight, &RenderStyle::initialMargin)); >- setPropertyHandler(CSSPropertyMarginBottom, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::marginBottom, &RenderStyle::setMarginBottom, &RenderStyle::initialMargin)); >- setPropertyHandler(CSSPropertyMarginLeft, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::marginLeft, &RenderStyle::setMarginLeft, &RenderStyle::initialMargin)); >- setPropertyHandler(CSSPropertyMargin, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyMarginTop), propertyHandler(CSSPropertyMarginRight), propertyHandler(CSSPropertyMarginBottom), propertyHandler(CSSPropertyMarginLeft))); >+ setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont<FontItalic, &FontDescription::italic, &FontDescription::setItalic, FontItalicOff>::createHandler()); >+ setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont<FontSmallCaps, &FontDescription::smallCaps, &FontDescription::setSmallCaps, FontSmallCapsOff>::createHandler()); >+ setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont<TextRenderingMode, &FontDescription::textRenderingMode, &FontDescription::setTextRenderingMode, AutoTextRendering>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitFontSmoothing, ApplyPropertyFont<FontSmoothingMode, &FontDescription::fontSmoothing, &FontDescription::setFontSmoothing, AutoSmoothing>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTextOrientation, ApplyPropertyFont<TextOrientation, &FontDescription::textOrientation, &FontDescription::setTextOrientation, TextOrientationVerticalRight>::createHandler()); >+ setPropertyHandler(CSSPropertyFontWeight, ApplyPropertyFontWeight::createHandler()); >+ >+ setPropertyHandler(CSSPropertyOutlineStyle, ApplyPropertyOutlineStyle::createHandler()); >+ setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor<InheritFromParent, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor, &RenderStyle::setVisitedLinkOutlineColor, &RenderStyle::color>::createHandler()); >+ setPropertyHandler(CSSPropertyOutlineOffset, ApplyPropertyComputeLength<int, &RenderStyle::outlineOffset, &RenderStyle::setOutlineOffset, &RenderStyle::initialOutlineOffset>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyOverflowX, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowX, EOverflow, &RenderStyle::setOverflowX, EOverflow, &RenderStyle::initialOverflowX>::createHandler()); >+ setPropertyHandler(CSSPropertyOverflowY, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowY, EOverflow, &RenderStyle::setOverflowY, EOverflow, &RenderStyle::initialOverflowY>::createHandler()); >+ setPropertyHandler(CSSPropertyOverflow, ApplyPropertyExpanding<ExpandValue, CSSPropertyOverflowX, CSSPropertyOverflowY>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitColumnRuleColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::columnRuleColor, &RenderStyle::setColumnRuleColor, &RenderStyle::setVisitedLinkColumnRuleColor, &RenderStyle::color>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTextEmphasisColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textEmphasisColor, &RenderStyle::setTextEmphasisColor, &RenderStyle::setVisitedLinkTextEmphasisColor, &RenderStyle::color>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTextFillColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textFillColor, &RenderStyle::setTextFillColor, &RenderStyle::setVisitedLinkTextFillColor, &RenderStyle::color>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTextStrokeColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textStrokeColor, &RenderStyle::setTextStrokeColor, &RenderStyle::setVisitedLinkTextStrokeColor, &RenderStyle::color>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyTop, ApplyPropertyLength<&RenderStyle::top, &RenderStyle::setTop, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyRight, ApplyPropertyLength<&RenderStyle::right, &RenderStyle::setRight, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyBottom, ApplyPropertyLength<&RenderStyle::bottom, &RenderStyle::setBottom, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyLeft, ApplyPropertyLength<&RenderStyle::left, &RenderStyle::setLeft, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWidth, ApplyPropertyLength<&RenderStyle::width, &RenderStyle::setWidth, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexWidth>::createHandler()); >+ setPropertyHandler(CSSPropertyHeight, ApplyPropertyLength<&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexHeight>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyListStyleImage, ApplyPropertyStyleImage<&RenderStyle::listStyleImage, &RenderStyle::setListStyleImage, &RenderStyle::initialListStyleImage, CSSPropertyListStyleImage>::createHandler()); >+ setPropertyHandler(CSSPropertyListStylePosition, ApplyPropertyDefault<EListStylePosition, &RenderStyle::listStylePosition, EListStylePosition, &RenderStyle::setListStylePosition, EListStylePosition, &RenderStyle::initialListStylePosition>::createHandler()); >+ setPropertyHandler(CSSPropertyListStyleType, ApplyPropertyDefault<EListStyleType, &RenderStyle::listStyleType, EListStyleType, &RenderStyle::setListStyleType, EListStyleType, &RenderStyle::initialListStyleType>::createHandler()); >+ setPropertyHandler(CSSPropertyListStyle, ApplyPropertyExpanding<SuppressValue, CSSPropertyListStyleType, CSSPropertyListStyleImage, CSSPropertyListStylePosition>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyMaxHeight, ApplyPropertyLength<&RenderStyle::maxHeight, &RenderStyle::setMaxHeight, &RenderStyle::initialMaxSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneEnabled, UndefinedEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyMaxWidth, ApplyPropertyLength<&RenderStyle::maxWidth, &RenderStyle::setMaxWidth, &RenderStyle::initialMaxSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneEnabled, UndefinedEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyMinHeight, ApplyPropertyLength<&RenderStyle::minHeight, &RenderStyle::setMinHeight, &RenderStyle::initialMinSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyMinWidth, ApplyPropertyLength<&RenderStyle::minWidth, &RenderStyle::setMinWidth, &RenderStyle::initialMinSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyMarginTop, ApplyPropertyLength<&RenderStyle::marginTop, &RenderStyle::setMarginTop, &RenderStyle::initialMargin, AutoEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyMarginRight, ApplyPropertyLength<&RenderStyle::marginRight, &RenderStyle::setMarginRight, &RenderStyle::initialMargin, AutoEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyMarginBottom, ApplyPropertyLength<&RenderStyle::marginBottom, &RenderStyle::setMarginBottom, &RenderStyle::initialMargin, AutoEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyMarginLeft, ApplyPropertyLength<&RenderStyle::marginLeft, &RenderStyle::setMarginLeft, &RenderStyle::initialMargin, AutoEnabled>::createHandler()); >+ setPropertyHandler(CSSPropertyMargin, ApplyPropertyExpanding<SuppressValue, CSSPropertyMarginTop, CSSPropertyMarginRight, CSSPropertyMarginBottom, CSSPropertyMarginLeft>::createHandler()); > >- setPropertyHandler(CSSPropertyWebkitMarginBeforeCollapse, new ApplyPropertyDefault<EMarginCollapse>(&RenderStyle::marginBeforeCollapse, &RenderStyle::setMarginBeforeCollapse, &RenderStyle::initialMarginBeforeCollapse)); >- setPropertyHandler(CSSPropertyWebkitMarginAfterCollapse, new ApplyPropertyDefault<EMarginCollapse>(&RenderStyle::marginAfterCollapse, &RenderStyle::setMarginAfterCollapse, &RenderStyle::initialMarginAfterCollapse)); >+ setPropertyHandler(CSSPropertyWebkitMarginBeforeCollapse, ApplyPropertyDefault<EMarginCollapse, &RenderStyle::marginBeforeCollapse, EMarginCollapse, &RenderStyle::setMarginBeforeCollapse, EMarginCollapse, &RenderStyle::initialMarginBeforeCollapse>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitMarginAfterCollapse, ApplyPropertyDefault<EMarginCollapse, &RenderStyle::marginAfterCollapse, EMarginCollapse, &RenderStyle::setMarginAfterCollapse, EMarginCollapse, &RenderStyle::initialMarginAfterCollapse>::createHandler()); > setPropertyHandler(CSSPropertyWebkitMarginTopCollapse, CSSPropertyWebkitMarginBeforeCollapse); > setPropertyHandler(CSSPropertyWebkitMarginBottomCollapse, CSSPropertyWebkitMarginAfterCollapse); >- setPropertyHandler(CSSPropertyWebkitMarginCollapse, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyWebkitMarginBeforeCollapse), propertyHandler(CSSPropertyWebkitMarginAfterCollapse))); >+ setPropertyHandler(CSSPropertyWebkitMarginCollapse, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse>::createHandler()); > >- setPropertyHandler(CSSPropertyPaddingTop, new ApplyPropertyLength<>(&RenderStyle::paddingTop, &RenderStyle::setPaddingTop, &RenderStyle::initialPadding)); >- setPropertyHandler(CSSPropertyPaddingRight, new ApplyPropertyLength<>(&RenderStyle::paddingRight, &RenderStyle::setPaddingRight, &RenderStyle::initialPadding)); >- setPropertyHandler(CSSPropertyPaddingBottom, new ApplyPropertyLength<>(&RenderStyle::paddingBottom, &RenderStyle::setPaddingBottom, &RenderStyle::initialPadding)); >- setPropertyHandler(CSSPropertyPaddingLeft, new ApplyPropertyLength<>(&RenderStyle::paddingLeft, &RenderStyle::setPaddingLeft, &RenderStyle::initialPadding)); >- setPropertyHandler(CSSPropertyPadding, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyPaddingTop), propertyHandler(CSSPropertyPaddingRight), propertyHandler(CSSPropertyPaddingBottom), propertyHandler(CSSPropertyPaddingLeft))); >- >- setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, new ApplyPropertyLength<>(&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX)); >- setPropertyHandler(CSSPropertyWebkitPerspectiveOriginY, new ApplyPropertyLength<>(&RenderStyle::perspectiveOriginY, &RenderStyle::setPerspectiveOriginY, &RenderStyle::initialPerspectiveOriginY)); >- setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyWebkitPerspectiveOriginX), propertyHandler(CSSPropertyWebkitPerspectiveOriginY))); >- setPropertyHandler(CSSPropertyWebkitTransformOriginX, new ApplyPropertyLength<>(&RenderStyle::transformOriginX, &RenderStyle::setTransformOriginX, &RenderStyle::initialTransformOriginX)); >- setPropertyHandler(CSSPropertyWebkitTransformOriginY, new ApplyPropertyLength<>(&RenderStyle::transformOriginY, &RenderStyle::setTransformOriginY, &RenderStyle::initialTransformOriginY)); >- setPropertyHandler(CSSPropertyWebkitTransformOriginZ, new ApplyPropertyComputeLength<float>(&RenderStyle::transformOriginZ, &RenderStyle::setTransformOriginZ, &RenderStyle::initialTransformOriginZ)); >- setPropertyHandler(CSSPropertyWebkitTransformOrigin, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyWebkitTransformOriginX), propertyHandler(CSSPropertyWebkitTransformOriginY), propertyHandler(CSSPropertyWebkitTransformOriginZ))); >- >- setPropertyHandler(CSSPropertyWebkitAnimationDelay, new ApplyPropertyAnimation<double>(&Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSStyleSelector::mapAnimationDelay, &RenderStyle::accessAnimations, &RenderStyle::animations)); >- setPropertyHandler(CSSPropertyWebkitAnimationDirection, new ApplyPropertyAnimation<Animation::AnimationDirection>(&Animation::direction, &Animation::setDirection, &Animation::isDirectionSet, &Animation::clearDirection, &Animation::initialAnimationDirection, &CSSStyleSelector::mapAnimationDirection, &RenderStyle::accessAnimations, &RenderStyle::animations)); >- setPropertyHandler(CSSPropertyWebkitAnimationDuration, new ApplyPropertyAnimation<double>(&Animation::duration, &Animation::setDuration, &Animation::isDurationSet, &Animation::clearDuration, &Animation::initialAnimationDuration, &CSSStyleSelector::mapAnimationDuration, &RenderStyle::accessAnimations, &RenderStyle::animations)); >- setPropertyHandler(CSSPropertyWebkitAnimationFillMode, new ApplyPropertyAnimation<unsigned>(&Animation::fillMode, &Animation::setFillMode, &Animation::isFillModeSet, &Animation::clearFillMode, &Animation::initialAnimationFillMode, &CSSStyleSelector::mapAnimationFillMode, &RenderStyle::accessAnimations, &RenderStyle::animations)); >- setPropertyHandler(CSSPropertyWebkitAnimationIterationCount, new ApplyPropertyAnimation<int>(&Animation::iterationCount, &Animation::setIterationCount, &Animation::isIterationCountSet, &Animation::clearIterationCount, &Animation::initialAnimationIterationCount, &CSSStyleSelector::mapAnimationIterationCount, &RenderStyle::accessAnimations, &RenderStyle::animations)); >- setPropertyHandler(CSSPropertyWebkitAnimationName, new ApplyPropertyAnimation<const String&>(&Animation::name, &Animation::setName, &Animation::isNameSet, &Animation::clearName, &Animation::initialAnimationName, &CSSStyleSelector::mapAnimationName, &RenderStyle::accessAnimations, &RenderStyle::animations)); >- setPropertyHandler(CSSPropertyWebkitAnimationPlayState, new ApplyPropertyAnimation<EAnimPlayState>(&Animation::playState, &Animation::setPlayState, &Animation::isPlayStateSet, &Animation::clearPlayState, &Animation::initialAnimationPlayState, &CSSStyleSelector::mapAnimationPlayState, &RenderStyle::accessAnimations, &RenderStyle::animations)); >- setPropertyHandler(CSSPropertyWebkitAnimationTimingFunction, new ApplyPropertyAnimation<const PassRefPtr<TimingFunction> >(&Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSStyleSelector::mapAnimationTimingFunction, &RenderStyle::accessAnimations, &RenderStyle::animations)); >- >- setPropertyHandler(CSSPropertyWebkitTransitionDelay, new ApplyPropertyAnimation<double>(&Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSStyleSelector::mapAnimationDelay, &RenderStyle::accessTransitions, &RenderStyle::transitions)); >- setPropertyHandler(CSSPropertyWebkitTransitionDuration, new ApplyPropertyAnimation<double>(&Animation::duration, &Animation::setDuration, &Animation::isDurationSet, &Animation::clearDuration, &Animation::initialAnimationDuration, &CSSStyleSelector::mapAnimationDuration, &RenderStyle::accessTransitions, &RenderStyle::transitions)); >- setPropertyHandler(CSSPropertyWebkitTransitionProperty, new ApplyPropertyAnimation<int>(&Animation::property, &Animation::setProperty, &Animation::isPropertySet, &Animation::clearProperty, &Animation::initialAnimationProperty, &CSSStyleSelector::mapAnimationProperty, &RenderStyle::accessTransitions, &RenderStyle::transitions)); >- setPropertyHandler(CSSPropertyWebkitTransitionTimingFunction, new ApplyPropertyAnimation<const PassRefPtr<TimingFunction> >(&Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSStyleSelector::mapAnimationTimingFunction, &RenderStyle::accessTransitions, &RenderStyle::transitions)); >- >- >- setPropertyHandler(CSSPropertyWebkitColumnCount, new ApplyPropertyAuto<unsigned short>(&RenderStyle::columnCount, &RenderStyle::setColumnCount, &RenderStyle::hasAutoColumnCount, &RenderStyle::setHasAutoColumnCount)); >- setPropertyHandler(CSSPropertyWebkitColumnGap, new ApplyPropertyAuto<float, ComputeLength, CSSValueNormal>(&RenderStyle::columnGap, &RenderStyle::setColumnGap, &RenderStyle::hasNormalColumnGap, &RenderStyle::setHasNormalColumnGap)); >- setPropertyHandler(CSSPropertyWebkitColumnWidth, new ApplyPropertyAuto<float, ComputeLength>(&RenderStyle::columnWidth, &RenderStyle::setColumnWidth, &RenderStyle::hasAutoColumnWidth, &RenderStyle::setHasAutoColumnWidth)); >- setPropertyHandler(CSSPropertyWebkitColumns, new ApplyPropertyExpanding<SuppressValue>(propertyHandler(CSSPropertyWebkitColumnWidth), propertyHandler(CSSPropertyWebkitColumnCount))); >- >- setPropertyHandler(CSSPropertyWebkitHighlight, new ApplyPropertyString<MapNoneToNull>(&RenderStyle::highlight, &RenderStyle::setHighlight, &RenderStyle::initialHighlight)); >- setPropertyHandler(CSSPropertyWebkitHyphenateCharacter, new ApplyPropertyString<MapAutoToNull>(&RenderStyle::hyphenationString, &RenderStyle::setHyphenationString, &RenderStyle::initialHyphenationString)); >- >- setPropertyHandler(CSSPropertyWebkitTextCombine, new ApplyPropertyDefault<TextCombine>(&RenderStyle::textCombine, &RenderStyle::setTextCombine, &RenderStyle::initialTextCombine)); >- setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, new ApplyPropertyDefault<TextEmphasisPosition>(&RenderStyle::textEmphasisPosition, &RenderStyle::setTextEmphasisPosition, &RenderStyle::initialTextEmphasisPosition)); >- setPropertyHandler(CSSPropertyWebkitTextEmphasisStyle, new ApplyPropertyTextEmphasisStyle()); >+ setPropertyHandler(CSSPropertyPaddingTop, ApplyPropertyLength<&RenderStyle::paddingTop, &RenderStyle::setPaddingTop, &RenderStyle::initialPadding>::createHandler()); >+ setPropertyHandler(CSSPropertyPaddingRight, ApplyPropertyLength<&RenderStyle::paddingRight, &RenderStyle::setPaddingRight, &RenderStyle::initialPadding>::createHandler()); >+ setPropertyHandler(CSSPropertyPaddingBottom, ApplyPropertyLength<&RenderStyle::paddingBottom, &RenderStyle::setPaddingBottom, &RenderStyle::initialPadding>::createHandler()); >+ setPropertyHandler(CSSPropertyPaddingLeft, ApplyPropertyLength<&RenderStyle::paddingLeft, &RenderStyle::setPaddingLeft, &RenderStyle::initialPadding>::createHandler()); >+ setPropertyHandler(CSSPropertyPadding, ApplyPropertyExpanding<SuppressValue, CSSPropertyPaddingTop, CSSPropertyPaddingRight, CSSPropertyPaddingBottom, CSSPropertyPaddingLeft>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, ApplyPropertyLength<&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitPerspectiveOriginY, ApplyPropertyLength<&RenderStyle::perspectiveOriginY, &RenderStyle::setPerspectiveOriginY, &RenderStyle::initialPerspectiveOriginY>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitPerspectiveOriginX, CSSPropertyWebkitPerspectiveOriginY>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTransformOriginX, ApplyPropertyLength<&RenderStyle::transformOriginX, &RenderStyle::setTransformOriginX, &RenderStyle::initialTransformOriginX>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTransformOriginY, ApplyPropertyLength<&RenderStyle::transformOriginY, &RenderStyle::setTransformOriginY, &RenderStyle::initialTransformOriginY>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTransformOriginZ, ApplyPropertyComputeLength<float, &RenderStyle::transformOriginZ, &RenderStyle::setTransformOriginZ, &RenderStyle::initialTransformOriginZ>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTransformOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitTransformOriginX, CSSPropertyWebkitTransformOriginY, CSSPropertyWebkitTransformOriginZ>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitAnimationDelay, ApplyPropertyAnimation<double, &Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSStyleSelector::mapAnimationDelay, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitAnimationDirection, ApplyPropertyAnimation<Animation::AnimationDirection, &Animation::direction, &Animation::setDirection, &Animation::isDirectionSet, &Animation::clearDirection, &Animation::initialAnimationDirection, &CSSStyleSelector::mapAnimationDirection, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitAnimationDuration, ApplyPropertyAnimation<double, &Animation::duration, &Animation::setDuration, &Animation::isDurationSet, &Animation::clearDuration, &Animation::initialAnimationDuration, &CSSStyleSelector::mapAnimationDuration, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitAnimationFillMode, ApplyPropertyAnimation<unsigned, &Animation::fillMode, &Animation::setFillMode, &Animation::isFillModeSet, &Animation::clearFillMode, &Animation::initialAnimationFillMode, &CSSStyleSelector::mapAnimationFillMode, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitAnimationIterationCount, ApplyPropertyAnimation<int, &Animation::iterationCount, &Animation::setIterationCount, &Animation::isIterationCountSet, &Animation::clearIterationCount, &Animation::initialAnimationIterationCount, &CSSStyleSelector::mapAnimationIterationCount, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitAnimationName, ApplyPropertyAnimation<const String&, &Animation::name, &Animation::setName, &Animation::isNameSet, &Animation::clearName, &Animation::initialAnimationName, &CSSStyleSelector::mapAnimationName, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitAnimationPlayState, ApplyPropertyAnimation<EAnimPlayState, &Animation::playState, &Animation::setPlayState, &Animation::isPlayStateSet, &Animation::clearPlayState, &Animation::initialAnimationPlayState, &CSSStyleSelector::mapAnimationPlayState, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitAnimationTimingFunction, ApplyPropertyAnimation<const PassRefPtr<TimingFunction>, &Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSStyleSelector::mapAnimationTimingFunction, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitTransitionDelay, ApplyPropertyAnimation<double, &Animation::delay, &Animation::setDelay, &Animation::isDelaySet, &Animation::clearDelay, &Animation::initialAnimationDelay, &CSSStyleSelector::mapAnimationDelay, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTransitionDuration, ApplyPropertyAnimation<double, &Animation::duration, &Animation::setDuration, &Animation::isDurationSet, &Animation::clearDuration, &Animation::initialAnimationDuration, &CSSStyleSelector::mapAnimationDuration, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTransitionProperty, ApplyPropertyAnimation<int, &Animation::property, &Animation::setProperty, &Animation::isPropertySet, &Animation::clearProperty, &Animation::initialAnimationProperty, &CSSStyleSelector::mapAnimationProperty, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTransitionTimingFunction, ApplyPropertyAnimation<const PassRefPtr<TimingFunction>, &Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSStyleSelector::mapAnimationTimingFunction, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitColumnCount, ApplyPropertyAuto<unsigned short, &RenderStyle::columnCount, &RenderStyle::setColumnCount, &RenderStyle::hasAutoColumnCount, &RenderStyle::setHasAutoColumnCount>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitColumnGap, ApplyPropertyAuto<float, &RenderStyle::columnGap, &RenderStyle::setColumnGap, &RenderStyle::hasNormalColumnGap, &RenderStyle::setHasNormalColumnGap, ComputeLength, CSSValueNormal>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitColumnWidth, ApplyPropertyAuto<float, &RenderStyle::columnWidth, &RenderStyle::setColumnWidth, &RenderStyle::hasAutoColumnWidth, &RenderStyle::setHasAutoColumnWidth, ComputeLength>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitColumns, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitColumnWidth, CSSPropertyWebkitColumnCount>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitHighlight, ApplyPropertyString<MapNoneToNull, &RenderStyle::highlight, &RenderStyle::setHighlight, &RenderStyle::initialHighlight>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitHyphenateCharacter, ApplyPropertyString<MapAutoToNull, &RenderStyle::hyphenationString, &RenderStyle::setHyphenationString, &RenderStyle::initialHyphenationString>::createHandler()); >+ >+ setPropertyHandler(CSSPropertyWebkitTextCombine, ApplyPropertyDefault<TextCombine, &RenderStyle::textCombine, TextCombine, &RenderStyle::setTextCombine, TextCombine, &RenderStyle::initialTextCombine>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, ApplyPropertyDefault<TextEmphasisPosition, &RenderStyle::textEmphasisPosition, TextEmphasisPosition, &RenderStyle::setTextEmphasisPosition, TextEmphasisPosition, &RenderStyle::initialTextEmphasisPosition>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTextEmphasisStyle, ApplyPropertyTextEmphasisStyle::createHandler()); > >- setPropertyHandler(CSSPropertyZIndex, new ApplyPropertyAuto<int>(&RenderStyle::zIndex, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHasAutoZIndex)); >+ setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::zIndex, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHasAutoZIndex>::createHandler()); > } > > >Index: Source/WebCore/css/CSSStyleApplyProperty.h >=================================================================== >--- Source/WebCore/css/CSSStyleApplyProperty.h (revision 97893) >+++ Source/WebCore/css/CSSStyleApplyProperty.h (working copy) >@@ -33,15 +33,26 @@ namespace WebCore { > > class CSSStyleSelector; > class CSSValue; >-class ApplyPropertyBase { >- WTF_MAKE_NONCOPYABLE(ApplyPropertyBase); >- WTF_MAKE_FAST_ALLOCATED; >+class CSSStyleApplyProperty; >+ >+class PropertyHandler { > public: >- ApplyPropertyBase() { } >- virtual ~ApplyPropertyBase() { } >- virtual void applyInheritValue(CSSStyleSelector*) const = 0; >- virtual void applyInitialValue(CSSStyleSelector*) const = 0; >- virtual void applyValue(CSSStyleSelector*, CSSValue*) const = 0; >+ typedef void (*InheritFunction)(CSSStyleSelector*); >+ typedef void (*InitialFunction)(CSSStyleSelector*); >+ typedef void (*ApplyFunction)(CSSStyleSelector*, CSSValue*); >+ PropertyHandler() : m_inherit(0), m_initial(0), m_apply(0) { } >+ PropertyHandler(InheritFunction inherit, InitialFunction initial, ApplyFunction apply) : m_inherit(inherit), m_initial(initial), m_apply(apply) { } >+ void applyInheritValue(CSSStyleSelector* selector) const { ASSERT(m_inherit); (*m_inherit)(selector); } >+ void applyInitialValue(CSSStyleSelector* selector) const { ASSERT(m_initial); (*m_initial)(selector); } >+ void applyValue(CSSStyleSelector* selector, CSSValue* value) const { ASSERT(m_apply); (*m_apply)(selector, value); } >+ bool isValid() const { return m_inherit && m_initial && m_apply; } >+ InheritFunction inheritFunction() const { return m_inherit; } >+ InitialFunction initialFunction() { return m_initial; } >+ ApplyFunction applyFunction() { return m_apply; } >+private: >+ InheritFunction m_inherit; >+ InitialFunction m_initial; >+ ApplyFunction m_apply; > }; > > class CSSStyleApplyProperty { >@@ -49,7 +60,7 @@ class CSSStyleApplyProperty { > public: > static const CSSStyleApplyProperty& sharedCSSStyleApplyProperty(); > >- ApplyPropertyBase* propertyHandler(CSSPropertyID property) const >+ const PropertyHandler& propertyHandler(CSSPropertyID property) const > { > ASSERT(valid(property)); > return m_propertyMap[index(property)]; >@@ -67,22 +78,22 @@ private: > return i >= 0 && i < numCSSProperties; > } > >- void setPropertyHandler(CSSPropertyID property, ApplyPropertyBase* value) >+ void setPropertyHandler(CSSPropertyID property, PropertyHandler handler) > { > ASSERT(valid(property)); >- ASSERT(!propertyHandler(property)); >- m_propertyMap[index(property)] = value; >+ ASSERT(!propertyHandler(property).isValid()); >+ m_propertyMap[index(property)] = handler; > } > > void setPropertyHandler(CSSPropertyID newProperty, CSSPropertyID equivalentProperty) > { > ASSERT(valid(newProperty)); > ASSERT(valid(equivalentProperty)); >- ASSERT(!propertyHandler(newProperty)); >+ ASSERT(!propertyHandler(newProperty).isValid()); > m_propertyMap[index(newProperty)] = m_propertyMap[index(equivalentProperty)]; > } > >- ApplyPropertyBase* m_propertyMap[numCSSProperties]; >+ PropertyHandler m_propertyMap[numCSSProperties]; > }; > > } >Index: Source/WebCore/css/CSSStyleSelector.cpp >=================================================================== >--- Source/WebCore/css/CSSStyleSelector.cpp (revision 97893) >+++ Source/WebCore/css/CSSStyleSelector.cpp (working copy) >@@ -2392,13 +2392,14 @@ void CSSStyleSelector::applyProperty(int > CSSPropertyID property = static_cast<CSSPropertyID>(id); > > // check lookup table for implementations and use when available >- if (ApplyPropertyBase* handler = m_applyProperty.propertyHandler(property)) { >+ const PropertyHandler& handler = m_applyProperty.propertyHandler(property); >+ if (handler.isValid()) { > if (isInherit) >- handler->applyInheritValue(this); >+ handler.applyInheritValue(this); > else if (isInitial) >- handler->applyInitialValue(this); >+ handler.applyInitialValue(this); > else >- handler->applyValue(this, value); >+ handler.applyValue(this, value); > return; > } > >@@ -3741,56 +3742,107 @@ void CSSStyleSelector::applyProperty(int > > // These properties are implemented in the CSSStyleApplyProperty lookup table. > case CSSPropertyColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyDirection: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundAttachment: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundClip: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitBackgroundClip: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitBackgroundComposite: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundOrigin: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitBackgroundOrigin: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundImage: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundSize: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitBackgroundSize: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskAttachment: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskClip: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskComposite: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskOrigin: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskImage: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskSize: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderBottomColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderLeftColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderRightColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderTopColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderTopStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderRightStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderBottomStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderLeftStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderTopWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderRightWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderBottomWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderLeftWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorder: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderTop: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderRight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderBottom: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderLeft: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderRadius: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitBorderRadius: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderTopLeftRadius: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderTopRightRadius: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderBottomLeftRadius: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderBottomRightRadius: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBorderSpacing: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitBorderHorizontalSpacing: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitBorderVerticalSpacing: >+ ASSERT_NOT_REACHED(); > case CSSPropertyCounterIncrement: >+ ASSERT_NOT_REACHED(); > case CSSPropertyCounterReset: >+ ASSERT_NOT_REACHED(); > case CSSPropertyLetterSpacing: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWordSpacing: >+ ASSERT_NOT_REACHED(); > #if ENABLE(CSS3_FLEXBOX) > case CSSPropertyWebkitFlexOrder: > case CSSPropertyWebkitFlexPack: >@@ -3798,89 +3850,173 @@ void CSSStyleSelector::applyProperty(int > case CSSPropertyWebkitFlexFlow: > #endif > case CSSPropertyFontStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyFontVariant: >+ ASSERT_NOT_REACHED(); > case CSSPropertyTextRendering: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTextOrientation: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitFontSmoothing: >+ ASSERT_NOT_REACHED(); > case CSSPropertyFontWeight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyOutlineStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyOutlineWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyOutlineOffset: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitColumnRuleWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyOutlineColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitColumnRuleColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTextEmphasisColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTextFillColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTextStrokeColor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundPosition: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundPositionX: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundPositionY: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskPosition: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskPositionX: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskPositionY: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundRepeat: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundRepeatX: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBackgroundRepeatY: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskRepeat: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskRepeatX: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitMaskRepeatY: >+ ASSERT_NOT_REACHED(); > case CSSPropertyOverflow: >+ ASSERT_NOT_REACHED(); > case CSSPropertyOverflowX: >+ ASSERT_NOT_REACHED(); > case CSSPropertyOverflowY: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMaxWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyTop: >+ ASSERT_NOT_REACHED(); > case CSSPropertyLeft: >+ ASSERT_NOT_REACHED(); > case CSSPropertyRight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyBottom: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMinWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyListStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyListStyleImage: >+ ASSERT_NOT_REACHED(); > case CSSPropertyListStylePosition: >+ ASSERT_NOT_REACHED(); > case CSSPropertyListStyleType: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMarginTop: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMarginRight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMarginBottom: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMarginLeft: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMargin: >+ ASSERT_NOT_REACHED(); > case CSSPropertyPaddingTop: >+ ASSERT_NOT_REACHED(); > case CSSPropertyPaddingRight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyPaddingBottom: >+ ASSERT_NOT_REACHED(); > case CSSPropertyPaddingLeft: >+ ASSERT_NOT_REACHED(); > case CSSPropertyPadding: >+ ASSERT_NOT_REACHED(); > case CSSPropertyTextIndent: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMaxHeight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyHeight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyMinHeight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTransformOriginX: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTransformOriginY: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTransformOriginZ: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTransformOrigin: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitPerspectiveOriginX: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitPerspectiveOriginY: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitPerspectiveOrigin: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitAnimationDelay: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitAnimationDirection: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitAnimationDuration: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitAnimationFillMode: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitAnimationIterationCount: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitAnimationName: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitAnimationPlayState: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitAnimationTimingFunction: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTransitionDelay: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTransitionDuration: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTransitionProperty: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTransitionTimingFunction: >+ ASSERT_NOT_REACHED(); > case CSSPropertyCursor: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitColumns: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitColumnCount: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitColumnGap: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitColumnWidth: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitHighlight: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitHyphenateCharacter: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTextCombine: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTextEmphasisPosition: >+ ASSERT_NOT_REACHED(); > case CSSPropertyWebkitTextEmphasisStyle: >+ ASSERT_NOT_REACHED(); > case CSSPropertyZIndex: > ASSERT_NOT_REACHED(); > return; >Index: Source/WebCore/rendering/style/RenderStyle.h >=================================================================== >--- Source/WebCore/rendering/style/RenderStyle.h (revision 97893) >+++ Source/WebCore/rendering/style/RenderStyle.h (working copy) >@@ -1518,6 +1518,7 @@ private: > } > > // Color accessors are all private to make sure callers use visitedDependentColor instead to access them. >+ const Color& invalidColor() const { static Color invalid; return invalid; } > const Color& borderLeftColor() const { return surround->border.left().color(); } > const Color& borderRightColor() const { return surround->border.right().color(); } > const Color& borderTopColor() const { return surround->border.top().color(); }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 68944
:
108915
|
108917
|
109086
|
109612
|
109718
|
109744
|
110801
|
111712
|
111716