Title: [178434] trunk/Source
Revision
178434
Author
[email protected]
Date
2015-01-14 12:11:44 -0800 (Wed, 14 Jan 2015)

Log Message

Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=140347

Reviewed by Darin Adler.

Source/WebCore:

Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
- Removing the static_cast to the destination type in the generated
  StyleBuilder code and let compiler implicitly convert the
  CSSPrimitiveValue to the setter's argument type.
- Updating conditional converters to return a WTF::Optional<>
  instead of returning a boolean and having an output argument
  passed by reference. This way, we can use "auto" in the generated
  StyleBuilder code to deduce the return type.

* css/CSSPropertyNames.in:
Drop TypeName parameter from all properties as it is no longer needed.

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertGridTrackSize):
(WebCore::StyleBuilderConverter::convertGridPosition):
(WebCore::StyleBuilderConverter::convertWordSpacing):
(WebCore::StyleBuilderConverter::convertPerspective):
(WebCore::StyleBuilderConverter::convertMarqueeIncrement):
(WebCore::StyleBuilderConverter::convertFilterOperations):
(WebCore::StyleBuilderConverter::convertMaskImageOperations):
Update conditional converters to return an Optional<>.

* css/makeprop.pl:
(generateValueSetter):
Drop support for TypeName, stop using static_cast to destination
type and update the generated code now that the conditional
converters return an Optional.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::systemFont):
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::setIsItalic):
(WebCore::FontDescription::setIsSmallCaps):
(WebCore::FontDescription::setItalic): Deleted.
(WebCore::FontDescription::setSmallCaps): Deleted.
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::systemFont):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemFont):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::systemFont):
* rendering/RenderThemeWin.cpp:
(WebCore::fillFontDescription):
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::updateStyle):
Now that we call the RenderStyle setters with a CSSPrimitiveValue
and let it be implicitly converted to the right type, instead of
doing an explicit static_cast, two setters on FontDescription
were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
taking a boolean in argument to setIsItalic() / setIsSmallCaps()
to resolve the ambiguity.

Source/WebKit/mac:

Call FontDescription::setIsItalic() instead of setItalic() as the
call site passes a boolean.

* WebView/WebHTMLView.mm:
(fontNameForDescription):

Source/WebKit/win:

Call FontDescription::setIsItalic() instead of setItalic() as the
call site passes a boolean.

* WebKitGraphics.cpp:
(makeFont):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (178433 => 178434)


--- trunk/Source/WebCore/ChangeLog	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/ChangeLog	2015-01-14 20:11:44 UTC (rev 178434)
@@ -1,3 +1,66 @@
+2015-01-14  Chris Dumez  <[email protected]>
+
+        Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
+        https://bugs.webkit.org/show_bug.cgi?id=140347
+
+        Reviewed by Darin Adler.
+
+        Make 'TypeName' parameter unnecessary in CSSPropertyNames.in by:
+        - Removing the static_cast to the destination type in the generated
+          StyleBuilder code and let compiler implicitly convert the
+          CSSPrimitiveValue to the setter's argument type.
+        - Updating conditional converters to return a WTF::Optional<>
+          instead of returning a boolean and having an output argument
+          passed by reference. This way, we can use "auto" in the generated
+          StyleBuilder code to deduce the return type.
+
+        * css/CSSPropertyNames.in:
+        Drop TypeName parameter from all properties as it is no longer needed.
+
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertGridTrackSize):
+        (WebCore::StyleBuilderConverter::convertGridPosition):
+        (WebCore::StyleBuilderConverter::convertWordSpacing):
+        (WebCore::StyleBuilderConverter::convertPerspective):
+        (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
+        (WebCore::StyleBuilderConverter::convertFilterOperations):
+        (WebCore::StyleBuilderConverter::convertMaskImageOperations):
+        Update conditional converters to return an Optional<>.
+
+        * css/makeprop.pl:
+        (generateValueSetter):
+        Drop support for TypeName, stop using static_cast to destination
+        type and update the generated code now that the conditional
+        converters return an Optional.
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::systemFont):
+        * platform/graphics/Font.cpp:
+        (WebCore::Font::Font):
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontDescription::setIsItalic):
+        (WebCore::FontDescription::setIsSmallCaps):
+        (WebCore::FontDescription::setItalic): Deleted.
+        (WebCore::FontDescription::setSmallCaps): Deleted.
+        * rendering/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::systemFont):
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::systemFont):
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::systemFont):
+        * rendering/RenderThemeSafari.cpp:
+        (WebCore::RenderThemeSafari::systemFont):
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::fillFontDescription):
+        * rendering/mathml/RenderMathMLToken.cpp:
+        (WebCore::RenderMathMLToken::updateStyle):
+        Now that we call the RenderStyle setters with a CSSPrimitiveValue
+        and let it be implicitly converted to the right type, instead of
+        doing an explicit static_cast, two setters on FontDescription
+        were ambiguous: setItalic() / setSmallCaps(). Rename the overloads
+        taking a boolean in argument to setIsItalic() / setIsSmallCaps()
+        to resolve the ambiguity.
+
 2015-01-14  Jer Noble  <[email protected]>
 
         Null-deref crash when seeking immediately before looping.

Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (178433 => 178434)


--- trunk/Source/WebCore/css/CSSPropertyNames.in	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in	2015-01-14 20:11:44 UTC (rev 178434)
@@ -8,11 +8,6 @@
 // http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp
 //
 // StyleBuilder options:
-// * TypeName:
-// Overrides the type of the setter method argument on RenderStyle. By
-// default, 'E' + PropertyId is used (e.g. EBorderCollapse). This option
-// is not needed if the "Converter" option is used.
-//
 // * Initial:
 // Overrides the method name on RenderStyle to get the initial value for
 // the property. By default, initial' + PropertyId is used (e.g.
@@ -35,12 +30,12 @@
 //
 // * Converter=XXX:
 // If converting the input CSSValue into the setter method argument type
-// is not trivial (i.e. casting to TypeName does not suffice), then you
-// can indicate that a Converter helper function in
-// css/StyleBuilderConverter.h should be used.
+// is not trivial (i.e. the CSSPrimitiveValue cannot be implicitly converted
+// to the expected type), then you can indicate that a Converter helper
+// function in css/StyleBuilderConverter.h should be used.
 //
 // * ConditionalConverter=XXX:
-// Similar to Converter=XXX but the converter function returns a boolean
+// Similar to Converter=XXX but the converter function returns a WTF::Optional<>
 // to indicate if the property setter should be called or not.
 //
 // * Custom=[Initial|Value|Inherit|All]:
@@ -104,13 +99,13 @@
 font [Inherited, Custom=All]
 font-family [Inherited, Custom=All]
 font-size [Inherited, Custom=All]
-font-style [Inherited, FontProperty, TypeName=FontItalic, NameForMethods=Italic]
-font-variant [Inherited, FontProperty, TypeName=FontSmallCaps, NameForMethods=SmallCaps]
+font-style [Inherited, FontProperty, NameForMethods=Italic]
+font-variant [Inherited, FontProperty, NameForMethods=SmallCaps]
 font-weight [Inherited, Custom=All]
-text-rendering [Inherited, FontProperty, TypeName=TextRenderingMode, NameForMethods=TextRenderingMode]
+text-rendering [Inherited, FontProperty, NameForMethods=TextRenderingMode]
 -webkit-font-feature-settings [Inherited, FontProperty, Custom=Initial|Inherit, Converter=FontFeatureSettings, NameForMethods=FeatureSettings]
