Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (175380 => 175381)
--- trunk/Source/WebCore/css/CSSPropertyNames.in 2014-10-30 21:25:30 UTC (rev 175380)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in 2014-10-30 21:30:19 UTC (rev 175381)
@@ -288,7 +288,7 @@
-webkit-border-end-width
-webkit-border-fit [NewStyleBuilder]
-webkit-border-horizontal-spacing [Inherited, NewStyleBuilder, NameForMethods=HorizontalBorderSpacing, Converter=ComputedLength<short>]
--webkit-border-image
+-webkit-border-image [NewStyleBuilder, Initial=initialNinePieceImage, Converter=BorderImage<CSSPropertyWebkitBorderImage>]
// -webkit-border-radius differs from border-radius only in the interpretation of
// a value consisting of two lengths: "-webkit-border-radius: l1 l2;" is equivalent
// to "border-radius: l1 / l2;"
@@ -407,7 +407,7 @@
-webkit-marquee-speed
-webkit-marquee-style [NewStyleBuilder, TypeName=EMarqueeBehavior, NameForMethods=MarqueeBehavior]
-webkit-mask
--webkit-mask-box-image
+-webkit-mask-box-image [NewStyleBuilder, Initial=initialNinePieceImage, Converter=BorderMask<CSSPropertyWebkitMaskBoxImage>]
-webkit-mask-box-image-outset
-webkit-mask-box-image-repeat
-webkit-mask-box-image-slice
Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (175380 => 175381)
--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp 2014-10-30 21:25:30 UTC (rev 175380)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp 2014-10-30 21:30:19 UTC (rev 175381)
@@ -902,28 +902,6 @@
};
enum BorderImageType { BorderImage = 0, BorderMask };
-template <BorderImageType borderImageType,
- CSSPropertyID property,
- const NinePieceImage& (RenderStyle::*getterFunction)() const,
- void (RenderStyle::*setterFunction)(const NinePieceImage&)>
-class ApplyPropertyBorderImage {
-public:
- static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
- {
- NinePieceImage image;
- if (borderImageType == BorderMask)
- image.setMaskDefaults();
- styleResolver->styleMap()->mapNinePieceImage(property, value, image);
- (styleResolver->style()->*setterFunction)(image);
- }
-
- static PropertyHandler createHandler()
- {
- PropertyHandler handler = ApplyPropertyDefaultBase<const NinePieceImage&, getterFunction, const NinePieceImage&, setterFunction, NinePieceImage, &RenderStyle::initialNinePieceImage>::createHandler();
- return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
- }
-};
-
enum BorderImageModifierType { Outset, Repeat, Slice, Width };
template <BorderImageType type, BorderImageModifierType modifier>
class ApplyPropertyBorderImageModifier {
@@ -2266,7 +2244,6 @@
setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitBackgroundComposite, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSToStyleMap::mapFillComposite>::createHandler());
setPropertyHandler(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin);
setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize);
- setPropertyHandler(CSSPropertyWebkitBorderImage, ApplyPropertyBorderImage<BorderImage, CSSPropertyWebkitBorderImage, &RenderStyle::borderImage, &RenderStyle::setBorderImage>::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(CSSPropertyWebkitColumnRuleColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::columnRuleColor, &RenderStyle::setColumnRuleColor, &RenderStyle::setVisitedLinkColumnRuleColor, &RenderStyle::color>::createHandler());
@@ -2283,7 +2260,6 @@
setPropertyHandler(CSSPropertyWebkitMarqueeIncrement, ApplyPropertyMarqueeIncrement::createHandler());
setPropertyHandler(CSSPropertyWebkitMarqueeRepetition, ApplyPropertyMarqueeRepetition::createHandler());
setPropertyHandler(CSSPropertyWebkitMarqueeSpeed, ApplyPropertyMarqueeSpeed::createHandler());
- setPropertyHandler(CSSPropertyWebkitMaskBoxImage, ApplyPropertyBorderImage<BorderMask, CSSPropertyWebkitMaskBoxImage, &RenderStyle::maskBoxImage, &RenderStyle::setMaskBoxImage>::createHandler());
setPropertyHandler(CSSPropertyWebkitMaskBoxImageOutset, ApplyPropertyBorderImageModifier<BorderMask, Outset>::createHandler());
setPropertyHandler(CSSPropertyWebkitMaskBoxImageRepeat, ApplyPropertyBorderImageModifier<BorderMask, Repeat>::createHandler());
setPropertyHandler(CSSPropertyWebkitMaskBoxImageSlice, ApplyPropertyBorderImageModifier<BorderMask, Slice>::createHandler());
Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (175380 => 175381)
--- trunk/Source/WebCore/css/StyleBuilderConverter.h 2014-10-30 21:25:30 UTC (rev 175380)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h 2014-10-30 21:30:19 UTC (rev 175381)
@@ -47,6 +47,8 @@
static LengthSize convertRadius(StyleResolver&, CSSValue&);
static TextDecoration convertTextDecoration(StyleResolver&, CSSValue&);
template <typename T> static T convertNumber(StyleResolver&, CSSValue&);
+ template <CSSPropertyID property> static NinePieceImage convertBorderImage(StyleResolver&, CSSValue&);
+ template <CSSPropertyID property> static NinePieceImage convertBorderMask(StyleResolver&, CSSValue&);
private:
static Length convertToRadiusLength(CSSToLengthConversionData&, CSSPrimitiveValue&);
@@ -206,6 +208,22 @@
return primitiveValue.getValue<T>(CSSPrimitiveValue::CSS_NUMBER);
}
+template <CSSPropertyID property>
+inline NinePieceImage StyleBuilderConverter::convertBorderImage(StyleResolver& styleResolver, CSSValue& value)
+{
+ NinePieceImage image;
+ styleResolver.styleMap()->mapNinePieceImage(property, &value, image);
+ return image;
+}
+
+template <CSSPropertyID property>
+inline NinePieceImage StyleBuilderConverter::convertBorderMask(StyleResolver& styleResolver, CSSValue& value)
+{
+ NinePieceImage image = convertBorderImage<property>(styleResolver, value);
+ image.setMaskDefaults();
+ return image;
+}
+
} // namespace WebCore
#endif // StyleBuilderConverter_h