<!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>[177687] 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/177687">177687</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-12-23 10:37:21 -0800 (Tue, 23 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move color CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139898

Reviewed by Antti Koivisto.

Move color CSS properties to the new StyleBuilder by teaching the
StyleBuilder generator how to handle them.

* css/CSSPropertyNames.in:
- Move color properties to the new StyleBuilder.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::defaultInitialColor): Deleted.
(WebCore::ApplyPropertyColor::applyInheritValue): Deleted.
(WebCore::ApplyPropertyColor::applyInitialValue): Deleted.
(WebCore::ApplyPropertyColor::applyValue): Deleted.
(WebCore::ApplyPropertyColor::applyColorValue): Deleted.
(WebCore::ApplyPropertyColor::createHandler): Deleted.
- Drop color properties support from the DeprecatedStyleBuilder.

* css/makeprop.pl:
- Teach the StyleBuilder generator how to handle color properties.
- Use a class for StyleBuilderFunctions instead of a namespace so
  that it can be made a friend of RenderStyle class.

* rendering/style/RenderStyle.h:
- Mark StyleBuilderFunctions class as friend as its functions
  can set RenderStyle members directly. This is similar to what
  is already done for StyleBuilderCustom class. The new color
  properties handling calls private methods on RenderStyle.
- Mark invalidColor() method as static as it does not require
  an instance.</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="#trunkSourceWebCorecssmakeproppl">trunk/Source/WebCore/css/makeprop.pl</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177686 => 177687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-23 18:04:39 UTC (rev 177686)