--webkit-font-kerning [Inherited, FontProperty, TypeName=FontDescription::Kerning, NameForMethods=Kerning]
--webkit-font-smoothing [Inherited, FontProperty, TypeName=FontSmoothingMode]
+-webkit-font-kerning [Inherited, FontProperty, NameForMethods=Kerning]
+-webkit-font-smoothing [Inherited, FontProperty]
 -webkit-font-variant-ligatures [Inherited, Custom=All]
 -webkit-locale [Inherited, Custom=Value]
 -webkit-text-orientation [Inherited, Custom=Value]
@@ -130,33 +125,33 @@
 #endif
 
 // Keep this in between the highest priority props and the lower ones.
--webkit-ruby-position [Inherited, TypeName=RubyPosition]
+-webkit-ruby-position [Inherited]
 
 // The remaining properties are listed in alphabetical order
 alignment-baseline [SVG]
 animation [Shorthand]
-animation-delay [AnimationProperty, TypeName=double, NameForMethods=Delay]
-animation-direction [AnimationProperty, TypeName=Animation::AnimationDirection, NameForMethods=Direction]
-animation-duration [AnimationProperty, TypeName=double, NameForMethods=Duration]
-animation-fill-mode [AnimationProperty, TypeName=unsigned, NameForMethods=FillMode]
-animation-iteration-count [AnimationProperty, TypeName=double, NameForMethods=IterationCount]
-animation-name [AnimationProperty, TypeName=String, NameForMethods=Name]
-animation-play-state [AnimationProperty, TypeName=EAnimPlayState, NameForMethods=PlayState]
-animation-timing-function [AnimationProperty, TypeName=PassRefPtr<TimingFunction>, NameForMethods=TimingFunction]
+animation-delay [AnimationProperty, NameForMethods=Delay]
+animation-direction [AnimationProperty, NameForMethods=Direction]
+animation-duration [AnimationProperty, NameForMethods=Duration]
+animation-fill-mode [AnimationProperty, NameForMethods=FillMode]
+animation-iteration-count [AnimationProperty, NameForMethods=IterationCount]
+animation-name [AnimationProperty, NameForMethods=Name]
+animation-play-state [AnimationProperty, NameForMethods=PlayState]
+animation-timing-function [AnimationProperty, NameForMethods=TimingFunction]
 background [Shorthand]
-background-attachment [FillLayerProperty, TypeName=EFillAttachment, NameForMethods=Attachment]
-background-blend-mode [FillLayerProperty, TypeName=BlendMode, NameForMethods=BlendMode]
-background-clip [FillLayerProperty, TypeName=EFillBox, NameForMethods=Clip]
+background-attachment [FillLayerProperty, NameForMethods=Attachment]
+background-blend-mode [FillLayerProperty, NameForMethods=BlendMode]
+background-clip [FillLayerProperty, NameForMethods=Clip]
 background-color [VisitedLinkColorSupport, Initial=invalidColor, NoDefaultColor]
-background-image [FillLayerProperty, TypeName=StyleImage*, NameForMethods=Image]
-background-origin [FillLayerProperty, TypeName=EFillBox, NameForMethods=Origin]
+background-image [FillLayerProperty, NameForMethods=Image]
+background-origin [FillLayerProperty, NameForMethods=Origin]
 background-position [Shorthand]
-background-position-x [FillLayerProperty, TypeName=Length, NameForMethods=XPosition]
-background-position-y [FillLayerProperty, TypeName=Length, NameForMethods=YPosition]
+background-position-x [FillLayerProperty, NameForMethods=XPosition]
+background-position-y [FillLayerProperty, NameForMethods=YPosition]
 background-repeat [Shorthand]
-background-repeat-x [FillLayerProperty, TypeName=EFillRepeat, NameForMethods=RepeatX]
-background-repeat-y [FillLayerProperty, TypeName=EFillRepeat, NameForMethods=RepeatY]
-background-size [FillLayerProperty, TypeName=EFillSize, NameForMethods=Size]
+background-repeat-x [FillLayerProperty, NameForMethods=RepeatX]
+background-repeat-y [FillLayerProperty, NameForMethods=RepeatY]
+background-size [FillLayerProperty, NameForMethods=Size]
 baseline-shift [SVG, Custom=Value]
 border [Shorthand]
 border-bottom [Shorthand]
@@ -165,7 +160,7 @@
 -webkit-border-bottom-left-radius = border-bottom-left-radius
 border-bottom-right-radius [Initial=initialBorderRadius, Converter=Radius]
 -webkit-border-bottom-right-radius = border-bottom-right-radius
-border-bottom-style [TypeName=EBorderStyle, Initial=initialBorderStyle]
+border-bottom-style [Initial=initialBorderStyle]
 border-bottom-width [Initial=initialBorderWidth, Converter=LineWidth<float>]
 border-collapse [Inherited]
 border-color [Shorthand]
@@ -177,12 +172,12 @@
 border-image-width [Custom=All]
 border-left [Shorthand]
 border-left-color [VisitedLinkColorSupport, Initial=invalidColor]
-border-left-style [TypeName=EBorderStyle, Initial=initialBorderStyle]
+border-left-style [Initial=initialBorderStyle]
 border-left-width [Initial=initialBorderWidth, Converter=LineWidth<float>]
 border-radius [Shorthand]
 border-right [Shorthand]
 border-right-color [VisitedLinkColorSupport, Initial=invalidColor]
-border-right-style [TypeName=EBorderStyle, Initial=initialBorderStyle]
+border-right-style [Initial=initialBorderStyle]
 border-right-width [Initial=initialBorderWidth, Converter=LineWidth<float>]
 border-spacing [Inherited, Shorthand]
 border-style [Shorthand]
@@ -192,7 +187,7 @@
 -webkit-border-top-left-radius = border-top-left-radius
 border-top-right-radius [Initial=initialBorderRadius, Converter=Radius]
 -webkit-border-top-right-radius = border-top-right-radius
-border-top-style [TypeName=EBorderStyle, Initial=initialBorderStyle]
+border-top-style [Initial=initialBorderStyle]
 border-top-width [Initial=initialBorderWidth, Converter=LineWidth<float>]
 border-width [Shorthand]
 bottom [Initial=initialOffset, Converter=LengthOrAuto]
@@ -207,9 +202,9 @@
 clip [Custom=All]
 -webkit-clip-path [Converter=ClipPath]
 clip-path [SVG, Converter=SVGURIReference, NameForMethods=ClipperResource]
-clip-rule [Inherited, SVG, TypeName=WindRule]
+clip-rule [Inherited, SVG]
 color-interpolation [Inherited, SVG]
-color-interpolation-filters [Inherited, SVG, TypeName=EColorInterpolation]
+color-interpolation-filters [Inherited, SVG]
 color-profile [SkipBuilder]
 color-rendering [Inherited, SVG]
 content [Custom=All]
@@ -217,18 +212,18 @@
 counter-reset [Custom=All]
 cursor [Inherited, Custom=All]
 #if defined(ENABLE_CURSOR_VISIBILITY) && ENABLE_CURSOR_VISIBILITY
--webkit-cursor-visibility [Inherited, TypeName=CursorVisibility]
+-webkit-cursor-visibility [Inherited]
 #endif
 cx [Initial=initialZeroLength, Converter=Length]
 cy [Initial=initialZeroLength, Converter=Length]
 dominant-baseline [SVG]
-empty-cells [Inherited, TypeName=EEmptyCell]
+empty-cells [Inherited]
 enable-background [SkipBuilder]
 fill [Inherited, SVG, Custom=All]
 fill-opacity [Inherited, SVG, Converter=Opacity]
-fill-rule [Inherited, SVG, TypeName=WindRule]
+fill-rule [Inherited, SVG]
 filter [SVG, Converter=SVGURIReference, NameForMethods=FilterResource]
-float [TypeName=EFloat, NameForMethods=Floating]
+float [NameForMethods=Floating]
 flood-color [SVG, Converter=SVGColor]
 flood-opacity [SVG, Converter=Opacity]
 font-stretch [SkipBuilder]
