<!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>[177915] 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/177915">177915</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-01-05 10:29:41 -0800 (Mon, 05 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Get rid of some unnecessary custom StyleBuilder code
https://bugs.webkit.org/show_bug.cgi?id=140058

Reviewed by Darin Adler.

Get rid of some unnecessary custom StyleBuilder code. The generator is
now able to generate this code just fine.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::StyleBuilderConverter::convertWordSpacing):
(WebCore::StyleBuilderConverter::convertPerspective):
(WebCore::StyleBuilderConverter::convertMarqueeIncrement):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::convertLineHeight):
(WebCore::StyleBuilderCustom::applyValueWebkitMarqueeIncrement): Deleted.
(WebCore::StyleBuilderCustom::csstoLengthConversionDataWithTextZoomFactor): Deleted.
(WebCore::StyleBuilderCustom::applyValueWordSpacing): Deleted.
(WebCore::StyleBuilderCustom::applyValueWebkitPerspective): Deleted.</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="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderCustomh">trunk/Source/WebCore/css/StyleBuilderCustom.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177914 => 177915)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-05 18:17:11 UTC (rev 177914)
+++ trunk/Source/WebCore/ChangeLog        2015-01-05 18:29:41 UTC (rev 177915)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2015-01-05  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Get rid of some unnecessary custom StyleBuilder code
+        https://bugs.webkit.org/show_bug.cgi?id=140058
+
+        Reviewed by Darin Adler.
+
+        Get rid of some unnecessary custom StyleBuilder code. The generator is
+        now able to generate this code just fine.
+
+        * css/CSSPropertyNames.in:
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
+        (WebCore::StyleBuilderConverter::convertWordSpacing):
+        (WebCore::StyleBuilderConverter::convertPerspective):
+        (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
+        * css/StyleBuilderCustom.h:
+        (WebCore::StyleBuilderCustom::convertLineHeight):
+        (WebCore::StyleBuilderCustom::applyValueWebkitMarqueeIncrement): Deleted.
+        (WebCore::StyleBuilderCustom::csstoLengthConversionDataWithTextZoomFactor): Deleted.
+        (WebCore::StyleBuilderCustom::applyValueWordSpacing): Deleted.
+        (WebCore::StyleBuilderCustom::applyValueWebkitPerspective): Deleted.
+
</ins><span class="cx"> 2014-12-23  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac] Cannot scroll when a non-scrollable iframe is contained inside a scrollable iframe
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (177914 => 177915)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2015-01-05 18:17:11 UTC (rev 177914)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2015-01-05 18:29:41 UTC (rev 177915)
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx"> width [Initial=initialSize, Converter=LengthSizing]
</span><span class="cx"> word-break [Inherited]
</span><span class="cx"> -epub-word-break = word-break
</span><del>-word-spacing [Inherited, Custom=Value]
</del><ins>+word-spacing [Inherited, ConditionalConverter=WordSpacing, TypeName=Length]
</ins><span class="cx"> word-wrap [Inherited=EOverflowWrap, NameForMethods=OverflowWrap]
</span><span class="cx"> z-index [TypeName=int, AutoFunctions]
</span><span class="cx"> alt [LegacyStyleBuilder]
</span><span class="lines">@@ -469,7 +469,7 @@
</span><span class="cx"> -webkit-margin-start [LegacyStyleBuilder]
</span><span class="cx"> -webkit-marquee [LegacyStyleBuilder]
</span><span class="cx"> -webkit-marquee-direction
</span><del>--webkit-marquee-increment [Custom=Value]
</del><ins>+-webkit-marquee-increment [ConditionalConverter=MarqueeIncrement, TypeName=Length]
</ins><span class="cx"> -webkit-marquee-repetition [NameForMethods=MarqueeLoopCount, Converter=MarqueeRepetition]
</span><span class="cx"> -webkit-marquee-speed [Converter=MarqueeSpeed]
</span><span class="cx"> -webkit-marquee-style [TypeName=EMarqueeBehavior, NameForMethods=MarqueeBehavior]
</span><span class="lines">@@ -503,7 +503,7 @@
</span><span class="cx"> -webkit-padding-before [LegacyStyleBuilder]
</span><span class="cx"> -webkit-padding-end [LegacyStyleBuilder]
</span><span class="cx"> -webkit-padding-start [LegacyStyleBuilder]
</span><del>--webkit-perspective [Custom=Value]
</del><ins>+-webkit-perspective [ConditionalConverter=Perspective, TypeName=float]
</ins><span class="cx"> -webkit-perspective-origin [LegacyStyleBuilder]
</span><span class="cx"> -webkit-perspective-origin-x [Converter=Length]
</span><span class="cx"> -webkit-perspective-origin-y [Converter=Length]
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (177914 => 177915)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2015-01-05 18:17:11 UTC (rev 177914)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2015-01-05 18:29:41 UTC (rev 177915)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &quot;CSSImageValue.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValue.h&quot;
</span><span class="cx"> #include &quot;CSSReflectValue.h&quot;
</span><ins>+#include &quot;Frame.h&quot;
</ins><span class="cx"> #include &quot;Length.h&quot;
</span><span class="cx"> #include &quot;Pair.h&quot;
</span><span class="cx"> #include &quot;QuotesData.h&quot;
</span><span class="lines">@@ -86,6 +87,9 @@
</span><span class="cx">     static bool convertGridPosition(StyleResolver&amp;, CSSValue&amp;, GridPosition&amp;);
</span><span class="cx">     static GridAutoFlow convertGridAutoFlow(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx"> #endif // ENABLE(CSS_GRID_LAYOUT)
</span><ins>+    static bool convertWordSpacing(StyleResolver&amp;, CSSValue&amp;, Length&amp;);
+    static bool convertPerspective(StyleResolver&amp;, CSSValue&amp;, float&amp;);
+    static bool convertMarqueeIncrement(StyleResolver&amp;, CSSValue&amp;, Length&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     friend class StyleBuilderCustom;
</span><span class="lines">@@ -100,6 +104,7 @@
</span><span class="cx">     static bool createGridPosition(CSSValue&amp;, GridPosition&amp;);
</span><span class="cx">     static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap&amp;, NamedGridLinesMap&amp;, GridTrackSizingDirection);
</span><span class="cx"> #endif // ENABLE(CSS_GRID_LAYOUT)
</span><ins>+    static CSSToLengthConversionData csstoLengthConversionDataWithTextZoomFactor(StyleResolver&amp;);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline Length StyleBuilderConverter::convertLength(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</span><span class="lines">@@ -852,6 +857,73 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> 
</span><ins>+inline CSSToLengthConversionData StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor(StyleResolver&amp; styleResolver)
+{
+    if (auto* frame = styleResolver.document().frame())
+        return styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(styleResolver.style()-&gt;effectiveZoom() * frame-&gt;textZoomFactor());
+
+    return styleResolver.state().cssToLengthConversionData();
+}
+
+inline bool StyleBuilderConverter::convertWordSpacing(StyleResolver&amp; styleResolver, CSSValue&amp; value, Length&amp; wordSpacing)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueNormal)
+        wordSpacing = RenderStyle::initialWordSpacing();
+    else if (primitiveValue.isLength())
+        wordSpacing = primitiveValue.computeLength&lt;Length&gt;(csstoLengthConversionDataWithTextZoomFactor(styleResolver));
+    else if (primitiveValue.isPercentage())
+        wordSpacing = Length(clampTo&lt;float&gt;(primitiveValue.getDoubleValue(), minValueForCssLength, maxValueForCssLength), Percent);
+    else if (primitiveValue.isNumber())
+        wordSpacing = Length(primitiveValue.getDoubleValue(), Fixed);
+    else
+        return false;
+
+    return true;
+}
+
+inline bool StyleBuilderConverter::convertPerspective(StyleResolver&amp; styleResolver, CSSValue&amp; value, float&amp; perspective)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    if (primitiveValue.getValueID() == CSSValueNone) {
+        perspective = 0;
+        return true;
+    }
+
+    if (primitiveValue.isLength())
+        perspective = primitiveValue.computeLength&lt;float&gt;(styleResolver.state().cssToLengthConversionData());
+    else if (primitiveValue.isNumber())
+        perspective = primitiveValue.getDoubleValue() * styleResolver.state().cssToLengthConversionData().zoom();
+    else {
+        ASSERT_NOT_REACHED();
+        return false;
+    }
+
+    return perspective &gt;= 0;
+}
+
+inline bool StyleBuilderConverter::convertMarqueeIncrement(StyleResolver&amp; styleResolver, CSSValue&amp; value, Length&amp; marqueeLength)
+{
+    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+    switch (primitiveValue.getValueID()) {
+    case CSSValueSmall:
+        marqueeLength = Length(1, Fixed); // 1px.
+        return true;
+    case CSSValueNormal:
+        marqueeLength = Length(6, Fixed); // 6px. The WinIE default.
+        return true;
+    case CSSValueLarge:
+        marqueeLength = Length(36, Fixed); // 36px.
+        return true;
+    case CSSValueInvalid:
+        marqueeLength = primitiveValue.convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion&gt;(styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f));
+        return !marqueeLength.isUndefined();
+    default:
+        break;
+    }
+    return false;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // StyleBuilderConverter_h
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (177914 => 177915)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderCustom.h        2015-01-05 18:17:11 UTC (rev 177914)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h        2015-01-05 18:29:41 UTC (rev 177915)
</span><span class="lines">@@ -102,15 +102,11 @@
</span><span class="cx">     static void applyValueVerticalAlign(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static void applyValueWebkitJustifySelf(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static void applyValueWebkitLocale(StyleResolver&amp;, CSSValue&amp;);
</span><del>-    static void applyValueWebkitMarqueeIncrement(StyleResolver&amp;, CSSValue&amp;);
-    static void applyValueWebkitPerspective(StyleResolver&amp;, CSSValue&amp;);
</del><span class="cx">     static void applyValueWebkitTextOrientation(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static void applyValueWebkitWritingMode(StyleResolver&amp;, CSSValue&amp;);
</span><del>-    static void applyValueWordSpacing(StyleResolver&amp;, CSSValue&amp;);
</del><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static void resetEffectiveZoom(StyleResolver&amp;);
</span><del>-    static CSSToLengthConversionData csstoLengthConversionDataWithTextZoomFactor(StyleResolver&amp;);
</del><span class="cx">     static bool convertLineHeight(StyleResolver&amp;, const CSSValue&amp;, Length&amp;, float multiplier = 1.f);
</span><span class="cx"> 
</span><span class="cx">     static Length mmLength(double mm);
</span><span class="lines">@@ -132,30 +128,6 @@
</span><span class="cx">     static float determineRubyTextSizeMultiplier(StyleResolver&amp;);
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-inline void StyleBuilderCustom::applyValueWebkitMarqueeIncrement(StyleResolver&amp; styleResolver, CSSValue&amp; value)
-{
-    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
-    Length marqueeLength(Undefined);
-    switch (primitiveValue.getValueID()) {
-    case CSSValueSmall:
-        marqueeLength = Length(1, Fixed); // 1px.
-        break;
-    case CSSValueNormal:
-        marqueeLength = Length(6, Fixed); // 6px. The WinIE default.
-        break;
-    case CSSValueLarge:
-        marqueeLength = Length(36, Fixed); // 36px.
-        break;
-    case CSSValueInvalid:
-        marqueeLength = primitiveValue.convertToLength&lt;FixedIntegerConversion | PercentConversion | CalculatedConversion&gt;(styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(1.0f));
-        break;
-    default:
-        break;
-    }
-    if (!marqueeLength.isUndefined())
-        styleResolver.style()-&gt;setMarqueeIncrement(marqueeLength);
-}
-
</del><span class="cx"> inline void StyleBuilderCustom::applyValueDirection(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</span><span class="cx"> {
</span><span class="cx">     styleResolver.style()-&gt;setDirection(downcast&lt;CSSPrimitiveValue&gt;(value));
</span><span class="lines">@@ -560,14 +532,6 @@
</span><span class="cx"> DEFINE_BORDER_IMAGE_MODIFIER_HANDLER(WebkitMaskBoxImage, Slice)
</span><span class="cx"> DEFINE_BORDER_IMAGE_MODIFIER_HANDLER(WebkitMaskBoxImage, Width)
</span><span class="cx"> 
</span><del>-inline CSSToLengthConversionData StyleBuilderCustom::csstoLengthConversionDataWithTextZoomFactor(StyleResolver&amp; styleResolver)
-{
-    if (Frame* frame = styleResolver.document().frame())
-        return styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(styleResolver.style()-&gt;effectiveZoom() * frame-&gt;textZoomFactor());
-
-    return styleResolver.state().cssToLengthConversionData();
-}
-
</del><span class="cx"> inline bool StyleBuilderCustom::convertLineHeight(StyleResolver&amp; styleResolver, const CSSValue&amp; value, Length&amp; length, float multiplier)
</span><span class="cx"> {
</span><span class="cx">     auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
</span><span class="lines">@@ -576,7 +540,7 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     if (primitiveValue.isLength()) {
</span><del>-        length = primitiveValue.computeLength&lt;Length&gt;(csstoLengthConversionDataWithTextZoomFactor(styleResolver));
</del><ins>+        length = primitiveValue.computeLength&lt;Length&gt;(StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor(styleResolver));
</ins><span class="cx">         if (multiplier != 1.f)
</span><span class="cx">             length = Length(length.value() * multiplier, Fixed);
</span><span class="cx">         return true;
</span><span class="lines">@@ -594,24 +558,6 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void StyleBuilderCustom::applyValueWordSpacing(StyleResolver&amp; styleResolver, CSSValue&amp; value)
-{
-    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
-
-    Length wordSpacing;
-    if (primitiveValue.getValueID() == CSSValueNormal)
-        wordSpacing = RenderStyle::initialWordSpacing();
-    else if (primitiveValue.isLength())
-        wordSpacing = primitiveValue.computeLength&lt;Length&gt;(csstoLengthConversionDataWithTextZoomFactor(styleResolver));
-    else if (primitiveValue.isPercentage())
-        wordSpacing = Length(clampTo&lt;float&gt;(primitiveValue.getDoubleValue(), minValueForCssLength, maxValueForCssLength), Percent);
-    else if (primitiveValue.isNumber())
-        wordSpacing = Length(primitiveValue.getDoubleValue(), Fixed);
-    else
-        return;
-    styleResolver.style()-&gt;setWordSpacing(wordSpacing);
-}
-
</del><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx"> 
</span><span class="cx"> inline void StyleBuilderCustom::applyInheritLineHeight(StyleResolver&amp; styleResolver)
</span><span class="lines">@@ -743,31 +689,6 @@
</span><span class="cx">         styleResolver.style()-&gt;setJustifySelf(primitiveValue);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void StyleBuilderCustom::applyValueWebkitPerspective(StyleResolver&amp; styleResolver, CSSValue&amp; value)
-{
-    auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
-
-    if (primitiveValue.getValueID() == CSSValueNone) {
-        styleResolver.style()-&gt;setPerspective(0);
-        return;
-    }
-
-    float perspectiveValue;
-    if (primitiveValue.isLength())
-        perspectiveValue = primitiveValue.computeLength&lt;float&gt;(styleResolver.state().cssToLengthConversionData());
-    else if (primitiveValue.isNumber()) {
-        // For backward compatibility, treat valueless numbers as px.
-        Ref&lt;CSSPrimitiveValue&gt; value(CSSPrimitiveValue::create(primitiveValue.getDoubleValue(), CSSPrimitiveValue::CSS_PX));
-        perspectiveValue = value.get().computeLength&lt;float&gt;(styleResolver.state().cssToLengthConversionData());
-    } else {
-        ASSERT_NOT_REACHED();
-        return;
-    }
-
-    if (perspectiveValue &gt;= 0.0f)
-        styleResolver.style()-&gt;setPerspective(perspectiveValue);
-}
-
</del><span class="cx"> template &lt;CSSPropertyID id&gt;
</span><span class="cx"> inline void StyleBuilderCustom::applyTextOrBoxShadowValue(StyleResolver&amp; styleResolver, CSSValue&amp; value)
</span><span class="cx"> {
</span></span></pre>
</div>
</div>

</body>
</html>