Title: [177489] trunk/Source/WebCore
Revision
177489
Author
[email protected]
Date
2014-12-18 01:55:48 -0800 (Thu, 18 Dec 2014)

Log Message

Move 'list-style-image' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139763

Reviewed by Antti Koivisto.

Move 'list-style-image' CSS property to the new StyleBuilder
by reusing an existing Converter helper and renaming it for
clarity.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyStyleImage::applyValue): Deleted.
(WebCore::ApplyPropertyStyleImage::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertStyleImage):
(WebCore::StyleBuilderConverter::convertBorderImageSource): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (177488 => 177489)


--- trunk/Source/WebCore/ChangeLog	2014-12-18 07:14:58 UTC (rev 177488)
+++ trunk/Source/WebCore/ChangeLog	2014-12-18 09:55:48 UTC (rev 177489)
@@ -1,3 +1,25 @@
+2014-12-18  Chris Dumez  <[email protected]>
+
+        Move 'list-style-image' CSS property to the new StyleBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=139763
+
+        Reviewed by Antti Koivisto.
+
+        Move 'list-style-image' CSS property to the new StyleBuilder
+        by reusing an existing Converter helper and renaming it for
+        clarity.
+
+        No new tests, no behavior change.
+
+        * css/CSSPropertyNames.in:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        (WebCore::ApplyPropertyStyleImage::applyValue): Deleted.
+        (WebCore::ApplyPropertyStyleImage::createHandler): Deleted.
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertStyleImage):
+        (WebCore::StyleBuilderConverter::convertBorderImageSource): Deleted.
+
 2014-12-17  Csaba Osztrogonác  <[email protected]>
 
         URTBF after r177452.

Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (177488 => 177489)


--- trunk/Source/WebCore/css/CSSPropertyNames.in	2014-12-18 07:14:58 UTC (rev 177488)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in	2014-12-18 09:55:48 UTC (rev 177489)
@@ -133,7 +133,7 @@
 border-image-outset [Custom=All]
 border-image-repeat [Custom=All]
 border-image-slice [Custom=All]
-border-image-source [Converter=BorderImageSource<CSSPropertyBorderImageSource>]
+border-image-source [Converter=StyleImage<CSSPropertyBorderImageSource>]
 border-image-width [Custom=All]
 border-left [LegacyStyleBuilder]
 border-left-color [LegacyStyleBuilder]
@@ -186,7 +186,7 @@
 left [Initial=initialOffset, Converter=LengthOrAuto]
 letter-spacing [Inherited, Converter=Spacing]
 list-style [Inherited, LegacyStyleBuilder]
-list-style-image [Inherited, LegacyStyleBuilder]
+list-style-image [Inherited, Converter=StyleImage<CSSPropertyListStyleImage>]
 list-style-position [Inherited]
 list-style-type [Inherited]
 margin [LegacyStyleBuilder]
@@ -446,7 +446,7 @@
 -webkit-mask-box-image-outset [Custom=All]
 -webkit-mask-box-image-repeat [Custom=All]
 -webkit-mask-box-image-slice [Custom=All]
--webkit-mask-box-image-source [Converter=BorderImageSource<CSSPropertyWebkitMaskBoxImageSource>]
+-webkit-mask-box-image-source [Converter=StyleImage<CSSPropertyWebkitMaskBoxImageSource>]
 -webkit-mask-box-image-width [Custom=All]
 -webkit-mask-clip [LegacyStyleBuilder]
 -webkit-mask-composite [LegacyStyleBuilder]

Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (177488 => 177489)


--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp	2014-12-18 07:14:58 UTC (rev 177488)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp	2014-12-18 09:55:48 UTC (rev 177489)
@@ -145,17 +145,6 @@
     static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
 };
 
-template <StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr<StyleImage>), StyleImage* (*initialFunction)(), CSSPropertyID property>
-class ApplyPropertyStyleImage {
-public:
-    static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) { (styleResolver->style()->*setterFunction)(styleResolver->styleImage(property, *value)); }
-    static PropertyHandler createHandler()
-    {
-        PropertyHandler handler = ApplyPropertyDefaultBase<StyleImage*, getterFunction, PassRefPtr<StyleImage>, setterFunction, StyleImage*, initialFunction>::createHandler();
-        return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
-    }
-};
-
 enum AutoValueType {Number = 0, ComputeLength};
 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 {
@@ -734,7 +723,6 @@
     setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont<FontItalic, &FontDescription::italic, &FontDescription::setItalic, FontItalicOff>::createHandler());
     setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont<FontSmallCaps, &FontDescription::smallCaps, &FontDescription::setSmallCaps, FontSmallCapsOff>::createHandler());
     setPropertyHandler(CSSPropertyFontWeight, ApplyPropertyFontWeight::createHandler());
-    setPropertyHandler(CSSPropertyListStyleImage, ApplyPropertyStyleImage<&RenderStyle::listStyleImage, &RenderStyle::setListStyleImage, &RenderStyle::initialListStyleImage, CSSPropertyListStyleImage>::createHandler());
     setPropertyHandler(CSSPropertyOrphans, ApplyPropertyAuto<short, &RenderStyle::orphans, &RenderStyle::setOrphans, &RenderStyle::hasAutoOrphans, &RenderStyle::setHasAutoOrphans>::createHandler());
     setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor, &RenderStyle::setVisitedLinkOutlineColor, &RenderStyle::color>::createHandler());
     setPropertyHandler(CSSPropertyWebkitTextDecorationColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textDecorationColor, &RenderStyle::setTextDecorationColor, &RenderStyle::setVisitedLinkTextDecorationColor, &RenderStyle::color>::createHandler());

Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (177488 => 177489)


--- trunk/Source/WebCore/css/StyleBuilderConverter.h	2014-12-18 07:14:58 UTC (rev 177488)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h	2014-12-18 09:55:48 UTC (rev 177489)
@@ -59,7 +59,7 @@
     static short convertWebkitHyphenateLimitLines(StyleResolver&, CSSValue&);
     template <CSSPropertyID property> static NinePieceImage convertBorderImage(StyleResolver&, CSSValue&);
     template <CSSPropertyID property> static NinePieceImage convertBorderMask(StyleResolver&, CSSValue&);
-    template <CSSPropertyID property> static PassRefPtr<StyleImage> convertBorderImageSource(StyleResolver&, CSSValue&);
+    template <CSSPropertyID property> static PassRefPtr<StyleImage> convertStyleImage(StyleResolver&, CSSValue&);
     static TransformOperations convertTransform(StyleResolver&, CSSValue&);
     static String convertString(StyleResolver&, CSSValue&);
     static String convertStringOrAuto(StyleResolver&, CSSValue&);
@@ -267,7 +267,7 @@
 }
 
 template <CSSPropertyID property>
-inline PassRefPtr<StyleImage> StyleBuilderConverter::convertBorderImageSource(StyleResolver& styleResolver, CSSValue& value)
+inline PassRefPtr<StyleImage> StyleBuilderConverter::convertStyleImage(StyleResolver& styleResolver, CSSValue& value)
 {
     return styleResolver.styleImage(property, value);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to