<!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>[201000] 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/201000">201000</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-05-16 23:36:52 -0700 (Mon, 16 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modernize CSS Parser
https://bugs.webkit.org/show_bug.cgi?id=157772

Patch by Alex Christensen &lt;achristensen@webkit.org&gt; on 2016-05-16
Reviewed by Brady Eidson.

No new tests.  This patch just replaces PassRefPtr with RefPtr&amp;&amp;.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::SourceSize::SourceSize):
(WebCore::CSSParser::createStyleProperties):
(WebCore::CSSParser::addProperty):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::addExpandedPropertyForValue):
(WebCore::CSSParser::parseVariableDependentValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseColumnsShorthand):
(WebCore::CSSParser::parseGridItemPositionShorthand):
(WebCore::CSSParser::parseGridAreaShorthand):
(WebCore::CSSParser::parseInsetRoundedCorners):
(WebCore::CSSParser::parseBasicShapeInset):
(WebCore::ShadowParseContext::commitLength):
(WebCore::ShadowParseContext::commitColor):
(WebCore::BorderImageParseContext::requireWidth):
(WebCore::BorderImageParseContext::requireOutset):
(WebCore::BorderImageParseContext::commitImage):
(WebCore::BorderImageParseContext::commitImageSlice):
(WebCore::BorderImageParseContext::commitForwardSlashOperator):
(WebCore::BorderImageParseContext::commitBorderWidth):
(WebCore::BorderImageParseContext::commitBorderOutset):
(WebCore::BorderImageParseContext::commitRepeat):
(WebCore::BorderImageParseContext::commitWebKitBorderImage):
(WebCore::BorderImageParseContext::commitBorderImage):
(WebCore::BorderImageParseContext::commitBorderImageProperty):
(WebCore::BorderImageSliceParseContext::commitFill):
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
(WebCore::BorderImageQuadParseContext::commitNumber):
(WebCore::BorderImageQuadParseContext::setAllowFinalCommit):
(WebCore::BorderImageQuadParseContext::setTop):
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
(WebCore::CSSParser::parseCounter):
(WebCore::parseDeprecatedGradientPoint):
(WebCore::CSSParser::parseDeprecatedGradient):
(WebCore::valueFromSideKeyword):
(WebCore::parseGradientColorOrKeyword):
(WebCore::CSSParser::parsePerspectiveOrigin):
(WebCore::CSSParser::addTextDecorationProperty):
(WebCore::CSSParser::parseTextDecoration):
(WebCore::CSSParser::realLex):
(WebCore::CSSParser::createImportRule):
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded):
(WebCore::CSSParser::addNewRuleToSourceTree):
* css/CSSParser.h:
(WebCore::CSSParser::hasProperties):
(WebCore::CSSParser::resetPropertyRange):
(WebCore::CSSParser::isExtractingSourceData):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200999 => 201000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-17 05:37:51 UTC (rev 200999)
+++ trunk/Source/WebCore/ChangeLog        2016-05-17 06:36:52 UTC (rev 201000)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2016-05-16  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Modernize CSS Parser
+        https://bugs.webkit.org/show_bug.cgi?id=157772
+
+        Reviewed by Brady Eidson.
+
+        No new tests.  This patch just replaces PassRefPtr with RefPtr&amp;&amp;.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseDeclaration):
+        (WebCore::CSSParser::SourceSize::SourceSize):
+        (WebCore::CSSParser::createStyleProperties):
+        (WebCore::CSSParser::addProperty):
+        (WebCore::CSSParser::parseValidPrimitive):
+        (WebCore::CSSParser::addExpandedPropertyForValue):
+        (WebCore::CSSParser::parseVariableDependentValue):
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseColumnsShorthand):
+        (WebCore::CSSParser::parseGridItemPositionShorthand):
+        (WebCore::CSSParser::parseGridAreaShorthand):
+        (WebCore::CSSParser::parseInsetRoundedCorners):
+        (WebCore::CSSParser::parseBasicShapeInset):
+        (WebCore::ShadowParseContext::commitLength):
+        (WebCore::ShadowParseContext::commitColor):
+        (WebCore::BorderImageParseContext::requireWidth):
+        (WebCore::BorderImageParseContext::requireOutset):
+        (WebCore::BorderImageParseContext::commitImage):
+        (WebCore::BorderImageParseContext::commitImageSlice):
+        (WebCore::BorderImageParseContext::commitForwardSlashOperator):
+        (WebCore::BorderImageParseContext::commitBorderWidth):
+        (WebCore::BorderImageParseContext::commitBorderOutset):
+        (WebCore::BorderImageParseContext::commitRepeat):
+        (WebCore::BorderImageParseContext::commitWebKitBorderImage):
+        (WebCore::BorderImageParseContext::commitBorderImage):
+        (WebCore::BorderImageParseContext::commitBorderImageProperty):
+        (WebCore::BorderImageSliceParseContext::commitFill):
+        (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
+        (WebCore::BorderImageQuadParseContext::commitNumber):
+        (WebCore::BorderImageQuadParseContext::setAllowFinalCommit):
+        (WebCore::BorderImageQuadParseContext::setTop):
+        (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
+        (WebCore::CSSParser::parseCounter):
+        (WebCore::parseDeprecatedGradientPoint):
+        (WebCore::CSSParser::parseDeprecatedGradient):
+        (WebCore::valueFromSideKeyword):
+        (WebCore::parseGradientColorOrKeyword):
+        (WebCore::CSSParser::parsePerspectiveOrigin):
+        (WebCore::CSSParser::addTextDecorationProperty):
+        (WebCore::CSSParser::parseTextDecoration):
+        (WebCore::CSSParser::realLex):
+        (WebCore::CSSParser::createImportRule):
+        (WebCore::CSSParser::createMediaRule):
+        (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded):
+        (WebCore::CSSParser::addNewRuleToSourceTree):
+        * css/CSSParser.h:
+        (WebCore::CSSParser::hasProperties):
+        (WebCore::CSSParser::resetPropertyRange):
+        (WebCore::CSSParser::isExtractingSourceData):
+
</ins><span class="cx"> 2016-05-16  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add RenderDescendantIterator to traverse a RenderObject's descendants
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (200999 => 201000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2016-05-17 05:37:51 UTC (rev 200999)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2016-05-17 06:36:52 UTC (rev 201000)
</span><span class="lines">@@ -1489,7 +1489,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-bool CSSParser::parseDeclaration(MutableStyleProperties* declaration, const String&amp; string, PassRefPtr&lt;CSSRuleSourceData&gt; prpRuleSourceData, StyleSheetContents* contextStyleSheet)
</del><ins>+bool CSSParser::parseDeclaration(MutableStyleProperties* declaration, const String&amp; string, RefPtr&lt;CSSRuleSourceData&gt;&amp;&amp; prpRuleSourceData, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><span class="cx">     // Length of the &quot;@-webkit-decls{&quot; prefix.
</span><span class="cx">     static const unsigned prefixLength = 15;
</span><span class="lines">@@ -1573,7 +1573,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSParser::SourceSize::SourceSize(std::unique_ptr&lt;MediaQueryExp&gt;&amp;&amp; origExp, RefPtr&lt;CSSValue&gt; value)
</del><ins>+CSSParser::SourceSize::SourceSize(std::unique_ptr&lt;MediaQueryExp&gt;&amp;&amp; origExp, RefPtr&lt;CSSValue&gt;&amp;&amp; value)
</ins><span class="cx">     : expression(WTFMove(origExp))
</span><span class="cx">     , length(value)
</span><span class="cx"> {
</span><span class="lines">@@ -1639,7 +1639,7 @@
</span><span class="cx">     return ImmutableStyleProperties::create(results.data(), results.size(), m_context.mode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParser::addProperty(CSSPropertyID propId, PassRefPtr&lt;CSSValue&gt; value, bool important, bool implicit)
</del><ins>+void CSSParser::addProperty(CSSPropertyID propId, RefPtr&lt;CSSValue&gt;&amp;&amp; value, bool important, bool implicit)
</ins><span class="cx"> {
</span><span class="cx">     // This property doesn't belong to a shorthand or is a CSS variable (which will be resolved later).
</span><span class="cx">     if (!m_currentShorthand) {
</span><span class="lines">@@ -1877,12 +1877,12 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr&lt;CSSValue&gt; prpValue, bool important)
</del><ins>+void CSSParser::addExpandedPropertyForValue(CSSPropertyID propId, RefPtr&lt;CSSValue&gt;&amp;&amp; prpValue, bool important)
</ins><span class="cx"> {
</span><span class="cx">     const StylePropertyShorthand&amp; shorthand = shorthandForProperty(propId);
</span><span class="cx">     unsigned shorthandLength = shorthand.length();
</span><span class="cx">     if (!shorthandLength) {
</span><del>-        addProperty(propId, prpValue, important);
</del><ins>+        addProperty(propId, WTFMove(prpValue), important);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1890,7 +1890,7 @@
</span><span class="cx">     ShorthandScope scope(this, propId);
</span><span class="cx">     const CSSPropertyID* longhands = shorthand.properties();
</span><span class="cx">     for (unsigned i = 0; i &lt; shorthandLength; ++i)
</span><del>-        addProperty(longhands[i], value, important);
</del><ins>+        addProperty(longhands[i], WTFMove(value), important);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;CSSValue&gt; CSSParser::parseVariableDependentValue(CSSPropertyID propID, const CSSVariableDependentValue&amp; dependentValue, const CustomPropertyValueMap&amp; customProperties)
</span><span class="lines">@@ -2023,7 +2023,7 @@
</span><span class="cx">             overflowXValue = cssValuePool.createIdentifierValue(CSSValueAuto);
</span><span class="cx">         else
</span><span class="cx">             overflowXValue = m_parsedProperties.last().value();
</span><del>-        addProperty(CSSPropertyOverflowX, overflowXValue.release(), important);
</del><ins>+        addProperty(CSSPropertyOverflowX, WTFMove(overflowXValue), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2452,7 +2452,7 @@
</span><span class="cx">     case CSSPropertyWebkitMaskBoxImage: {
</span><span class="cx">         RefPtr&lt;CSSValue&gt; result;
</span><span class="cx">         if (parseBorderImage(propId, result)) {
</span><del>-            addProperty(propId, result, important);
</del><ins>+            addProperty(propId, WTFMove(result), important);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="lines">@@ -2461,7 +2461,7 @@
</span><span class="cx">     case CSSPropertyWebkitMaskBoxImageOutset: {
</span><span class="cx">         RefPtr&lt;CSSPrimitiveValue&gt; result;
</span><span class="cx">         if (parseBorderImageOutset(result)) {
</span><del>-            addProperty(propId, result, important);
</del><ins>+            addProperty(propId, WTFMove(result), important);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="lines">@@ -2470,7 +2470,7 @@
</span><span class="cx">     case CSSPropertyWebkitMaskBoxImageRepeat: {
</span><span class="cx">         RefPtr&lt;CSSValue&gt; result;
</span><span class="cx">         if (parseBorderImageRepeat(result)) {
</span><del>-            addProperty(propId, result, important);
</del><ins>+            addProperty(propId, WTFMove(result), important);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="lines">@@ -2479,7 +2479,7 @@
</span><span class="cx">     case CSSPropertyWebkitMaskBoxImageSlice: {
</span><span class="cx">         RefPtr&lt;CSSBorderImageSliceValue&gt; result;
</span><span class="cx">         if (parseBorderImageSlice(propId, result)) {
</span><del>-            addProperty(propId, result, important);
</del><ins>+            addProperty(propId, WTFMove(result), important);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="lines">@@ -2488,7 +2488,7 @@
</span><span class="cx">     case CSSPropertyWebkitMaskBoxImageWidth: {
</span><span class="cx">         RefPtr&lt;CSSPrimitiveValue&gt; result;
</span><span class="cx">         if (parseBorderImageWidth(result)) {
</span><del>-            addProperty(propId, result, important);
</del><ins>+            addProperty(propId, WTFMove(result), important);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="lines">@@ -2594,7 +2594,7 @@
</span><span class="cx">             RefPtr&lt;CSSValue&gt; currValue;
</span><span class="cx">             if (!parseFilter(*m_valueList, currValue))
</span><span class="cx">                 return false;
</span><del>-            addProperty(propId, currValue, important);
</del><ins>+            addProperty(propId, WTFMove(currValue), important);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="lines">@@ -3907,14 +3907,14 @@
</span><span class="cx"> 
</span><span class="cx">     // Any unassigned property at this point will become implicit 'auto'.
</span><span class="cx">     if (columnWidth)
</span><del>-        addProperty(CSSPropertyColumnWidth, columnWidth, important);
</del><ins>+        addProperty(CSSPropertyColumnWidth, WTFMove(columnWidth), important);
</ins><span class="cx">     else {
</span><span class="cx">         addProperty(CSSPropertyColumnWidth, CSSValuePool::singleton().createIdentifierValue(CSSValueAuto), important, !hasPendingExplicitAuto /* implicit */);
</span><span class="cx">         hasPendingExplicitAuto = false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (columnCount)
</span><del>-        addProperty(CSSPropertyColumnCount, columnCount, important);
</del><ins>+        addProperty(CSSPropertyColumnCount, WTFMove(columnCount), important);
</ins><span class="cx">     else
</span><span class="cx">         addProperty(CSSPropertyColumnCount, CSSValuePool::singleton().createIdentifierValue(CSSValueAuto), important, !hasPendingExplicitAuto /* implicit */);
</span><span class="cx"> 
</span><span class="lines">@@ -5545,8 +5545,8 @@
</span><span class="cx">     } else
</span><span class="cx">         endValue = gridMissingGridPositionValue(*startValue);
</span><span class="cx"> 
</span><del>-    addProperty(shorthand.properties()[0], startValue, important);
-    addProperty(shorthand.properties()[1], endValue, important);
</del><ins>+    addProperty(shorthand.properties()[0], WTFMove(startValue), important);
+    addProperty(shorthand.properties()[1], WTFMove(endValue), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5813,10 +5813,10 @@
</span><span class="cx">     if (!columnEndValue)
</span><span class="cx">         columnEndValue = gridMissingGridPositionValue(*columnStartValue);
</span><span class="cx"> 
</span><del>-    addProperty(CSSPropertyGridRowStart, rowStartValue, important);
-    addProperty(CSSPropertyGridColumnStart, columnStartValue, important);
-    addProperty(CSSPropertyGridRowEnd, rowEndValue, important);
-    addProperty(CSSPropertyGridColumnEnd, columnEndValue, important);
</del><ins>+    addProperty(CSSPropertyGridRowStart, WTFMove(rowStartValue), important);
+    addProperty(CSSPropertyGridColumnStart, WTFMove(columnStartValue), important);
+    addProperty(CSSPropertyGridRowEnd, WTFMove(rowEndValue), important);
+    addProperty(CSSPropertyGridColumnEnd, WTFMove(columnEndValue), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -6504,7 +6504,7 @@
</span><span class="cx"> 
</span><span class="cx"> // FIXME: This should be refactored with CSSParser::parseBorderRadius.
</span><span class="cx"> // CSSParser::parseBorderRadius contains support for some legacy radius construction.
</span><del>-RefPtr&lt;CSSBasicShape&gt; CSSParser::parseInsetRoundedCorners(PassRefPtr&lt;CSSBasicShapeInset&gt; shape, CSSParserValueList&amp; args)
</del><ins>+RefPtr&lt;CSSBasicShape&gt; CSSParser::parseInsetRoundedCorners(RefPtr&lt;CSSBasicShapeInset&gt;&amp;&amp; shape, CSSParserValueList&amp; args)
</ins><span class="cx"> {
</span><span class="cx">     CSSParserValue* argument = args.next();
</span><span class="cx"> 
</span><span class="lines">@@ -6612,7 +6612,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (hasRoundedInset)
</span><del>-        return parseInsetRoundedCorners(shape, args);
</del><ins>+        return parseInsetRoundedCorners(WTFMove(shape), args);
</ins><span class="cx">     return shape;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -7951,7 +7951,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void commitColor(PassRefPtr&lt;CSSPrimitiveValue&gt; val)
</del><ins>+    void commitColor(RefPtr&lt;CSSPrimitiveValue&gt;&amp;&amp; val)
</ins><span class="cx">     {
</span><span class="cx">         color = val;
</span><span class="cx">         allowColor = false;
</span><span class="lines">@@ -8179,7 +8179,7 @@
</span><span class="cx">     bool requireWidth() const { return m_requireWidth; }
</span><span class="cx">     bool requireOutset() const { return m_requireOutset; }
</span><span class="cx"> 
</span><del>-    void commitImage(PassRefPtr&lt;CSSValue&gt; image)
</del><ins>+    void commitImage(RefPtr&lt;CSSValue&gt;&amp;&amp; image)
</ins><span class="cx">     {
</span><span class="cx">         m_image = image;
</span><span class="cx">         m_canAdvance = true;
</span><span class="lines">@@ -8188,7 +8188,7 @@
</span><span class="cx">         m_allowImageSlice = !m_imageSlice;
</span><span class="cx">         m_allowRepeat = !m_repeat;
</span><span class="cx">     }
</span><del>-    void commitImageSlice(PassRefPtr&lt;CSSBorderImageSliceValue&gt; slice)
</del><ins>+    void commitImageSlice(RefPtr&lt;CSSBorderImageSliceValue&gt;&amp;&amp; slice)
</ins><span class="cx">     {
</span><span class="cx">         m_imageSlice = slice;
</span><span class="cx">         m_canAdvance = true;
</span><span class="lines">@@ -8209,7 +8209,7 @@
</span><span class="cx">             m_requireWidth = false;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    void commitBorderWidth(PassRefPtr&lt;CSSPrimitiveValue&gt; slice)
</del><ins>+    void commitBorderWidth(RefPtr&lt;CSSPrimitiveValue&gt;&amp;&amp; slice)
</ins><span class="cx">     {
</span><span class="cx">         m_borderSlice = slice;
</span><span class="cx">         m_canAdvance = true;
</span><span class="lines">@@ -8218,7 +8218,7 @@
</span><span class="cx">         m_allowImage = !m_image;
</span><span class="cx">         m_allowRepeat = !m_repeat;
</span><span class="cx">     }
</span><del>-    void commitBorderOutset(PassRefPtr&lt;CSSPrimitiveValue&gt; outset)
</del><ins>+    void commitBorderOutset(RefPtr&lt;CSSPrimitiveValue&gt;&amp;&amp; outset)
</ins><span class="cx">     {
</span><span class="cx">         m_outset = outset;
</span><span class="cx">         m_canAdvance = true;
</span><span class="lines">@@ -8227,7 +8227,7 @@
</span><span class="cx">         m_allowImage = !m_image;
</span><span class="cx">         m_allowRepeat = !m_repeat;
</span><span class="cx">     }
</span><del>-    void commitRepeat(PassRefPtr&lt;CSSValue&gt; repeat)
</del><ins>+    void commitRepeat(RefPtr&lt;CSSValue&gt;&amp;&amp; repeat)
</ins><span class="cx">     {
</span><span class="cx">         m_repeat = repeat;
</span><span class="cx">         m_canAdvance = true;
</span><span class="lines">@@ -8237,24 +8237,24 @@
</span><span class="cx">         m_allowImage = !m_image;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    PassRefPtr&lt;CSSValue&gt; commitWebKitBorderImage()
</del><ins>+    RefPtr&lt;CSSValue&gt; commitWebKitBorderImage()
</ins><span class="cx">     {
</span><span class="cx">         return createBorderImageValue(m_image, m_imageSlice, m_borderSlice, m_outset, m_repeat);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void commitBorderImage(CSSParser&amp; parser, bool important)
</span><span class="cx">     {
</span><del>-        commitBorderImageProperty(CSSPropertyBorderImageSource, parser, m_image, important);
</del><ins>+        commitBorderImageProperty(CSSPropertyBorderImageSource, parser, WTFMove(m_image), important);
</ins><span class="cx">         commitBorderImageProperty(CSSPropertyBorderImageSlice, parser, m_imageSlice, important);
</span><span class="cx">         commitBorderImageProperty(CSSPropertyBorderImageWidth, parser, m_borderSlice, important);
</span><span class="cx">         commitBorderImageProperty(CSSPropertyBorderImageOutset, parser, m_outset, important);
</span><del>-        commitBorderImageProperty(CSSPropertyBorderImageRepeat, parser, m_repeat, important);
</del><ins>+        commitBorderImageProperty(CSSPropertyBorderImageRepeat, parser, WTFMove(m_repeat), important);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void commitBorderImageProperty(CSSPropertyID propId, CSSParser&amp; parser, PassRefPtr&lt;CSSValue&gt; value, bool important)
</del><ins>+    void commitBorderImageProperty(CSSPropertyID propId, CSSParser&amp; parser, RefPtr&lt;CSSValue&gt;&amp;&amp; value, bool important)
</ins><span class="cx">     {
</span><span class="cx">         if (value)
</span><del>-            parser.addProperty(propId, value, important);
</del><ins>+            parser.addProperty(propId, WTFMove(value), important);
</ins><span class="cx">         else
</span><span class="cx">             parser.addProperty(propId, CSSValuePool::singleton().createImplicitInitialValue(), important, true);
</span><span class="cx">     }
</span><span class="lines">@@ -8423,7 +8423,7 @@
</span><span class="cx"> 
</span><span class="cx">     void commitFill() { m_fill = true; m_allowFill = false; m_allowNumber = !m_top; }
</span><span class="cx"> 
</span><del>-    PassRefPtr&lt;CSSBorderImageSliceValue&gt; commitBorderImageSlice()
</del><ins>+    Ref&lt;CSSBorderImageSliceValue&gt; commitBorderImageSlice()
</ins><span class="cx">     {
</span><span class="cx">         // We need to clone and repeat values for any omissions.
</span><span class="cx">         ASSERT(m_top);
</span><span class="lines">@@ -8539,9 +8539,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void setAllowFinalCommit() { m_allowFinalCommit = true; }
</span><del>-    void setTop(PassRefPtr&lt;CSSPrimitiveValue&gt; val) { m_top = val; }
</del><ins>+    void setTop(RefPtr&lt;CSSPrimitiveValue&gt;&amp;&amp; val) { m_top = val; }
</ins><span class="cx"> 
</span><del>-    PassRefPtr&lt;CSSPrimitiveValue&gt; commitBorderImageQuad()
</del><ins>+    Ref&lt;CSSPrimitiveValue&gt; commitBorderImageQuad()
</ins><span class="cx">     {
</span><span class="cx">         // We need to clone and repeat values for any omissions.
</span><span class="cx">         ASSERT(m_top);
</span><span class="lines">@@ -8753,7 +8753,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // This should go away once we drop support for -webkit-gradient
</span><del>-static PassRefPtr&lt;CSSPrimitiveValue&gt; parseDeprecatedGradientPoint(CSSParserValue&amp; value, bool horizontal)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; parseDeprecatedGradientPoint(CSSParserValue&amp; value, bool horizontal)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; result;
</span><span class="cx">     if (value.unit == CSSPrimitiveValue::CSS_IDENT) {
</span><span class="lines">@@ -8971,7 +8971,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSPrimitiveValue&gt; valueFromSideKeyword(CSSParserValue&amp; value, bool&amp; isHorizontal)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; valueFromSideKeyword(CSSParserValue&amp; value, bool&amp; isHorizontal)
</ins><span class="cx"> {
</span><span class="cx">     if (value.unit != CSSPrimitiveValue::CSS_IDENT)
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -8991,7 +8991,7 @@
</span><span class="cx">     return CSSValuePool::singleton().createIdentifierValue(value.id);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static PassRefPtr&lt;CSSPrimitiveValue&gt; parseGradientColorOrKeyword(CSSParser&amp; parser, CSSParserValue&amp; value)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; parseGradientColorOrKeyword(CSSParser&amp; parser, CSSParserValue&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = value.id;
</span><span class="cx">     if (id == CSSValueWebkitText || CSSParser::isValidSystemColorValue(id) || id == CSSValueMenu || id == CSSValueCurrentcolor)
</span><span class="lines">@@ -10398,7 +10398,7 @@
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParser::addTextDecorationProperty(CSSPropertyID propId, PassRefPtr&lt;CSSValue&gt; value, bool important)
</del><ins>+void CSSParser::addTextDecorationProperty(CSSPropertyID propId, RefPtr&lt;CSSValue&gt;&amp;&amp; value, bool important)
</ins><span class="cx"> {
</span><span class="cx">     // The text-decoration-line property takes priority over text-decoration, unless the latter has important priority set.
</span><span class="cx">     if (propId == CSSPropertyTextDecoration &amp;&amp; !important &amp;&amp; !inShorthand()) {
</span><span class="lines">@@ -10407,7 +10407,7 @@
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    addProperty(propId, value, important);
</del><ins>+    addProperty(propId, WTFMove(value), important);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important)
</span><span class="lines">@@ -12856,7 +12856,7 @@
</span><span class="cx">     return token();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;StyleRuleBase&gt; CSSParser::createImportRule(const CSSParserString&amp; url, PassRefPtr&lt;MediaQuerySet&gt; media)
</del><ins>+RefPtr&lt;StyleRuleBase&gt; CSSParser::createImportRule(const CSSParserString&amp; url, RefPtr&lt;MediaQuerySet&gt;&amp;&amp; media)
</ins><span class="cx"> {
</span><span class="cx">     if (!media || !m_allowImportRules) {
</span><span class="cx">         popRuleData();
</span><span class="lines">@@ -12867,7 +12867,7 @@
</span><span class="cx">     return rule;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;StyleRuleBase&gt; CSSParser::createMediaRule(PassRefPtr&lt;MediaQuerySet&gt; media, RuleList* rules)
</del><ins>+RefPtr&lt;StyleRuleBase&gt; CSSParser::createMediaRule(RefPtr&lt;MediaQuerySet&gt;&amp;&amp; media, RuleList* rules)
</ins><span class="cx"> {
</span><span class="cx">     m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><span class="cx">     RefPtr&lt;StyleRuleMedia&gt; rule;
</span><span class="lines">@@ -12952,7 +12952,7 @@
</span><span class="cx">     addNewRuleToSourceTree(rule.release());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParser::addNewRuleToSourceTree(PassRefPtr&lt;CSSRuleSourceData&gt; rule)
</del><ins>+void CSSParser::addNewRuleToSourceTree(RefPtr&lt;CSSRuleSourceData&gt;&amp;&amp; rule)
</ins><span class="cx"> {
</span><span class="cx">     // Precondition: (isExtractingSourceData()).
</span><span class="cx">     if (!m_ruleSourceDataResult)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (200999 => 201000)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2016-05-17 05:37:51 UTC (rev 200999)
+++ trunk/Source/WebCore/css/CSSParser.h        2016-05-17 06:36:52 UTC (rev 201000)
</span><span class="lines">@@ -126,14 +126,14 @@
</span><span class="cx">     static RefPtr&lt;CSSValueList&gt; parseFontFaceValue(const AtomicString&amp;);
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; parseValidPrimitive(CSSValueID ident, ValueWithCalculation&amp;);
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties*, const String&amp;, PassRefPtr&lt;CSSRuleSourceData&gt;, StyleSheetContents* contextStyleSheet);
</del><ins>+    WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties*, const String&amp;, RefPtr&lt;CSSRuleSourceData&gt;&amp;&amp;, StyleSheetContents* contextStyleSheet);
</ins><span class="cx">     static Ref&lt;ImmutableStyleProperties&gt; parseInlineStyleDeclaration(const String&amp;, Element*);
</span><span class="cx">     std::unique_ptr&lt;MediaQuery&gt; parseMediaQuery(const String&amp;);
</span><span class="cx"> 
</span><del>-    void addProperty(CSSPropertyID, PassRefPtr&lt;CSSValue&gt;, bool important, bool implicit = false);
</del><ins>+    void addProperty(CSSPropertyID, RefPtr&lt;CSSValue&gt;&amp;&amp;, bool important, bool implicit = false);
</ins><span class="cx">     void rollbackLastProperties(int num);
</span><span class="cx">     bool hasProperties() const { return !m_parsedProperties.isEmpty(); }
</span><del>-    void addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr&lt;CSSValue&gt;, bool);
</del><ins>+    void addExpandedPropertyForValue(CSSPropertyID propId, RefPtr&lt;CSSValue&gt;&amp;&amp;, bool);
</ins><span class="cx"> 
</span><span class="cx">     bool parseValue(CSSPropertyID, bool important);
</span><span class="cx">     bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&amp;, bool important);
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx">         RefPtr&lt;CSSValue&gt; length;
</span><span class="cx"> 
</span><span class="cx">         SourceSize(SourceSize&amp;&amp;);
</span><del>-        SourceSize(std::unique_ptr&lt;MediaQueryExp&gt;&amp;&amp;, RefPtr&lt;CSSValue&gt;);
</del><ins>+        SourceSize(std::unique_ptr&lt;MediaQueryExp&gt;&amp;&amp;, RefPtr&lt;CSSValue&gt;&amp;&amp;);
</ins><span class="cx">     };
</span><span class="cx">     Vector&lt;SourceSize&gt; parseSizesAttribute(StringView);
</span><span class="cx">     SourceSize sourceSize(std::unique_ptr&lt;MediaQueryExp&gt;&amp;&amp;, CSSParserValue&amp;);
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx">     bool parseTextEmphasisStyle(bool important);
</span><span class="cx">     bool parseTextEmphasisPosition(bool important);
</span><span class="cx"> 
</span><del>-    void addTextDecorationProperty(CSSPropertyID, PassRefPtr&lt;CSSValue&gt;, bool important);
</del><ins>+    void addTextDecorationProperty(CSSPropertyID, RefPtr&lt;CSSValue&gt;&amp;&amp;, bool important);
</ins><span class="cx">     bool parseTextDecoration(CSSPropertyID propId, bool important);
</span><span class="cx">     bool parseTextDecorationSkip(bool important);
</span><span class="cx">     bool parseTextUnderlinePosition(bool important);
</span><span class="lines">@@ -359,12 +359,12 @@
</span><span class="cx">     std::unique_ptr&lt;Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&gt; createSelectorVector();
</span><span class="cx">     void recycleSelectorVector(std::unique_ptr&lt;Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&gt;);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;StyleRuleBase&gt; createImportRule(const CSSParserString&amp;, PassRefPtr&lt;MediaQuerySet&gt;);
</del><ins>+    RefPtr&lt;StyleRuleBase&gt; createImportRule(const CSSParserString&amp;, RefPtr&lt;MediaQuerySet&gt;&amp;&amp;);
</ins><span class="cx">     RefPtr&lt;StyleKeyframe&gt; createKeyframe(CSSParserValueList&amp;);
</span><span class="cx">     RefPtr&lt;StyleRuleKeyframes&gt; createKeyframesRule(const String&amp;, std::unique_ptr&lt;Vector&lt;RefPtr&lt;StyleKeyframe&gt;&gt;&gt;);
</span><span class="cx"> 
</span><span class="cx">     typedef Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt; RuleList;
</span><del>-    RefPtr&lt;StyleRuleBase&gt; createMediaRule(PassRefPtr&lt;MediaQuerySet&gt;, RuleList*);
</del><ins>+    RefPtr&lt;StyleRuleBase&gt; createMediaRule(RefPtr&lt;MediaQuerySet&gt;&amp;&amp;, RuleList*);
</ins><span class="cx">     RefPtr&lt;StyleRuleBase&gt; createEmptyMediaRule(RuleList*);
</span><span class="cx">     RefPtr&lt;StyleRuleBase&gt; createStyleRule(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;* selectors);
</span><span class="cx">     RefPtr&lt;StyleRuleBase&gt; createFontFaceRule();
</span><span class="lines">@@ -446,7 +446,7 @@
</span><span class="cx">     void markPropertyStart();
</span><span class="cx">     void markPropertyEnd(bool isImportantFound, bool isPropertyParsed);
</span><span class="cx">     void processAndAddNewRuleToSourceTreeIfNeeded();
</span><del>-    void addNewRuleToSourceTree(PassRefPtr&lt;CSSRuleSourceData&gt;);
</del><ins>+    void addNewRuleToSourceTree(RefPtr&lt;CSSRuleSourceData&gt;&amp;&amp;);
</ins><span class="cx">     RefPtr&lt;CSSRuleSourceData&gt; popRuleData();
</span><span class="cx">     void resetPropertyRange() { m_propertyRange.start = m_propertyRange.end = UINT_MAX; }
</span><span class="cx">     bool isExtractingSourceData() const { return !!m_currentRuleDataStack; }
</span><span class="lines">@@ -570,7 +570,7 @@
</span><span class="cx">     ParseResult parseValue(MutableStyleProperties*, CSSPropertyID, const String&amp;, bool important, StyleSheetContents* contextStyleSheet);
</span><span class="cx">     Ref&lt;ImmutableStyleProperties&gt; parseDeclaration(const String&amp;, StyleSheetContents* contextStyleSheet);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSBasicShape&gt; parseInsetRoundedCorners(PassRefPtr&lt;CSSBasicShapeInset&gt;, CSSParserValueList&amp;);
</del><ins>+    RefPtr&lt;CSSBasicShape&gt; parseInsetRoundedCorners(RefPtr&lt;CSSBasicShapeInset&gt;&amp;&amp;, CSSParserValueList&amp;);
</ins><span class="cx"> 
</span><span class="cx">     enum SizeParameterType {
</span><span class="cx">         None,
</span></span></pre>
</div>
</div>

</body>
</html>