@@ -236,7 +231,7 @@
 glyph-orientation-vertical [Inherited, SVG, Converter=GlyphOrientationOrAuto]
 height [Initial=initialSize, Converter=LengthSizing]
 #if defined(ENABLE_CSS_IMAGE_ORIENTATION) && ENABLE_CSS_IMAGE_ORIENTATION
-image-orientation [Inherited, TypeName=ImageOrientationEnum]
+image-orientation [Inherited]
 #endif
 image-rendering [Inherited]
 #if defined(ENABLE_CSS_IMAGE_RESOLUTION) && ENABLE_CSS_IMAGE_RESOLUTION
@@ -265,12 +260,12 @@
 max-width [Initial=initialMaxSize, Converter=LengthMaxSizing]
 min-height [Initial=initialMinSize, Converter=LengthSizing]
 min-width [Initial=initialMinSize, Converter=LengthSizing]
-object-fit [TypeName=ObjectFit]
-opacity [TypeName=float]
+object-fit
+opacity
 // Honor -webkit-opacity as a synonym for opacity. This was the only syntax that worked in Safari 1.1,
 // and may be in use on some websites and widgets.
 -webkit-opacity = opacity
-orphans [Inherited, TypeName=short, AutoFunctions]
+orphans [Inherited, AutoFunctions]
 outline [Shorthand]
 outline-color [VisitedLinkColorSupport, Initial=invalidColor]
 outline-offset [Converter=ComputedLength<int>]
@@ -278,17 +273,17 @@
 outline-width [Converter=LineWidth<unsigned short>]
 overflow [Shorthand]
 overflow-wrap
-overflow-x [TypeName=EOverflow]
-overflow-y [TypeName=EOverflow]
+overflow-x
+overflow-y
 padding [Shorthand]
 padding-bottom [Initial=initialPadding, Converter=Length]
 padding-left [Initial=initialPadding, Converter=Length]
 padding-right [Initial=initialPadding, Converter=Length]
 padding-top [Initial=initialPadding, Converter=Length]
 page [SkipBuilder]
-page-break-after [TypeName=EPageBreak, Initial=initialPageBreak]
-page-break-before [TypeName=EPageBreak, Initial=initialPageBreak]
-page-break-inside [TypeName=EPageBreak, Initial=initialPageBreak]
+page-break-after [Initial=initialPageBreak]
+page-break-before [Initial=initialPageBreak]
+page-break-inside [Initial=initialPageBreak]
 paint-order [SVG, Converter=PaintOrder]
 pointer-events [Inherited]
 position
@@ -306,14 +301,14 @@
 stroke [Inherited, SVG, Custom=All]
 stroke-dasharray [Inherited, SVG, Converter=StrokeDashArray, NameForMethods=StrokeDashArray]
 stroke-dashoffset [Inherited, NameForMethods=StrokeDashOffset, Initial=initialZeroLength, Converter=Length]
-stroke-linecap [Inherited, SVG, NameForMethods=CapStyle, TypeName=LineCap]
-stroke-linejoin [Inherited, SVG, NameForMethods=JoinStyle, TypeName=LineJoin]
+stroke-linecap [Inherited, SVG, NameForMethods=CapStyle]
+stroke-linejoin [Inherited, SVG, NameForMethods=JoinStyle]
 stroke-miterlimit [Inherited, SVG, Converter=Number<float>, NameForMethods=StrokeMiterLimit]
 stroke-opacity [Inherited, SVG, Converter=Opacity]
 stroke-width [Inherited, Initial=initialOneLength, Converter=Length]
 speak [Inherited]
 table-layout
-tab-size [Inherited, TypeName=unsigned]
+tab-size [Inherited]
 text-align [Inherited, Converter=TextAlign]
 text-anchor [Inherited, SVG]
 text-decoration [Converter=TextDecoration]
@@ -323,7 +318,7 @@
 text-line-through-mode [SkipBuilder]
 text-line-through-style [SkipBuilder]
 text-line-through-width [SkipBuilder]
-text-overflow [TypeName=TextOverflow]
+text-overflow
 text-overline [SkipBuilder]
 text-overline-color [SkipBuilder]
 text-overline-mode [SkipBuilder]
@@ -350,37 +345,37 @@
 vertical-align [Custom=Value]
 visibility [Inherited]
 white-space [Inherited]
-widows [Inherited, TypeName=short, AutoFunctions]
+widows [Inherited, AutoFunctions]
 width [Initial=initialSize, Converter=LengthSizing]
 word-break [Inherited]
 -epub-word-break = word-break
-word-spacing [Inherited, ConditionalConverter=WordSpacing, TypeName=Length]
+word-spacing [Inherited, ConditionalConverter=WordSpacing]
 word-wrap [Inherited=EOverflowWrap, NameForMethods=OverflowWrap]
-writing-mode [Inherited, SVG, TypeName=SVGWritingMode]
+writing-mode [Inherited, SVG]
 x [Initial=initialZeroLength, Converter=Length]
 y [Initial=initialZeroLength, Converter=Length]
-z-index [TypeName=int, AutoFunctions]
+z-index [AutoFunctions]
 alt [NameForMethods=ContentAltText, Custom=Value]
 -webkit-alt = alt
 -webkit-animation [Shorthand]
--webkit-animation-delay [AnimationProperty, TypeName=double, NameForMethods=Delay]
--webkit-animation-direction [AnimationProperty, TypeName=Animation::AnimationDirection, NameForMethods=Direction]
--webkit-animation-duration [AnimationProperty, TypeName=double, NameForMethods=Duration]
--webkit-animation-fill-mode [AnimationProperty, TypeName=unsigned, NameForMethods=FillMode]
--webkit-animation-iteration-count [AnimationProperty, TypeName=double, NameForMethods=IterationCount]
--webkit-animation-name [AnimationProperty, TypeName=String, NameForMethods=Name]
--webkit-animation-play-state [AnimationProperty, TypeName=EAnimPlayState, NameForMethods=PlayState]
--webkit-animation-timing-function [AnimationProperty, TypeName=PassRefPtr<TimingFunction>, NameForMethods=TimingFunction]
--webkit-appearance [TypeName=ControlPart]
+-webkit-animation-delay [AnimationProperty, NameForMethods=Delay]
+-webkit-animation-direction [AnimationProperty, NameForMethods=Direction]
+-webkit-animation-duration [AnimationProperty, NameForMethods=Duration]
+-webkit-animation-fill-mode [AnimationProperty, NameForMethods=FillMode]
+-webkit-animation-iteration-count [AnimationProperty, NameForMethods=IterationCount]
+-webkit-animation-name [AnimationProperty, NameForMethods=Name]
+-webkit-animation-play-state [AnimationProperty, NameForMethods=PlayState]
+-webkit-animation-timing-function [AnimationProperty, NameForMethods=TimingFunction]
+-webkit-appearance
 -webkit-aspect-ratio [Inherited, Custom=All]
 -webkit-backface-visibility
--webkit-background-clip [FillLayerProperty, TypeName=EFillBox, NameForMethods=Clip]
--webkit-background-composite [FillLayerProperty, TypeName=CompositeOperator, NameForMethods=Composite]
--webkit-background-origin [FillLayerProperty, TypeName=EFillBox, NameForMethods=Origin]
+-webkit-background-clip [FillLayerProperty, NameForMethods=Clip]
+-webkit-background-composite [FillLayerProperty, NameForMethods=Composite]
+-webkit-background-origin [FillLayerProperty, NameForMethods=Origin]
 // -webkit-background-size differs from background-size only in the interpretation of
 // a single value: -webkit-background-size: l; is equivalent to background-size: l l;
 // whereas background-size: l; is equivalent to background-size: l auto;
