<!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 <cdumez@apple.com>
</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 <cdumez@apple.com>
+
</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(&applyInheritValue, &applyInitialValue, &applyValue); }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-template <typename T, T (FontDescription::*getterFunction)() const, void (FontDescription::*setterFunction)(T), T initialValue>
-class ApplyPropertyFont {
-public:
- static void applyInheritValue(CSSPropertyID, StyleResolver* styleResolver)
- {
- FontDescription fontDescription = styleResolver->fontDescription();
- (fontDescription.*setterFunction)((styleResolver->parentFontDescription().*getterFunction)());
- styleResolver->setFontDescription(fontDescription);
- }
-
- static void applyInitialValue(CSSPropertyID, StyleResolver* styleResolver)
- {
- FontDescription fontDescription = styleResolver->fontDescription();
- (fontDescription.*setterFunction)(initialValue);
- styleResolver->setFontDescription(fontDescription);
- }
-
- static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
- {
- if (!is<CSSPrimitiveValue>(*value))
- return;
- CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(*value);
- FontDescription fontDescription = styleResolver->fontDescription();
- (fontDescription.*setterFunction)(primitiveValue);
- styleResolver->setFontDescription(fontDescription);
- }
-
- static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); }
-};
-
</del><span class="cx"> class ApplyPropertyFontSize {
</span><span class="cx"> private:
</span><span class="cx"> // When the CSS keyword "larger" 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<EFillRepeat, CSSPropertyBackgroundRepeatY, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSToStyleMap::mapFillRepeatY>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyBackgroundSize, ApplyPropertyFillLayer<FillSize, CSSPropertyBackgroundSize, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSToStyleMap::mapFillSize>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyFontSize, ApplyPropertyFontSize::createHandler());
</span><del>- setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont<FontItalic, &FontDescription::italic, &FontDescription::setItalic, FontItalicOff>::createHandler());
- setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont<FontSmallCaps, &FontDescription::smallCaps, &FontDescription::setSmallCaps, FontSmallCapsOff>::createHandler());
- setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont<TextRenderingMode, &FontDescription::textRenderingMode, &FontDescription::setTextRenderingMode, AutoTextRendering>::createHandler());
</del><span class="cx">
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitBackgroundClip, CSSPropertyBackgroundClip);
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitBackgroundComposite, BackgroundFillLayer, &RenderStyle::accessBackgroundLayers, &RenderStyle::backgroundLayers, &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSToStyleMap::mapFillComposite>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin);
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize);
</span><del>- setPropertyHandler(CSSPropertyWebkitFontKerning, ApplyPropertyFont<FontDescription::Kerning, &FontDescription::kerning, &FontDescription::setKerning, FontDescription::AutoKerning>::createHandler());
- setPropertyHandler(CSSPropertyWebkitFontSmoothing, ApplyPropertyFont<FontSmoothingMode, &FontDescription::fontSmoothing, &FontDescription::setFontSmoothing, AutoSmoothing>::createHandler());
</del><span class="cx"> setPropertyHandler(CSSPropertyWebkitMaskClip, ApplyPropertyFillLayer<EFillBox, CSSPropertyWebkitMaskClip, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isClipSet, &FillLayer::clip, &FillLayer::setClip, &FillLayer::clearClip, &FillLayer::initialFillClip, &CSSToStyleMap::mapFillClip>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitMaskComposite, ApplyPropertyFillLayer<CompositeOperator, CSSPropertyWebkitMaskComposite, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSToStyleMap::mapFillComposite>::createHandler());
</span><span class="cx"> setPropertyHandler(CSSPropertyWebkitMaskOrigin, ApplyPropertyFillLayer<EFillBox, CSSPropertyWebkitMaskOrigin, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isOriginSet, &FillLayer::origin, &FillLayer::setOrigin, &FillLayer::clearOrigin, &FillLayer::initialFillOrigin, &CSSToStyleMap::mapFillOrigin>::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 => 1,
</span><span class="cx"> Converter => 1,
</span><span class="cx"> Custom => 1,
</span><ins>+ FontProperty => 1,
</ins><span class="cx"> Getter => 1,
</span><span class="cx"> Initial => 1,
</span><span class="cx"> NameForMethods => 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}{"Setter"};
+ my $initial = $propertiesWithStyleBuilderOptions{$name}{"Initial"};
</ins><span class="cx"> my $setterContent = "";
</span><span class="cx"> $setterContent .= $indent . "static void applyInitial" . $nameToId{$name} . "(StyleResolver& styleResolver)\n";
</span><span class="cx"> $setterContent .= $indent . "{\n";
</span><span class="lines">@@ -569,13 +572,17 @@
</span><span class="cx"> if (exists $propertiesWithStyleBuilderOptions{$name}{"AutoFunctions"}) {
</span><span class="cx"> $setterContent .= $indent . " " . getAutoSetter($name, $style) . ";\n";
</span><span class="cx"> } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"VisitedLinkColorSupport"}) {
</span><del>- my $initialColor = "RenderStyle::" . $propertiesWithStyleBuilderOptions{$name}{"Initial"} . "()";
</del><ins>+ my $initialColor = "RenderStyle::" . $initial . "()";
</ins><span class="cx"> $setterContent .= generateColorValueSetter($name, $initialColor, $indent . " ");
</span><span class="cx"> } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"AnimationProperty"}) {
</span><span class="cx"> $setterContent .= generateAnimationPropertyInitialValueSetter($name, $indent . " ");
</span><ins>+ } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"FontProperty"}) {
+ $setterContent .= $indent . " FontDescription fontDescription = styleResolver.fontDescription();\n";
+ $setterContent .= $indent . " fontDescription." . $setter . "(FontDescription::" . $initial . "());\n";
+ $setterContent .= $indent . " styleResolver.setFontDescription(fontDescription);\n";
</ins><span class="cx"> } else {
</span><del>- my $setValue = $style . "->" . $propertiesWithStyleBuilderOptions{$name}{"Setter"};
- $setterContent .= $indent . " " . $setValue . "(RenderStyle::" . $propertiesWithStyleBuilderOptions{$name}{"Initial"} . "());\n";
</del><ins>+ my $setValue = $style . "->" . $setter;
+ $setterContent .= $indent . " " . $setValue . "(RenderStyle::" . $initial . "());\n";
</ins><span class="cx"> }
</span><span class="cx"> $setterContent .= $indent . "}\n";
</span><span class="cx">
</span><span class="lines">@@ -591,7 +598,8 @@
</span><span class="cx"> $setterContent .= $indent . "{\n";
</span><span class="cx"> my $parentStyle = "styleResolver.parentStyle()";
</span><span class="cx"> my $style = "styleResolver.style()";
</span><del>- my $setValue = $style . "->" . $propertiesWithStyleBuilderOptions{$name}{"Setter"};
</del><ins>+ my $getter = $propertiesWithStyleBuilderOptions{$name}{"Getter"};
+ my $setter = $propertiesWithStyleBuilderOptions{$name}{"Setter"};
</ins><span class="cx"> my $didCallSetValue = 0;
</span><span class="cx"> if (exists $propertiesWithStyleBuilderOptions{$name}{"AutoFunctions"}) {
</span><span class="cx"> $setterContent .= $indent . " if (" . getAutoGetter($name, $parentStyle) . ") {\n";
</span><span class="lines">@@ -599,7 +607,7 @@
</span><span class="cx"> $setterContent .= $indent . " return;\n";
</span><span class="cx"> $setterContent .= $indent . " }\n";
</span><span class="cx"> } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"VisitedLinkColorSupport"}) {
</span><del>- $setterContent .= $indent . " Color color = " . $parentStyle . "->" . $propertiesWithStyleBuilderOptions{$name}{"Getter"} . "();\n";
</del><ins>+ $setterContent .= $indent . " Color color = " . $parentStyle . "->" . $getter . "();\n";
</ins><span class="cx"> if (!exists($propertiesWithStyleBuilderOptions{$name}{"NoDefaultColor"})) {
</span><span class="cx"> $setterContent .= $indent . " if (!color.isValid())\n";
</span><span class="cx"> $setterContent .= $indent . " color = " . $parentStyle . "->color();\n";
</span><span class="lines">@@ -609,9 +617,15 @@
</span><span class="cx"> } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"AnimationProperty"}) {
</span><span class="cx"> $setterContent .= generateAnimationPropertyInheritValueSetter($name, $indent . " ");
</span><span class="cx"> $didCallSetValue = 1;
</span><ins>+ } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"FontProperty"}) {
+ $setterContent .= $indent . " FontDescription fontDescription = styleResolver.fontDescription();\n";
+ $setterContent .= $indent . " fontDescription." . $setter . "(styleResolver.parentFontDescription()." . $getter . "());\n";
+ $setterContent .= $indent . " styleResolver.setFontDescription(fontDescription);\n";
+ $didCallSetValue = 1;
</ins><span class="cx"> }
</span><span class="cx"> if (!$didCallSetValue) {
</span><del>- my $inheritedValue = $parentStyle . "->" . $propertiesWithStyleBuilderOptions{$name}{"Getter"} . "()";
</del><ins>+ my $inheritedValue = $parentStyle . "->" . $getter . "()";
+ my $setValue = $style . "->" . $setter;
</ins><span class="cx"> $setterContent .= $indent . " " . $setValue . "(" . $inheritedValue . ");\n";
</span><span class="cx"> }
</span><span class="cx"> $setterContent .= $indent . "}\n";
</span><span class="lines">@@ -633,6 +647,7 @@
</span><span class="cx"> $convertedValue = "static_cast<" . $propertiesWithStyleBuilderOptions{$name}{"TypeName"} . ">(downcast<CSSPrimitiveValue>(value))";
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ my $setter = $propertiesWithStyleBuilderOptions{$name}{"Setter"};
</ins><span class="cx"> my $style = "styleResolver.style()";
</span><span class="cx"> my $didCallSetValue = 0;
</span><span class="cx"> if (exists $propertiesWithStyleBuilderOptions{$name}{"AutoFunctions"}) {
</span><span class="lines">@@ -641,19 +656,24 @@
</span><span class="cx"> $setterContent .= $indent . " return;\n";
</span><span class="cx"> $setterContent .= $indent . " }\n";
</span><span class="cx"> } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"VisitedLinkColorSupport"}) {
</span><del>- $setterContent .= $indent . " auto& primitiveValue = downcast<CSSPrimitiveValue>(value);\n";
- if ($name eq "color") {
- # The "color" property supports "currentColor" value. We should add a parameter.
- $setterContent .= handleCurrentColorValue($name, "primitiveValue", $indent . " ");
- }
- $setterContent .= generateColorValueSetter($name, "primitiveValue", $indent . " ", VALUE_IS_PRIMITIVE);
- $didCallSetValue = 1;
</del><ins>+ $setterContent .= $indent . " auto& primitiveValue = downcast<CSSPrimitiveValue>(value);\n";
+ if ($name eq "color") {
+ # The "color" property supports "currentColor" value. We should add a parameter.
+ $setterContent .= handleCurrentColorValue($name, "primitiveValue", $indent . " ");
+ }
+ $setterContent .= generateColorValueSetter($name, "primitiveValue", $indent . " ", VALUE_IS_PRIMITIVE);
+ $didCallSetValue = 1;
</ins><span class="cx"> } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"AnimationProperty"}) {
</span><del>- $setterContent .= generateAnimationPropertyValueSetter($name, $indent . " ");
- $didCallSetValue = 1;
</del><ins>+ $setterContent .= generateAnimationPropertyValueSetter($name, $indent . " ");
+ $didCallSetValue = 1;
+ } elsif (exists $propertiesWithStyleBuilderOptions{$name}{"FontProperty"}) {
+ $setterContent .= $indent . " FontDescription fontDescription = styleResolver.fontDescription();\n";
+ $setterContent .= $indent . " fontDescription." . $setter . "(" . $convertedValue . ");\n";
+ $setterContent .= $indent . " styleResolver.setFontDescription(fontDescription);\n";
+ $didCallSetValue = 1;
</ins><span class="cx"> }
</span><span class="cx"> if (!$didCallSetValue) {
</span><del>- my $setValue = $style . "->" . $propertiesWithStyleBuilderOptions{$name}{"Setter"};
</del><ins>+ my $setValue = $style . "->" . $setter;
</ins><span class="cx"> $setterContent .= $indent . " " . $setValue . "(" . $convertedValue . ");\n";
</span><span class="cx"> }
</span><span class="cx"> $setterContent .= $indent . "}\n";
</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<AtomicString> m_families;
</span><span class="cx"> RefPtr<FontFeatureSettings> m_featureSettings;
</span></span></pre>
</div>
</div>
</body>
</html>