<!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>[177630] 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/177630">177630</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-12-22 02:38:57 -0800 (Mon, 22 Dec 2014)</dd>
</dl>

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

Reviewed by Antti Koivisto.

Move &quot;Auto&quot; CSS properties from DeprecatedStyleBuilder to the new
StyleBuilder, by adding support in the generator for using hasAutoXXX()
/ setHasAutoXXX() methods on RenderStyle.

No new tests, no web-exposed behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyAuto::setValue): Deleted.
(WebCore::ApplyPropertyAuto::value): Deleted.
(WebCore::ApplyPropertyAuto::hasAuto): Deleted.
(WebCore::ApplyPropertyAuto::setAuto): Deleted.
(WebCore::ApplyPropertyAuto::applyInheritValue): Deleted.
(WebCore::ApplyPropertyAuto::applyInitialValue): Deleted.
(WebCore::ApplyPropertyAuto::applyValue): Deleted.
(WebCore::ApplyPropertyAuto::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialColumnGap):
(WebCore::StyleBuilderCustom::applyInheritColumnGap):
(WebCore::StyleBuilderCustom::applyValueColumnGap):
* css/makeprop.pl:
(getNameForMethods):
(getAutoGetter):
(getAutoSetter):
(generateInitialValueSetter):
(generateInheritValueSetter):
(generateValueSetter):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
<li><a href="#trunkSourceWebCorecssmakeproppl">trunk/Source/WebCore/css/makeprop.pl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177629 => 177630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-22 02:00:04 UTC (rev 177629)
+++ trunk/Source/WebCore/ChangeLog        2014-12-22 10:38:57 UTC (rev 177630)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-12-22  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Move &quot;Auto&quot; CSS properties to the new StyleBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=139858
+
+        Reviewed by Antti Koivisto.
+
+        Move &quot;Auto&quot; CSS properties from DeprecatedStyleBuilder to the new
+        StyleBuilder, by adding support in the generator for using hasAutoXXX()
+        / setHasAutoXXX() methods on RenderStyle.
+
+        No new tests, no web-exposed behavior change.
+
+        * css/CSSPropertyNames.in:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        (WebCore::ApplyPropertyAuto::setValue): Deleted.
+        (WebCore::ApplyPropertyAuto::value): Deleted.
+        (WebCore::ApplyPropertyAuto::hasAuto): Deleted.
+        (WebCore::ApplyPropertyAuto::setAuto): Deleted.
+        (WebCore::ApplyPropertyAuto::applyInheritValue): Deleted.
+        (WebCore::ApplyPropertyAuto::applyInitialValue): Deleted.
+        (WebCore::ApplyPropertyAuto::applyValue): Deleted.
+        (WebCore::ApplyPropertyAuto::createHandler): Deleted.
+        * css/StyleBuilderCustom.h:
+        (WebCore::StyleBuilderCustom::applyInitialColumnGap):
+        (WebCore::StyleBuilderCustom::applyInheritColumnGap):
+        (WebCore::StyleBuilderCustom::applyValueColumnGap):
+        * css/makeprop.pl:
+        (getNameForMethods):
+        (getAutoGetter):
+        (getAutoSetter):
+        (generateInitialValueSetter):
+        (generateInheritValueSetter):
+        (generateValueSetter):
+
</ins><span class="cx"> 2014-12-21  Shivakumar JM  &lt;shiva.jm@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         HTMLSelectElement add() should support adding group of options element (HTMLOptGroupElement).
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (177629 => 177630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2014-12-22 02:00:04 UTC (rev 177629)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2014-12-22 10:38:57 UTC (rev 177630)
</span><span class="lines">@@ -56,6 +56,10 @@
</span><span class="cx"> // If special handling is also needed to apply inherit or initial value, use
</span><span class="cx"> // Custom=All. Alternatively, several '|'-separated options can be passed:
</span><span class="cx"> // e.g. 'Custom=Inherit|Value&quot;.
</span><ins>+//
+// * AutoFunctions:
+// Indicates that this CSS property requires handling of &quot;auto&quot; and has
+// corresponding hasAutoXXX() / setHasAutoXXX() methods on RenderStyle.
</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">@@ -203,7 +207,7 @@
</span><span class="cx"> // Honor -webkit-opacity as a synonym for opacity. This was the only syntax that worked in Safari 1.1,
</span><span class="cx"> // and may be in use on some websites and widgets.
</span><span class="cx"> -webkit-opacity = opacity
</span><del>-orphans [Inherited, LegacyStyleBuilder]
</del><ins>+orphans [Inherited, TypeName=short, AutoFunctions]
</ins><span class="cx"> outline [LegacyStyleBuilder]
</span><span class="cx"> outline-color [LegacyStyleBuilder]
</span><span class="cx"> outline-offset [Converter=ComputedLength&lt;int&gt;]
</span><span class="lines">@@ -267,13 +271,13 @@
</span><span class="cx"> vertical-align [Custom=Value]
</span><span class="cx"> visibility [Inherited]
</span><span class="cx"> white-space [Inherited]
</span><del>-widows [Inherited, LegacyStyleBuilder]
</del><ins>+widows [Inherited, TypeName=short, AutoFunctions]
</ins><span class="cx"> width [Initial=initialSize, Converter=LengthSizing]
</span><span class="cx"> word-break [Inherited]
</span><span class="cx"> -epub-word-break = word-break
</span><span class="cx"> word-spacing [Inherited, Custom=Value]
</span><span class="cx"> word-wrap [Inherited=EOverflowWrap, NameForMethods=OverflowWrap]
</span><del>-z-index [LegacyStyleBuilder]
</del><ins>+z-index [TypeName=int, AutoFunctions]
</ins><span class="cx"> alt [LegacyStyleBuilder]
</span><span class="cx"> -webkit-alt = alt
</span><span class="cx"> -webkit-animation [LegacyStyleBuilder]
</span><span class="lines">@@ -337,11 +341,11 @@
</span><span class="cx"> -webkit-column-break-after [TypeName=EPageBreak, Initial=initialPageBreak]
</span><span class="cx"> -webkit-column-break-before [TypeName=EPageBreak, Initial=initialPageBreak]
</span><span class="cx"> -webkit-column-break-inside [TypeName=EPageBreak, Initial=initialPageBreak]
</span><del>-column-count [LegacyStyleBuilder]
</del><ins>+column-count [TypeName=unsigned short, AutoFunctions]
</ins><span class="cx"> -webkit-column-count = column-count
</span><span class="cx"> column-fill [TypeName=ColumnFill]
</span><span class="cx"> -webkit-column-fill = column-fill
</span><del>-column-gap [LegacyStyleBuilder]
</del><ins>+column-gap [Custom=All]
</ins><span class="cx"> -webkit-column-gap = column-gap
</span><span class="cx"> column-progression [TypeName=ColumnProgression]
</span><span class="cx"> -webkit-column-progression = column-progression
</span><span class="lines">@@ -355,7 +359,7 @@
</span><span class="cx"> -webkit-column-rule-width = column-rule-width
</span><span class="cx"> column-span [TypeName=ColumnSpan]
</span><span class="cx"> -webkit-column-span = column-span
</span><del>-column-width [LegacyStyleBuilder]
</del><ins>+column-width [TypeName=float, AutoFunctions, Converter=ComputedLength&lt;float&gt;]
</ins><span class="cx"> -webkit-column-width = column-width
</span><span class="cx"> columns [LegacyStyleBuilder]
</span><span class="cx"> -webkit-columns = columns
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (177629 => 177630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-12-22 02:00:04 UTC (rev 177629)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-12-22 10:38:57 UTC (rev 177630)
</span><span class="lines">@@ -41,42 +41,6 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="cx"> 
</span><del>-enum AutoValueType {Number = 0, ComputeLength};
-template &lt;typename T, T (RenderStyle::*getterFunction)() const, void (RenderStyle::*setterFunction)(T), bool (RenderStyle::*hasAutoFunction)() const, void (RenderStyle::*setAutoFunction)(), AutoValueType valueType = Number, int autoIdentity = CSSValueAuto&gt;
-class ApplyPropertyAuto {
-public:
-    static void setValue(RenderStyle* style, T value) { (style-&gt;*setterFunction)(value); }
-    static T value(RenderStyle* style) { return (style-&gt;*getterFunction)(); }
-    static bool hasAuto(RenderStyle* style) { return (style-&gt;*hasAutoFunction)(); }
-    static void setAuto(RenderStyle* style) { (style-&gt;*setAutoFunction)(); }
-
-    static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
-    {
-        if (hasAuto(styleResolver-&gt;parentStyle()))
-            setAuto(styleResolver-&gt;style());
-        else
-            setValue(styleResolver-&gt;style(), value(styleResolver-&gt;parentStyle()));
-    }
-
-    static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver) { setAuto(styleResolver-&gt;style()); }
-
-    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() == autoIdentity)
-            setAuto(styleResolver-&gt;style());
-        else if (valueType == Number)
-            setValue(styleResolver-&gt;style(), primitiveValue);
-        else if (valueType == ComputeLength)
-            setValue(styleResolver-&gt;style(), primitiveValue.computeLength&lt;T&gt;(styleResolver-&gt;state().cssToLengthConversionData()));
-    }
-
-    static PropertyHandler createHandler() { return PropertyHandler(&amp;applyInheritValue, &amp;applyInitialValue, &amp;applyValue); }
-};
-
</del><span class="cx"> enum ColorInherit {NoInheritFromParent = 0, InheritFromParent};
</span><span class="cx"> Color defaultInitialColor();
</span><span class="cx"> Color defaultInitialColor() { return Color(); }
</span><span class="lines">@@ -586,7 +550,6 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyFontSize, ApplyPropertyFontSize::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont&lt;FontItalic, &amp;FontDescription::italic, &amp;FontDescription::setItalic, FontItalicOff&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont&lt;FontSmallCaps, &amp;FontDescription::smallCaps, &amp;FontDescription::setSmallCaps, FontSmallCapsOff&gt;::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyOrphans, ApplyPropertyAuto&lt;short, &amp;RenderStyle::orphans, &amp;RenderStyle::setOrphans, &amp;RenderStyle::hasAutoOrphans, &amp;RenderStyle::setHasAutoOrphans&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::outlineColor, &amp;RenderStyle::setOutlineColor, &amp;RenderStyle::setVisitedLinkOutlineColor, &amp;RenderStyle::color&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextDecorationColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textDecorationColor, &amp;RenderStyle::setTextDecorationColor, &amp;RenderStyle::setVisitedLinkTextDecorationColor, &amp;RenderStyle::color&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont&lt;TextRenderingMode, &amp;FontDescription::textRenderingMode, &amp;FontDescription::setTextRenderingMode, AutoTextRendering&gt;::createHandler());
</span><span class="lines">@@ -612,10 +575,7 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer&lt;CompositeOperator, CSSPropertyWebkitBackgroundComposite, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isCompositeSet, &amp;FillLayer::composite, &amp;FillLayer::setComposite, &amp;FillLayer::clearComposite, &amp;FillLayer::initialFillComposite, &amp;CSSToStyleMap::mapFillComposite&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin);
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize);
</span><del>-    setPropertyHandler(CSSPropertyColumnCount, ApplyPropertyAuto&lt;unsigned short, &amp;RenderStyle::columnCount, &amp;RenderStyle::setColumnCount, &amp;RenderStyle::hasAutoColumnCount, &amp;RenderStyle::setHasAutoColumnCount&gt;::createHandler());
-    setPropertyHandler(CSSPropertyColumnGap, ApplyPropertyAuto&lt;float, &amp;RenderStyle::columnGap, &amp;RenderStyle::setColumnGap, &amp;RenderStyle::hasNormalColumnGap, &amp;RenderStyle::setHasNormalColumnGap, ComputeLength, CSSValueNormal&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyColumnRuleColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::columnRuleColor, &amp;RenderStyle::setColumnRuleColor, &amp;RenderStyle::setVisitedLinkColumnRuleColor, &amp;RenderStyle::color&gt;::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyColumnWidth, ApplyPropertyAuto&lt;float, &amp;RenderStyle::columnWidth, &amp;RenderStyle::setColumnWidth, &amp;RenderStyle::hasAutoColumnWidth, &amp;RenderStyle::setHasAutoColumnWidth, ComputeLength&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyWebkitFontKerning, ApplyPropertyFont&lt;FontDescription::Kerning, &amp;FontDescription::kerning, &amp;FontDescription::setKerning, FontDescription::AutoKerning&gt;::createHandler());
</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="lines">@@ -635,10 +595,6 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTransitionDuration, ApplyPropertyAnimation&lt;double, &amp;Animation::duration, &amp;Animation::setDuration, &amp;Animation::isDurationSet, &amp;Animation::clearDuration, &amp;Animation::initialAnimationDuration, &amp;CSSToStyleMap::mapAnimationDuration, &amp;RenderStyle::accessTransitions, &amp;RenderStyle::transitions&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTransitionProperty, ApplyPropertyAnimation&lt;CSSPropertyID, &amp;Animation::property, &amp;Animation::setProperty, &amp;Animation::isPropertySet, &amp;Animation::clearProperty, &amp;Animation::initialAnimationProperty, &amp;CSSToStyleMap::mapAnimationProperty, &amp;RenderStyle::accessTransitions, &amp;RenderStyle::transitions&gt;::createHandler());
</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><del>-    setPropertyHandler(CSSPropertyWidows, ApplyPropertyAuto&lt;short, &amp;RenderStyle::widows, &amp;RenderStyle::setWidows, &amp;RenderStyle::hasAutoWidows, &amp;RenderStyle::setHasAutoWidows&gt;::createHandler());
-
-    setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto&lt;int, &amp;RenderStyle::zIndex, &amp;RenderStyle::setZIndex, &amp;RenderStyle::hasAutoZIndex, &amp;RenderStyle::setHasAutoZIndex&gt;::createHandler());
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (177629 => 177630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-12-22 02:00:04 UTC (rev 177629)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2014-12-22 10:38:57 UTC (rev 177630)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &quot;LocaleToScriptMapping.h&quot;
</span><span class="cx"> #include &quot;Rect.h&quot;
</span><span class="cx"> #include &quot;SVGElement.h&quot;
</span><ins>+#include &quot;StyleBuilderConverter.h&quot;
</ins><span class="cx"> #include &quot;StyleFontSizeFunctions.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -55,6 +56,7 @@
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(BorderImageWidth);
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(BoxShadow);
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(Clip);
</span><ins>+    DECLARE_PROPERTY_CUSTOM_HANDLERS(ColumnGap);
</ins><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(CounterIncrement);
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(CounterReset);
</span><span class="cx">     DECLARE_PROPERTY_CUSTOM_HANDLERS(Cursor);
</span><span class="lines">@@ -1179,6 +1181,27 @@
</span><span class="cx">     styleResolver.setFontDescription(fontDescription);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void StyleBuilderCustom::applyInitialColumnGap(StyleResolver&amp; styleResolver)
+{
+    styleResolver.style()-&gt;setHasNormalColumnGap();
+}
+
+inline void StyleBuilderCustom::applyInheritColumnGap(StyleResolver&amp; styleResolver)
+{
+    if (styleResolver.parentStyle()-&gt;hasNormalColumnGap())
+        styleResolver.style()-&gt;setHasNormalColumnGap();
+    else
+        styleResolver.style()-&gt;setColumnGap(styleResolver.parentStyle()-&gt;columnGap());
+}
+
+inline void StyleBuilderCustom::applyValueColumnGap(StyleResolver&amp; styleResolver, CSSValue&amp; value)
+{
+    if (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueNormal)
+        styleResolver.style()-&gt;setHasNormalColumnGap();
+    else
+        styleResolver.style()-&gt;setColumnGap(StyleBuilderConverter::convertComputedLength&lt;float&gt;(styleResolver, value));
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // StyleBuilderCustom_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssmakeproppl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/makeprop.pl (177629 => 177630)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeprop.pl        2014-12-22 02:00:04 UTC (rev 177629)
+++ trunk/Source/WebCore/css/makeprop.pl        2014-12-22 10:38:57 UTC (rev 177630)
</span><span class="lines">@@ -43,7 +43,8 @@
</span><span class="cx"> my %nameIsInherited;
</span><span class="cx"> my %propertiesWithStyleBuilderOptions;
</span><span class="cx"> my %styleBuilderOptions = (
</span><del>-  Converter =&gt; 1, # Defined in Source/WebCore/css/StyleBuilderConverter.h
</del><ins>+  AutoFunctions =&gt; 1, # Defined in Source/WebCore/css/StyleBuilderConverter.h
+  Converter =&gt; 1,
</ins><span class="cx">   Custom =&gt; 1,
</span><span class="cx">   Getter =&gt; 1,
</span><span class="cx">   Initial =&gt; 1,
</span><span class="lines">@@ -337,11 +338,36 @@
</span><span class="cx">   return $propertiesWithStyleBuilderOptions{$name}{&quot;Custom&quot;}{$builderFunction} ? &quot;StyleBuilderCustom&quot; : &quot;StyleBuilderFunctions&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub getNameForMethods {
+  my $name = shift;
+
+  my $nameForMethods = $nameToId{$name};
+  $nameForMethods =~ s/Webkit//g;
+  if (exists($propertiesWithStyleBuilderOptions{$name}{&quot;NameForMethods&quot;})) {
+    $nameForMethods = $propertiesWithStyleBuilderOptions{$name}{&quot;NameForMethods&quot;};
+  }
+  return $nameForMethods;
+}
+
+sub getAutoGetter {
+  my $name = shift;
+  my $renderStyle = shift;
+
+  return $renderStyle . &quot;-&gt;hasAuto&quot; . getNameForMethods($name) . &quot;()&quot;;
+}
+
+sub getAutoSetter {
+  my $name = shift;
+  my $renderStyle = shift;
+
+  return $renderStyle . &quot;-&gt;setHasAuto&quot; . getNameForMethods($name) . &quot;()&quot;;
+}
+
</ins><span class="cx"> foreach my $name (@names) {
</span><span class="cx">   # Skip properties still using the legacy style builder.
</span><span class="cx">   next unless exists($propertiesWithStyleBuilderOptions{$name});
</span><span class="cx"> 
</span><del>-  my $nameForMethods = $nameToId{$name};
</del><ins>+  my $nameForMethods = getNameForMethods($name);
</ins><span class="cx">   $nameForMethods =~ s/Webkit//g;
</span><span class="cx">   if (exists($propertiesWithStyleBuilderOptions{$name}{&quot;NameForMethods&quot;})) {
</span><span class="cx">     $nameForMethods = $propertiesWithStyleBuilderOptions{$name}{&quot;NameForMethods&quot;};
</span><span class="lines">@@ -368,6 +394,74 @@
</span><span class="cx">   $propertiesWithStyleBuilderOptions{$name}{&quot;Custom&quot;} = \%customValues;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub generateInitialValueSetter {
+  my $name = shift;
+  my $indent = shift;
+
+  my $setterContent = &quot;&quot;;
+  $setterContent .= $indent . &quot;inline void applyInitial&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
+  $setterContent .= $indent . &quot;{\n&quot;;
+  my $style = &quot;styleResolver.style()&quot;;
+  if (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AutoFunctions&quot;}) {
+    $setterContent .= $indent . &quot;    &quot; . getAutoSetter($name, $style) . &quot;;\n&quot;;
+  } else {
+    my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
+    $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(RenderStyle::&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Initial&quot;} . &quot;());\n&quot;;
+  }
+  $setterContent .= $indent . &quot;}\n&quot;;
+
+  return $setterContent;
+}
+
+sub generateInheritValueSetter {
+  my $name = shift;
+  my $indent = shift;
+
+  my $setterContent = &quot;&quot;;
+  $setterContent .= $indent . &quot;inline void applyInherit&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
+  $setterContent .= $indent . &quot;{\n&quot;;
+  my $parentStyle = &quot;styleResolver.parentStyle()&quot;;
+  my $style = &quot;styleResolver.style()&quot;;
+  if (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AutoFunctions&quot;}) {
+    $setterContent .= $indent . &quot;    if (&quot; . getAutoGetter($name, $parentStyle) . &quot;) {\n&quot;;
+    $setterContent .= $indent . &quot;        &quot; . getAutoSetter($name, $style) . &quot;;\n&quot;;
+    $setterContent .= $indent . &quot;        return;\n&quot;;
+    $setterContent .= $indent . &quot;    }\n&quot;;
+  }
+  my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
+  $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(&quot; . $parentStyle . &quot;-&gt;&quot; .  $propertiesWithStyleBuilderOptions{$name}{&quot;Getter&quot;} . &quot;());\n&quot;;
+  $setterContent .= $indent . &quot;}\n&quot;;
+
+  return $setterContent;
+}
+
+sub generateValueSetter {
+  my $name = shift;
+  my $indent = shift;
+
+  my $setterContent = &quot;&quot;;
+  $setterContent .= $indent . &quot;inline void applyValue&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver, CSSValue&amp; value)\n&quot;;
+  $setterContent .= $indent . &quot;{\n&quot;;
+  my $convertedValue;
+  if (exists($propertiesWithStyleBuilderOptions{$name}{&quot;Converter&quot;})) {
+    $convertedValue = &quot;StyleBuilderConverter::convert&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Converter&quot;} . &quot;(styleResolver, value)&quot;;
+  } else {
+    $convertedValue = &quot;static_cast&lt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;TypeName&quot;} . &quot;&gt;(downcast&lt;CSSPrimitiveValue&gt;(value))&quot;;
+  }
+  my $style = &quot;styleResolver.style()&quot;;
+  if (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AutoFunctions&quot;}) {
+    $setterContent .= $indent . &quot;    if (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueAuto) {\n&quot;;
+    $setterContent .= $indent . &quot;        &quot;. getAutoSetter($name, $style) . &quot;;\n&quot;;
+    $setterContent .= $indent . &quot;        return;\n&quot;;
+    $setterContent .= $indent . &quot;    }\n&quot;;
+  }
+  my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
+  $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(&quot; . $convertedValue . &quot;);\n&quot;;
+  $setterContent .= $indent . &quot;}\n&quot;;
+
+  return $setterContent;
+}
+
</ins><span class="cx"> open STYLEBUILDER, &quot;&gt;StyleBuilder.cpp&quot; || die &quot;Could not open StyleBuilder.cpp for writing&quot;;
</span><span class="cx"> print STYLEBUILDER &lt;&lt; &quot;EOF&quot;;
</span><span class="cx"> /* This file is automatically generated from CSSPropertyNames.in by makeprop, do not edit */
</span><span class="lines">@@ -391,30 +485,15 @@
</span><span class="cx">   # Skip properties still using the legacy style builder.
</span><span class="cx">   next unless exists($propertiesWithStyleBuilderOptions{$name});
</span><span class="cx"> 
</span><del>-  my $setValue = &quot;styleResolver.style()-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
</del><ins>+  my $indent = &quot;    &quot;;
</ins><span class="cx">   if (!$propertiesWithStyleBuilderOptions{$name}{&quot;Custom&quot;}{&quot;Initial&quot;}) {
</span><del>-    print STYLEBUILDER &quot;    inline void applyInitial&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
-    print STYLEBUILDER &quot;    {\n&quot;;
-    print STYLEBUILDER &quot;        &quot; . $setValue . &quot;(RenderStyle::&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Initial&quot;} . &quot;());\n&quot;;
-    print STYLEBUILDER &quot;    }\n&quot;;
</del><ins>+    print STYLEBUILDER generateInitialValueSetter($name, $indent);
</ins><span class="cx">   }
</span><span class="cx">   if (!$propertiesWithStyleBuilderOptions{$name}{&quot;Custom&quot;}{&quot;Inherit&quot;}) {
</span><del>-    print STYLEBUILDER &quot;    inline void applyInherit&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
-    print STYLEBUILDER &quot;    {\n&quot;;
-    print STYLEBUILDER &quot;        &quot; . $setValue . &quot;(styleResolver.parentStyle()-&gt;&quot; .  $propertiesWithStyleBuilderOptions{$name}{&quot;Getter&quot;} . &quot;());\n&quot;;
-    print STYLEBUILDER &quot;    }\n&quot;;
</del><ins>+    print STYLEBUILDER generateInheritValueSetter($name, $indent);
</ins><span class="cx">   }
</span><span class="cx">   if (!$propertiesWithStyleBuilderOptions{$name}{&quot;Custom&quot;}{&quot;Value&quot;}) {
</span><del>-    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($propertiesWithStyleBuilderOptions{$name}{&quot;Converter&quot;})) {
-      $convertedValue = &quot;StyleBuilderConverter::convert&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Converter&quot;} . &quot;(styleResolver, value)&quot;;
-    } else {
-      $convertedValue = &quot;static_cast&lt;&quot; . $propertiesWithStyleBuilderOptions{$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;;
</del><ins>+    print STYLEBUILDER generateValueSetter($name, $indent);
</ins><span class="cx">   }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>