--webkit-background-size [FillLayerProperty, TypeName=EFillSize, NameForMethods=Size]
+-webkit-background-size [FillLayerProperty, NameForMethods=Size]
 -webkit-border-after [Shorthand]
 -webkit-border-after-color [SkipBuilder]
 -webkit-border-after-style [SkipBuilder]
@@ -405,12 +400,12 @@
 -webkit-border-start-style [SkipBuilder]
 -webkit-border-start-width [SkipBuilder]
 -webkit-border-vertical-spacing [Inherited, NameForMethods=VerticalBorderSpacing, Converter=ComputedLength<short>]
--webkit-box-align [TypeName=EBoxAlignment]
+-webkit-box-align
 -webkit-box-direction [Inherited]
--webkit-box-flex [TypeName=float]
--webkit-box-flex-group [TypeName=unsigned]
+-webkit-box-flex
+-webkit-box-flex-group
 -webkit-box-lines
--webkit-box-ordinal-group [TypeName=unsigned]
+-webkit-box-ordinal-group
 -webkit-box-orient
 -webkit-box-pack
 -webkit-box-reflect [Converter=Reflection]
@@ -418,30 +413,30 @@
 // Let -webkit-box-shadow blur radius be w_r and box-shadow blur radius be b_r. For
 // w_r > 8px, b_r = 8 + 4 * sqrt((w_r - 8) / 2).
 -webkit-box-shadow [Custom=All]
--webkit-color-correction [Inherited, TypeName=ColorSpace, NameForMethods=ColorSpace]
--webkit-column-axis [TypeName=ColumnAxis]
--webkit-column-break-after [TypeName=EPageBreak, Initial=initialPageBreak]
--webkit-column-break-before [TypeName=EPageBreak, Initial=initialPageBreak]
--webkit-column-break-inside [TypeName=EPageBreak, Initial=initialPageBreak]
-column-count [TypeName=unsigned short, AutoFunctions]
+-webkit-color-correction [Inherited, NameForMethods=ColorSpace]
+-webkit-column-axis
+-webkit-column-break-after [Initial=initialPageBreak]
+-webkit-column-break-before [Initial=initialPageBreak]
+-webkit-column-break-inside [Initial=initialPageBreak]
+column-count [AutoFunctions]
 -webkit-column-count = column-count
-column-fill [TypeName=ColumnFill]
+column-fill
 -webkit-column-fill = column-fill
 column-gap [Custom=All]
 -webkit-column-gap = column-gap
-column-progression [TypeName=ColumnProgression]
+column-progression
 -webkit-column-progression = column-progression
 column-rule [Shorthand]
 -webkit-column-rule = column-rule
 column-rule-color [VisitedLinkColorSupport, Initial=invalidColor]
 -webkit-column-rule-color = column-rule-color
-column-rule-style [TypeName=EBorderStyle, Initial=initialBorderStyle]
+column-rule-style [Initial=initialBorderStyle]
 -webkit-column-rule-style = column-rule-style
 column-rule-width [Converter=LineWidth<unsigned short>]
 -webkit-column-rule-width = column-rule-width
-column-span [TypeName=ColumnSpan]
+column-span
 -webkit-column-span = column-span
-column-width [TypeName=float, AutoFunctions, Converter=ComputedLength<float>]
+column-width [AutoFunctions, Converter=ComputedLength<float>]
 -webkit-column-width = column-width
 columns [Shorthand]
 -webkit-columns = columns
@@ -449,15 +444,15 @@
 -webkit-box-decoration-break
 #endif
 #if defined(ENABLE_CSS_COMPOSITING) && ENABLE_CSS_COMPOSITING
-mix-blend-mode [TypeName=BlendMode, NameForMethods=BlendMode]
-isolation [TypeName=Isolation]
+mix-blend-mode [NameForMethods=BlendMode]
+isolation
 #endif
--webkit-filter [ConditionalConverter=FilterOperations, TypeName=FilterOperations]
+-webkit-filter [ConditionalConverter=FilterOperations]
 align-content
 -webkit-align-content = align-content
 align-items
 -webkit-align-items = align-items
-align-self [TypeName=EAlignItems]
+align-self
 -webkit-align-self = align-self
 flex [Shorthand]
 -webkit-flex = flex
@@ -467,31 +462,31 @@
 -webkit-flex-direction = flex-direction
 flex-flow [Shorthand]
 -webkit-flex-flow = flex-flow
-flex-grow [TypeName=float]
+flex-grow
 -webkit-flex-grow = flex-grow
-flex-shrink [TypeName=float]
+flex-shrink
 -webkit-flex-shrink = flex-shrink
 flex-wrap
 -webkit-flex-wrap = flex-wrap
 justify-content
 -webkit-justify-content = justify-content
 #if defined(ENABLE_FILTERS_LEVEL_2) && ENABLE_FILTERS_LEVEL_2
--webkit-backdrop-filter [ConditionalConverter=FilterOperations, TypeName=FilterOperations]
+-webkit-backdrop-filter [ConditionalConverter=FilterOperations]
 #endif
 -webkit-justify-self [Custom=Value]
 -webkit-font-size-delta [SkipBuilder]
 #if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
 -webkit-grid [Shorthand]
 -webkit-grid-area [Shorthand]
--webkit-grid-auto-columns [ConditionalConverter=GridTrackSize, TypeName=GridTrackSize]
--webkit-grid-auto-rows [ConditionalConverter=GridTrackSize, TypeName=GridTrackSize]
--webkit-grid-column-end [ConditionalConverter=GridPosition, TypeName=GridPosition, NameForMethods=GridItemColumnEnd]
--webkit-grid-column-start [ConditionalConverter=GridPosition, TypeName=GridPosition, NameForMethods=GridItemColumnStart]
+-webkit-grid-auto-columns [ConditionalConverter=GridTrackSize]
+-webkit-grid-auto-rows [ConditionalConverter=GridTrackSize]
+-webkit-grid-column-end [ConditionalConverter=GridPosition, NameForMethods=GridItemColumnEnd]
+-webkit-grid-column-start [ConditionalConverter=GridPosition, NameForMethods=GridItemColumnStart]
 -webkit-grid-template [Shorthand]
 -webkit-grid-template-columns [Custom=All]
 -webkit-grid-template-rows [Custom=All]
--webkit-grid-row-end [ConditionalConverter=GridPosition, TypeName=GridPosition, NameForMethods=GridItemRowEnd]
--webkit-grid-row-start [ConditionalConverter=GridPosition, TypeName=GridPosition, NameForMethods=GridItemRowStart]
+-webkit-grid-row-end [ConditionalConverter=GridPosition, NameForMethods=GridItemRowEnd]
+-webkit-grid-row-start [ConditionalConverter=GridPosition, NameForMethods=GridItemRowStart]
 -webkit-grid-column [Shorthand]
 -webkit-grid-row [Shorthand]
 -webkit-grid-template-areas [Custom=All]
@@ -501,21 +496,21 @@
 -webkit-hyphenate-limit-after [Inherited, NameForMethods=HyphenationLimitAfter, Converter=NumberOrAuto<short>]
 -webkit-hyphenate-limit-before [Inherited, NameForMethods=HyphenationLimitBefore, Converter=NumberOrAuto<short>]
 -webkit-hyphenate-limit-lines [Inherited, NameForMethods=HyphenationLimitLines, Converter=WebkitHyphenateLimitLines]
--webkit-hyphens [Inherited, TypeName=Hyphens]
+-webkit-hyphens [Inherited]
 -epub-hyphens = -webkit-hyphens
 -webkit-initial-letter [Converter=InitialLetter]
 -webkit-line-box-contain [Inherited, Converter=LineBoxContain]
