<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[175267] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/175267">175267</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-10-28 12:12:37 -0700 (Tue, 28 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move &quot;Number&quot; CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138125

Reviewed by Antti Koivisto.

Move &quot;Number&quot; CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder:
-webkit-hyphenate-limit-after
-webkit-hyphenate-limit-before
-webkit-shape-image-threshold
-webkit-hyphenate-limit-lines

They are now generated from CSSPropertyNames.in

For -webkit-hyphenate-limit-lines, I used custom code instead of
the Number converter as it required special handling for the id
value. This patch thus adds support for [Custom=Value] to
CSSPropertyNames.in and the custom code goes into
css/StyleBuilderCustom.h.

No new tests, no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyNumber::setValue): Deleted.
(WebCore::ApplyPropertyNumber::applyValue): Deleted.
(WebCore::ApplyPropertyNumber::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertNumber):
* css/StyleBuilderCustom.h: Added.
(WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines):
* css/makeprop.pl:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssmakeproppl">trunk/Source/WebCore/css/makeprop.pl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175266 => 175267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-28 19:05:32 UTC (rev 175266)
+++ trunk/Source/WebCore/ChangeLog        2014-10-28 19:12:37 UTC (rev 175267)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-10-28  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Move &quot;Number&quot; CSS properties to the new StyleBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=138125
+
+        Reviewed by Antti Koivisto.
+
+        Move &quot;Number&quot; CSS properties from DeprecatedStyleBuilder to the new
+        StyleBuilder:
+        -webkit-hyphenate-limit-after
+        -webkit-hyphenate-limit-before
+        -webkit-shape-image-threshold
+        -webkit-hyphenate-limit-lines
+
+        They are now generated from CSSPropertyNames.in
+
+        For -webkit-hyphenate-limit-lines, I used custom code instead of
+        the Number converter as it required special handling for the id
+        value. This patch thus adds support for [Custom=Value] to
+        CSSPropertyNames.in and the custom code goes into
+        css/StyleBuilderCustom.h.
+
+        No new tests, no behavior change.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSPropertyNames.in:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        (WebCore::ApplyPropertyNumber::setValue): Deleted.
+        (WebCore::ApplyPropertyNumber::applyValue): Deleted.
+        (WebCore::ApplyPropertyNumber::createHandler): Deleted.
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertNumber):
+        * css/StyleBuilderCustom.h: Added.
+        (WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines):
+        * css/makeprop.pl:
+
</ins><span class="cx"> 2014-10-28  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebCore] Remove uses of WTF::bind() in the Media Stream module
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (175266 => 175267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-28 19:05:32 UTC (rev 175266)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-28 19:12:37 UTC (rev 175267)
</span><span class="lines">@@ -2502,6 +2502,7 @@
</span><span class="cx">                 82E3D8DF122EA0D1003AE5BC /* CSSPropertySourceData.h in Headers */ = {isa = PBXBuildFile; fileRef = 82E3D8DD122EA0D1003AE5BC /* CSSPropertySourceData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 832B843419D8E55100B26055 /* SVGAnimateElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 832B843319D8E55100B26055 /* SVGAnimateElementBase.h */; };
</span><span class="cx">                 832B843619D8E57400B26055 /* SVGAnimateElementBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */; };
</span><ins>+                835D363719FF6193004C93AB /* StyleBuilderCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 835D363619FF6193004C93AB /* StyleBuilderCustom.h */; };
</ins><span class="cx">                 836FBCEA178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */; };
</span><span class="cx">                 836FBCEC178C117F00B21A15 /* SVGAnimatedProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */; };
</span><span class="cx">                 8386A96D19F61B2E00E1EC4A /* StyleBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8386A96C19F61B2E00E1EC4A /* StyleBuilder.h */; };
</span><span class="lines">@@ -9687,6 +9688,7 @@
</span><span class="cx">                 82E3D8DD122EA0D1003AE5BC /* CSSPropertySourceData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSPropertySourceData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 832B843319D8E55100B26055 /* SVGAnimateElementBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimateElementBase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimateElementBase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                835D363619FF6193004C93AB /* StyleBuilderCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilderCustom.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTypeAnimator.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedProperty.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 8386A96C19F61B2E00E1EC4A /* StyleBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilder.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22231,6 +22233,7 @@
</span><span class="cx">                                 536D5A26193F410B00CE4CAB /* SourceSizeList.h */,
</span><span class="cx">                                 8386A96C19F61B2E00E1EC4A /* StyleBuilder.h */,
</span><span class="cx">                                 83B9687919F8AB83004EF7AF /* StyleBuilderConverter.h */,
</span><ins>+                                835D363619FF6193004C93AB /* StyleBuilderCustom.h */,
</ins><span class="cx">                                 E47A97CE163059FC005DCD99 /* StyleInvalidationAnalysis.cpp */,
</span><span class="cx">                                 E47A97CF163059FC005DCD99 /* StyleInvalidationAnalysis.h */,
</span><span class="cx">                                 0FF5026E102BA9660066F39A /* StyleMedia.cpp */,
</span><span class="lines">@@ -25568,6 +25571,7 @@
</span><span class="cx">                                 FD31601A12B0267600C1A359 /* PannerNode.h in Headers */,
</span><span class="cx">                                 447958041643B49A001E0A7F /* ParsedContentType.h in Headers */,
</span><span class="cx">                                 BC76AC130DD7AD5C00415F34 /* ParserUtilities.h in Headers */,
</span><ins>+                                835D363719FF6193004C93AB /* StyleBuilderCustom.h in Headers */,
</ins><span class="cx">                                 F55B3DCA1251F12D003EF269 /* PasswordInputType.h in Headers */,
</span><span class="cx">                                 4B2708C70AF19EE40065127F /* Pasteboard.h in Headers */,
</span><span class="cx">                                 C598905714E9C28000E8D18B /* PasteboardStrategy.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (175266 => 175267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2014-10-28 19:05:32 UTC (rev 175266)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2014-10-28 19:12:37 UTC (rev 175267)
</span><span class="lines">@@ -7,6 +7,48 @@
</span><span class="cx"> // Microsoft extensions are documented here:
</span><span class="cx"> // http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp
</span><span class="cx"> // 
</span><ins>+// StyleBuilder options:
+// * NewStyleBuilder:
+// Indicates to makeprop.pl that this property should be generated
+// in the new StyleBuilder.cpp. This option is temporary until all
+// CSS properties are generated.
+//
+// * 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 &quot;Converter&quot; 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.
+// initialBorderCollapse()).
+//
+// * Getter:
+// Overrides the method name on RenderStyle to get the current value for
+// the property. By default, the PropertyId with first letter lowercased
+// is used (e.g. borderCollapse()).
+//
+// * Setter:
+// Overrides the method name on RenderStyle to set the current value for
+// the property. By default, 'set' + PropertyId is used (e.g.
+// setBorderCollapse()).
+//
+// * NameForMethods:
+// Overrides the Getter / Setter / Initial method names on RenderStyle.
+// For e.g. &quot;NameForMethods=OverflowWrap&quot; will use
+// &quot;overflowWrap() / setOverflowWrap() / initialOverflowWrap()&quot;.
+//
+// * 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.
+//
+// * Custom=Value:
+// This option is used to indicate that the CSS property requires special
+// handling to set its value, and a regular Converter helper cannot be
+// used. The Custom code for the property should be located in
+// css/StyleBuilderCustom.h and named applyValue[CSSPropertyName]().
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> // high-priority property names have to be listed first, to simplify the check
</span><span class="lines">@@ -335,9 +377,9 @@
</span><span class="cx"> -webkit-grid-auto-flow
</span><span class="cx"> #endif
</span><span class="cx"> -webkit-hyphenate-character [Inherited]
</span><del>--webkit-hyphenate-limit-after [Inherited]
--webkit-hyphenate-limit-before [Inherited]
--webkit-hyphenate-limit-lines [Inherited]
</del><ins>+-webkit-hyphenate-limit-after [Inherited, NewStyleBuilder, NameForMethods=HyphenationLimitAfter, Converter=Number&lt;short&gt;]
+-webkit-hyphenate-limit-before [Inherited, NewStyleBuilder, NameForMethods=HyphenationLimitBefore, Converter=Number&lt;short&gt;]
+-webkit-hyphenate-limit-lines [Inherited, NewStyleBuilder, NameForMethods=HyphenationLimitLines, Custom=Value]
</ins><span class="cx"> -webkit-hyphens [Inherited, NewStyleBuilder, TypeName=Hyphens]
</span><span class="cx"> -epub-hyphens = -webkit-hyphens
</span><span class="cx"> -webkit-initial-letter
</span><span class="lines">@@ -461,7 +503,7 @@
</span><span class="cx"> #if defined(ENABLE_CSS_SHAPES) &amp;&amp; ENABLE_CSS_SHAPES
</span><span class="cx"> -webkit-shape-outside
</span><span class="cx"> -webkit-shape-margin [NewStyleBuilder, Converter=Length]
</span><del>--webkit-shape-image-threshold
</del><ins>+-webkit-shape-image-threshold [NewStyleBuilder, Converter=Number&lt;float&gt;]
</ins><span class="cx"> #endif
</span><span class="cx"> #if defined(ENABLE_CSS_DEVICE_ADAPTATION) &amp;&amp; ENABLE_CSS_DEVICE_ADAPTATION
</span><span class="cx"> max-zoom
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (175266 => 175267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-10-28 19:05:32 UTC (rev 175266)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-10-28 19:12:37 UTC (rev 175267)
</span><span class="lines">@@ -160,28 +160,6 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template &lt;typename NumberType, NumberType (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(NumberType), NumberType (*initialFunction)(), int idMapsToMinusOne = CSSValueAuto&gt;
-class ApplyPropertyNumber {
-public:
-    static void setValue(RenderStyle* style, NumberType value) { (style-&gt;*setterFunction)(value); }
-    static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
-    {
-        if (!is&lt;CSSPrimitiveValue&gt;(*value))
-            return;
-
-        CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-        if (primitiveValue.getValueID() == idMapsToMinusOne)
-            setValue(styleResolver-&gt;style(), -1);
-        else
-            setValue(styleResolver-&gt;style(), primitiveValue.getValue&lt;NumberType&gt;(CSSPrimitiveValue::CSS_NUMBER));
-    }
-    static PropertyHandler createHandler()
-    {
-        PropertyHandler handler = ApplyPropertyDefaultBase&lt;NumberType, getterFunction, NumberType, setterFunction, NumberType, initialFunction&gt;::createHandler();
-        return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &amp;applyValue);
-    }
-};
-
</del><span class="cx"> template &lt;StyleImage* (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(PassRefPtr&lt;StyleImage&gt;), StyleImage* (*initialFunction)(), CSSPropertyID property&gt;
</span><span class="cx"> class ApplyPropertyStyleImage {
</span><span class="cx"> public:
</span><span class="lines">@@ -2301,9 +2279,6 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitFontSmoothing, ApplyPropertyFont&lt;FontSmoothingMode, &amp;FontDescription::fontSmoothing, &amp;FontDescription::setFontSmoothing, AutoSmoothing&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitFontVariantLigatures, ApplyPropertyFontVariantLigatures::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitHyphenateCharacter, ApplyPropertyString&lt;MapAutoToNull, &amp;RenderStyle::hyphenationString, &amp;RenderStyle::setHyphenationString, &amp;RenderStyle::initialHyphenationString&gt;::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyWebkitHyphenateLimitAfter, ApplyPropertyNumber&lt;short, &amp;RenderStyle::hyphenationLimitAfter, &amp;RenderStyle::setHyphenationLimitAfter, &amp;RenderStyle::initialHyphenationLimitAfter&gt;::createHandler());
-    setPropertyHandler(CSSPropertyWebkitHyphenateLimitBefore, ApplyPropertyNumber&lt;short, &amp;RenderStyle::hyphenationLimitBefore, &amp;RenderStyle::setHyphenationLimitBefore, &amp;RenderStyle::initialHyphenationLimitBefore&gt;::createHandler());
-    setPropertyHandler(CSSPropertyWebkitHyphenateLimitLines, ApplyPropertyNumber&lt;short, &amp;RenderStyle::hyphenationLimitLines, &amp;RenderStyle::setHyphenationLimitLines, &amp;RenderStyle::initialHyphenationLimitLines, CSSValueNoLimit&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString&lt;MapNoneToNull, &amp;RenderStyle::lineGrid, &amp;RenderStyle::setLineGrid, &amp;RenderStyle::initialLineGrid&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMarqueeIncrement, ApplyPropertyMarqueeIncrement::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMarqueeRepetition, ApplyPropertyMarqueeRepetition::createHandler());
</span><span class="lines">@@ -2336,7 +2311,6 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTransitionTimingFunction, ApplyPropertyAnimation&lt;const PassRefPtr&lt;TimingFunction&gt;, &amp;Animation::timingFunction, &amp;Animation::setTimingFunction, &amp;Animation::isTimingFunctionSet, &amp;Animation::clearTimingFunction, &amp;Animation::initialAnimationTimingFunction, &amp;CSSToStyleMap::mapAnimationTimingFunction, &amp;RenderStyle::accessTransitions, &amp;RenderStyle::transitions&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitClipPath, ApplyPropertyClipPath&lt;&amp;RenderStyle::clipPath, &amp;RenderStyle::setClipPath, &amp;RenderStyle::initialClipPath&gt;::createHandler());
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><del>-    setPropertyHandler(CSSPropertyWebkitShapeImageThreshold, ApplyPropertyNumber&lt;float, &amp;RenderStyle::shapeImageThreshold, &amp;RenderStyle::setShapeImageThreshold, &amp;RenderStyle::initialShapeImageThreshold&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyWebkitShapeOutside, ApplyPropertyShape&lt;&amp;RenderStyle::shapeOutside, &amp;RenderStyle::setShapeOutside, &amp;RenderStyle::initialShapeOutside&gt;::createHandler());
</span><span class="cx"> #endif
</span><span class="cx">     setPropertyHandler(CSSPropertyWidows, ApplyPropertyAuto&lt;short, &amp;RenderStyle::widows, &amp;RenderStyle::setWidows, &amp;RenderStyle::hasAutoWidows, &amp;RenderStyle::setHasAutoWidows&gt;::createHandler());
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (175266 => 175267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2014-10-28 19:05:32 UTC (rev 175266)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2014-10-28 19:12:37 UTC (rev 175267)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">     static float convertSpacing(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static LengthSize convertRadius(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static TextDecoration convertTextDecoration(StyleResolver&amp;, CSSValue&amp;);
</span><ins>+    template &lt;typename T&gt; static T convertNumber(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static Length convertToRadiusLength(CSSToLengthConversionData&amp;, CSSPrimitiveValue&amp;);
</span><span class="lines">@@ -196,6 +197,15 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template &lt;typename T&gt;
+inline T StyleBuilderConverter::convertNumber(StyleResolver&amp;, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueAuto)
+        return -1;
+    return primitiveValue.getValue&lt;T&gt;(CSSPrimitiveValue::CSS_NUMBER);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // StyleBuilderConverter_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/StyleBuilderCustom.h (0 => 175267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h                                (rev 0)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-10-28 19:12:37 UTC (rev 175267)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef StyleBuilderCustom_h
+#define StyleBuilderCustom_h
+
+#include &quot;StyleResolver.h&quot;
+
+namespace WebCore {
+
+namespace StyleBuilderFunctions {
+
+inline void applyValueWebkitHyphenateLimitLines(StyleResolver&amp; styleResolver, CSSValue&amp; value)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    short number = -1;
+    if (primitiveValue.getValueID() != CSSValueNoLimit)
+        number = primitiveValue.getValue&lt;short&gt;(CSSPrimitiveValue::CSS_NUMBER);
+    styleResolver.style()-&gt;setHyphenationLimitLines(number);
+}
+
+} // namespace StyleBuilderFunctions
+
+} // namespace Value
+
+#endif // StyleBuilderCustom_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssmakeproppl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/makeprop.pl (175266 => 175267)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeprop.pl        2014-10-28 19:05:32 UTC (rev 175266)
+++ trunk/Source/WebCore/css/makeprop.pl        2014-10-28 19:12:37 UTC (rev 175267)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> my %propertiesUsingNewStyleBuilder;
</span><span class="cx"> my %newStyleBuilderOptions = (
</span><span class="cx">   Converter =&gt; 1, # Defined in Source/WebCore/css/StyleBuilderConverter.h
</span><ins>+  Custom =&gt; 1,
</ins><span class="cx">   Getter =&gt; 1,
</span><span class="cx">   Initial =&gt; 1,
</span><span class="cx">   NameForMethods =&gt; 1,
</span><span class="lines">@@ -350,6 +351,9 @@
</span><span class="cx">   if (!exists($propertiesUsingNewStyleBuilder{$name}{&quot;Initial&quot;})) {
</span><span class="cx">     $propertiesUsingNewStyleBuilder{$name}{&quot;Initial&quot;} = &quot;initial&quot; . $nameForMethods;
</span><span class="cx">   }
</span><ins>+  if (!exists($propertiesUsingNewStyleBuilder{$name}{&quot;Custom&quot;})) {
+    $propertiesUsingNewStyleBuilder{$name}{&quot;Custom&quot;} = &quot;None&quot;;
+  }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> open STYLEBUILDER, &quot;&gt;StyleBuilder.cpp&quot; || die &quot;Could not open StyleBuilder.cpp for writing&quot;;
</span><span class="lines">@@ -363,12 +367,12 @@
</span><span class="cx"> #include &quot;CSSProperty.h&quot;
</span><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><span class="cx"> #include &quot;StyleBuilderConverter.h&quot;
</span><ins>+#include &quot;StyleBuilderCustom.h&quot;
</ins><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class StyleBuilderFunctions {
-public:
</del><ins>+namespace StyleBuilderFunctions {
</ins><span class="cx"> EOF
</span><span class="cx"> 
</span><span class="cx"> foreach my $name (@names) {
</span><span class="lines">@@ -376,28 +380,30 @@
</span><span class="cx">   next unless exists($propertiesUsingNewStyleBuilder{$name});
</span><span class="cx"> 
</span><span class="cx">   my $setValue = &quot;styleResolver.style()-&gt;&quot; . $propertiesUsingNewStyleBuilder{$name}{&quot;Setter&quot;};
</span><del>-  print STYLEBUILDER &quot;    static void applyInitial&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</del><ins>+  print STYLEBUILDER &quot;    inline void applyInitial&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</ins><span class="cx">   print STYLEBUILDER &quot;    {\n&quot;;
</span><span class="cx">   print STYLEBUILDER &quot;        &quot; . $setValue . &quot;(RenderStyle::&quot; . $propertiesUsingNewStyleBuilder{$name}{&quot;Initial&quot;} . &quot;());\n&quot;;
</span><span class="cx">   print STYLEBUILDER &quot;    }\n&quot;;
</span><del>-  print STYLEBUILDER &quot;    static void applyInherit&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</del><ins>+  print STYLEBUILDER &quot;    inline void applyInherit&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</ins><span class="cx">   print STYLEBUILDER &quot;    {\n&quot;;
</span><span class="cx">   print STYLEBUILDER &quot;        &quot; . $setValue . &quot;(styleResolver.parentStyle()-&gt;&quot; .  $propertiesUsingNewStyleBuilder{$name}{&quot;Getter&quot;} . &quot;());\n&quot;;
</span><span class="cx">   print STYLEBUILDER &quot;    }\n&quot;;
</span><del>-  print STYLEBUILDER &quot;    static void applyValue&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver, CSSValue&amp; value)\n&quot;;
-  print STYLEBUILDER &quot;    {\n&quot;;
-  my $convertedValue;
-  if (exists($propertiesUsingNewStyleBuilder{$name}{&quot;Converter&quot;})) {
-    $convertedValue = &quot;StyleBuilderConverter::convert&quot; . $propertiesUsingNewStyleBuilder{$name}{&quot;Converter&quot;} . &quot;(styleResolver, value)&quot;;
-  } else {
-    $convertedValue = &quot;static_cast&lt;&quot; . $propertiesUsingNewStyleBuilder{$name}{&quot;TypeName&quot;} . &quot;&gt;(downcast&lt;CSSPrimitiveValue&gt;(value))&quot;;
</del><ins>+  if ($propertiesUsingNewStyleBuilder{$name}{&quot;Custom&quot;} ne &quot;Value&quot;) {
+    print STYLEBUILDER &quot;    inline void applyValue&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver, CSSValue&amp; value)\n&quot;;
+    print STYLEBUILDER &quot;    {\n&quot;;
+    my $convertedValue;
+    if (exists($propertiesUsingNewStyleBuilder{$name}{&quot;Converter&quot;})) {
+      $convertedValue = &quot;StyleBuilderConverter::convert&quot; . $propertiesUsingNewStyleBuilder{$name}{&quot;Converter&quot;} . &quot;(styleResolver, value)&quot;;
+    } else {
+      $convertedValue = &quot;static_cast&lt;&quot; . $propertiesUsingNewStyleBuilder{$name}{&quot;TypeName&quot;} . &quot;&gt;(downcast&lt;CSSPrimitiveValue&gt;(value))&quot;;
+    }
+    print STYLEBUILDER &quot;        &quot; . $setValue . &quot;(&quot; . $convertedValue . &quot;);\n&quot;;
+    print STYLEBUILDER &quot;    }\n&quot;;
</ins><span class="cx">   }
</span><del>-  print STYLEBUILDER &quot;        &quot; . $setValue . &quot;(&quot; . $convertedValue . &quot;);\n&quot;;
-  print STYLEBUILDER &quot;    }\n&quot;;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> print STYLEBUILDER &lt;&lt; &quot;EOF&quot;;
</span><del>-};
</del><ins>+} // namespace StyleBuilderFunctions
</ins><span class="cx"> 
</span><span class="cx"> bool StyleBuilder::applyProperty(CSSPropertyID property, StyleResolver&amp; styleResolver, CSSValue&amp; value, bool isInitial, bool isInherit)
</span><span class="cx"> {
</span></span></pre>
</div>
</div>

</body>
</html>