<!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>[159907] 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/159907">159907</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2013-12-01 18:47:40 -0800 (Sun, 01 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make more computed style helpers return PassRef.
&lt;https://webkit.org/b/125043&gt;

Reduce branchiness in computed style code by making more of the
file-local helpers return PassRef instead of PassRefPtr.

Reviewed by Anders Carlsson.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (159906 => 159907)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2013-12-02 01:53:39 UTC (rev 159906)
+++ trunk/Source/WebCore/ChangeLog        2013-12-02 02:47:40 UTC (rev 159907)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2013-12-01  Andreas Kling  &lt;akling@apple.com&gt;
+
+        Make more computed style helpers return PassRef.
+        &lt;https://webkit.org/b/125043&gt;
+
+        Reduce branchiness in computed style code by making more of the
+        file-local helpers return PassRef instead of PassRefPtr.
+
+        Reviewed by Anders Carlsson.
+
</ins><span class="cx"> 2013-11-30  Ryuan Choi  &lt;ryuan.choi@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Implement scrollbarThickness for opaque scrollbar
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (159906 => 159907)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2013-12-02 01:53:39 UTC (rev 159906)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2013-12-02 02:47:40 UTC (rev 159907)
</span><span class="lines">@@ -600,24 +600,24 @@
</span><span class="cx">     return createBorderImageValue(imageValue.release(), imageSlices.release(), borderSlices.release(), outset.release(), repeat.release());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline static PassRefPtr&lt;CSSPrimitiveValue&gt; zoomAdjustedPixelValue(double value, const RenderStyle* style)
</del><ins>+inline static PassRef&lt;CSSPrimitiveValue&gt; zoomAdjustedPixelValue(double value, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline static PassRefPtr&lt;CSSPrimitiveValue&gt; zoomAdjustedNumberValue(double value, const RenderStyle* style)
</del><ins>+inline static PassRef&lt;CSSPrimitiveValue&gt; zoomAdjustedNumberValue(double value, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     return cssValuePool().createValue(value / style-&gt;effectiveZoom(), CSSPrimitiveValue::CSS_NUMBER);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; zoomAdjustedPixelValueForLength(const Length&amp; length, const RenderStyle* style)
</del><ins>+static PassRef&lt;CSSValue&gt; zoomAdjustedPixelValueForLength(const Length&amp; length, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     if (length.isFixed())
</span><span class="cx">         return zoomAdjustedPixelValue(length.value(), style);
</span><span class="cx">     return cssValuePool().createValue(length);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForReflection(const StyleReflection* reflection, const RenderStyle* style)
</del><ins>+static PassRef&lt;CSSValue&gt; valueForReflection(const StyleReflection* reflection, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     if (!reflection)
</span><span class="cx">         return cssValuePool().createIdentifierValue(CSSValueNone);
</span><span class="lines">@@ -647,20 +647,20 @@
</span><span class="cx">     return CSSReflectValue::create(direction.release(), offset.release(), valueForNinePieceImage(reflection-&gt;mask()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValueList&gt; createPositionListForLayer(CSSPropertyID propertyID, const FillLayer* layer, const RenderStyle* style)
</del><ins>+static PassRef&lt;CSSValueList&gt; createPositionListForLayer(CSSPropertyID propertyID, const FillLayer* layer, const RenderStyle* style)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; positionList = CSSValueList::createSpaceSeparated();
</del><ins>+    auto positionList = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     if (layer-&gt;isBackgroundOriginSet()) {
</span><span class="cx">         ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
</span><del>-        positionList-&gt;append(cssValuePool().createValue(layer-&gt;backgroundXOrigin()));
</del><ins>+        positionList.get().append(cssValuePool().createValue(layer-&gt;backgroundXOrigin()));
</ins><span class="cx">     }
</span><del>-    positionList-&gt;append(zoomAdjustedPixelValueForLength(layer-&gt;xPosition(), style));
</del><ins>+    positionList.get().append(zoomAdjustedPixelValueForLength(layer-&gt;xPosition(), style));
</ins><span class="cx">     if (layer-&gt;isBackgroundOriginSet()) {
</span><span class="cx">         ASSERT(propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
</span><del>-        positionList-&gt;append(cssValuePool().createValue(layer-&gt;backgroundYOrigin()));
</del><ins>+        positionList.get().append(cssValuePool().createValue(layer-&gt;backgroundYOrigin()));
</ins><span class="cx">     }
</span><del>-    positionList-&gt;append(zoomAdjustedPixelValueForLength(layer-&gt;yPosition(), style));
-    return positionList.release();
</del><ins>+    positionList.get().append(zoomAdjustedPixelValueForLength(layer-&gt;yPosition(), style));
+    return positionList;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static PassRefPtr&lt;CSSValue&gt; getPositionOffsetValue(RenderStyle* style, CSSPropertyID propertyID, RenderView* renderView)
</span><span class="lines">@@ -712,21 +712,21 @@
</span><span class="cx">     return cssValuePool().createColorValue(color.rgb());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValueList&gt; getBorderRadiusCornerValues(const LengthSize&amp; radius, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValueList&gt; getBorderRadiusCornerValues(const LengthSize&amp; radius, const RenderStyle* style, RenderView* renderView)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</del><ins>+    auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     if (radius.width().type() == Percent)
</span><del>-        list-&gt;append(cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
</del><ins>+        list.get().append(cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
</ins><span class="cx">     else
</span><del>-        list-&gt;append(zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style));
</del><ins>+        list.get().append(zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style));
</ins><span class="cx">     if (radius.height().type() == Percent)
</span><del>-        list-&gt;append(cssValuePool().createValue(radius.height().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
</del><ins>+        list.get().append(cssValuePool().createValue(radius.height().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
</ins><span class="cx">     else
</span><del>-        list-&gt;append(zoomAdjustedPixelValue(valueForLength(radius.height(), 0, renderView), style));
-    return list.release();
</del><ins>+        list.get().append(zoomAdjustedPixelValue(valueForLength(radius.height(), 0, renderView), style));
+    return list;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; getBorderRadiusCornerValue(const LengthSize&amp; radius, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValue&gt; getBorderRadiusCornerValue(const LengthSize&amp; radius, const RenderStyle* style, RenderView* renderView)
</ins><span class="cx"> {
</span><span class="cx">     if (radius.width() == radius.height()) {
</span><span class="cx">         if (radius.width().type() == Percent)
</span><span class="lines">@@ -736,9 +736,9 @@
</span><span class="cx">     return getBorderRadiusCornerValues(radius, style, renderView);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValueList&gt; getBorderRadiusShorthandValue(const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValueList&gt; getBorderRadiusShorthandValue(const RenderStyle* style, RenderView* renderView)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSlashSeparated();
</del><ins>+    auto list = CSSValueList::createSlashSeparated();
</ins><span class="cx">     bool showHorizontalBottomLeft = style-&gt;borderTopRightRadius().width() != style-&gt;borderBottomLeftRadius().width();
</span><span class="cx">     bool showHorizontalBottomRight = showHorizontalBottomLeft || (style-&gt;borderBottomRightRadius().width() != style-&gt;borderTopLeftRadius().width());
</span><span class="cx">     bool showHorizontalTopRight = showHorizontalBottomRight || (style-&gt;borderTopRightRadius().width() != style-&gt;borderTopLeftRadius().width());
</span><span class="lines">@@ -762,7 +762,7 @@
</span><span class="cx">     if (showHorizontalBottomLeft)
</span><span class="cx">         horizontalRadii-&gt;append(bottomLeftRadius-&gt;item(0));
</span><span class="cx"> 
</span><del>-    list-&gt;append(horizontalRadii.release());
</del><ins>+    list.get().append(horizontalRadii.release());
</ins><span class="cx"> 
</span><span class="cx">     if (showVerticalTopLeft) {
</span><span class="cx">         RefPtr&lt;CSSValueList&gt; verticalRadii = CSSValueList::createSpaceSeparated();
</span><span class="lines">@@ -773,9 +773,9 @@
</span><span class="cx">             verticalRadii-&gt;append(bottomRightRadius-&gt;item(1));
</span><span class="cx">         if (showVerticalBottomLeft)
</span><span class="cx">             verticalRadii-&gt;append(bottomLeftRadius-&gt;item(1));
</span><del>-        list-&gt;append(verticalRadii.release());
</del><ins>+        list.get().append(verticalRadii.release());
</ins><span class="cx">     }
</span><del>-    return list.release();
</del><ins>+    return list;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static LayoutRect sizingBox(RenderObject* renderer)
</span><span class="lines">@@ -787,7 +787,7 @@
</span><span class="cx">     return box-&gt;style().boxSizing() == BORDER_BOX ? box-&gt;borderBoxRect() : box-&gt;computedCSSContentBoxRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;WebKitCSSTransformValue&gt; matrixTransformValue(const TransformationMatrix&amp; transform, const RenderStyle* style)
</del><ins>+static PassRef&lt;WebKitCSSTransformValue&gt; matrixTransformValue(const TransformationMatrix&amp; transform, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;WebKitCSSTransformValue&gt; transformValue;
</span><span class="cx">     if (transform.isAffine()) {
</span><span class="lines">@@ -823,10 +823,10 @@
</span><span class="cx">         transformValue-&gt;append(cssValuePool().createValue(transform.m44(), CSSPrimitiveValue::CSS_NUMBER));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return transformValue.release();
</del><ins>+    return transformValue.releaseNonNull();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; computedTransform(RenderObject* renderer, const RenderStyle* style)
</del><ins>+static PassRef&lt;CSSValue&gt; computedTransform(RenderObject* renderer, const RenderStyle* style)
</ins><span class="cx"> {
</span><span class="cx">     if (!renderer || !renderer-&gt;hasTransform() || !style-&gt;hasTransform())
</span><span class="cx">         return cssValuePool().createIdentifierValue(CSSValueNone);
</span><span class="lines">@@ -840,45 +840,44 @@
</span><span class="cx">     // Note that this does not flatten to an affine transform if ENABLE(3D_RENDERING) is off, by design.
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Need to print out individual functions (https://bugs.webkit.org/show_bug.cgi?id=23924)
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
-    list-&gt;append(matrixTransformValue(transform, style));
-
-    return list.release();
</del><ins>+    auto list = CSSValueList::createSpaceSeparated();
+    list.get().append(matrixTransformValue(transform, style));
+    return std::move(list);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHADERS)
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForCustomFilterArrayParameter(const CustomFilterArrayParameter* arrayParameter)
</del><ins>+static PassRef&lt;WebKitCSSArrayFunctionValue&gt; valueForCustomFilterArrayParameter(const CustomFilterArrayParameter* arrayParameter)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;WebKitCSSArrayFunctionValue&gt; arrayParameterValue = WebKitCSSArrayFunctionValue::create();
</del><ins>+    auto arrayParameterValue = WebKitCSSArrayFunctionValue::create();
</ins><span class="cx">     for (unsigned i = 0, size = arrayParameter-&gt;size(); i &lt; size; ++i)
</span><del>-        arrayParameterValue-&gt;append(cssValuePool().createValue(arrayParameter-&gt;valueAt(i), CSSPrimitiveValue::CSS_NUMBER));
-    return arrayParameterValue.release();
</del><ins>+        arrayParameterValue.get().append(cssValuePool().createValue(arrayParameter-&gt;valueAt(i), CSSPrimitiveValue::CSS_NUMBER));
+    return arrayParameterValue;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForCustomFilterMatParameter(const CustomFilterArrayParameter* matrixParameter)
</del><ins>+static PassRef&lt;WebKitCSSMatFunctionValue&gt; valueForCustomFilterMatParameter(const CustomFilterArrayParameter* matrixParameter)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;WebKitCSSMatFunctionValue&gt; matrixParameterValue = WebKitCSSMatFunctionValue::create();
</del><ins>+    auto matrixParameterValue = WebKitCSSMatFunctionValue::create();
</ins><span class="cx">     for (unsigned i = 0, size = matrixParameter-&gt;size(); i &lt; size; ++i)
</span><del>-        matrixParameterValue-&gt;append(cssValuePool().createValue(matrixParameter-&gt;valueAt(i), CSSPrimitiveValue::CSS_NUMBER));
-    return matrixParameterValue.release();
</del><ins>+        matrixParameterValue.get().append(cssValuePool().createValue(matrixParameter-&gt;valueAt(i), CSSPrimitiveValue::CSS_NUMBER));
+    return matrixParameterValue;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForCustomFilterColorParameter(const CustomFilterColorParameter* colorParameter)
</del><ins>+static PassRef&lt;CSSValueList&gt; valueForCustomFilterColorParameter(const CustomFilterColorParameter* colorParameter)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; colorParameterValue = CSSValueList::createSpaceSeparated();
-    colorParameterValue-&gt;append(cssValuePool().createColorValue(colorParameter-&gt;color().rgb()));
-    return colorParameterValue.release();
</del><ins>+    auto colorParameterValue = CSSValueList::createSpaceSeparated();
+    colorParameterValue.get().append(cssValuePool().createColorValue(colorParameter-&gt;color().rgb()));
+    return colorParameterValue;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForCustomFilterNumberParameter(const CustomFilterNumberParameter* numberParameter)
</del><ins>+static PassRef&lt;CSSValueList&gt; valueForCustomFilterNumberParameter(const CustomFilterNumberParameter* numberParameter)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; numberParameterValue = CSSValueList::createSpaceSeparated();
</del><ins>+    auto numberParameterValue = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     for (unsigned i = 0; i &lt; numberParameter-&gt;size(); ++i)
</span><del>-        numberParameterValue-&gt;append(cssValuePool().createValue(numberParameter-&gt;valueAt(i), CSSPrimitiveValue::CSS_NUMBER));
-    return numberParameterValue.release();
</del><ins>+        numberParameterValue.get().append(cssValuePool().createValue(numberParameter-&gt;valueAt(i), CSSPrimitiveValue::CSS_NUMBER));
+    return numberParameterValue;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForCustomFilterTransformParameter(const RenderObject* renderer, const RenderStyle* style, const CustomFilterTransformParameter* transformParameter)
</del><ins>+static PassRef&lt;WebKitCSSTransformValue&gt; valueForCustomFilterTransformParameter(const RenderObject* renderer, const RenderStyle* style, const CustomFilterTransformParameter* transformParameter)
</ins><span class="cx"> {
</span><span class="cx">     IntSize size;
</span><span class="cx">     if (renderer &amp;&amp; renderer-&gt;isBox())
</span><span class="lines">@@ -912,12 +911,12 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(CSS_SHADERS)
</span><span class="cx"> 
</span><del>-static inline PassRefPtr&lt;CSSPrimitiveValue&gt; adjustLengthForZoom(double length, const RenderStyle* style, AdjustPixelValuesForComputedStyle adjust)
</del><ins>+static inline PassRef&lt;CSSPrimitiveValue&gt; adjustLengthForZoom(double length, const RenderStyle* style, AdjustPixelValuesForComputedStyle adjust)
</ins><span class="cx"> {
</span><span class="cx">     return adjust == AdjustPixelValues ? zoomAdjustedPixelValue(length, style) : cssValuePool().createValue(length, CSSPrimitiveValue::CSS_PX);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline PassRefPtr&lt;CSSPrimitiveValue&gt; adjustLengthForZoom(const Length&amp; length, const RenderStyle* style, AdjustPixelValuesForComputedStyle adjust)
</del><ins>+static inline PassRef&lt;CSSPrimitiveValue&gt; adjustLengthForZoom(const Length&amp; length, const RenderStyle* style, AdjustPixelValuesForComputedStyle adjust)
</ins><span class="cx"> {
</span><span class="cx">     return adjust == AdjustPixelValues ? zoomAdjustedPixelValue(length.value(), style) : cssValuePool().createValue(length);
</span><span class="cx"> }
</span><span class="lines">@@ -1100,7 +1099,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForGridTrackBreadth(const GridLength&amp; trackBreadth, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValue&gt; valueForGridTrackBreadth(const GridLength&amp; trackBreadth, const RenderStyle* style, RenderView* renderView)
</ins><span class="cx"> {
</span><span class="cx">     if (!trackBreadth.isLength())
</span><span class="cx">         return cssValuePool().createValue(trackBreadth.flex(), CSSPrimitiveValue::CSS_FR);
</span><span class="lines">@@ -1146,7 +1145,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForGridTrackList(const Vector&lt;GridTrackSize&gt;&amp; trackSizes, const NamedGridLinesMap&amp; namedGridLines, const RenderStyle* style, RenderView* renderView)
</del><ins>+static PassRef&lt;CSSValue&gt; valueForGridTrackList(const Vector&lt;GridTrackSize&gt;&amp; trackSizes, const NamedGridLinesMap&amp; namedGridLines, const RenderStyle* style, RenderView* renderView)
</ins><span class="cx"> {
</span><span class="cx">     // Handle the 'none' case here.
</span><span class="cx">     if (!trackSizes.size()) {
</span><span class="lines">@@ -1154,17 +1153,17 @@
</span><span class="cx">         return cssValuePool().createIdentifierValue(CSSValueNone);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</del><ins>+    auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     for (size_t i = 0; i &lt; trackSizes.size(); ++i) {
</span><del>-        addValuesForNamedGridLinesAtIndex(namedGridLines, i, *list);
-        list-&gt;append(valueForGridTrackSize(trackSizes[i], style, renderView));
</del><ins>+        addValuesForNamedGridLinesAtIndex(namedGridLines, i, list.get());
+        list.get().append(valueForGridTrackSize(trackSizes[i], style, renderView));
</ins><span class="cx">     }
</span><span class="cx">     // Those are the trailing &lt;string&gt;* allowed in the syntax.
</span><del>-    addValuesForNamedGridLinesAtIndex(namedGridLines, trackSizes.size(), *list);
-    return list.release();
</del><ins>+    addValuesForNamedGridLinesAtIndex(namedGridLines, trackSizes.size(), list.get());
+    return std::move(list);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; valueForGridPosition(const GridPosition&amp; position)
</del><ins>+static PassRef&lt;CSSValue&gt; valueForGridPosition(const GridPosition&amp; position)
</ins><span class="cx"> {
</span><span class="cx">     if (position.isAuto())
</span><span class="cx">         return cssValuePool().createIdentifierValue(CSSValueAuto);
</span><span class="lines">@@ -1172,65 +1171,62 @@
</span><span class="cx">     if (position.isNamedGridArea())
</span><span class="cx">         return cssValuePool().createValue(position.namedGridLine(), CSSPrimitiveValue::CSS_STRING);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</del><ins>+    auto list = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     if (position.isSpan()) {
</span><del>-        list-&gt;append(cssValuePool().createIdentifierValue(CSSValueSpan));
-        list-&gt;append(cssValuePool().createValue(position.spanPosition(), CSSPrimitiveValue::CSS_NUMBER));
</del><ins>+        list.get().append(cssValuePool().createIdentifierValue(CSSValueSpan));
+        list.get().append(cssValuePool().createValue(position.spanPosition(), CSSPrimitiveValue::CSS_NUMBER));
</ins><span class="cx">     } else
</span><del>-        list-&gt;append(cssValuePool().createValue(position.integerPosition(), CSSPrimitiveValue::CSS_NUMBER));
</del><ins>+        list.get().append(cssValuePool().createValue(position.integerPosition(), CSSPrimitiveValue::CSS_NUMBER));
</ins><span class="cx"> 
</span><span class="cx">     if (!position.namedGridLine().isNull())
</span><del>-        list-&gt;append(cssValuePool().createValue(position.namedGridLine(), CSSPrimitiveValue::CSS_STRING));
-    return list.release();
</del><ins>+        list.get().append(cssValuePool().createValue(position.namedGridLine(), CSSPrimitiveValue::CSS_STRING));
+    return std::move(list);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; createTransitionPropertyValue(const Animation&amp; animation)
</del><ins>+static PassRef&lt;CSSValue&gt; createTransitionPropertyValue(const Animation&amp; animation)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValue&gt; propertyValue;
</del><span class="cx">     if (animation.animationMode() == Animation::AnimateNone)
</span><del>-        propertyValue = cssValuePool().createIdentifierValue(CSSValueNone);
-    else if (animation.animationMode() == Animation::AnimateAll)
-        propertyValue = cssValuePool().createIdentifierValue(CSSValueAll);
-    else
-        propertyValue = cssValuePool().createValue(getPropertyNameString(animation.property()), CSSPrimitiveValue::CSS_STRING);
-    return propertyValue.release();
</del><ins>+        return cssValuePool().createIdentifierValue(CSSValueNone);
+    if (animation.animationMode() == Animation::AnimateAll)
+        return cssValuePool().createIdentifierValue(CSSValueAll);
+    return cssValuePool().createValue(getPropertyNameString(animation.property()), CSSPrimitiveValue::CSS_STRING);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; getTransitionPropertyValue(const AnimationList* animList)
</del><ins>+static PassRef&lt;CSSValueList&gt; getTransitionPropertyValue(const AnimationList* animList)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createCommaSeparated();
</del><ins>+    auto list = CSSValueList::createCommaSeparated();
</ins><span class="cx">     if (animList) {
</span><span class="cx">         for (size_t i = 0; i &lt; animList-&gt;size(); ++i)
</span><del>-            list-&gt;append(createTransitionPropertyValue(animList-&gt;animation(i)));
</del><ins>+            list.get().append(createTransitionPropertyValue(animList-&gt;animation(i)));
</ins><span class="cx">     } else
</span><del>-        list-&gt;append(cssValuePool().createIdentifierValue(CSSValueAll));
-    return list.release();
</del><ins>+        list.get().append(cssValuePool().createIdentifierValue(CSSValueAll));
+    return list;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; getDelayValue(const AnimationList* animList)
</del><ins>+static PassRef&lt;CSSValueList&gt; getDelayValue(const AnimationList* animList)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createCommaSeparated();
</del><ins>+    auto list = CSSValueList::createCommaSeparated();
</ins><span class="cx">     if (animList) {
</span><span class="cx">         for (size_t i = 0; i &lt; animList-&gt;size(); ++i)
</span><del>-            list-&gt;append(cssValuePool().createValue(animList-&gt;animation(i).delay(), CSSPrimitiveValue::CSS_S));
</del><ins>+            list.get().append(cssValuePool().createValue(animList-&gt;animation(i).delay(), CSSPrimitiveValue::CSS_S));
</ins><span class="cx">     } else {
</span><span class="cx">         // Note that initialAnimationDelay() is used for both transitions and animations
</span><del>-        list-&gt;append(cssValuePool().createValue(Animation::initialAnimationDelay(), CSSPrimitiveValue::CSS_S));
</del><ins>+        list.get().append(cssValuePool().createValue(Animation::initialAnimationDelay(), CSSPrimitiveValue::CSS_S));
</ins><span class="cx">     }
</span><del>-    return list.release();
</del><ins>+    return list;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; getDurationValue(const AnimationList* animList)
</del><ins>+static PassRef&lt;CSSValueList&gt; getDurationValue(const AnimationList* animList)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createCommaSeparated();
</del><ins>+    auto list = CSSValueList::createCommaSeparated();
</ins><span class="cx">     if (animList) {
</span><span class="cx">         for (size_t i = 0; i &lt; animList-&gt;size(); ++i)
</span><del>-            list-&gt;append(cssValuePool().createValue(animList-&gt;animation(i).duration(), CSSPrimitiveValue::CSS_S));
</del><ins>+            list.get().append(cssValuePool().createValue(animList-&gt;animation(i).duration(), CSSPrimitiveValue::CSS_S));
</ins><span class="cx">     } else {
</span><span class="cx">         // Note that initialAnimationDuration() is used for both transitions and animations
</span><del>-        list-&gt;append(cssValuePool().createValue(Animation::initialAnimationDuration(), CSSPrimitiveValue::CSS_S));
</del><ins>+        list.get().append(cssValuePool().createValue(Animation::initialAnimationDuration(), CSSPrimitiveValue::CSS_S));
</ins><span class="cx">     }
</span><del>-    return list.release();
</del><ins>+    return list;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static PassRefPtr&lt;CSSValue&gt; createTimingFunctionValue(const TimingFunction* timingFunction)
</span><span class="lines">@@ -1272,16 +1268,16 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSValue&gt; getTimingFunctionValue(const AnimationList* animList)
</del><ins>+static PassRef&lt;CSSValueList&gt; getTimingFunctionValue(const AnimationList* animList)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createCommaSeparated();
</del><ins>+    auto list = CSSValueList::createCommaSeparated();
</ins><span class="cx">     if (animList) {
</span><span class="cx">         for (size_t i = 0; i &lt; animList-&gt;size(); ++i)
</span><del>-            list-&gt;append(createTimingFunctionValue(animList-&gt;animation(i).timingFunction().get()));
</del><ins>+            list.get().append(createTimingFunctionValue(animList-&gt;animation(i).timingFunction().get()));
</ins><span class="cx">     } else
</span><span class="cx">         // Note that initialAnimationTimingFunction() is used for both transitions and animations
</span><del>-        list-&gt;append(createTimingFunctionValue(Animation::initialAnimationTimingFunction().get()));
-    return list.release();
</del><ins>+        list.get().append(createTimingFunctionValue(Animation::initialAnimationTimingFunction().get()));
+    return list;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static PassRefPtr&lt;CSSValue&gt; createLineBoxContainValue(unsigned lineBoxContain)
</span></span></pre>
</div>
</div>

</body>
</html>