<!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 <achristensen@webkit.org> on 2016-05-16
Reviewed by Brady Eidson.
No new tests. This patch just replaces PassRefPtr with RefPtr&&.
* 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 <achristensen@webkit.org>
+
+ 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&&.
+
+ * 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 <cdumez@apple.com>
</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& string, PassRefPtr<CSSRuleSourceData> prpRuleSourceData, StyleSheetContents* contextStyleSheet)
</del><ins>+bool CSSParser::parseDeclaration(MutableStyleProperties* declaration, const String& string, RefPtr<CSSRuleSourceData>&& prpRuleSourceData, StyleSheetContents* contextStyleSheet)
</ins><span class="cx"> {
</span><span class="cx"> // Length of the "@-webkit-decls{" 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<MediaQueryExp>&& origExp, RefPtr<CSSValue> value)
</del><ins>+CSSParser::SourceSize::SourceSize(std::unique_ptr<MediaQueryExp>&& origExp, RefPtr<CSSValue>&& 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<CSSValue> value, bool important, bool implicit)
</del><ins>+void CSSParser::addProperty(CSSPropertyID propId, RefPtr<CSSValue>&& 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<CSSValue> prpValue, bool important)
</del><ins>+void CSSParser::addExpandedPropertyForValue(CSSPropertyID propId, RefPtr<CSSValue>&& prpValue, bool important)
</ins><span class="cx"> {
</span><span class="cx"> const StylePropertyShorthand& 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 < 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<CSSValue> CSSParser::parseVariableDependentValue(CSSPropertyID propID, const CSSVariableDependentValue& dependentValue, const CustomPropertyValueMap& 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<CSSValue> 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<CSSPrimitiveValue> 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<CSSValue> 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<CSSBorderImageSliceValue> 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<CSSPrimitiveValue> 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<CSSValue> 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<CSSBasicShape> CSSParser::parseInsetRoundedCorners(PassRefPtr<CSSBasicShapeInset> shape, CSSParserValueList& args)
</del><ins>+RefPtr<CSSBasicShape> CSSParser::parseInsetRoundedCorners(RefPtr<CSSBasicShapeInset>&& shape, CSSParserValueList& 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<CSSPrimitiveValue> val)
</del><ins>+ void commitColor(RefPtr<CSSPrimitiveValue>&& 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<CSSValue> image)
</del><ins>+ void commitImage(RefPtr<CSSValue>&& 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<CSSBorderImageSliceValue> slice)
</del><ins>+ void commitImageSlice(RefPtr<CSSBorderImageSliceValue>&& 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<CSSPrimitiveValue> slice)
</del><ins>+ void commitBorderWidth(RefPtr<CSSPrimitiveValue>&& 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<CSSPrimitiveValue> outset)
</del><ins>+ void commitBorderOutset(RefPtr<CSSPrimitiveValue>&& 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<CSSValue> repeat)
</del><ins>+ void commitRepeat(RefPtr<CSSValue>&& 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<CSSValue> commitWebKitBorderImage()
</del><ins>+ RefPtr<CSSValue> 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& 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& parser, PassRefPtr<CSSValue> value, bool important)
</del><ins>+ void commitBorderImageProperty(CSSPropertyID propId, CSSParser& parser, RefPtr<CSSValue>&& 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<CSSBorderImageSliceValue> commitBorderImageSlice()
</del><ins>+ Ref<CSSBorderImageSliceValue> 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<CSSPrimitiveValue> val) { m_top = val; }
</del><ins>+ void setTop(RefPtr<CSSPrimitiveValue>&& val) { m_top = val; }
</ins><span class="cx">
</span><del>- PassRefPtr<CSSPrimitiveValue> commitBorderImageQuad()
</del><ins>+ Ref<CSSPrimitiveValue> 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<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue& value, bool horizontal)
</del><ins>+static RefPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue& value, bool horizontal)
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<CSSPrimitiveValue> 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<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue& value, bool& isHorizontal)
</del><ins>+static RefPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue& value, bool& 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<CSSPrimitiveValue> parseGradientColorOrKeyword(CSSParser& parser, CSSParserValue& value)
</del><ins>+static RefPtr<CSSPrimitiveValue> parseGradientColorOrKeyword(CSSParser& parser, CSSParserValue& 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<CSSValue> value, bool important)
</del><ins>+void CSSParser::addTextDecorationProperty(CSSPropertyID propId, RefPtr<CSSValue>&& 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 && !important && !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<StyleRuleBase> CSSParser::createImportRule(const CSSParserString& url, PassRefPtr<MediaQuerySet> media)
</del><ins>+RefPtr<StyleRuleBase> CSSParser::createImportRule(const CSSParserString& url, RefPtr<MediaQuerySet>&& 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<StyleRuleBase> CSSParser::createMediaRule(PassRefPtr<MediaQuerySet> media, RuleList* rules)
</del><ins>+RefPtr<StyleRuleBase> CSSParser::createMediaRule(RefPtr<MediaQuerySet>&& media, RuleList* rules)
</ins><span class="cx"> {
</span><span class="cx"> m_allowImportRules = m_allowNamespaceDeclarations = false;
</span><span class="cx"> RefPtr<StyleRuleMedia> 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<CSSRuleSourceData> rule)
</del><ins>+void CSSParser::addNewRuleToSourceTree(RefPtr<CSSRuleSourceData>&& 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<CSSValueList> parseFontFaceValue(const AtomicString&);
</span><span class="cx"> RefPtr<CSSPrimitiveValue> parseValidPrimitive(CSSValueID ident, ValueWithCalculation&);
</span><span class="cx">
</span><del>- WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties*, const String&, PassRefPtr<CSSRuleSourceData>, StyleSheetContents* contextStyleSheet);
</del><ins>+ WEBCORE_EXPORT bool parseDeclaration(MutableStyleProperties*, const String&, RefPtr<CSSRuleSourceData>&&, StyleSheetContents* contextStyleSheet);
</ins><span class="cx"> static Ref<ImmutableStyleProperties> parseInlineStyleDeclaration(const String&, Element*);
</span><span class="cx"> std::unique_ptr<MediaQuery> parseMediaQuery(const String&);
</span><span class="cx">
</span><del>- void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool implicit = false);
</del><ins>+ void addProperty(CSSPropertyID, RefPtr<CSSValue>&&, 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<CSSValue>, bool);
</del><ins>+ void addExpandedPropertyForValue(CSSPropertyID propId, RefPtr<CSSValue>&&, bool);
</ins><span class="cx">
</span><span class="cx"> bool parseValue(CSSPropertyID, bool important);
</span><span class="cx"> bool parseShorthand(CSSPropertyID, const StylePropertyShorthand&, bool important);
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx"> RefPtr<CSSValue> length;
</span><span class="cx">
</span><span class="cx"> SourceSize(SourceSize&&);
</span><del>- SourceSize(std::unique_ptr<MediaQueryExp>&&, RefPtr<CSSValue>);
</del><ins>+ SourceSize(std::unique_ptr<MediaQueryExp>&&, RefPtr<CSSValue>&&);
</ins><span class="cx"> };
</span><span class="cx"> Vector<SourceSize> parseSizesAttribute(StringView);
</span><span class="cx"> SourceSize sourceSize(std::unique_ptr<MediaQueryExp>&&, CSSParserValue&);
</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<CSSValue>, bool important);
</del><ins>+ void addTextDecorationProperty(CSSPropertyID, RefPtr<CSSValue>&&, 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<Vector<std::unique_ptr<CSSParserSelector>>> createSelectorVector();
</span><span class="cx"> void recycleSelectorVector(std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>);
</span><span class="cx">
</span><del>- RefPtr<StyleRuleBase> createImportRule(const CSSParserString&, PassRefPtr<MediaQuerySet>);
</del><ins>+ RefPtr<StyleRuleBase> createImportRule(const CSSParserString&, RefPtr<MediaQuerySet>&&);
</ins><span class="cx"> RefPtr<StyleKeyframe> createKeyframe(CSSParserValueList&);
</span><span class="cx"> RefPtr<StyleRuleKeyframes> createKeyframesRule(const String&, std::unique_ptr<Vector<RefPtr<StyleKeyframe>>>);
</span><span class="cx">
</span><span class="cx"> typedef Vector<RefPtr<StyleRuleBase>> RuleList;
</span><del>- RefPtr<StyleRuleBase> createMediaRule(PassRefPtr<MediaQuerySet>, RuleList*);
</del><ins>+ RefPtr<StyleRuleBase> createMediaRule(RefPtr<MediaQuerySet>&&, RuleList*);
</ins><span class="cx"> RefPtr<StyleRuleBase> createEmptyMediaRule(RuleList*);
</span><span class="cx"> RefPtr<StyleRuleBase> createStyleRule(Vector<std::unique_ptr<CSSParserSelector>>* selectors);
</span><span class="cx"> RefPtr<StyleRuleBase> 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<CSSRuleSourceData>);
</del><ins>+ void addNewRuleToSourceTree(RefPtr<CSSRuleSourceData>&&);
</ins><span class="cx"> RefPtr<CSSRuleSourceData> 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&, bool important, StyleSheetContents* contextStyleSheet);
</span><span class="cx"> Ref<ImmutableStyleProperties> parseDeclaration(const String&, StyleSheetContents* contextStyleSheet);
</span><span class="cx">
</span><del>- RefPtr<CSSBasicShape> parseInsetRoundedCorners(PassRefPtr<CSSBasicShapeInset>, CSSParserValueList&);
</del><ins>+ RefPtr<CSSBasicShape> parseInsetRoundedCorners(RefPtr<CSSBasicShapeInset>&&, CSSParserValueList&);
</ins><span class="cx">
</span><span class="cx"> enum SizeParameterType {
</span><span class="cx"> None,
</span></span></pre>
</div>
</div>
</body>
</html>