+++ trunk/Source/WebCore/ChangeLog        2014-12-23 18:37:21 UTC (rev 177687)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-12-23  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Move color CSS properties to the new StyleBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=139898
+
+        Reviewed by Antti Koivisto.
+
+        Move color CSS properties to the new StyleBuilder by teaching the
+        StyleBuilder generator how to handle them.
+
+        * css/CSSPropertyNames.in:
+        - Move color properties to the new StyleBuilder.
+
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        (WebCore::defaultInitialColor): Deleted.
+        (WebCore::ApplyPropertyColor::applyInheritValue): Deleted.
+        (WebCore::ApplyPropertyColor::applyInitialValue): Deleted.
+        (WebCore::ApplyPropertyColor::applyValue): Deleted.
+        (WebCore::ApplyPropertyColor::applyColorValue): Deleted.
+        (WebCore::ApplyPropertyColor::createHandler): Deleted.
+        - Drop color properties support from the DeprecatedStyleBuilder.
+
+        * css/makeprop.pl:
+        - Teach the StyleBuilder generator how to handle color properties.
+        - Use a class for StyleBuilderFunctions instead of a namespace so
+          that it can be made a friend of RenderStyle class.
+
+        * rendering/style/RenderStyle.h:
+        - Mark StyleBuilderFunctions class as friend as its functions
+          can set RenderStyle members directly. This is similar to what
+          is already done for StyleBuilderCustom class. The new color
+          properties handling calls private methods on RenderStyle.
+        - Mark invalidColor() method as static as it does not require
+          an instance.
+
</ins><span class="cx"> 2014-12-23  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Incorrect dashed and dotted border painting.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (177686 => 177687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2014-12-23 18:04:39 UTC (rev 177686)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2014-12-23 18:37:21 UTC (rev 177687)
</span><span class="lines">@@ -60,11 +60,23 @@
</span><span class="cx"> // * AutoFunctions:
</span><span class="cx"> // Indicates that this CSS property requires handling of &quot;auto&quot; and has
</span><span class="cx"> // corresponding hasAutoXXX() / setHasAutoXXX() methods on RenderStyle.
</span><ins>+//
+// * VisitedLinkColorSupport:
+// Indicates that this CSS property is a color property with a
+// &quot;setVisitedLinkXXX()&quot; setter on RenderStyle to be called when
+// StyleResolver::applyPropertyToVisitedLinkStyle() return true.
+// The regular setter on RenderStyle will only be called if
+// StyleResolver::applyPropertyToRegularStyle() returns true.
+//
+// * NoDefaultColor:
+// Should only with used with &quot;VisitedLinkColorSupport&quot;. It indicates that for
+// setting the inherited value, it will not fallback to using the parent's
+// &quot;color&quot; property if the inherited color is invalid.
</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="cx"> // for applying them first.
</span><del>-color [Inherited, LegacyStyleBuilder]
</del><ins>+color [Inherited, VisitedLinkColorSupport, NoDefaultColor]
</ins><span class="cx"> direction [Inherited, Custom=Value]
</span><span class="cx"> display [Custom=Inherit|Value]
</span><span class="cx"> font [Inherited, LegacyStyleBuilder]
</span><span class="lines">@@ -112,7 +124,7 @@
</span><span class="cx"> background-attachment [LegacyStyleBuilder]
</span><span class="cx"> background-blend-mode [LegacyStyleBuilder]
</span><span class="cx"> background-clip [LegacyStyleBuilder]
</span><del>-background-color [LegacyStyleBuilder]
</del><ins>+background-color [VisitedLinkColorSupport, Initial=invalidColor, NoDefaultColor]
</ins><span class="cx"> background-image [LegacyStyleBuilder]
</span><span class="cx"> background-origin [LegacyStyleBuilder]
</span><span class="cx"> background-position [LegacyStyleBuilder]
</span><span class="lines">@@ -124,7 +136,7 @@
</span><span class="cx"> background-size [LegacyStyleBuilder]
</span><span class="cx"> border [LegacyStyleBuilder]
</span><span class="cx"> border-bottom [LegacyStyleBuilder]
</span><del>-border-bottom-color [LegacyStyleBuilder]
</del><ins>+border-bottom-color [VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> border-bottom-left-radius [Initial=initialBorderRadius, Converter=Radius]
</span><span class="cx"> -webkit-border-bottom-left-radius = border-bottom-left-radius
</span><span class="cx"> border-bottom-right-radius [Initial=initialBorderRadius, Converter=Radius]
</span><span class="lines">@@ -140,18 +152,18 @@
</span><span class="cx"> border-image-source [Converter=StyleImage&lt;CSSPropertyBorderImageSource&gt;]
</span><span class="cx"> border-image-width [Custom=All]
</span><span class="cx"> border-left [LegacyStyleBuilder]
</span><del>-border-left-color [LegacyStyleBuilder]
</del><ins>+border-left-color [VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> border-left-style [TypeName=EBorderStyle, Initial=initialBorderStyle]
</span><span class="cx"> border-left-width [Initial=initialBorderWidth, Converter=LineWidth&lt;float&gt;]
</span><span class="cx"> border-radius [LegacyStyleBuilder]
</span><span class="cx"> border-right [LegacyStyleBuilder]
</span><del>-border-right-color [LegacyStyleBuilder]
</del><ins>+border-right-color [VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> border-right-style [TypeName=EBorderStyle, Initial=initialBorderStyle]
</span><span class="cx"> border-right-width [Initial=initialBorderWidth, Converter=LineWidth&lt;float&gt;]
</span><span class="cx"> border-spacing [Inherited, LegacyStyleBuilder]
</span><span class="cx"> border-style [LegacyStyleBuilder]
</span><span class="cx"> border-top [LegacyStyleBuilder]
</span><del>-border-top-color [LegacyStyleBuilder]
</del><ins>+border-top-color [VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> border-top-left-radius [Initial=initialBorderRadius, Converter=Radius]
</span><span class="cx"> -webkit-border-top-left-radius = border-top-left-radius
</span><span class="cx"> border-top-right-radius [Initial=initialBorderRadius, Converter=Radius]
</span><span class="lines">@@ -209,7 +221,7 @@
</span><span class="cx"> -webkit-opacity = opacity
</span><span class="cx"> orphans [Inherited, TypeName=short, AutoFunctions]
</span><span class="cx"> outline [LegacyStyleBuilder]
</span><del>-outline-color [LegacyStyleBuilder]
</del><ins>+outline-color [VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> outline-offset [Converter=ComputedLength&lt;int&gt;]
</span><span class="cx"> outline-style [Custom=All]
</span><span class="cx"> outline-width [Converter=LineWidth&lt;unsigned short&gt;]
</span><span class="lines">@@ -351,7 +363,7 @@
</span><span class="cx"> -webkit-column-progression = column-progression
</span><span class="cx"> column-rule [LegacyStyleBuilder]
</span><span class="cx"> -webkit-column-rule = column-rule
</span><del>-column-rule-color [LegacyStyleBuilder]
</del><ins>+column-rule-color [VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> -webkit-column-rule-color = column-rule-color
</span><span class="cx"> column-rule-style [TypeName=EBorderStyle, Initial=initialBorderStyle]
</span><span class="cx"> -webkit-column-rule-style = column-rule-style
</span><span class="lines">@@ -497,14 +509,14 @@
</span><span class="cx"> -webkit-text-decoration [LegacyStyleBuilder]
</span><span class="cx"> -webkit-text-decoration-line [NameForMethods=TextDecoration, Converter=TextDecoration]
</span><span class="cx"> -webkit-text-decoration-style [TypeName=TextDecorationStyle]
</span><del>--webkit-text-decoration-color [LegacyStyleBuilder]
</del><ins>+-webkit-text-decoration-color [VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> -webkit-text-decoration-skip [Inherited, Converter=TextDecorationSkip]
</span><span class="cx"> -webkit-text-underline-position [Inherited, Converter=TextUnderlinePosition]
</span><span class="cx"> -webkit-text-decorations-in-effect [Inherited, LegacyStyleBuilder]
</span><span class="cx"> -webkit-text-emphasis [Inherited, LegacyStyleBuilder]
</span><span class="cx"> -epub-text-emphasis = -webkit-text-emphasis
</span><span class="cx"> text-emphasis = -webkit-text-emphasis
</span><del>--webkit-text-emphasis-color [Inherited, LegacyStyleBuilder]
</del><ins>+-webkit-text-emphasis-color [Inherited, VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> -epub-text-emphasis-color = -webkit-text-emphasis-color
</span><span class="cx"> text-emphasis-color = -webkit-text-emphasis-color
</span><span class="cx"> -webkit-text-emphasis-position [Inherited, Converter=TextEmphasisPosition]
</span><span class="lines">@@ -512,10 +524,10 @@
</span><span class="cx"> -webkit-text-emphasis-style [Inherited, Custom=All]
</span><span class="cx"> -epub-text-emphasis-style = -webkit-text-emphasis-style
</span><span class="cx"> text-emphasis-style = -webkit-text-emphasis-style
</span><del>--webkit-text-fill-color [Inherited, LegacyStyleBuilder]
</del><ins>+-webkit-text-fill-color [Inherited, VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> -webkit-text-security [Inherited]
</span><span class="cx"> -webkit-text-stroke [Inherited, LegacyStyleBuilder]
</span><del>--webkit-text-stroke-color [Inherited, LegacyStyleBuilder]
</del><ins>+-webkit-text-stroke-color [Inherited, VisitedLinkColorSupport, Initial=invalidColor]
</ins><span class="cx"> -webkit-text-stroke-width [Inherited, Converter=TextStrokeWidth]
</span><span class="cx"> -webkit-transform [Converter=Transform]
</span><span class="cx"> -webkit-transform-origin [LegacyStyleBuilder]
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (177686 => 177687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-12-23 18:04:39 UTC (rev 177686)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-12-23 18:37:21 UTC (rev 177687)
</span><span class="lines">@@ -41,56 +41,6 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="cx"> 
</span><del>-enum ColorInherit {NoInheritFromParent = 0, InheritFromParent};
-Color defaultInitialColor();
-Color defaultInitialColor() { return Color(); }
-template &lt;ColorInherit inheritColorFromParent,
-          Color (RenderStyle::*getterFunction)() const,
-          void (RenderStyle::*setterFunction)(const Color&amp;),
-          void (RenderStyle::*visitedLinkSetterFunction)(const Color&amp;),
-          Color (RenderStyle::*defaultFunction)() const,
-          Color (*initialFunction)() = &amp;defaultInitialColor&gt;
-class ApplyPropertyColor {
-public:
-    static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
-    {
-        // Visited link style can never explicitly inherit from parent visited link style so no separate getters are needed.
-        Color color = (styleResolver-&gt;parentStyle()-&gt;*getterFunction)();
-        applyColorValue(styleResolver, color.isValid() ? color : (styleResolver-&gt;parentStyle()-&gt;*defaultFunction)());
-    }
-
-    static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
-    {
-        applyColorValue(styleResolver, initialFunction());
-    }
-
-    static void applyValue(CSSPropertyID propertyID, StyleResolver* styleResolver, CSSValue* value)
-    {
-        if (!is&lt;CSSPrimitiveValue&gt;(*value))
-            return;
-
-        CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-        if (inheritColorFromParent &amp;&amp; primitiveValue.getValueID() == CSSValueCurrentcolor)
-            applyInheritValue(propertyID, styleResolver);
-        else {
-            if (styleResolver-&gt;applyPropertyToRegularStyle())
-                (styleResolver-&gt;style()-&gt;*setterFunction)(styleResolver-&gt;colorFromPrimitiveValue(&amp;primitiveValue));
-            if (styleResolver-&gt;applyPropertyToVisitedLinkStyle())
-                (styleResolver-&gt;style()-&gt;*visitedLinkSetterFunction)(styleResolver-&gt;colorFromPrimitiveValue(&amp;primitiveValue, /* forVisitedLink */ true));
-        }
-    }
-
-    static void applyColorValue(StyleResolver* styleResolver, const Color&amp; color)
-    {
-        if (styleResolver-&gt;applyPropertyToRegularStyle())
-            (styleResolver-&gt;style()-&gt;*setterFunction)(color);
-        if (styleResolver-&gt;applyPropertyToVisitedLinkStyle())
-            (styleResolver-&gt;style()-&gt;*visitedLinkSetterFunction)(color);
-    }
-
-    static PropertyHandler createHandler() { return PropertyHandler(&amp;applyInheritValue, &amp;applyInitialValue, &amp;applyValue); }
-};
-
</del><span class="cx"> template &lt;typename T&gt;
</span><span class="cx"> struct FillLayerAccessorTypes {
</span><span class="cx">     typedef T Setter;
</span><span class="lines">@@ -534,7 +484,6 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyBackgroundAttachment, ApplyPropertyFillLayer&lt;EFillAttachment, CSSPropertyBackgroundAttachment, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isAttachmentSet, &amp;FillLayer::attachment, &amp;FillLayer::setAttachment, &amp;FillLayer::clearAttachment, &amp;FillLayer::initialFillAttachment, &amp;CSSToStyleMap::mapFillAttachment&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyBackgroundBlendMode, ApplyPropertyFillLayer&lt;BlendMode, CSSPropertyBackgroundBlendMode, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isBlendModeSet, &amp;FillLayer::blendMode, &amp;FillLayer::setBlendMode, &amp;FillLayer::clearBlendMode, &amp;FillLayer::initialFillBlendMode, &amp;CSSToStyleMap::mapFillBlendMode&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyBackgroundClip, ApplyPropertyFillLayer&lt;EFillBox, CSSPropertyBackgroundClip, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isClipSet, &amp;FillLayer::clip, &amp;FillLayer::setClip, &amp;FillLayer::clearClip, &amp;FillLayer::initialFillClip, &amp;CSSToStyleMap::mapFillClip&gt;::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyBackgroundColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::backgroundColor, &amp;RenderStyle::setBackgroundColor, &amp;RenderStyle::setVisitedLinkBackgroundColor, &amp;RenderStyle::invalidColor&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyBackgroundImage, ApplyPropertyFillLayer&lt;StyleImage*, CSSPropertyBackgroundImage, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isImageSet, &amp;FillLayer::image, &amp;FillLayer::setImage, &amp;FillLayer::clearImage, &amp;FillLayer::initialFillImage, &amp;CSSToStyleMap::mapFillImage&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyBackgroundOrigin, ApplyPropertyFillLayer&lt;EFillBox, CSSPropertyBackgroundOrigin, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isOriginSet, &amp;FillLayer::origin, &amp;FillLayer::setOrigin, &amp;FillLayer::clearOrigin, &amp;FillLayer::initialFillOrigin, &amp;CSSToStyleMap::mapFillOrigin&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyBackgroundPositionX, ApplyPropertyFillLayer&lt;Length, CSSPropertyBackgroundPositionX, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isXPositionSet, &amp;FillLayer::xPosition, &amp;FillLayer::setXPosition, &amp;FillLayer::clearXPosition, &amp;FillLayer::initialFillXPosition, &amp;CSSToStyleMap::mapFillXPosition&gt;::createHandler());
</span><span class="lines">@@ -542,16 +491,9 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyBackgroundRepeatX, ApplyPropertyFillLayer&lt;EFillRepeat, CSSPropertyBackgroundRepeatX, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isRepeatXSet, &amp;FillLayer::repeatX, &amp;FillLayer::setRepeatX, &amp;FillLayer::clearRepeatX, &amp;FillLayer::initialFillRepeatX, &amp;CSSToStyleMap::mapFillRepeatX&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyBackgroundRepeatY, ApplyPropertyFillLayer&lt;EFillRepeat, CSSPropertyBackgroundRepeatY, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isRepeatYSet, &amp;FillLayer::repeatY, &amp;FillLayer::setRepeatY, &amp;FillLayer::clearRepeatY, &amp;FillLayer::initialFillRepeatY, &amp;CSSToStyleMap::mapFillRepeatY&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyBackgroundSize, ApplyPropertyFillLayer&lt;FillSize, CSSPropertyBackgroundSize, BackgroundFillLayer, &amp;RenderStyle::accessBackgroundLayers, &amp;RenderStyle::backgroundLayers, &amp;FillLayer::isSizeSet, &amp;FillLayer::size, &amp;FillLayer::setSize, &amp;FillLayer::clearSize, &amp;FillLayer::initialFillSize, &amp;CSSToStyleMap::mapFillSize&gt;::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyBorderBottomColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::borderBottomColor, &amp;RenderStyle::setBorderBottomColor, &amp;RenderStyle::setVisitedLinkBorderBottomColor, &amp;RenderStyle::color&gt;::createHandler());
-    setPropertyHandler(CSSPropertyBorderLeftColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::borderLeftColor, &amp;RenderStyle::setBorderLeftColor, &amp;RenderStyle::setVisitedLinkBorderLeftColor, &amp;RenderStyle::color&gt;::createHandler());
-    setPropertyHandler(CSSPropertyBorderRightColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::borderRightColor, &amp;RenderStyle::setBorderRightColor, &amp;RenderStyle::setVisitedLinkBorderRightColor, &amp;RenderStyle::color&gt;::createHandler());
-    setPropertyHandler(CSSPropertyBorderTopColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::borderTopColor, &amp;RenderStyle::setBorderTopColor, &amp;RenderStyle::setVisitedLinkBorderTopColor, &amp;RenderStyle::color&gt;::createHandler());
-    setPropertyHandler(CSSPropertyColor, ApplyPropertyColor&lt;InheritFromParent, &amp;RenderStyle::color, &amp;RenderStyle::setColor, &amp;RenderStyle::setVisitedLinkColor, &amp;RenderStyle::invalidColor, RenderStyle::initialColor&gt;::createHandler());
</del><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(CSSPropertyOutlineColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::outlineColor, &amp;RenderStyle::setOutlineColor, &amp;RenderStyle::setVisitedLinkOutlineColor, &amp;RenderStyle::color&gt;::createHandler());
-    setPropertyHandler(CSSPropertyWebkitTextDecorationColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textDecorationColor, &amp;RenderStyle::setTextDecorationColor, &amp;RenderStyle::setVisitedLinkTextDecorationColor, &amp;RenderStyle::color&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont&lt;TextRenderingMode, &amp;FontDescription::textRenderingMode, &amp;FontDescription::setTextRenderingMode, AutoTextRendering&gt;::createHandler());
</span><span class="cx"> 
</span><span class="cx">     setPropertyHandler(CSSPropertyAnimationDelay, ApplyPropertyAnimation&lt;double, &amp;Animation::delay, &amp;Animation::setDelay, &amp;Animation::isDelaySet, &amp;Animation::clearDelay, &amp;Animation::initialAnimationDelay, &amp;CSSToStyleMap::mapAnimationDelay, &amp;RenderStyle::accessAnimations, &amp;RenderStyle::animations&gt;::createHandler());
</span><span class="lines">@@ -575,7 +517,6 @@
</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(CSSPropertyColumnRuleColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::columnRuleColor, &amp;RenderStyle::setColumnRuleColor, &amp;RenderStyle::setVisitedLinkColumnRuleColor, &amp;RenderStyle::color&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">@@ -588,9 +529,6 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMaskRepeatY, ApplyPropertyFillLayer&lt;EFillRepeat, CSSPropertyWebkitMaskRepeatY, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &amp;FillLayer::isRepeatYSet, &amp;FillLayer::repeatY, &amp;FillLayer::setRepeatY, &amp;FillLayer::clearRepeatY, &amp;FillLayer::initialFillRepeatY, &amp;CSSToStyleMap::mapFillRepeatY&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMaskSize, ApplyPropertyFillLayer&lt;FillSize, CSSPropertyWebkitMaskSize, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &amp;FillLayer::isSizeSet, &amp;FillLayer::size, &amp;FillLayer::setSize, &amp;FillLayer::clearSize, &amp;FillLayer::initialFillSize, &amp;CSSToStyleMap::mapFillSize&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMaskSourceType, ApplyPropertyFillLayer&lt;EMaskSourceType, CSSPropertyWebkitMaskSourceType, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &amp;FillLayer::isMaskSourceTypeSet, &amp;FillLayer::maskSourceType, &amp;FillLayer::setMaskSourceType, &amp;FillLayer::clearMaskSourceType, &amp;FillLayer::initialMaskSourceType, &amp;CSSToStyleMap::mapFillMaskSourceType&gt;::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyWebkitTextEmphasisColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textEmphasisColor, &amp;RenderStyle::setTextEmphasisColor, &amp;RenderStyle::setVisitedLinkTextEmphasisColor, &amp;RenderStyle::color&gt;::createHandler());
-    setPropertyHandler(CSSPropertyWebkitTextFillColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textFillColor, &amp;RenderStyle::setTextFillColor, &amp;RenderStyle::setVisitedLinkTextFillColor, &amp;RenderStyle::color&gt;::createHandler());
-    setPropertyHandler(CSSPropertyWebkitTextStrokeColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textStrokeColor, &amp;RenderStyle::setTextStrokeColor, &amp;RenderStyle::setVisitedLinkTextStrokeColor, &amp;RenderStyle::color&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyWebkitTransitionDelay, ApplyPropertyAnimation&lt;double, &amp;Animation::delay, &amp;Animation::setDelay, &amp;Animation::isDelaySet, &amp;Animation::clearDelay, &amp;Animation::initialAnimationDelay, &amp;CSSToStyleMap::mapAnimationDelay, &amp;RenderStyle::accessTransitions, &amp;RenderStyle::transitions&gt;::createHandler());
</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></pre></div>
<a id="trunkSourceWebCorecssmakeproppl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/makeprop.pl (177686 => 177687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeprop.pl        2014-12-23 18:04:39 UTC (rev 177686)
+++ trunk/Source/WebCore/css/makeprop.pl        2014-12-23 18:37:21 UTC (rev 177687)
</span><span class="lines">@@ -49,8 +49,10 @@
</span><span class="cx">   Getter =&gt; 1,
</span><span class="cx">   Initial =&gt; 1,
</span><span class="cx">   NameForMethods =&gt; 1,
</span><ins>+  NoDefaultColor =&gt; 1,
</ins><span class="cx">   Setter =&gt; 1,
</span><span class="cx">   TypeName =&gt; 1,
</span><ins>+  VisitedLinkColorSupport =&gt; 1,
</ins><span class="cx"> );
</span><span class="cx"> my %nameToId;
</span><span class="cx"> my @aliases = ();
</span><span class="lines">@@ -363,6 +365,13 @@
</span><span class="cx">   return $renderStyle . &quot;-&gt;setHasAuto&quot; . getNameForMethods($name) . &quot;()&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub getVisitedLinkSetter {
+  my $name = shift;
+  my $renderStyle = shift;
+
+  return $renderStyle . &quot;-&gt;setVisitedLink&quot; . getNameForMethods($name);
+}
+
</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="lines">@@ -394,16 +403,66 @@
</span><span class="cx">   $propertiesWithStyleBuilderOptions{$name}{&quot;Custom&quot;} = \%customValues;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+use constant {
+  NOT_FOR_VISITED_LINK =&gt; 0,
+  FOR_VISITED_LINK =&gt; 1,
+};
+
+sub colorFromPrimitiveValue {
+  my $primitiveValue = shift;
+  my $forVisitedLink = @_ ? shift : NOT_FOR_VISITED_LINK;
+
+  return &quot;styleResolver.colorFromPrimitiveValue(&amp;&quot; . $primitiveValue . &quot;, /* forVisitedLink */ &quot; . ($forVisitedLink ? &quot;true&quot; : &quot;false&quot;) . &quot;)&quot;;
+}
+
+use constant {
+  VALUE_IS_COLOR =&gt; 0,
+  VALUE_IS_PRIMITIVE =&gt; 1,
+};
+
+sub generateColorValueSetter {
+  my $name = shift;
+  my $value = shift;
+  my $indent = shift;
+  my $valueIsPrimitive = @_ ? shift : VALUE_IS_COLOR;
+
+  my $style = &quot;styleResolver.style()&quot;;
+  my $setterContent .= $indent . &quot;if (styleResolver.applyPropertyToRegularStyle())\n&quot;;
+  my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
+  my $color = $valueIsPrimitive ? colorFromPrimitiveValue($value) : $value;
+  $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(&quot; . $color . &quot;);\n&quot;;
+  $setterContent .= $indent . &quot;if (styleResolver.applyPropertyToVisitedLinkStyle())\n&quot;;
+  $color = $valueIsPrimitive ? colorFromPrimitiveValue($value, FOR_VISITED_LINK) : $value;
+  $setterContent .= $indent . &quot;    &quot; . getVisitedLinkSetter($name, $style) . &quot;(&quot; . $color . &quot;);\n&quot;;
+
+  return $setterContent;
+}
+
+sub handleCurrentColorValue {
+  my $name = shift;
+  my $primitiveValue = shift;
+  my $indent = shift;
+
+  my $code = $indent . &quot;if (&quot; . $primitiveValue . &quot;.getValueID() == CSSValueCurrentcolor) {\n&quot;;
+  $code .= $indent . &quot;    applyInherit&quot; . $nameToId{$name} . &quot;(styleResolver);\n&quot;;
+  $code .= $indent . &quot;    return;\n&quot;;
+  $code .= $indent . &quot;}\n&quot;;
+  return $code;
+}
+
</ins><span class="cx"> sub generateInitialValueSetter {
</span><span class="cx">   my $name = shift;
</span><span class="cx">   my $indent = shift;
</span><span class="cx"> 
</span><span class="cx">   my $setterContent = &quot;&quot;;
</span><del>-  $setterContent .= $indent . &quot;inline void applyInitial&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</del><ins>+  $setterContent .= $indent . &quot;static void applyInitial&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</ins><span class="cx">   $setterContent .= $indent . &quot;{\n&quot;;
</span><span class="cx">   my $style = &quot;styleResolver.style()&quot;;
</span><span class="cx">   if (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AutoFunctions&quot;}) {
</span><span class="cx">     $setterContent .= $indent . &quot;    &quot; . getAutoSetter($name, $style) . &quot;;\n&quot;;
</span><ins>+  } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;VisitedLinkColorSupport&quot;}) {
+      my $initialColor = &quot;RenderStyle::&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Initial&quot;} . &quot;()&quot;;
+      $setterContent .= generateColorValueSetter($name, $initialColor, $indent . &quot;    &quot;);
</ins><span class="cx">   } else {
</span><span class="cx">     my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
</span><span class="cx">     $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(RenderStyle::&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Initial&quot;} . &quot;());\n&quot;;
</span><span class="lines">@@ -418,18 +477,30 @@
</span><span class="cx">   my $indent = shift;
</span><span class="cx"> 
</span><span class="cx">   my $setterContent = &quot;&quot;;
</span><del>-  $setterContent .= $indent . &quot;inline void applyInherit&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</del><ins>+  $setterContent .= $indent . &quot;static void applyInherit&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</ins><span class="cx">   $setterContent .= $indent . &quot;{\n&quot;;
</span><span class="cx">   my $parentStyle = &quot;styleResolver.parentStyle()&quot;;
</span><span class="cx">   my $style = &quot;styleResolver.style()&quot;;
</span><ins>+  my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
+  my $didCallSetValue = 0;
</ins><span class="cx">   if (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AutoFunctions&quot;}) {
</span><span class="cx">     $setterContent .= $indent . &quot;    if (&quot; . getAutoGetter($name, $parentStyle) . &quot;) {\n&quot;;
</span><span class="cx">     $setterContent .= $indent . &quot;        &quot; . getAutoSetter($name, $style) . &quot;;\n&quot;;
</span><span class="cx">     $setterContent .= $indent . &quot;        return;\n&quot;;
</span><span class="cx">     $setterContent .= $indent . &quot;    }\n&quot;;
</span><ins>+  } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;VisitedLinkColorSupport&quot;}) {
+    $setterContent .= $indent . &quot;    Color color = &quot; . $parentStyle . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Getter&quot;} . &quot;();\n&quot;;
+    if (!exists($propertiesWithStyleBuilderOptions{$name}{&quot;NoDefaultColor&quot;})) {
+      $setterContent .= $indent . &quot;    if (!color.isValid())\n&quot;;
+      $setterContent .= $indent . &quot;        color = &quot; . $parentStyle . &quot;-&gt;color();\n&quot;;
+    }
+    $setterContent .= generateColorValueSetter($name, &quot;color&quot;, $indent . &quot;    &quot;);
+    $didCallSetValue = 1;
</ins><span class="cx">   }
</span><del>-  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;;
</del><ins>+  if (!$didCallSetValue) {
+    my $inheritedValue = $parentStyle . &quot;-&gt;&quot; .  $propertiesWithStyleBuilderOptions{$name}{&quot;Getter&quot;} . &quot;()&quot;;
+    $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(&quot; . $inheritedValue . &quot;);\n&quot;;
+  }
</ins><span class="cx">   $setterContent .= $indent . &quot;}\n&quot;;
</span><span class="cx"> 
</span><span class="cx">   return $setterContent;
</span><span class="lines">@@ -440,7 +511,7 @@
</span><span class="cx">   my $indent = shift;
</span><span class="cx"> 
</span><span class="cx">   my $setterContent = &quot;&quot;;
</span><del>-  $setterContent .= $indent . &quot;inline void applyValue&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver, CSSValue&amp; value)\n&quot;;
</del><ins>+  $setterContent .= $indent . &quot;static void applyValue&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver, CSSValue&amp; value)\n&quot;;
</ins><span class="cx">   $setterContent .= $indent . &quot;{\n&quot;;
</span><span class="cx">   my $convertedValue;
</span><span class="cx">   if (exists($propertiesWithStyleBuilderOptions{$name}{&quot;Converter&quot;})) {
</span><span class="lines">@@ -448,15 +519,27 @@
</span><span class="cx">   } else {
</span><span class="cx">     $convertedValue = &quot;static_cast&lt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;TypeName&quot;} . &quot;&gt;(downcast&lt;CSSPrimitiveValue&gt;(value))&quot;;
</span><span class="cx">   }
</span><ins>+
</ins><span class="cx">   my $style = &quot;styleResolver.style()&quot;;
</span><ins>+  my $didCallSetValue = 0;
</ins><span class="cx">   if (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AutoFunctions&quot;}) {
</span><span class="cx">     $setterContent .= $indent . &quot;    if (downcast&lt;CSSPrimitiveValue&gt;(value).getValueID() == CSSValueAuto) {\n&quot;;
</span><span class="cx">     $setterContent .= $indent . &quot;        &quot;. getAutoSetter($name, $style) . &quot;;\n&quot;;
</span><span class="cx">     $setterContent .= $indent . &quot;        return;\n&quot;;
</span><span class="cx">     $setterContent .= $indent . &quot;    }\n&quot;;
</span><ins>+  } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;VisitedLinkColorSupport&quot;}) {
+      $setterContent .= $indent . &quot;    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);\n&quot;;
+      if ($name eq &quot;color&quot;) {
+        # The &quot;color&quot; property supports &quot;currentColor&quot; value. We should add a parameter.
+        $setterContent .= handleCurrentColorValue($name, &quot;primitiveValue&quot;, $indent . &quot;    &quot;);
+      }
+      $setterContent .= generateColorValueSetter($name, &quot;primitiveValue&quot;, $indent . &quot;    &quot;, VALUE_IS_PRIMITIVE);
+      $didCallSetValue = 1;
</ins><span class="cx">   }
</span><del>-  my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
-  $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(&quot; . $convertedValue . &quot;);\n&quot;;
</del><ins>+  if (!$didCallSetValue) {
+    my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
+    $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(&quot; . $convertedValue . &quot;);\n&quot;;
+  }
</ins><span class="cx">   $setterContent .= $indent . &quot;}\n&quot;;
</span><span class="cx"> 
</span><span class="cx">   return $setterContent;
</span><span class="lines">@@ -478,7 +561,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-namespace StyleBuilderFunctions {
</del><ins>+class StyleBuilderFunctions {
+public:
</ins><span class="cx"> EOF
</span><span class="cx"> 
</span><span class="cx"> foreach my $name (@names) {
</span><span class="lines">@@ -498,7 +582,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> print STYLEBUILDER &lt;&lt; &quot;EOF&quot;;
</span><del>-} // namespace StyleBuilderFunctions
</del><ins>+};
</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>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (177686 => 177687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-12-23 18:04:39 UTC (rev 177686)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-12-23 18:37:21 UTC (rev 177687)
</span><span class="lines">@@ -130,6 +130,7 @@
</span><span class="cx">     friend class RenderSVGResource; // FIXME: Needs to alter the visited state by hand. Should clean the SVG code up and move it into RenderStyle perhaps.
</span><span class="cx">     friend class RenderTreeAsText; // FIXME: Only needed so the render tree can keep lying and dump the wrong colors.  Rebaselining would allow this to be yanked.
</span><span class="cx">     friend class StyleBuilderCustom; // Sets members directly.
</span><ins>+    friend class StyleBuilderFunctions; // Sets members directly.
</ins><span class="cx">     friend class StyleResolver; // Sets members directly.
</span><span class="cx"> 
</span><span class="cx"> public:
</span><span class="lines">@@ -2082,7 +2083,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Color accessors are all private to make sure callers use visitedDependentColor instead to access them.
</span><del>-    Color invalidColor() const { static Color invalid; return invalid; }
</del><ins>+    static Color invalidColor() { static Color invalid; return invalid; }
</ins><span class="cx">     Color borderLeftColor() const { return surround-&gt;border.left().color(); }
</span><span class="cx">     Color borderRightColor() const { return surround-&gt;border.right().color(); }
</span><span class="cx">     Color borderTopColor() const { return surround-&gt;border.top().color(); }
</span></span></pre>
</div>
</div>

</body>
</html>