<!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>[177828] 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/177828">177828</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-12-30 16:53:04 -0800 (Tue, 30 Dec 2014)</dd>
</dl>

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

Reviewed by Darin Adler.

Move font-related CSS properties to the new StyleBuilder
by teaching makeprop.pl how to generate them.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyFont::applyInheritValue): Deleted.
(WebCore::ApplyPropertyFont::applyInitialValue): Deleted.
(WebCore::ApplyPropertyFont::applyValue): Deleted.
(WebCore::ApplyPropertyFont::createHandler): Deleted.
* css/makeprop.pl:
(generateInitialValueSetter):
(generateInheritValueSetter):
(generateValueSetter):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::initialItalic):
(WebCore::FontDescription::initialSmallCaps):
(WebCore::FontDescription::initialKerning):
(WebCore::FontDescription::initialFontSmoothing):
(WebCore::FontDescription::initialTextRenderingMode):</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="#trunkSourceWebCoreplatformgraphicsFontDescriptionh">trunk/Source/WebCore/platform/graphics/FontDescription.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177827 => 177828)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-30 22:25:32 UTC (rev 177827)
+++ trunk/Source/WebCore/ChangeLog        2014-12-31 00:53:04 UTC (rev 177828)
</span><span class="lines">@@ -1,5 +1,33 @@
</span><span class="cx"> 2014-12-30  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Move font-related CSS properties to the new StyleBuilder
+        https://bugs.webkit.org/show_bug.cgi?id=140008
+
+        Reviewed by Darin Adler.
+
+        Move font-related CSS properties to the new StyleBuilder
+        by teaching makeprop.pl how to generate them.
+
+        * css/CSSPropertyNames.in:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        (WebCore::ApplyPropertyFont::applyInheritValue): Deleted.
+        (WebCore::ApplyPropertyFont::applyInitialValue): Deleted.
+        (WebCore::ApplyPropertyFont::applyValue): Deleted.
+        (WebCore::ApplyPropertyFont::createHandler): Deleted.
+        * css/makeprop.pl:
+        (generateInitialValueSetter):
+        (generateInheritValueSetter):
+        (generateValueSetter):
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontDescription::initialItalic):
+        (WebCore::FontDescription::initialSmallCaps):
+        (WebCore::FontDescription::initialKerning):
+        (WebCore::FontDescription::initialFontSmoothing):
+        (WebCore::FontDescription::initialTextRenderingMode):
+
+2014-12-30  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Move '-webkit-font-variant-ligature' CSS property to the new StyleBuilder
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=140007
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (177827 => 177828)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2014-12-30 22:25:32 UTC (rev 177827)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2014-12-31 00:53:04 UTC (rev 177828)
</span><span class="lines">@@ -76,6 +76,10 @@
</span><span class="cx"> // * AnimationProperty:
</span><span class="cx"> // Indicates that this CSS property is an animation / transition property.
</span><span class="cx"> // It must have corresponding methods on the Animation class.
</span><ins>+//
+// * FontProperty:
+// Indicates that this CSS property is font-related. It must have corresponding
+// methods on the FontDescription class.
</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">@@ -86,13 +90,13 @@
</span><span class="cx"> font [Inherited, LegacyStyleBuilder]
</span><span class="cx"> font-family [Inherited, Custom=All]
</span><span class="cx"> font-size [Inherited, LegacyStyleBuilder]
</span><del>-font-style [Inherited, LegacyStyleBuilder]
-font-variant [Inherited, LegacyStyleBuilder]
</del><ins>+font-style [Inherited, FontProperty, TypeName=FontItalic, NameForMethods=Italic]
+font-variant [Inherited, FontProperty, TypeName=FontSmallCaps, NameForMethods=SmallCaps]
</ins><span class="cx"> font-weight [Inherited, Custom=All]
</span><del>-text-rendering [Inherited, LegacyStyleBuilder]
</del><ins>+text-rendering [Inherited, FontProperty, TypeName=TextRenderingMode, NameForMethods=TextRenderingMode]
</ins><span class="cx"> -webkit-font-feature-settings [Inherited, LegacyStyleBuilder]
</span><del>--webkit-font-kerning [Inherited, LegacyStyleBuilder]
--webkit-font-smoothing [Inherited, LegacyStyleBuilder]
</del><ins>+-webkit-font-kerning [Inherited, FontProperty, TypeName=FontDescription::Kerning, NameForMethods=Kerning]
+-webkit-font-smoothing [Inherited, FontProperty, TypeName=FontSmoothingMode]
</ins><span class="cx"> -webkit-font-variant-ligatures [Inherited, Custom=All]
</span><span class="cx"> -webkit-locale [Inherited, Custom=Value]
</span><span class="cx"> -webkit-text-orientation [Inherited, Custom=Value]
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (177827 => 177828)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-12-30 22:25:32 UTC (rev 177827)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-12-31 00:53:04 UTC (rev 177828)
</span><span class="lines">@@ -141,36 +141,6 @@
</span><span class="cx">     static PropertyHandler createHandler() { return PropertyHandler(&amp;applyInheritValue, &amp;applyInitialValue, &amp;applyValue); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template &lt;typename T, T (FontDescription::*getterFunction)() const, void (FontDescription::*setterFunction)(T), T initialValue&gt;
-class ApplyPropertyFont {
-public:
-    static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
-    {
-        FontDescription fontDescription = styleResolver-&gt;fontDescription();
-        (fontDescription.*setterFunction)((styleResolver-&gt;parentFontDescription().*getterFunction)());
-        styleResolver-&gt;setFontDescription(fontDescription);
-    }
-
-    static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
-    {
-        FontDescription fontDescription = styleResolver-&gt;fontDescription();
-        (fontDescription.*setterFunction)(initialValue);
-        styleResolver-&gt;setFontDescription(fontDescription);
-    }
-
-    static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
-    {
-        if (!is&lt;CSSPrimitiveValue&gt;(*value))
-            return;
-        CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-        FontDescription fontDescription = styleResolver-&gt;fontDescription();
-        (fontDescription.*setterFunction)(primitiveValue);
-        styleResolver-&gt;setFontDescription(fontDescription);
-    }
-
-    static PropertyHandler createHandler() { return PropertyHandler(&amp;applyInheritValue, &amp;applyInitialValue, &amp;applyValue); }
-};
-
</del><span class="cx"> class ApplyPropertyFontSize {
</span><span class="cx"> private:
</span><span class="cx">     // When the CSS keyword &quot;larger&quot; is used, this function will attempt to match within the keyword
</span><span class="lines">@@ -336,16 +306,11 @@
</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><span class="cx">     setPropertyHandler(CSSPropertyFontSize, ApplyPropertyFontSize::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont&lt;FontItalic, &amp;FontDescription::italic, &amp;FontDescription::setItalic, FontItalicOff&gt;::createHandler());
-    setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont&lt;FontSmallCaps, &amp;FontDescription::smallCaps, &amp;FontDescription::setSmallCaps, FontSmallCapsOff&gt;::createHandler());
-    setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont&lt;TextRenderingMode, &amp;FontDescription::textRenderingMode, &amp;FontDescription::setTextRenderingMode, AutoTextRendering&gt;::createHandler());
</del><span class="cx"> 
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitBackgroundClip, CSSPropertyBackgroundClip);
</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(CSSPropertyWebkitFontKerning, ApplyPropertyFont&lt;FontDescription::Kerning, &amp;FontDescription::kerning, &amp;FontDescription::setKerning, FontDescription::AutoKerning&gt;::createHandler());
-    setPropertyHandler(CSSPropertyWebkitFontSmoothing, ApplyPropertyFont&lt;FontSmoothingMode, &amp;FontDescription::fontSmoothing, &amp;FontDescription::setFontSmoothing, AutoSmoothing&gt;::createHandler());
</del><span class="cx">     setPropertyHandler(CSSPropertyWebkitMaskClip, ApplyPropertyFillLayer&lt;EFillBox, CSSPropertyWebkitMaskClip, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &amp;FillLayer::isClipSet, &amp;FillLayer::clip, &amp;FillLayer::setClip, &amp;FillLayer::clearClip, &amp;FillLayer::initialFillClip, &amp;CSSToStyleMap::mapFillClip&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitMaskComposite, ApplyPropertyFillLayer&lt;CompositeOperator, CSSPropertyWebkitMaskComposite, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &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(CSSPropertyWebkitMaskOrigin, ApplyPropertyFillLayer&lt;EFillBox, CSSPropertyWebkitMaskOrigin, MaskFillLayer, &amp;RenderStyle::accessMaskLayers, &amp;RenderStyle::maskLayers, &amp;FillLayer::isOriginSet, &amp;FillLayer::origin, &amp;FillLayer::setOrigin, &amp;FillLayer::clearOrigin, &amp;FillLayer::initialFillOrigin, &amp;CSSToStyleMap::mapFillOrigin&gt;::createHandler());
</span></span></pre></div>
<a id="trunkSourceWebCorecssmakeproppl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/makeprop.pl (177827 => 177828)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeprop.pl        2014-12-30 22:25:32 UTC (rev 177827)
+++ trunk/Source/WebCore/css/makeprop.pl        2014-12-31 00:53:04 UTC (rev 177828)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">   AutoFunctions =&gt; 1,
</span><span class="cx">   Converter =&gt; 1,
</span><span class="cx">   Custom =&gt; 1,
</span><ins>+  FontProperty =&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">@@ -562,6 +563,8 @@
</span><span class="cx">   my $name = shift;
</span><span class="cx">   my $indent = shift;
</span><span class="cx"> 
</span><ins>+  my $setter = $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
+  my $initial = $propertiesWithStyleBuilderOptions{$name}{&quot;Initial&quot;};
</ins><span class="cx">   my $setterContent = &quot;&quot;;
</span><span class="cx">   $setterContent .= $indent . &quot;static void applyInitial&quot; . $nameToId{$name} . &quot;(StyleResolver&amp; styleResolver)\n&quot;;
</span><span class="cx">   $setterContent .= $indent . &quot;{\n&quot;;
</span><span class="lines">@@ -569,13 +572,17 @@
</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><span class="cx">   } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;VisitedLinkColorSupport&quot;}) {
</span><del>-      my $initialColor = &quot;RenderStyle::&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Initial&quot;} . &quot;()&quot;;
</del><ins>+      my $initialColor = &quot;RenderStyle::&quot; . $initial . &quot;()&quot;;
</ins><span class="cx">       $setterContent .= generateColorValueSetter($name, $initialColor, $indent . &quot;    &quot;);
</span><span class="cx">   } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AnimationProperty&quot;}) {
</span><span class="cx">     $setterContent .= generateAnimationPropertyInitialValueSetter($name, $indent . &quot;    &quot;);
</span><ins>+  } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;FontProperty&quot;}) {
+    $setterContent .= $indent . &quot;    FontDescription fontDescription = styleResolver.fontDescription();\n&quot;;
+    $setterContent .= $indent . &quot;    fontDescription.&quot; . $setter . &quot;(FontDescription::&quot; . $initial . &quot;());\n&quot;;
+    $setterContent .= $indent . &quot;    styleResolver.setFontDescription(fontDescription);\n&quot;;
</ins><span class="cx">   } else {
</span><del>-    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;;
</del><ins>+    my $setValue = $style . &quot;-&gt;&quot; . $setter;
+    $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(RenderStyle::&quot; . $initial . &quot;());\n&quot;;
</ins><span class="cx">   }
</span><span class="cx">   $setterContent .= $indent . &quot;}\n&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -591,7 +598,8 @@
</span><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><del>-  my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
</del><ins>+  my $getter = $propertiesWithStyleBuilderOptions{$name}{&quot;Getter&quot;};
+  my $setter = $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
</ins><span class="cx">   my $didCallSetValue = 0;
</span><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="lines">@@ -599,7 +607,7 @@
</span><span class="cx">     $setterContent .= $indent . &quot;        return;\n&quot;;
</span><span class="cx">     $setterContent .= $indent . &quot;    }\n&quot;;
</span><span class="cx">   } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;VisitedLinkColorSupport&quot;}) {
</span><del>-    $setterContent .= $indent . &quot;    Color color = &quot; . $parentStyle . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Getter&quot;} . &quot;();\n&quot;;
</del><ins>+    $setterContent .= $indent . &quot;    Color color = &quot; . $parentStyle . &quot;-&gt;&quot; . $getter . &quot;();\n&quot;;
</ins><span class="cx">     if (!exists($propertiesWithStyleBuilderOptions{$name}{&quot;NoDefaultColor&quot;})) {
</span><span class="cx">       $setterContent .= $indent . &quot;    if (!color.isValid())\n&quot;;
</span><span class="cx">       $setterContent .= $indent . &quot;        color = &quot; . $parentStyle . &quot;-&gt;color();\n&quot;;
</span><span class="lines">@@ -609,9 +617,15 @@
</span><span class="cx">   } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AnimationProperty&quot;}) {
</span><span class="cx">     $setterContent .= generateAnimationPropertyInheritValueSetter($name, $indent . &quot;    &quot;);
</span><span class="cx">     $didCallSetValue = 1;
</span><ins>+  } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;FontProperty&quot;}) {
+    $setterContent .= $indent . &quot;    FontDescription fontDescription = styleResolver.fontDescription();\n&quot;;
+    $setterContent .= $indent . &quot;    fontDescription.&quot; . $setter . &quot;(styleResolver.parentFontDescription().&quot; . $getter . &quot;());\n&quot;;
+    $setterContent .= $indent . &quot;    styleResolver.setFontDescription(fontDescription);\n&quot;;
+    $didCallSetValue = 1;
</ins><span class="cx">   }
</span><span class="cx">   if (!$didCallSetValue) {
</span><del>-    my $inheritedValue = $parentStyle . &quot;-&gt;&quot; .  $propertiesWithStyleBuilderOptions{$name}{&quot;Getter&quot;} . &quot;()&quot;;
</del><ins>+    my $inheritedValue = $parentStyle . &quot;-&gt;&quot; .  $getter . &quot;()&quot;;
+    my $setValue = $style . &quot;-&gt;&quot; . $setter;
</ins><span class="cx">     $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(&quot; . $inheritedValue . &quot;);\n&quot;;
</span><span class="cx">   }
</span><span class="cx">   $setterContent .= $indent . &quot;}\n&quot;;
</span><span class="lines">@@ -633,6 +647,7 @@
</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><span class="cx"> 
</span><ins>+  my $setter = $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
</ins><span class="cx">   my $style = &quot;styleResolver.style()&quot;;
</span><span class="cx">   my $didCallSetValue = 0;
</span><span class="cx">   if (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AutoFunctions&quot;}) {
</span><span class="lines">@@ -641,19 +656,24 @@
</span><span class="cx">     $setterContent .= $indent . &quot;        return;\n&quot;;
</span><span class="cx">     $setterContent .= $indent . &quot;    }\n&quot;;
</span><span class="cx">   } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;VisitedLinkColorSupport&quot;}) {
</span><del>-      $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;
</del><ins>+    $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">   } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;AnimationProperty&quot;}) {
</span><del>-      $setterContent .= generateAnimationPropertyValueSetter($name, $indent . &quot;    &quot;);
-      $didCallSetValue = 1;
</del><ins>+    $setterContent .= generateAnimationPropertyValueSetter($name, $indent . &quot;    &quot;);
+    $didCallSetValue = 1;
+  } elsif (exists $propertiesWithStyleBuilderOptions{$name}{&quot;FontProperty&quot;}) {
+    $setterContent .= $indent . &quot;    FontDescription fontDescription = styleResolver.fontDescription();\n&quot;;
+    $setterContent .= $indent . &quot;    fontDescription.&quot; . $setter . &quot;(&quot; . $convertedValue . &quot;);\n&quot;;
+    $setterContent .= $indent . &quot;    styleResolver.setFontDescription(fontDescription);\n&quot;;
+    $didCallSetValue = 1;
</ins><span class="cx">   }
</span><span class="cx">   if (!$didCallSetValue) {
</span><del>-    my $setValue = $style . &quot;-&gt;&quot; . $propertiesWithStyleBuilderOptions{$name}{&quot;Setter&quot;};
</del><ins>+    my $setValue = $style . &quot;-&gt;&quot; . $setter;
</ins><span class="cx">     $setterContent .= $indent . &quot;    &quot; . $setValue . &quot;(&quot; . $convertedValue . &quot;);\n&quot;;
</span><span class="cx">   }
</span><span class="cx">   $setterContent .= $indent . &quot;}\n&quot;;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsFontDescriptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (177827 => 177828)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/FontDescription.h        2014-12-30 22:25:32 UTC (rev 177827)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h        2014-12-31 00:53:04 UTC (rev 177828)
</span><span class="lines">@@ -176,6 +176,13 @@
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    // Initial values for font properties.
+    static FontItalic initialItalic() { return FontItalicOff; }
+    static FontSmallCaps initialSmallCaps() { return FontSmallCapsOff; }
+    static Kerning initialKerning() { return AutoKerning; }
+    static FontSmoothingMode initialFontSmoothing() { return AutoSmoothing; }
+    static TextRenderingMode initialTextRenderingMode() { return AutoTextRendering; }
+
</ins><span class="cx"> private:
</span><span class="cx">     RefCountedArray&lt;AtomicString&gt; m_families;
</span><span class="cx">     RefPtr&lt;FontFeatureSettings&gt; m_featureSettings;
</span></span></pre>
</div>
</div>

</body>
</html>