--webkit-line-align [Inherited, TypeName=LineAlign]
--webkit-line-break [Inherited, TypeName=LineBreak]
--webkit-line-clamp [TypeName=LineClampValue]
+-webkit-line-align [Inherited]
+-webkit-line-break [Inherited]
+-webkit-line-clamp
 -webkit-line-grid [Inherited, Converter=StringOrNone]
--webkit-line-snap [Inherited, TypeName=LineSnap]
+-webkit-line-snap [Inherited]
 -webkit-logical-width [SkipBuilder]
 -webkit-logical-height [SkipBuilder]
--webkit-margin-after-collapse [TypeName=EMarginCollapse]
--webkit-margin-before-collapse [TypeName=EMarginCollapse]
--webkit-margin-bottom-collapse [TypeName=EMarginCollapse, NameForMethods=MarginAfterCollapse]
--webkit-margin-top-collapse [TypeName=EMarginCollapse, NameForMethods=MarginBeforeCollapse]
+-webkit-margin-after-collapse
+-webkit-margin-before-collapse
+-webkit-margin-bottom-collapse [NameForMethods=MarginAfterCollapse]
+-webkit-margin-top-collapse [NameForMethods=MarginBeforeCollapse]
 -webkit-margin-collapse [Shorthand]
 -webkit-margin-after [SkipBuilder]
 -webkit-margin-before [SkipBuilder]
@@ -523,10 +518,10 @@
 -webkit-margin-start [SkipBuilder]
 -webkit-marquee [Shorthand]
 -webkit-marquee-direction
--webkit-marquee-increment [ConditionalConverter=MarqueeIncrement, TypeName=Length]
+-webkit-marquee-increment [ConditionalConverter=MarqueeIncrement]
 -webkit-marquee-repetition [NameForMethods=MarqueeLoopCount, Converter=MarqueeRepetition]
 -webkit-marquee-speed [Converter=MarqueeSpeed]
--webkit-marquee-style [TypeName=EMarqueeBehavior, NameForMethods=MarqueeBehavior]
+-webkit-marquee-style [NameForMethods=MarqueeBehavior]
 -webkit-mask [Shorthand]
 -webkit-mask-box-image [Initial=initialNinePieceImage, Converter=BorderMask<CSSPropertyWebkitMaskBoxImage>]
 -webkit-mask-box-image-outset [Custom=All]
@@ -534,52 +529,52 @@
 -webkit-mask-box-image-slice [Custom=All]
 -webkit-mask-box-image-source [Converter=StyleImage<CSSPropertyWebkitMaskBoxImageSource>]
 -webkit-mask-box-image-width [Custom=All]
--webkit-mask-clip [FillLayerProperty, TypeName=EFillBox, NameForMethods=Clip]
--webkit-mask-composite [FillLayerProperty, TypeName=CompositeOperator, NameForMethods=Composite]
--webkit-mask-image [Custom=Initial|Inherit, ConditionalConverter=MaskImageOperations, TypeName=Vector<RefPtr<MaskImageOperation>>]
--webkit-mask-origin [FillLayerProperty, TypeName=EFillBox, NameForMethods=Origin]
+-webkit-mask-clip [FillLayerProperty, NameForMethods=Clip]
+-webkit-mask-composite [FillLayerProperty, NameForMethods=Composite]
+-webkit-mask-image [Custom=Initial|Inherit, Converter=MaskImageOperations]
+-webkit-mask-origin [FillLayerProperty, NameForMethods=Origin]
 -webkit-mask-position [Shorthand]
--webkit-mask-position-x [FillLayerProperty, TypeName=Length, NameForMethods=XPosition]
--webkit-mask-position-y [FillLayerProperty, TypeName=Length, NameForMethods=YPosition]
+-webkit-mask-position-x [FillLayerProperty, NameForMethods=XPosition]
+-webkit-mask-position-y [FillLayerProperty, NameForMethods=YPosition]
 -webkit-mask-repeat [Shorthand]
--webkit-mask-repeat-x [FillLayerProperty, TypeName=EFillRepeat, NameForMethods=RepeatX]
--webkit-mask-repeat-y [FillLayerProperty, TypeName=EFillRepeat, NameForMethods=RepeatY]
--webkit-mask-size [FillLayerProperty, TypeName=FillSize, NameForMethods=Size]
--webkit-mask-source-type [FillLayerProperty, TypeName=EMaskSourceType, NameForMethods=MaskSourceType]
+-webkit-mask-repeat-x [FillLayerProperty, NameForMethods=RepeatX]
+-webkit-mask-repeat-y [FillLayerProperty, NameForMethods=RepeatY]
+-webkit-mask-size [FillLayerProperty, NameForMethods=Size]
+-webkit-mask-source-type [FillLayerProperty, NameForMethods=MaskSourceType]
 -webkit-max-logical-width [SkipBuilder]
 -webkit-max-logical-height [SkipBuilder]
 -webkit-min-logical-width [SkipBuilder]
 -webkit-min-logical-height [SkipBuilder]
--webkit-nbsp-mode [Inherited, TypeName=ENBSPMode, Setter=setNBSPMode, Initial=initialNBSPMode]
-order [TypeName=int]
+-webkit-nbsp-mode [Inherited, Setter=setNBSPMode, Initial=initialNBSPMode]
+order
 -webkit-order = order
 -webkit-padding-after [SkipBuilder]
 -webkit-padding-before [SkipBuilder]
 -webkit-padding-end [SkipBuilder]
 -webkit-padding-start [SkipBuilder]
--webkit-perspective [ConditionalConverter=Perspective, TypeName=float]
+-webkit-perspective [ConditionalConverter=Perspective]
 -webkit-perspective-origin [Shorthand]
 -webkit-perspective-origin-x [Converter=Length]
 -webkit-perspective-origin-y [Converter=Length]
--webkit-print-color-adjust [Inherited, TypeName=PrintColorAdjust]
--webkit-rtl-ordering [Inherited, TypeName=Order, Setter=setRTLOrdering, Initial=initialRTLOrdering]
+-webkit-print-color-adjust [Inherited]
+-webkit-rtl-ordering [Inherited, Setter=setRTLOrdering, Initial=initialRTLOrdering]
 #if defined(ENABLE_CSS_SCROLL_SNAP)
 -webkit-scroll-snap-points-x [Converter=ScrollSnapPoints]
 -webkit-scroll-snap-points-y [Converter=ScrollSnapPoints]
--webkit-scroll-snap-type [TypeName=ScrollSnapType]
+-webkit-scroll-snap-type
 -webkit-scroll-snap-destination [Converter=SnapCoordinatePair]
 -webkit-scroll-snap-coordinate [Converter=ScrollSnapCoordinates, NameForMethods=ScrollSnapCoordinates]
 #endif
 -webkit-svg-shadow [SVG, Custom=All]
--webkit-text-combine [Inherited, TypeName=TextCombine]
+-webkit-text-combine [Inherited]
 -epub-text-combine = -webkit-text-combine
 #if defined(ENABLE_CSS3_TEXT) && ENABLE_CSS3_TEXT
--webkit-text-align-last [Inherited, TypeName=TextAlignLast]
--webkit-text-justify [Inherited, TypeName=TextJustify]
+-webkit-text-align-last [Inherited]
+-webkit-text-justify [Inherited]
 #endif
 -webkit-text-decoration [SkipBuilder]
 -webkit-text-decoration-line [NameForMethods=TextDecoration, Converter=TextDecoration]
--webkit-text-decoration-style [TypeName=TextDecorationStyle]
+-webkit-text-decoration-style
 -webkit-text-decoration-color [VisitedLinkColorSupport, Initial=invalidColor]
 -webkit-text-decoration-skip [Inherited, Converter=TextDecorationSkip]
 -webkit-text-underline-position [Inherited, Converter=TextUnderlinePosition]
@@ -605,22 +600,22 @@
 -webkit-transform-origin-x [Converter=Length]
 -webkit-transform-origin-y [Converter=Length]
 -webkit-transform-origin-z [Converter=ComputedLength<float>]
--webkit-transform-style [TypeName=ETransformStyle3D, NameForMethods=TransformStyle3D]
+-webkit-transform-style [NameForMethods=TransformStyle3D]
 -webkit-transition [Shorthand]
--webkit-transition-delay [AnimationProperty, TypeName=double, NameForMethods=Delay]
--webkit-transition-duration [AnimationProperty, TypeName=double, NameForMethods=Duration]
--webkit-transition-property [AnimationProperty, TypeName=CSSPropertyID, NameForMethods=Property]
--webkit-transition-timing-function [AnimationProperty, TypeName=PassRefPtr<TimingFunction>, NameForMethods=TimingFunction]
+-webkit-transition-delay [AnimationProperty, NameForMethods=Delay]
+-webkit-transition-duration [AnimationProperty, NameForMethods=Duration]
+-webkit-transition-property [AnimationProperty, NameForMethods=Property]
+-webkit-transition-timing-function [AnimationProperty, NameForMethods=TimingFunction]
 -webkit-user-drag
 -webkit-user-modify [Inherited]
 -webkit-user-select [Inherited]
 #if defined(ENABLE_CSS_REGIONS) && ENABLE_CSS_REGIONS
 -webkit-flow-into [NameForMethods=FlowThread, Converter=StringOrNone]
 -webkit-flow-from [NameForMethods=RegionThread, Converter=StringOrNone]
--webkit-region-fragment [TypeName=RegionFragment]
--webkit-region-break-after [TypeName=EPageBreak, Initial=initialPageBreak]
--webkit-region-break-before [TypeName=EPageBreak, Initial=initialPageBreak]
--webkit-region-break-inside [TypeName=EPageBreak, Initial=initialPageBreak]
+-webkit-region-fragment
+-webkit-region-break-after [Initial=initialPageBreak]
+-webkit-region-break-before [Initial=initialPageBreak]
+-webkit-region-break-inside [Initial=initialPageBreak]
 #endif
 #if defined(ENABLE_CSS_SHAPES) && ENABLE_CSS_SHAPES
 -webkit-shape-outside [Converter=ShapeValue]

Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (178433 => 178434)


--- trunk/Source/WebCore/css/StyleBuilderConverter.h	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h	2015-01-14 20:11:44 UTC (rev 178434)
@@ -49,6 +49,7 @@
 #include "StyleScrollSnapPoints.h"
 #include "TransformFunctions.h"
 #include "WebKitCSSResourceValue.h"
+#include <wtf/Optional.h>
 
 namespace WebCore {
 
@@ -94,15 +95,15 @@
     static Vector<LengthSize> convertScrollSnapCoordinates(StyleResolver&, CSSValue&);
 #endif
 #if ENABLE(CSS_GRID_LAYOUT)
-    static bool convertGridTrackSize(StyleResolver&, CSSValue&, GridTrackSize&);
-    static bool convertGridPosition(StyleResolver&, CSSValue&, GridPosition&);
+    static Optional<GridTrackSize> convertGridTrackSize(StyleResolver&, CSSValue&);
+    static Optional<GridPosition> convertGridPosition(StyleResolver&, CSSValue&);
     static GridAutoFlow convertGridAutoFlow(StyleResolver&, CSSValue&);
 #endif // ENABLE(CSS_GRID_LAYOUT)
-    static bool convertWordSpacing(StyleResolver&, CSSValue&, Length&);
-    static bool convertPerspective(StyleResolver&, CSSValue&, float&);
-    static bool convertMarqueeIncrement(StyleResolver&, CSSValue&, Length&);
-    static bool convertFilterOperations(StyleResolver&, CSSValue&, FilterOperations&);
-    static bool convertMaskImageOperations(StyleResolver&, CSSValue&, Vector<RefPtr<MaskImageOperation>>&);
+    static Optional<Length> convertWordSpacing(StyleResolver&, CSSValue&);
+    static Optional<float> convertPerspective(StyleResolver&, CSSValue&);
+    static Optional<Length> convertMarqueeIncrement(StyleResolver&, CSSValue&);
+    static Optional<FilterOperations> convertFilterOperations(StyleResolver&, CSSValue&);
+    static Vector<RefPtr<MaskImageOperation>> convertMaskImageOperations(StyleResolver&, CSSValue&);
 #if PLATFORM(IOS)
     static bool convertTouchCallout(StyleResolver&, CSSValue&);
 #endif
@@ -906,14 +907,20 @@
     }
 }
 
-inline bool StyleBuilderConverter::convertGridTrackSize(StyleResolver& styleResolver, CSSValue& value, GridTrackSize& trackSize)
+inline Optional<GridTrackSize> StyleBuilderConverter::convertGridTrackSize(StyleResolver& styleResolver, CSSValue& value)
 {
-    return createGridTrackSize(value, trackSize, styleResolver);
+    GridTrackSize trackSize;
+    if (createGridTrackSize(value, trackSize, styleResolver))
+        return trackSize;
+    return Nullopt;
 }
 
-inline bool StyleBuilderConverter::convertGridPosition(StyleResolver&, CSSValue& value, GridPosition& gridPosition)
+inline Optional<GridPosition> StyleBuilderConverter::convertGridPosition(StyleResolver&, CSSValue& value)
 {
-    return createGridPosition(value, gridPosition);
+    GridPosition gridPosition;
+    if (createGridPosition(value, gridPosition))
+        return gridPosition;
+    return Nullopt;
 }
 
 inline GridAutoFlow StyleBuilderConverter::convertGridAutoFlow(StyleResolver&, CSSValue& value)
@@ -956,8 +963,9 @@
     return styleResolver.state().cssToLengthConversionData();
 }
 
-inline bool StyleBuilderConverter::convertWordSpacing(StyleResolver& styleResolver, CSSValue& value, Length& wordSpacing)
+inline Optional<Length> StyleBuilderConverter::convertWordSpacing(StyleResolver& styleResolver, CSSValue& value)
 {
+    Optional<Length> wordSpacing;
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     if (primitiveValue.getValueID() == CSSValueNormal)
         wordSpacing = RenderStyle::initialWordSpacing();
@@ -967,61 +975,64 @@
         wordSpacing = Length(clampTo<float>(primitiveValue.getDoubleValue(), minValueForCssLength, maxValueForCssLength), Percent);
     else if (primitiveValue.isNumber())
         wordSpacing = Length(primitiveValue.getDoubleValue(), Fixed);
-    else
-        return false;
 
-    return true;
+    return wordSpacing;
 }
 
-inline bool StyleBuilderConverter::convertPerspective(StyleResolver& styleResolver, CSSValue& value, float& perspective)
+inline Optional<float> StyleBuilderConverter::convertPerspective(StyleResolver& styleResolver, CSSValue& value)
 {
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
-    if (primitiveValue.getValueID() == CSSValueNone) {
-        perspective = 0;
-        return true;
-    }
+    if (primitiveValue.getValueID() == CSSValueNone)
+        return 0.f;
 
+    float perspective = -1;
     if (primitiveValue.isLength())
         perspective = primitiveValue.computeLength<float>(styleResolver.state().cssToLengthConversionData());
     else if (primitiveValue.isNumber())
         perspective = primitiveValue.getDoubleValue() * styleResolver.state().cssToLengthConversionData().zoom();
-    else {
+    else
         ASSERT_NOT_REACHED();
-        return false;
-    }
 
-    return perspective >= 0;
+    return perspective < 0 ? Nullopt : perspective;
 }
 
-inline bool StyleBuilderConverter::convertMarqueeIncrement(StyleResolver& styleResolver, CSSValue& value, Length& marqueeLength)
+inline Optional<Length> StyleBuilderConverter::convertMarqueeIncrement(StyleResolver& styleResolver, CSSValue& value)
 {
+    Optional<Length> marqueeLength;
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     switch (primitiveValue.getValueID()) {
     case CSSValueSmall:
         marqueeLength = Length(1, Fixed); // 1px.
-        return true;
+        break;
     case CSSValueNormal:
         marqueeLength = Length(6, Fixed); // 6px. The WinIE default.
-        return true;
+        break;
     case CSSValueLarge:
         marqueeLength = Length(36, Fixed); // 36px.
-        return true;
-    case CSSValueInvalid:
-        marqueeLength = primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f));
-        return !marqueeLength.isUndefined();
+        break;
+    case CSSValueInvalid: {
+        Length length = primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f));
+        if (!length.isUndefined())
+            marqueeLength = length;
+        break;
+    }
     default:
         break;
     }
-    return false;
+    return marqueeLength;
 }
 
-inline bool StyleBuilderConverter::convertFilterOperations(StyleResolver& styleResolver, CSSValue& value, FilterOperations& operations)
+inline Optional<FilterOperations> StyleBuilderConverter::convertFilterOperations(StyleResolver& styleResolver, CSSValue& value)
 {
-    return styleResolver.createFilterOperations(value, operations);
+    FilterOperations operations;
+    if (styleResolver.createFilterOperations(value, operations))
+        return operations;
+    return Nullopt;
 }
 
-inline bool StyleBuilderConverter::convertMaskImageOperations(StyleResolver& styleResolver, CSSValue& value, Vector<RefPtr<MaskImageOperation>>& operations)
+inline Vector<RefPtr<MaskImageOperation>> StyleBuilderConverter::convertMaskImageOperations(StyleResolver& styleResolver, CSSValue& value)
 {
+    Vector<RefPtr<MaskImageOperation>> operations;
     RefPtr<WebKitCSSResourceValue> maskImageValue;
     RefPtr<CSSValueList> maskImagesList;
     CSSValueList::iterator listIterator;
@@ -1069,7 +1080,7 @@
             maskImageValue = nullptr;
     }
 
-    return true;
+    return operations;
 }
 
 inline RefPtr<FontFeatureSettings> StyleBuilderConverter::convertFontFeatureSettings(StyleResolver&, CSSValue& value)

Modified: trunk/Source/WebCore/css/makeprop.pl (178433 => 178434)


--- trunk/Source/WebCore/css/makeprop.pl	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/css/makeprop.pl	2015-01-14 20:11:44 UTC (rev 178434)
@@ -58,7 +58,6 @@
   Shorthand => 1,
   SkipBuilder => 1,
   Setter => 1,
-  TypeName => 1,
   VisitedLinkColorSupport => 1,
 );
 my %nameToId;
@@ -443,9 +442,6 @@
     $nameForMethods = $propertiesWithStyleBuilderOptions{$name}{"NameForMethods"};
   }
 
-  if (!exists($propertiesWithStyleBuilderOptions{$name}{"TypeName"})) {
-    $propertiesWithStyleBuilderOptions{$name}{"TypeName"} = "E" . $nameForMethods;
-  }
   if (!exists($propertiesWithStyleBuilderOptions{$name}{"Getter"})) {
     $propertiesWithStyleBuilderOptions{$name}{"Getter"} = lcfirst($nameForMethods);
   }
@@ -778,10 +774,10 @@
   if (exists($propertiesWithStyleBuilderOptions{$name}{"Converter"})) {
     $convertedValue = "StyleBuilderConverter::convert" . $propertiesWithStyleBuilderOptions{$name}{"Converter"} . "(styleResolver, value)";
   } elsif (exists($propertiesWithStyleBuilderOptions{$name}{"ConditionalConverter"})) {
-    $setterContent .= $indent . "    " . $propertiesWithStyleBuilderOptions{$name}{"TypeName"} . " convertedValue;\n";
-    $convertedValue = "convertedValue";
+    $setterContent .= $indent . "    auto convertedValue = StyleBuilderConverter::convert" . $propertiesWithStyleBuilderOptions{$name}{"ConditionalConverter"} . "(styleResolver, value);\n";
+    $convertedValue = "convertedValue.value()";
   } else {
-    $convertedValue = "static_cast<" . $propertiesWithStyleBuilderOptions{$name}{"TypeName"} . ">(downcast<CSSPrimitiveValue>(value))";
+    $convertedValue = "downcast<CSSPrimitiveValue>(value)";
   }
 
   my $setter = $propertiesWithStyleBuilderOptions{$name}{"Setter"};
@@ -814,7 +810,7 @@
   }
   if (!$didCallSetValue) {
     if (exists($propertiesWithStyleBuilderOptions{$name}{"ConditionalConverter"})) {
-      $setterContent .= $indent . "    if (StyleBuilderConverter::convert" . $propertiesWithStyleBuilderOptions{$name}{"ConditionalConverter"} . "(styleResolver, value, " . $convertedValue . "))\n";
+      $setterContent .= $indent . "    if (convertedValue)\n";
       $setterContent .= "    ";
     }
     $setterContent .= $indent . "    " . generateSetValueStatement($name, $convertedValue) . ";\n";

Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (178433 => 178434)


--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp	2015-01-14 20:11:44 UTC (rev 178434)
@@ -992,7 +992,7 @@
     fontDescription.setSpecifiedSize(defaultFontSize);
     fontDescription.setIsAbsoluteSize(true);
     fontDescription.setWeight(FontWeightNormal);
-    fontDescription.setItalic(false);
+    fontDescription.setItalic(FontItalicOff);
 }
 
 void RenderThemeEfl::adjustProgressBarStyle(StyleResolver&, RenderStyle& style, Element*) const

Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (178433 => 178434)


--- trunk/Source/WebCore/platform/graphics/Font.cpp	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp	2015-01-14 20:11:44 UTC (rev 178434)
@@ -136,7 +136,7 @@
 #if PLATFORM(IOS)
     m_fontDescription.setSpecifiedSize(CTFontGetSize(fontData.font()));
     m_fontDescription.setComputedSize(CTFontGetSize(fontData.font()));
-    m_fontDescription.setItalic(CTFontGetSymbolicTraits(fontData.font()) & kCTFontTraitItalic);
+    m_fontDescription.setIsItalic(CTFontGetSymbolicTraits(fontData.font()) & kCTFontTraitItalic);
     m_fontDescription.setWeight((CTFontGetSymbolicTraits(fontData.font()) & kCTFontTraitBold) ? FontWeightBold : FontWeightNormal);
 #endif
 }
@@ -152,7 +152,7 @@
     CTFontRef primaryFont = fontData.font();
     m_fontDescription.setSpecifiedSize(CTFontGetSize(primaryFont));
     m_fontDescription.setComputedSize(CTFontGetSize(primaryFont));
-    m_fontDescription.setItalic(CTFontGetSymbolicTraits(primaryFont) & kCTFontTraitItalic);
+    m_fontDescription.setIsItalic(CTFontGetSymbolicTraits(primaryFont) & kCTFontTraitItalic);
     m_fontDescription.setWeight((CTFontGetSymbolicTraits(primaryFont) & kCTFontTraitBold) ? FontWeightBold : FontWeightNormal);
     m_fontDescription.setUsePrinterFont(fontData.isPrinterFont());
     m_glyphs = retrieveOrAddCachedFontGlyphs(m_fontDescription, fontSelector.get());

Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (178433 => 178434)


--- trunk/Source/WebCore/platform/graphics/FontDescription.h	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h	2015-01-14 20:11:44 UTC (rev 178434)
@@ -148,9 +148,9 @@
     void setComputedSize(float s) { m_computedSize = clampToFloat(s); }
     void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); }
     void setItalic(FontItalic i) { m_italic = i; }
-    void setItalic(bool i) { setItalic(i ? FontItalicOn : FontItalicOff); }
+    void setIsItalic(bool i) { setItalic(i ? FontItalicOn : FontItalicOff); }
     void setSmallCaps(FontSmallCaps c) { m_smallCaps = c; }
-    void setSmallCaps(bool c) { setSmallCaps(c ? FontSmallCapsOn : FontSmallCapsOff); }
+    void setIsSmallCaps(bool c) { setSmallCaps(c ? FontSmallCapsOn : FontSmallCapsOff); }
     void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; }
     void setWeight(FontWeight w) { m_weight = w; }
     void setUsePrinterFont(bool p) { m_usePrinterFont = p; }

Modified: trunk/Source/WebCore/rendering/RenderThemeGtk.cpp (178433 => 178434)


--- trunk/Source/WebCore/rendering/RenderThemeGtk.cpp	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/rendering/RenderThemeGtk.cpp	2015-01-14 20:11:44 UTC (rev 178434)
@@ -108,7 +108,7 @@
     fontDescription.setSpecifiedSize(size);
     fontDescription.setIsAbsoluteSize(true);
     fontDescription.setWeight(FontWeightNormal);
-    fontDescription.setItalic(false);
+    fontDescription.setItalic(FontItalicOff);
     pango_font_description_free(pangoDescription);
 }
 

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (178433 => 178434)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2015-01-14 20:11:44 UTC (rev 178434)
@@ -1257,7 +1257,7 @@
         cachedDesc->setOneFamily(textStyle);
         cachedDesc->setSpecifiedSize(CTFontGetSize(font.get()));
         cachedDesc->setWeight(fromCTFontWeight(FontCache::weightOfCTFont(font.get())));
-        cachedDesc->setItalic(0);
+        cachedDesc->setItalic(FontItalicOff);
     }
     fontDescription = *cachedDesc;
 }

Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (178433 => 178434)


--- trunk/Source/WebCore/rendering/RenderThemeMac.mm	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm	2015-01-14 20:11:44 UTC (rev 178434)
@@ -393,7 +393,7 @@
         cachedDesc->setOneFamily([font webCoreFamilyName]);
         cachedDesc->setSpecifiedSize([font pointSize]);
         cachedDesc->setWeight(toFontWeight([fontManager weightOfFont:font]));
-        cachedDesc->setItalic([fontManager traitsOfFont:font] & NSItalicFontMask);
+        cachedDesc->setIsItalic([fontManager traitsOfFont:font] & NSItalicFontMask);
     }
     fontDescription = *cachedDesc;
 }

Modified: trunk/Source/WebCore/rendering/RenderThemeSafari.cpp (178433 => 178434)


--- trunk/Source/WebCore/rendering/RenderThemeSafari.cpp	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/rendering/RenderThemeSafari.cpp	2015-01-14 20:11:44 UTC (rev 178434)
@@ -246,7 +246,7 @@
         cachedDesc->setOneFamily("Lucida Grande");
         cachedDesc->setSpecifiedSize(fontSize);
         cachedDesc->setWeight(FontWeightNormal);
-        cachedDesc->setItalic(false);
+        cachedDesc->setItalic(FontItalicOff);
     }
     fontDescription = *cachedDesc;
 }

Modified: trunk/Source/WebCore/rendering/RenderThemeWin.cpp (178433 => 178434)


--- trunk/Source/WebCore/rendering/RenderThemeWin.cpp	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/rendering/RenderThemeWin.cpp	2015-01-14 20:11:44 UTC (rev 178434)
@@ -326,7 +326,7 @@
     fontDescription.setOneFamily(String(logFont.lfFaceName));
     fontDescription.setSpecifiedSize(fontSize);
     fontDescription.setWeight(logFont.lfWeight >= 700 ? FontWeightBold : FontWeightNormal); // FIXME: Use real weight.
-    fontDescription.setItalic(logFont.lfItalic);
+    fontDescription.setIsItalic(logFont.lfItalic);
 }
 
 static void fillFontDescription(FontDescription& fontDescription, LOGFONT& logFont)

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp (178433 => 178434)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp	2015-01-14 20:11:44 UTC (rev 178434)
@@ -90,7 +90,7 @@
         FontDescription fontDescription(newStyle.get().fontDescription());
         FontSelector* fontSelector = newStyle.get().font().fontSelector();
         if (!m_containsElement && element().textContent().stripWhiteSpace().simplifyWhiteSpace().length() == 1 && !tokenElement.hasAttribute(mathvariantAttr))
-            fontDescription.setItalic(true);
+            fontDescription.setItalic(FontItalicOn);
         if (newStyle.get().setFontDescription(fontDescription))
             newStyle.get().font().update(fontSelector);
     }

Modified: trunk/Source/WebKit/mac/ChangeLog (178433 => 178434)


--- trunk/Source/WebKit/mac/ChangeLog	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebKit/mac/ChangeLog	2015-01-14 20:11:44 UTC (rev 178434)
@@ -1,3 +1,16 @@
+2015-01-14  Chris Dumez  <[email protected]>
+
+        Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
+        https://bugs.webkit.org/show_bug.cgi?id=140347
+
+        Reviewed by Darin Adler.
+
+        Call FontDescription::setIsItalic() instead of setItalic() as the
+        call site passes a boolean.
+
+        * WebView/WebHTMLView.mm:
+        (fontNameForDescription):
+
 2015-01-13  Anders Carlsson  <[email protected]>
 
         Temporarily reintroduce the informal delegate protocols

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (178433 => 178434)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2015-01-14 20:11:44 UTC (rev 178434)
@@ -4875,7 +4875,7 @@
 {
     // Find the font the same way the rendering code would later if it encountered this CSS.
     FontDescription fontDescription;
-    fontDescription.setItalic(italic);
+    fontDescription.setIsItalic(italic);
     fontDescription.setWeight(bold ? FontWeight900 : FontWeight500);
     fontDescription.setSpecifiedSize(pointSize);
     RefPtr<SimpleFontData> simpleFontData = fontCache().fontForFamily(fontDescription, familyName);

Modified: trunk/Source/WebKit/win/ChangeLog (178433 => 178434)


--- trunk/Source/WebKit/win/ChangeLog	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebKit/win/ChangeLog	2015-01-14 20:11:44 UTC (rev 178434)
@@ -1,3 +1,16 @@
+2015-01-14  Chris Dumez  <[email protected]>
+
+        Make 'TypeName' parameter unnecessary in CSSPropertyNames.in
+        https://bugs.webkit.org/show_bug.cgi?id=140347
+
+        Reviewed by Darin Adler.
+
+        Call FontDescription::setIsItalic() instead of setItalic() as the
+        call site passes a boolean.
+
+        * WebKitGraphics.cpp:
+        (makeFont):
+
 2015-01-11  Sam Weinig  <[email protected]>
 
         Remove support for SharedWorkers

Modified: trunk/Source/WebKit/win/WebKitGraphics.cpp (178433 => 178434)


--- trunk/Source/WebKit/win/WebKitGraphics.cpp	2015-01-14 19:42:00 UTC (rev 178433)
+++ trunk/Source/WebKit/win/WebKitGraphics.cpp	2015-01-14 20:11:44 UTC (rev 178434)
@@ -56,7 +56,7 @@
     f.setOneFamily(fontFamilyString);
     f.setSpecifiedSize(description.size);
     f.setComputedSize(description.size);
-    f.setItalic(description.italic);
+    f.setIsItalic(description.italic);
     f.setWeight(description.bold ? FontWeightBold : FontWeightNormal);
     f.setIsAbsoluteSize(true);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to