<!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>[207479] 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/207479">207479</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2016-10-18 13:03:18 -0700 (Tue, 18 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Parser] Get all the properties turned on
https://bugs.webkit.org/show_bug.cgi?id=163605

Reviewed by Dean Jackson.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSFunctionValue.h:
* css/CSSPendingSubstitutionValue.cpp: Added.
(WebCore::CSSPendingSubstitutionValue::customCSSText):
* css/CSSPendingSubstitutionValue.h: Added.
(WebCore::CSSPendingSubstitutionValue::create):
(WebCore::CSSPendingSubstitutionValue::shorthandValue):
(WebCore::CSSPendingSubstitutionValue::shorthandPropertyId):
(WebCore::CSSPendingSubstitutionValue::equals):
(WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isPendingSubstitutionValue):
* css/CSSValueKeywords.in:
* css/StylePropertyShorthand.cpp:
(WebCore::transitionShorthandForParsing):
* css/StylePropertyShorthand.h:
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::completeURL):
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::CSSParserImpl::consumeDeclarationValue):
* css/parser/CSSParserMode.h:
(WebCore::CSSParserContext::completeURL):
* css/parser/CSSParserToken.cpp:
(WebCore::CSSParserToken::parseAsCSSPropertyID):
(WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted.
* css/parser/CSSParserToken.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::cssPropertyID):
(WebCore::CSSPropertyParser::addProperty):
(WebCore::CSSPropertyParser::addExpandedPropertyForValue):
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseValueStart):
(WebCore::CSSPropertyParser::consumeCSSWideKeyword):
(WebCore::consumeTransformOrigin):
(WebCore::consumeWillChange):
(WebCore::consumeFontFeatureTag):
(WebCore::consumeFontFeatureSettings):
(WebCore::consumePage):
(WebCore::consumeQuotes):
(WebCore::FontVariantLigaturesParser::consumeLigature):
(WebCore::FontVariantLigaturesParser::finalizeValue):
(WebCore::consumeFontVariantLigatures):
(WebCore::consumeFontVariantCaps):
(WebCore::FontVariantNumericParser::consumeNumeric):
(WebCore::FontVariantNumericParser::finalizeValue):
(WebCore::consumeFontVariantNumeric):
(WebCore::consumeFontVariantCSS21):
(WebCore::consumeFontVariantList):
(WebCore::consumeFontWeight):
(WebCore::consumeFamilyName):
(WebCore::consumeGenericFamily):
(WebCore::consumeFontFamily):
(WebCore::consumeSpacing):
(WebCore::consumeTabSize):
(WebCore::consumeTextSizeAdjust):
(WebCore::consumeFontSize):
(WebCore::consumeLineHeight):
(WebCore::createPrimitiveValuePair):
(WebCore::consumeCounter):
(WebCore::consumePageSize):
(WebCore::consumeSize):
(WebCore::consumeTextIndent):
(WebCore::validWidthOrHeightKeyword):
(WebCore::consumeMaxWidthOrHeight):
(WebCore::consumeWidthOrHeight):
(WebCore::consumeMarginOrOffset):
(WebCore::consumeClipComponent):
(WebCore::consumeClip):
(WebCore::consumeTouchAction):
(WebCore::consumeLineClamp):
(WebCore::consumeLocale):
(WebCore::consumeColumnWidth):
(WebCore::consumeColumnCount):
(WebCore::consumeColumnGap):
(WebCore::consumeColumnSpan):
(WebCore::consumeZoom):
(WebCore::consumeAnimationIterationCount):
(WebCore::consumeAnimationName):
(WebCore::consumeTransitionProperty):
(WebCore::consumeCubicBezier):
(WebCore::consumeAnimationTimingFunction):
(WebCore::consumeAnimationValue):
(WebCore::isValidAnimationPropertyList):
(WebCore::consumeAnimationPropertyList):
(WebCore::CSSPropertyParser::consumeAnimationShorthand):
(WebCore::consumeZIndex):
(WebCore::parseSingleShadow):
(WebCore::consumeShadow):
(WebCore::consumeFilterFunction):
(WebCore::consumeFilter):
(WebCore::consumeTextDecorationLine):
(WebCore::consumeTextEmphasisStyle):
(WebCore::consumeOutlineColor):
(WebCore::consumeLineWidth):
(WebCore::consumeBorderWidth):
(WebCore::consumeTextStrokeWidth):
(WebCore::consumeColumnRuleWidth):
(WebCore::consumeTranslate3d):
(WebCore::consumeNumbers):
(WebCore::consumePerspective):
(WebCore::consumeTransformValue):
(WebCore::consumeTransform):
(WebCore::consumePositionLonghand):
(WebCore::consumePositionX):
(WebCore::consumePositionY):
(WebCore::consumePaintStroke):
(WebCore::consumePaintOrder):
(WebCore::consumeNoneOrURI):
(WebCore::consumeFlexBasis):
(WebCore::consumeStrokeDasharray):
(WebCore::consumeBaselineShift):
(WebCore::consumeRxOrRy):
(WebCore::consumeCursor):
(WebCore::consumeAttr):
(WebCore::consumeCounterContent):
(WebCore::consumeContent):
(WebCore::consumePositionList):
(WebCore::consumeScrollSnapCoordinate):
(WebCore::consumeScrollSnapPoints):
(WebCore::consumeBorderRadiusCorner):
(WebCore::consumeVerticalAlign):
(WebCore::consumeShapeRadius):
(WebCore::consumeBasicShapeCircle):
(WebCore::consumeBasicShapeEllipse):
(WebCore::consumeBasicShapePolygon):
(WebCore::complete4Sides):
(WebCore::consumeRadii):
(WebCore::consumeBasicShapeInset):
(WebCore::consumeBasicShape):
(WebCore::consumeWebkitClipPath):
(WebCore::consumeShapeOutside):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::consumeBorderImageRepeatKeyword):
(WebCore::consumeBorderImageRepeat):
(WebCore::consumeBorderImageSlice):
(WebCore::consumeBorderImageOutset):
(WebCore::consumeBorderImageWidth):
(WebCore::consumeBorderImageComponents):
(WebCore::consumeWebkitBorderImage):
(WebCore::consumeReflect):
(WebCore::consumeImageOrientation):
(WebCore::consumeBackgroundBlendMode):
(WebCore::consumeBackgroundAttachment):
(WebCore::consumeBackgroundBox):
(WebCore::consumeBackgroundComposite):
(WebCore::consumePrefixedBackgroundBox):
(WebCore::consumeBackgroundSize):
(WebCore::consumeGridAutoFlow):
(WebCore::consumeBackgroundComponent):
(WebCore::addBackgroundValue):
(WebCore::consumeCommaSeparatedBackgroundComponent):
(WebCore::consumeSelfPositionKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::consumeFitContent):
(WebCore::consumeCustomIdentForGridLine):
(WebCore::consumeGridLine):
(WebCore::isGridTrackFixedSized):
(WebCore::consumeGridBreadth):
(WebCore::consumeGridTrackSize):
(WebCore::consumeGridLineNames):
(WebCore::consumeGridTrackRepeatFunction):
(WebCore::consumeGridTrackList):
(WebCore::consumeGridTemplatesRowsOrColumns):
(WebCore::consumeGridTemplateAreas):
(WebCore::consumeFontFaceUnicodeRange):
(WebCore::consumeFontFaceSrcURI):
(WebCore::consumeFontFaceSrcLocal):
(WebCore::consumeFontFaceSrc):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeSystemFont):
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::consumeFontVariantShorthand):
(WebCore::CSSPropertyParser::consumeBorderSpacing):
(WebCore::consumeSingleViewportDescriptor):
(WebCore::CSSPropertyParser::parseViewportDescriptor):
(WebCore::consumeColumnWidthOrCount):
(WebCore::CSSPropertyParser::consumeColumns):
(WebCore::CSSPropertyParser::consumeShorthandGreedily):
(WebCore::CSSPropertyParser::consumeFlex):
(WebCore::CSSPropertyParser::consumeBorder):
(WebCore::CSSPropertyParser::consume4Values):
(WebCore::CSSPropertyParser::consumeBorderImage):
(WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
(WebCore::consumeBackgroundPosition):
(WebCore::consumeRepeatStyleComponent):
(WebCore::consumeRepeatStyle):
(WebCore::CSSPropertyParser::consumeBackgroundShorthand):
(WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
(WebCore::CSSPropertyParser::consumeGridAreaShorthand):
(WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
(WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
(WebCore::CSSPropertyParser::consumeGridShorthand):
(WebCore::CSSPropertyParser::parseShorthand):
(WebCore::unresolvedCSSPropertyID): Deleted.
* css/parser/CSSPropertyParser.h:
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeIdent):
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
(WebCore::CSSPropertyParserHelpers::consumeString):
(WebCore::CSSPropertyParserHelpers::consumeImageSet):
* css/parser/CSSPropertyParserHelpers.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSFunctionValueh">trunk/Source/WebCore/css/CSSFunctionValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuecpp">trunk/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertyShorthandcpp">trunk/Source/WebCore/css/StylePropertyShorthand.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStylePropertyShorthandh">trunk/Source/WebCore/css/StylePropertyShorthand.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParsercpp">trunk/Source/WebCore/css/parser/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserImplcpp">trunk/Source/WebCore/css/parser/CSSParserImpl.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserModeh">trunk/Source/WebCore/css/parser/CSSParserMode.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserTokencpp">trunk/Source/WebCore/css/parser/CSSParserToken.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserTokenh">trunk/Source/WebCore/css/parser/CSSParserToken.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParserh">trunk/Source/WebCore/css/parser/CSSPropertyParser.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParserHelperscpp">trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParserHelpersh">trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssCSSPendingSubstitutionValuecpp">trunk/Source/WebCore/css/CSSPendingSubstitutionValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPendingSubstitutionValueh">trunk/Source/WebCore/css/CSSPendingSubstitutionValue.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -1298,6 +1298,7 @@
</span><span class="cx">     css/CSSMediaRule.cpp
</span><span class="cx">     css/CSSNamedImageValue.cpp
</span><span class="cx">     css/CSSPageRule.cpp
</span><ins>+    css/CSSPendingSubstitutionValue.cpp
</ins><span class="cx">     css/CSSPrimitiveValue.cpp
</span><span class="cx">     css/CSSProperty.cpp
</span><span class="cx">     css/CSSPropertySourceData.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/ChangeLog        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -1,3 +1,220 @@
</span><ins>+2016-10-18  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        [CSS Parser] Get all the properties turned on
+        https://bugs.webkit.org/show_bug.cgi?id=163605
+
+        Reviewed by Dean Jackson.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSFunctionValue.h:
+        * css/CSSPendingSubstitutionValue.cpp: Added.
+        (WebCore::CSSPendingSubstitutionValue::customCSSText):
+        * css/CSSPendingSubstitutionValue.h: Added.
+        (WebCore::CSSPendingSubstitutionValue::create):
+        (WebCore::CSSPendingSubstitutionValue::shorthandValue):
+        (WebCore::CSSPendingSubstitutionValue::shorthandPropertyId):
+        (WebCore::CSSPendingSubstitutionValue::equals):
+        (WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
+        * css/CSSValue.cpp:
+        (WebCore::CSSValue::cssText):
+        (WebCore::CSSValue::destroy):
+        * css/CSSValue.h:
+        (WebCore::CSSValue::isPendingSubstitutionValue):
+        * css/CSSValueKeywords.in:
+        * css/StylePropertyShorthand.cpp:
+        (WebCore::transitionShorthandForParsing):
+        * css/StylePropertyShorthand.h:
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParser::completeURL):
+        * css/parser/CSSParserImpl.cpp:
+        (WebCore::CSSParserImpl::parseValue):
+        (WebCore::CSSParserImpl::consumeDeclaration):
+        (WebCore::CSSParserImpl::consumeDeclarationValue):
+        * css/parser/CSSParserMode.h:
+        (WebCore::CSSParserContext::completeURL):
+        * css/parser/CSSParserToken.cpp:
+        (WebCore::CSSParserToken::parseAsCSSPropertyID):
+        (WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted.
+        * css/parser/CSSParserToken.h:
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::cssPropertyID):
+        (WebCore::CSSPropertyParser::addProperty):
+        (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
+        (WebCore::CSSPropertyParser::parseValue):
+        (WebCore::CSSPropertyParser::parseSingleValue):
+        (WebCore::CSSPropertyParser::parseValueStart):
+        (WebCore::CSSPropertyParser::consumeCSSWideKeyword):
+        (WebCore::consumeTransformOrigin):
+        (WebCore::consumeWillChange):
+        (WebCore::consumeFontFeatureTag):
+        (WebCore::consumeFontFeatureSettings):
+        (WebCore::consumePage):
+        (WebCore::consumeQuotes):
+        (WebCore::FontVariantLigaturesParser::consumeLigature):
+        (WebCore::FontVariantLigaturesParser::finalizeValue):
+        (WebCore::consumeFontVariantLigatures):
+        (WebCore::consumeFontVariantCaps):
+        (WebCore::FontVariantNumericParser::consumeNumeric):
+        (WebCore::FontVariantNumericParser::finalizeValue):
+        (WebCore::consumeFontVariantNumeric):
+        (WebCore::consumeFontVariantCSS21):
+        (WebCore::consumeFontVariantList):
+        (WebCore::consumeFontWeight):
+        (WebCore::consumeFamilyName):
+        (WebCore::consumeGenericFamily):
+        (WebCore::consumeFontFamily):
+        (WebCore::consumeSpacing):
+        (WebCore::consumeTabSize):
+        (WebCore::consumeTextSizeAdjust):
+        (WebCore::consumeFontSize):
+        (WebCore::consumeLineHeight):
+        (WebCore::createPrimitiveValuePair):
+        (WebCore::consumeCounter):
+        (WebCore::consumePageSize):
+        (WebCore::consumeSize):
+        (WebCore::consumeTextIndent):
+        (WebCore::validWidthOrHeightKeyword):
+        (WebCore::consumeMaxWidthOrHeight):
+        (WebCore::consumeWidthOrHeight):
+        (WebCore::consumeMarginOrOffset):
+        (WebCore::consumeClipComponent):
+        (WebCore::consumeClip):
+        (WebCore::consumeTouchAction):
+        (WebCore::consumeLineClamp):
+        (WebCore::consumeLocale):
+        (WebCore::consumeColumnWidth):
+        (WebCore::consumeColumnCount):
+        (WebCore::consumeColumnGap):
+        (WebCore::consumeColumnSpan):
+        (WebCore::consumeZoom):
+        (WebCore::consumeAnimationIterationCount):
+        (WebCore::consumeAnimationName):
+        (WebCore::consumeTransitionProperty):
+        (WebCore::consumeCubicBezier):
+        (WebCore::consumeAnimationTimingFunction):
+        (WebCore::consumeAnimationValue):
+        (WebCore::isValidAnimationPropertyList):
+        (WebCore::consumeAnimationPropertyList):
+        (WebCore::CSSPropertyParser::consumeAnimationShorthand):
+        (WebCore::consumeZIndex):
+        (WebCore::parseSingleShadow):
+        (WebCore::consumeShadow):
+        (WebCore::consumeFilterFunction):
+        (WebCore::consumeFilter):
+        (WebCore::consumeTextDecorationLine):
+        (WebCore::consumeTextEmphasisStyle):
+        (WebCore::consumeOutlineColor):
+        (WebCore::consumeLineWidth):
+        (WebCore::consumeBorderWidth):
+        (WebCore::consumeTextStrokeWidth):
+        (WebCore::consumeColumnRuleWidth):
+        (WebCore::consumeTranslate3d):
+        (WebCore::consumeNumbers):
+        (WebCore::consumePerspective):
+        (WebCore::consumeTransformValue):
+        (WebCore::consumeTransform):
+        (WebCore::consumePositionLonghand):
+        (WebCore::consumePositionX):
+        (WebCore::consumePositionY):
+        (WebCore::consumePaintStroke):
+        (WebCore::consumePaintOrder):
+        (WebCore::consumeNoneOrURI):
+        (WebCore::consumeFlexBasis):
+        (WebCore::consumeStrokeDasharray):
+        (WebCore::consumeBaselineShift):
+        (WebCore::consumeRxOrRy):
+        (WebCore::consumeCursor):
+        (WebCore::consumeAttr):
+        (WebCore::consumeCounterContent):
+        (WebCore::consumeContent):
+        (WebCore::consumePositionList):
+        (WebCore::consumeScrollSnapCoordinate):
+        (WebCore::consumeScrollSnapPoints):
+        (WebCore::consumeBorderRadiusCorner):
+        (WebCore::consumeVerticalAlign):
+        (WebCore::consumeShapeRadius):
+        (WebCore::consumeBasicShapeCircle):
+        (WebCore::consumeBasicShapeEllipse):
+        (WebCore::consumeBasicShapePolygon):
+        (WebCore::complete4Sides):
+        (WebCore::consumeRadii):
+        (WebCore::consumeBasicShapeInset):
+        (WebCore::consumeBasicShape):
+        (WebCore::consumeWebkitClipPath):
+        (WebCore::consumeShapeOutside):
+        (WebCore::consumeContentDistributionOverflowPosition):
+        (WebCore::consumeBorderImageRepeatKeyword):
+        (WebCore::consumeBorderImageRepeat):
+        (WebCore::consumeBorderImageSlice):
+        (WebCore::consumeBorderImageOutset):
+        (WebCore::consumeBorderImageWidth):
+        (WebCore::consumeBorderImageComponents):
+        (WebCore::consumeWebkitBorderImage):
+        (WebCore::consumeReflect):
+        (WebCore::consumeImageOrientation):
+        (WebCore::consumeBackgroundBlendMode):
+        (WebCore::consumeBackgroundAttachment):
+        (WebCore::consumeBackgroundBox):
+        (WebCore::consumeBackgroundComposite):
+        (WebCore::consumePrefixedBackgroundBox):
+        (WebCore::consumeBackgroundSize):
+        (WebCore::consumeGridAutoFlow):
+        (WebCore::consumeBackgroundComponent):
+        (WebCore::addBackgroundValue):
+        (WebCore::consumeCommaSeparatedBackgroundComponent):
+        (WebCore::consumeSelfPositionKeyword):
+        (WebCore::consumeSelfPositionOverflowPosition):
+        (WebCore::consumeAlignItems):
+        (WebCore::consumeJustifyItems):
+        (WebCore::consumeFitContent):
+        (WebCore::consumeCustomIdentForGridLine):
+        (WebCore::consumeGridLine):
+        (WebCore::isGridTrackFixedSized):
+        (WebCore::consumeGridBreadth):
+        (WebCore::consumeGridTrackSize):
+        (WebCore::consumeGridLineNames):
+        (WebCore::consumeGridTrackRepeatFunction):
+        (WebCore::consumeGridTrackList):
+        (WebCore::consumeGridTemplatesRowsOrColumns):
+        (WebCore::consumeGridTemplateAreas):
+        (WebCore::consumeFontFaceUnicodeRange):
+        (WebCore::consumeFontFaceSrcURI):
+        (WebCore::consumeFontFaceSrcLocal):
+        (WebCore::consumeFontFaceSrc):
+        (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
+        (WebCore::CSSPropertyParser::consumeSystemFont):
+        (WebCore::CSSPropertyParser::consumeFont):
+        (WebCore::CSSPropertyParser::consumeFontVariantShorthand):
+        (WebCore::CSSPropertyParser::consumeBorderSpacing):
+        (WebCore::consumeSingleViewportDescriptor):
+        (WebCore::CSSPropertyParser::parseViewportDescriptor):
+        (WebCore::consumeColumnWidthOrCount):
+        (WebCore::CSSPropertyParser::consumeColumns):
+        (WebCore::CSSPropertyParser::consumeShorthandGreedily):
+        (WebCore::CSSPropertyParser::consumeFlex):
+        (WebCore::CSSPropertyParser::consumeBorder):
+        (WebCore::CSSPropertyParser::consume4Values):
+        (WebCore::CSSPropertyParser::consumeBorderImage):
+        (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
+        (WebCore::consumeBackgroundPosition):
+        (WebCore::consumeRepeatStyleComponent):
+        (WebCore::consumeRepeatStyle):
+        (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
+        (WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
+        (WebCore::CSSPropertyParser::consumeGridAreaShorthand):
+        (WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
+        (WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
+        (WebCore::CSSPropertyParser::consumeGridShorthand):
+        (WebCore::CSSPropertyParser::parseShorthand):
+        (WebCore::unresolvedCSSPropertyID): Deleted.
+        * css/parser/CSSPropertyParser.h:
+        * css/parser/CSSPropertyParserHelpers.cpp:
+        (WebCore::CSSPropertyParserHelpers::consumeIdent):
+        (WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
+        (WebCore::CSSPropertyParserHelpers::consumeString):
+        (WebCore::CSSPropertyParserHelpers::consumeImageSet):
+        * css/parser/CSSPropertyParserHelpers.h:
+
</ins><span class="cx"> 2016-10-18  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Correct Document::removeAllEventListeners
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -3387,6 +3387,8 @@
</span><span class="cx">                 93FDAFCA0B11307400E2746F /* EditorInsertAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FDAFC90B11307400E2746F /* EditorInsertAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9418278A1D8B244000492764 /* StyleColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 941827881D8B242200492764 /* StyleColor.cpp */; };
</span><span class="cx">                 9418278B1D8B244000492764 /* StyleColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 941827891D8B242200492764 /* StyleColor.h */; };
</span><ins>+                9418278E1D8CAF9200492764 /* CSSPendingSubstitutionValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9418278C1D8CAE9500492764 /* CSSPendingSubstitutionValue.cpp */; };
+                9418278F1D8CAF9200492764 /* CSSPendingSubstitutionValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9418278D1D8CAE9500492764 /* CSSPendingSubstitutionValue.h */; };
</ins><span class="cx">                 9444CBD31D860C8B0073A074 /* SizesCalcParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9444CBD01D860C740073A074 /* SizesCalcParser.cpp */; };
</span><span class="cx">                 9444CBD41D860C8B0073A074 /* SizesCalcParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 9444CBCF1D860C740073A074 /* SizesCalcParser.h */; };
</span><span class="cx">                 9444CBD51D860C8B0073A074 /* SizesAttributeParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9444CBD21D860C740073A074 /* SizesAttributeParser.cpp */; };
</span><span class="lines">@@ -10739,6 +10741,8 @@
</span><span class="cx">                 93FDAFC90B11307400E2746F /* EditorInsertAction.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EditorInsertAction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 941827881D8B242200492764 /* StyleColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleColor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 941827891D8B242200492764 /* StyleColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleColor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                9418278C1D8CAE9500492764 /* CSSPendingSubstitutionValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPendingSubstitutionValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                9418278D1D8CAE9500492764 /* CSSPendingSubstitutionValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSPendingSubstitutionValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 9444CBCF1D860C740073A074 /* SizesCalcParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SizesCalcParser.h; path = parser/SizesCalcParser.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9444CBD01D860C740073A074 /* SizesCalcParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SizesCalcParser.cpp; path = parser/SizesCalcParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9444CBD11D860C740073A074 /* SizesAttributeParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SizesAttributeParser.h; path = parser/SizesAttributeParser.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22832,6 +22836,8 @@
</span><span class="cx">                                 A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */,
</span><span class="cx">                                 A80E6CD60A1989CA007FB8C5 /* CSSPageRule.h */,
</span><span class="cx">                                 85C56CA60AA89D5F00D95755 /* CSSPageRule.idl */,
</span><ins>+                                9418278C1D8CAE9500492764 /* CSSPendingSubstitutionValue.cpp */,
+                                9418278D1D8CAE9500492764 /* CSSPendingSubstitutionValue.h */,
</ins><span class="cx">                                 A80E6CDB0A1989CA007FB8C5 /* CSSPrimitiveValue.cpp */,
</span><span class="cx">                                 A80E6CBC0A1989CA007FB8C5 /* CSSPrimitiveValue.h */,
</span><span class="cx">                                 9307059009E0C75800B17FE4 /* CSSPrimitiveValue.idl */,
</span><span class="lines">@@ -26431,6 +26437,7 @@
</span><span class="cx">                                 297BE3D516C03C08003316BD /* PlatformSpeechSynthesisUtterance.h in Headers */,
</span><span class="cx">                                 297BE3D616C03C0B003316BD /* PlatformSpeechSynthesisVoice.h in Headers */,
</span><span class="cx">                                 297BE3D716C03C0E003316BD /* PlatformSpeechSynthesizer.h in Headers */,
</span><ins>+                                9418278F1D8CAF9200492764 /* CSSPendingSubstitutionValue.h in Headers */,
</ins><span class="cx">                                 1AD8F81B11CAB9E900E93E54 /* PlatformStrategies.h in Headers */,
</span><span class="cx">                                 0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */,
</span><span class="cx">                                 074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */,
</span><span class="lines">@@ -30920,6 +30927,7 @@
</span><span class="cx">                                 AAA728F816D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm in Sources */,
</span><span class="cx">                                 AA478A8016CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm in Sources */,
</span><span class="cx">                                 2D3EF4491917915C00034184 /* WebActionDisablingCALayerDelegate.mm in Sources */,
</span><ins>+                                9418278E1D8CAF9200492764 /* CSSPendingSubstitutionValue.cpp in Sources */,
</ins><span class="cx">                                 120DE3ED1C86CA3E00B6D4DD /* WebAnimation.cpp in Sources */,
</span><span class="cx">                                 07D637411BB0B11300256CE9 /* WebAudioSourceProviderAVFObjC.mm in Sources */,
</span><span class="cx">                                 CDA29A311CBF74DA00901CCF /* WebAVPlayerController.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFunctionValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFunctionValue.h (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFunctionValue.h        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/CSSFunctionValue.h        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -55,6 +55,8 @@
</span><span class="cx">     String customCSSText() const;
</span><span class="cx"> 
</span><span class="cx">     bool equals(const CSSFunctionValue&amp;) const;
</span><ins>+    
+    CSSValueID name() const { return m_name; }
</ins><span class="cx"> 
</span><span class="cx">     CSSValueList* arguments() const { return m_args.get(); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPendingSubstitutionValuecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSPendingSubstitutionValue.cpp (0 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPendingSubstitutionValue.cpp                                (rev 0)
+++ trunk/Source/WebCore/css/CSSPendingSubstitutionValue.cpp        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright (C) 2016 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//    * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//    * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//    * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include &quot;config.h&quot;
+#include &quot;CSSPendingSubstitutionValue.h&quot;
+
+namespace WebCore {
+
+String CSSPendingSubstitutionValue::customCSSText() const
+{
+    return &quot;&quot;;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSPendingSubstitutionValueh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSPendingSubstitutionValue.h (0 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPendingSubstitutionValue.h                                (rev 0)
+++ trunk/Source/WebCore/css/CSSPendingSubstitutionValue.h        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright (C) 2016 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//    * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//    * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//    * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#pragma once
+
+#include &quot;CSSPropertyNames.h&quot;
+#include &quot;CSSValue.h&quot;
+#include &quot;CSSVariableReferenceValue.h&quot;
+
+namespace WebCore {
+
+class CSSPendingSubstitutionValue : public CSSValue {
+public:
+    static Ref&lt;CSSPendingSubstitutionValue&gt; create(CSSPropertyID shorthandPropertyId, Ref&lt;CSSVariableReferenceValue&gt;&amp;&amp; shorthandValue)
+    {
+        return adoptRef(*new CSSPendingSubstitutionValue(shorthandPropertyId, WTFMove(shorthandValue)));
+    }
+
+    CSSVariableReferenceValue* shorthandValue() const
+    {
+        return m_shorthandValue.get();
+    }
+
+    CSSPropertyID shorthandPropertyId() const
+    {
+        return m_shorthandPropertyId;
+    }
+
+    bool equals(const CSSPendingSubstitutionValue&amp; other) const { return m_shorthandValue == other.m_shorthandValue; }
+    String customCSSText() const;
+
+private:
+    CSSPendingSubstitutionValue(CSSPropertyID shorthandPropertyId, Ref&lt;CSSVariableReferenceValue&gt;&amp;&amp; shorthandValue)
+        : CSSValue(PendingSubstitutionValueClass)
+        , m_shorthandPropertyId(shorthandPropertyId)
+        , m_shorthandValue(WTFMove(shorthandValue))
+    {
+    }
+
+    CSSPropertyID m_shorthandPropertyId;
+    RefPtr&lt;CSSVariableReferenceValue&gt; m_shorthandValue;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSPendingSubstitutionValue, isPendingSubstitutionValue())
+
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.cpp (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.cpp        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/CSSValue.cpp        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> #include &quot;CSSInitialValue.h&quot;
</span><span class="cx"> #include &quot;CSSLineBoxContainValue.h&quot;
</span><span class="cx"> #include &quot;CSSNamedImageValue.h&quot;
</span><ins>+#include &quot;CSSPendingSubstitutionValue.h&quot;
</ins><span class="cx"> #include &quot;CSSPrimitiveValue.h&quot;
</span><span class="cx"> #include &quot;CSSProperty.h&quot;
</span><span class="cx"> #include &quot;CSSReflectValue.h&quot;
</span><span class="lines">@@ -365,6 +366,8 @@
</span><span class="cx">         return downcast&lt;CSSCustomIdentValue&gt;(*this).customCSSText();
</span><span class="cx">     case VariableReferenceClass:
</span><span class="cx">         return downcast&lt;CSSVariableReferenceValue&gt;(*this).customCSSText();
</span><ins>+    case PendingSubstitutionValueClass:
+        return downcast&lt;CSSPendingSubstitutionValue&gt;(*this).customCSSText();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="lines">@@ -522,6 +525,9 @@
</span><span class="cx">     case VariableReferenceClass:
</span><span class="cx">         delete downcast&lt;CSSVariableReferenceValue&gt;(this);
</span><span class="cx">         return;
</span><ins>+    case PendingSubstitutionValueClass:
+        delete downcast&lt;CSSPendingSubstitutionValue&gt;(this);
+        return;
</ins><span class="cx">     }
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/CSSValue.h        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -129,6 +129,7 @@
</span><span class="cx">     bool isCustomPropertyDeclaration() const { return m_classType == CustomPropertyDeclarationClass; }
</span><span class="cx">     bool isCustomIdentValue() const { return m_classType == CustomIdentClass; }
</span><span class="cx">     bool isVariableReferenceValue() const { return m_classType == VariableReferenceClass; }
</span><ins>+    bool isPendingSubstitutionValue() const { return m_classType == PendingSubstitutionValueClass; }
</ins><span class="cx"> 
</span><span class="cx">     bool isCSSOMSafe() const { return m_isCSSOMSafe; }
</span><span class="cx">     bool isSubtypeExposedToCSSOM() const
</span><span class="lines">@@ -210,6 +211,7 @@
</span><span class="cx">         CustomPropertyDeclarationClass,
</span><span class="cx">         CustomIdentClass,
</span><span class="cx">         VariableReferenceClass,
</span><ins>+        PendingSubstitutionValueClass,
</ins><span class="cx"> 
</span><span class="cx">         // List class types must appear after ValueListClass.
</span><span class="cx">         ValueListClass,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -1195,6 +1195,8 @@
</span><span class="cx"> blur
</span><span class="cx"> drop-shadow
</span><span class="cx"> url
</span><ins>+cubic-bezier
+steps
</ins><span class="cx"> 
</span><span class="cx"> // colors
</span><span class="cx"> rgb
</span><span class="lines">@@ -1249,6 +1251,9 @@
</span><span class="cx"> // grid-{column-start|column-end|row-start|row-end}
</span><span class="cx"> span
</span><span class="cx"> 
</span><ins>+// grid-template-{columns|rows}
+minmax
+
</ins><span class="cx"> // grid-auto-flow
</span><span class="cx"> auto-flow
</span><span class="cx"> dense
</span></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertyShorthandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StylePropertyShorthand.cpp (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StylePropertyShorthand.cpp        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/StylePropertyShorthand.cpp        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -50,6 +50,16 @@
</span><span class="cx">     return StylePropertyShorthand(CSSPropertyAnimation, animationPropertiesForParsing);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+StylePropertyShorthand transitionShorthandForParsing()
+{
+    // Similar to animations, we have property after timing-function and delay after
+    // duration.
+    static const CSSPropertyID transitionProperties[] = {
+        CSSPropertyTransitionDuration, CSSPropertyTransitionTimingFunction,
+        CSSPropertyTransitionDelay, CSSPropertyTransitionProperty};
+    return StylePropertyShorthand(CSSPropertyTransition, transitionProperties);
+}
+
</ins><span class="cx"> bool isShorthandCSSProperty(CSSPropertyID id)
</span><span class="cx"> {
</span><span class="cx">     return shorthandForProperty(id).length();
</span></span></pre></div>
<a id="trunkSourceWebCorecssStylePropertyShorthandh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StylePropertyShorthand.h (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StylePropertyShorthand.h        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/StylePropertyShorthand.h        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx"> 
</span><span class="cx"> // Custom StylePropertyShorthand functions.
</span><span class="cx"> StylePropertyShorthand animationShorthandForParsing();
</span><ins>+StylePropertyShorthand transitionShorthandForParsing();
</ins><span class="cx"> StylePropertyShorthand borderAbridgedShorthand();
</span><span class="cx"> 
</span><span class="cx"> // Returns empty value if the property is not a shorthand.
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -1554,16 +1554,12 @@
</span><span class="cx"> 
</span><span class="cx"> URL CSSParser::completeURL(const CSSParserContext&amp; context, const String&amp; url)
</span><span class="cx"> {
</span><del>-    if (url.isNull())
-        return URL();
-    if (context.charset.isEmpty())
-        return URL(context.baseURL, url);
-    return URL(context.baseURL, url, context.charset);
</del><ins>+    return context.completeURL(url);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> URL CSSParser::completeURL(const String&amp; url) const
</span><span class="cx"> {
</span><del>-    return completeURL(m_context, url);
</del><ins>+    return m_context.completeURL(url);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSParser::validateCalculationUnit(ValueWithCalculation&amp; valueWithCalculation, Units unitFlags)
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserImpl.cpp (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserImpl.cpp        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSParserImpl.cpp        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSParserImpl::parseValue(MutableStyleProperties* declaration, CSSPropertyID unresolvedProperty, const String&amp; string, bool important, const CSSParserContext&amp; context)
</del><ins>+bool CSSParserImpl::parseValue(MutableStyleProperties* declaration, CSSPropertyID propertyID, const String&amp; string, bool important, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     CSSParserImpl parser(context);
</span><span class="cx">     StyleRule::Type ruleType = StyleRule::Style;
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">         ruleType = StyleRule::Viewport;
</span><span class="cx"> #endif
</span><span class="cx">     CSSTokenizer::Scope scope(string);
</span><del>-    parser.consumeDeclarationValue(scope.tokenRange(), unresolvedProperty, important, ruleType);
</del><ins>+    parser.consumeDeclarationValue(scope.tokenRange(), propertyID, important, ruleType);
</ins><span class="cx">     if (parser.m_parsedProperties.isEmpty())
</span><span class="cx">         return false;
</span><span class="cx">     return declaration-&gt;addParsedProperties(parser.m_parsedProperties);
</span><span class="lines">@@ -757,7 +757,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(range.peek().type() == IdentToken);
</span><span class="cx">     const CSSParserToken&amp; token = range.consumeIncludingWhitespace();
</span><del>-    CSSPropertyID unresolvedProperty = token.parseAsUnresolvedCSSPropertyID();
</del><ins>+    CSSPropertyID propertyID = token.parseAsCSSPropertyID();
</ins><span class="cx">     if (range.consume().type() != ColonToken)
</span><span class="cx">         return; // Parse error
</span><span class="cx"> 
</span><span class="lines">@@ -777,7 +777,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     size_t propertiesCount = m_parsedProperties.size();
</span><del>-    if (unresolvedProperty == CSSPropertyInvalid &amp;&amp; CSSVariableParser::isValidVariableName(token)) {
</del><ins>+    if (propertyID == CSSPropertyInvalid &amp;&amp; CSSVariableParser::isValidVariableName(token)) {
</ins><span class="cx">         AtomicString variableName = token.value().toAtomicString();
</span><span class="cx">         consumeVariableValue(range.makeSubRange(&amp;range.peek(), declarationValueEnd), variableName, important);
</span><span class="cx">     }
</span><span class="lines">@@ -785,8 +785,8 @@
</span><span class="cx">     if (important &amp;&amp; (ruleType == StyleRule::FontFace || ruleType == StyleRule::Keyframe))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (unresolvedProperty != CSSPropertyInvalid)
-        consumeDeclarationValue(range.makeSubRange(&amp;range.peek(), declarationValueEnd), unresolvedProperty, important, ruleType);
</del><ins>+    if (propertyID != CSSPropertyInvalid)
+        consumeDeclarationValue(range.makeSubRange(&amp;range.peek(), declarationValueEnd), propertyID, important, ruleType);
</ins><span class="cx"> 
</span><span class="cx">     if (m_observerWrapper &amp;&amp; (ruleType == StyleRule::Style || ruleType == StyleRule::Keyframe)) {
</span><span class="cx">         m_observerWrapper-&gt;observer().observeProperty(
</span><span class="lines">@@ -801,9 +801,9 @@
</span><span class="cx">         m_parsedProperties.append(CSSProperty(CSSPropertyCustom, WTFMove(value), important));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParserImpl::consumeDeclarationValue(CSSParserTokenRange range, CSSPropertyID unresolvedProperty, bool important, StyleRule::Type ruleType)
</del><ins>+void CSSParserImpl::consumeDeclarationValue(CSSParserTokenRange range, CSSPropertyID propertyID, bool important, StyleRule::Type ruleType)
</ins><span class="cx"> {
</span><del>-    CSSPropertyParser::parseValue(unresolvedProperty, important, range, m_context, m_parsedProperties, ruleType);
</del><ins>+    CSSPropertyParser::parseValue(propertyID, important, range, m_context, m_parsedProperties, ruleType);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;Vector&lt;double&gt;&gt; CSSParserImpl::consumeKeyframeKeyList(CSSParserTokenRange range)
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserModeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserMode.h (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserMode.h        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSParserMode.h        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #ifndef CSSParserMode_h
</span><span class="cx"> #define CSSParserMode_h
</span><span class="cx"> 
</span><ins>+#include &quot;TextEncoding.h&quot;
</ins><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &quot;URLHash.h&quot;
</span><span class="cx"> #include &lt;wtf/HashFunctions.h&gt;
</span><span class="lines">@@ -107,6 +108,16 @@
</span><span class="cx">     bool useLegacyBackgroundSizeShorthandBehavior { false };
</span><span class="cx">     bool springTimingFunctionEnabled { false };
</span><span class="cx">     bool useNewParser { false };
</span><ins>+    
+    URL completeURL(const String&amp; url) const
+    {
+        if (url.isNull())
+            return URL();
+        if (charset.isEmpty())
+            return URL(baseURL, url);
+        return URL(baseURL, url, TextEncoding(charset));
+    }
+
</ins><span class="cx"> #if ENABLE(VARIATION_FONTS)
</span><span class="cx">     bool variationFontsEnabled { false };
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserTokencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserToken.cpp (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserToken.cpp        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSParserToken.cpp        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -296,10 +296,10 @@
</span><span class="cx">     return m_numericValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSPropertyID CSSParserToken::parseAsUnresolvedCSSPropertyID() const
</del><ins>+CSSPropertyID CSSParserToken::parseAsCSSPropertyID() const
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_type == IdentToken);
</span><del>-    return unresolvedCSSPropertyID(value());
</del><ins>+    return cssPropertyID(value());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CSSValueID CSSParserToken::id() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserTokenh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserToken.h (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserToken.h        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSParserToken.h        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasStringBacking() const;
</span><span class="cx"> 
</span><del>-    CSSPropertyID parseAsUnresolvedCSSPropertyID() const;
</del><ins>+    CSSPropertyID parseAsCSSPropertyID() const;
</ins><span class="cx"> 
</span><span class="cx">     void serialize(StringBuilder&amp;) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -32,11 +32,11 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CSSBasicShapes.h&quot;
</span><span class="cx"> #include &quot;CSSBorderImage.h&quot;
</span><ins>+#include &quot;CSSBorderImageSliceValue.h&quot;
</ins><span class="cx"> #include &quot;CSSContentDistributionValue.h&quot;
</span><span class="cx"> #include &quot;CSSCursorImageValue.h&quot;
</span><del>-// FIXME-NEWPARSER #include &quot;CSSCustomIdentValue.h&quot;
</del><ins>+#include &quot;CSSCustomIdentValue.h&quot;
</ins><span class="cx"> #include &quot;CSSFontFaceSrcValue.h&quot;
</span><del>-// FIXME-NEWPARSER #include &quot;CSSFontFamilyValue.h&quot;
</del><span class="cx"> #include &quot;CSSFontFeatureValue.h&quot;
</span><span class="cx"> #include &quot;CSSFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSGridAutoRepeatValue.h&quot;
</span><span class="lines">@@ -46,31 +46,33 @@
</span><span class="cx"> #include &quot;CSSInitialValue.h&quot;
</span><span class="cx"> #include &quot;CSSParserFastPaths.h&quot;
</span><span class="cx"> #include &quot;CSSParserIdioms.h&quot;
</span><del>-// FIXME-NEWPARSER #include &quot;CSSPathValue.h&quot;
-// FIXME-NEWPARSER #include &quot;CSSPendingSubstitutionValue.h&quot;
</del><ins>+#include &quot;CSSPendingSubstitutionValue.h&quot;
</ins><span class="cx"> #include &quot;CSSPrimitiveValueMappings.h&quot;
</span><span class="cx"> #include &quot;CSSPropertyParserHelpers.h&quot;
</span><del>-// FIXME-NEWPARSER #include &quot;CSSQuadValue.h&quot;
</del><span class="cx"> #include &quot;CSSReflectValue.h&quot;
</span><ins>+#include &quot;CSSRevertValue.h&quot;
</ins><span class="cx"> #include &quot;CSSShadowValue.h&quot;
</span><del>-// FIXME-NEWPARSER #include &quot;CSSStringValue.h&quot;
</del><span class="cx"> #include &quot;CSSTimingFunctionValue.h&quot;
</span><del>-// FIXME-NEWPARSER #include &quot;CSSURIValue.h&quot;
</del><span class="cx"> #include &quot;CSSUnicodeRangeValue.h&quot;
</span><span class="cx"> #include &quot;CSSUnsetValue.h&quot;
</span><del>-// FIXME-NEWPARSER #include &quot;CSSValuePair.h&quot;
-// FIXME-NEWPARSER #include &quot;CSSVariableReferenceValue.h&quot;
-// FIXME-NEWPARSER #include &quot;CSSVariableParser.h&quot;
</del><ins>+#include &quot;CSSVariableParser.h&quot;
+#include &quot;CSSVariableReferenceValue.h&quot;
</ins><span class="cx"> #include &quot;Counter.h&quot;
</span><span class="cx"> #include &quot;FontFace.h&quot;
</span><span class="cx"> #include &quot;HashTools.h&quot;
</span><ins>+// FIXME-NEWPARSER: Replace Pair and Rect with actual CSSValue subclasses (CSSValuePair and CSSQuadValue).
+#include &quot;Pair.h&quot;
+#include &quot;Rect.h&quot;
</ins><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;RuntimeEnabledFeatures.h&quot;
</span><span class="cx"> #include &quot;SVGPathUtilities.h&quot;
</span><span class="cx"> #include &quot;StylePropertyShorthand.h&quot;
</span><ins>+#include &quot;StylePropertyShorthandFunctions.h&quot;
</ins><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><ins>+using namespace WTF;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static bool hasPrefix(const char* string, unsigned length, const char* prefix)
</span><span class="lines">@@ -181,7 +183,7 @@
</span><span class="cx">     return string.is8Bit() ? cssValueKeywordID(string.characters8(), length) : cssValueKeywordID(string.characters16(), length);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSPropertyID unresolvedCSSPropertyID(StringView string)
</del><ins>+CSSPropertyID cssPropertyID(StringView string)
</ins><span class="cx"> {
</span><span class="cx">     unsigned length = string.length();
</span><span class="cx">     
</span><span class="lines">@@ -193,12 +195,8 @@
</span><span class="cx">     return string.is8Bit() ? cssPropertyID(string.characters8(), length) : cssPropertyID(string.characters16(), length);
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-// FIXME-NEWPARSER
-// Comment out property parsing for now.
-/*
</del><span class="cx"> using namespace CSSPropertyParserHelpers;
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> CSSPropertyParser::CSSPropertyParser(const CSSParserTokenRange&amp; range,
</span><span class="cx">     const CSSParserContext&amp; context, Vector&lt;CSSProperty, 256&gt;* parsedProperties)
</span><span class="cx">     : m_range(range)
</span><span class="lines">@@ -208,25 +206,22 @@
</span><span class="cx">     m_range.consumeWhitespace();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSPropertyParser::addProperty(CSSPropertyID property, CSSPropertyID currentShorthand, const CSSValue&amp; value, bool important, bool implicit)
</del><ins>+void CSSPropertyParser::addProperty(CSSPropertyID property, CSSPropertyID currentShorthand, Ref&lt;CSSValue&gt;&amp;&amp; value, bool important, bool implicit)
</ins><span class="cx"> {
</span><del>-    ASSERT(!isPropertyAlias(property));
-
</del><span class="cx">     int shorthandIndex = 0;
</span><span class="cx">     bool setFromShorthand = false;
</span><span class="cx"> 
</span><span class="cx">     if (currentShorthand) {
</span><del>-        Vector&lt;StylePropertyShorthand, 4&gt; shorthands;
-        getMatchingShorthandsForLonghand(property, &amp;shorthands);
</del><ins>+        auto shorthands = matchingShorthandsForLonghand(property);
</ins><span class="cx">         setFromShorthand = true;
</span><span class="cx">         if (shorthands.size() &gt; 1)
</span><span class="cx">             shorthandIndex = indexOfShorthandForLonghand(currentShorthand, shorthands);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_parsedProperties-&gt;append(CSSProperty(property, value, important, setFromShorthand, shorthandIndex, implicit));
</del><ins>+    m_parsedProperties-&gt;append(CSSProperty(property, WTFMove(value), important, setFromShorthand, shorthandIndex, implicit));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID property, const CSSValue&amp; value, bool important)
</del><ins>+void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID property, Ref&lt;CSSValue&gt;&amp;&amp; value, bool important)
</ins><span class="cx"> {
</span><span class="cx">     const StylePropertyShorthand&amp; shorthand = shorthandForProperty(property);
</span><span class="cx">     unsigned shorthandLength = shorthand.length();
</span><span class="lines">@@ -233,84 +228,71 @@
</span><span class="cx">     ASSERT(shorthandLength);
</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], property, value, important);
</del><ins>+        addProperty(longhands[i], property, WTFMove(value), important);
</ins><span class="cx"> }
</span><del>-*/
</del><span class="cx">     
</span><del>-bool CSSPropertyParser::parseValue(CSSPropertyID /*unresolvedProperty*/, bool /*important*/,
-    const CSSParserTokenRange&amp; /*range*/, const CSSParserContext&amp; /*context*/,
-    ParsedPropertyVector&amp; /*parsedProperties*/, StyleRule::Type /*ruleType*/)
</del><ins>+bool CSSPropertyParser::parseValue(CSSPropertyID propertyID, bool important,
+    const CSSParserTokenRange&amp; range, const CSSParserContext&amp; context,
+    ParsedPropertyVector&amp; parsedProperties, StyleRule::Type ruleType)
</ins><span class="cx"> {
</span><del>-    return false;
-    
-    /*
</del><span class="cx">     int parsedPropertiesSize = parsedProperties.size();
</span><span class="cx"> 
</span><span class="cx">     CSSPropertyParser parser(range, context, &amp;parsedProperties);
</span><del>-    CSSPropertyID resolvedProperty = resolveCSSPropertyID(unresolvedProperty);
</del><span class="cx">     bool parseSuccess;
</span><span class="cx"> 
</span><del>-    if (ruleType == StyleRule::Viewport) {
-        parseSuccess = (RuntimeEnabledFeatures::cssViewportEnabled() || isUASheetBehavior(context.mode()))
-            &amp;&amp; parser.parseViewportDescriptor(resolvedProperty, important);
-    } else if (ruleType == StyleRule::FontFace) {
-        parseSuccess = parser.parseFontFaceDescriptor(resolvedProperty);
-    } else {
-        parseSuccess = parser.parseValueStart(unresolvedProperty, important);
-    }
</del><ins>+#if ENABLE(CSS_DEVICE_ADAPTATION)
+    if (ruleType == StyleRule::Viewport)
+        parseSuccess = parser.parseViewportDescriptor(propertyID, important);
+    else
+#endif
+    if (ruleType == StyleRule::FontFace)
+        parseSuccess = parser.parseFontFaceDescriptor(propertyID);
+    else
+        parseSuccess = parser.parseValueStart(propertyID, important);
</ins><span class="cx"> 
</span><del>-    // This doesn't count UA style sheets
-    if (parseSuccess &amp;&amp; context.useCounter())
-        context.useCounter()-&gt;count(context.mode(), unresolvedProperty);
-
</del><span class="cx">     if (!parseSuccess)
</span><span class="cx">         parsedProperties.shrink(parsedPropertiesSize);
</span><span class="cx"> 
</span><span class="cx">     return parseSuccess;
</span><del>-     */
</del><span class="cx"> }
</span><del>-/*
-const CSSValue* CSSPropertyParser::parseSingleValue(
-    CSSPropertyID property, const CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+
+RefPtr&lt;CSSValue&gt; CSSPropertyParser::parseSingleValue(CSSPropertyID property, const CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     CSSPropertyParser parser(range, context, nullptr);
</span><del>-    const CSSValue* value = parser.parseSingleValue(property);
</del><ins>+    RefPtr&lt;CSSValue&gt; value = parser.parseSingleValue(property);
</ins><span class="cx">     if (!value || !parser.m_range.atEnd())
</span><span class="cx">         return nullptr;
</span><span class="cx">     return value;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSPropertyParser::parseValueStart(CSSPropertyID unresolvedProperty, bool important)
</del><ins>+bool CSSPropertyParser::parseValueStart(CSSPropertyID propertyID, bool important)
</ins><span class="cx"> {
</span><del>-    if (consumeCSSWideKeyword(unresolvedProperty, important))
</del><ins>+    if (consumeCSSWideKeyword(propertyID, important))
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     CSSParserTokenRange originalRange = m_range;
</span><del>-    CSSPropertyID propertyId = resolveCSSPropertyID(unresolvedProperty);
-    bool isShorthand = isShorthandProperty(propertyId);
</del><ins>+    bool isShorthand = isShorthandCSSProperty(propertyID);
</ins><span class="cx"> 
</span><span class="cx">     if (isShorthand) {
</span><span class="cx">         // Variable references will fail to parse here and will fall out to the variable ref parser below.
</span><del>-        if (parseShorthand(unresolvedProperty, important))
</del><ins>+        if (parseShorthand(propertyID, important))
</ins><span class="cx">             return true;
</span><span class="cx">     } else {
</span><del>-        if (const CSSValue* parsedValue = parseSingleValue(unresolvedProperty)) {
-            if (m_range.atEnd()) {
-                addProperty(propertyId, CSSPropertyInvalid, *parsedValue, important);
-                return true;
-            }
</del><ins>+        RefPtr&lt;CSSValue&gt; parsedValue = parseSingleValue(propertyID);
+        if (parsedValue &amp;&amp; m_range.atEnd()) {
+            addProperty(propertyID, CSSPropertyInvalid, *parsedValue, important);
+            return true;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (RuntimeEnabledFeatures::cssVariablesEnabled() &amp;&amp; CSSVariableParser::containsValidVariableReferences(originalRange)) {
-        CSSVariableReferenceValue* variable = CSSVariableReferenceValue::create(CSSVariableData::create(originalRange));
</del><ins>+    if (CSSVariableParser::containsValidVariableReferences(originalRange)) {
+        RefPtr&lt;CSSVariableReferenceValue&gt; variable = CSSVariableReferenceValue::create(CSSVariableData::create(originalRange));
</ins><span class="cx"> 
</span><span class="cx">         if (isShorthand) {
</span><del>-            const CSSPendingSubstitutionValue&amp; pendingValue = *CSSPendingSubstitutionValue::create(propertyId, variable);
-            addExpandedPropertyForValue(propertyId, pendingValue, important);
-        } else {
-            addProperty(propertyId, CSSPropertyInvalid, *variable, important);
-        }
</del><ins>+            RefPtr&lt;CSSPendingSubstitutionValue&gt; pendingValue = CSSPendingSubstitutionValue::create(propertyID, variable.releaseNonNull());
+            addExpandedPropertyForValue(propertyID, pendingValue.releaseNonNull(), important);
+        } else
+            addProperty(propertyID, CSSPropertyInvalid, variable.releaseNonNull(), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -317,48 +299,48 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx">  
</span><del>-bool CSSPropertyParser::consumeCSSWideKeyword(CSSPropertyID unresolvedProperty, bool important)
</del><ins>+bool CSSPropertyParser::consumeCSSWideKeyword(CSSPropertyID propertyID, bool important)
</ins><span class="cx"> {
</span><span class="cx">     CSSParserTokenRange rangeCopy = m_range;
</span><del>-    CSSValueID id = rangeCopy.consumeIncludingWhitespace().id();
</del><ins>+    CSSValueID valueID = rangeCopy.consumeIncludingWhitespace().id();
</ins><span class="cx">     if (!rangeCopy.atEnd())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    CSSValue* value = nullptr;
-    if (id == CSSValueInitial)
-        value = CSSInitialValue::create();
-    else if (id == CSSValueInherit)
-        value = CSSInheritedValue::create();
-    else if (id == CSSValueUnset)
-        value = CSSUnsetValue::create();
</del><ins>+    RefPtr&lt;CSSValue&gt; value;
+    if (valueID == CSSValueInherit)
+        value = CSSValuePool::singleton().createInheritedValue();
+    else if (valueID == CSSValueInitial)
+        value = CSSValuePool::singleton().createExplicitInitialValue();
+    else if (valueID == CSSValueUnset)
+        value = CSSValuePool::singleton().createUnsetValue();
+    else if (valueID == CSSValueRevert)
+        value = CSSValuePool::singleton().createRevertValue();
</ins><span class="cx">     else
</span><span class="cx">         return false;
</span><del>-
-    CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty);
-    const StylePropertyShorthand&amp; shorthand = shorthandForProperty(property);
</del><ins>+    
+    const StylePropertyShorthand&amp; shorthand = shorthandForProperty(propertyID);
</ins><span class="cx">     if (!shorthand.length()) {
</span><del>-        if (CSSPropertyMetadata::isDescriptorOnly(unresolvedProperty))
</del><ins>+        if (CSSProperty::isDescriptorOnly(propertyID))
</ins><span class="cx">             return false;
</span><del>-        addProperty(property, CSSPropertyInvalid, *value, important);
-    } else {
-        addExpandedPropertyForValue(property, *value, important);
-    }
</del><ins>+        addProperty(propertyID, CSSPropertyInvalid, value.releaseNonNull(), important);
+    } else
+        addExpandedPropertyForValue(propertyID, value.releaseNonNull(), important);
</ins><span class="cx">     m_range = rangeCopy;
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumeTransformOrigin(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless)
</del><ins>+static RefPtr&lt;CSSValueList&gt; consumeTransformOrigin(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless)
</ins><span class="cx"> {
</span><del>-    CSSValue* resultX = nullptr;
-    CSSValue* resultY = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; resultX;
+    RefPtr&lt;CSSPrimitiveValue&gt; resultY;
</ins><span class="cx">     if (consumeOneOrTwoValuedPosition(range, cssParserMode, unitless, resultX, resultY)) {
</span><del>-        CSSValueList* list = CSSValueList::createSpaceSeparated();
-        list-&gt;append(*resultX);
-        list-&gt;append(*resultY);
-        CSSValue* resultZ = consumeLength(range, cssParserMode, ValueRangeAll);
</del><ins>+        RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
+        list-&gt;append(resultX.releaseNonNull());
+        list-&gt;append(resultY.releaseNonNull());
+        RefPtr&lt;CSSPrimitiveValue&gt; resultZ = consumeLength(range, cssParserMode, ValueRangeAll);
</ins><span class="cx">         if (!resultZ)
</span><del>-            resultZ = CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitType::Pixels);
-        list-&gt;append(*resultZ);
</del><ins>+            resultZ = CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitTypes::CSS_PX);
+        list-&gt;append(resultZ.releaseNonNull());
</ins><span class="cx">         return list;
</span><span class="cx">     }
</span><span class="cx">     return nullptr;
</span><span class="lines">@@ -365,25 +347,24 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Methods for consuming non-shorthand properties starts here.
</span><del>-static CSSValue* consumeWillChange(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeWillChange(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* values = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; values = CSSValueList::createCommaSeparated();
</ins><span class="cx">     // Every comma-separated list of identifiers is a valid will-change value,
</span><span class="cx">     // unless the list includes an explicitly disallowed identifier.
</span><span class="cx">     while (true) {
</span><span class="cx">         if (range.peek().type() != IdentToken)
</span><span class="cx">             return nullptr;
</span><del>-        CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(range.peek().value());
-        if (unresolvedProperty) {
-            ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty));
</del><ins>+        CSSPropertyID propertyID = cssPropertyID(range.peek().value());
+        if (propertyID != CSSPropertyInvalid) {
</ins><span class="cx">             // Now &quot;all&quot; is used by both CSSValue and CSSPropertyValue.
</span><span class="cx">             // Need to return nullptr when currentValue is CSSPropertyAll.
</span><del>-            if (unresolvedProperty == CSSPropertyWillChange || unresolvedProperty == CSSPropertyAll)
</del><ins>+            if (propertyID == CSSPropertyWillChange || propertyID == CSSPropertyAll)
</ins><span class="cx">                 return nullptr;
</span><del>-            values-&gt;append(*CSSCustomIdentValue::create(unresolvedProperty));
</del><ins>+            values-&gt;append(CSSCustomIdentValue::create(propertyID));
</ins><span class="cx">             range.consumeIncludingWhitespace();
</span><span class="cx">         } else {
</span><span class="cx">             switch (range.peek().id()) {
</span><span class="lines">@@ -396,7 +377,7 @@
</span><span class="cx">                 return nullptr;
</span><span class="cx">             case CSSValueContents:
</span><span class="cx">             case CSSValueScrollPosition:
</span><del>-                values-&gt;append(*consumeIdent(range));
</del><ins>+                values-&gt;append(consumeIdent(range).releaseNonNull());
</ins><span class="cx">                 break;
</span><span class="cx">             default:
</span><span class="cx">                 range.consumeIncludingWhitespace();
</span><span class="lines">@@ -413,7 +394,7 @@
</span><span class="cx">     return values;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSFontFeatureValue* consumeFontFeatureTag(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSFontFeatureValue&gt; consumeFontFeatureTag(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     // Feature tag name consists of 4-letter characters.
</span><span class="cx">     static const unsigned tagNameLength = 4;
</span><span class="lines">@@ -424,12 +405,14 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (token.value().length() != tagNameLength)
</span><span class="cx">         return nullptr;
</span><del>-    AtomicString tag = token.value().toAtomicString();
-    for (unsigned i = 0; i &lt; tagNameLength; ++i) {
</del><ins>+    
+    FontTag tag;
+    for (unsigned i = 0; i &lt; tag.size(); ++i) {
</ins><span class="cx">         // Limits the range of characters to 0x20-0x7E, following the tag name rules defiend in the OpenType specification.
</span><del>-        UChar character = tag[i];
</del><ins>+        UChar character = token.value()[i];
</ins><span class="cx">         if (character &lt; 0x20 || character &gt; 0x7E)
</span><span class="cx">             return nullptr;
</span><ins>+        tag[i] = toASCIILower(character);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     int tagValue = 1;
</span><span class="lines">@@ -441,24 +424,24 @@
</span><span class="cx">     } else if (range.peek().id() == CSSValueOn || range.peek().id() == CSSValueOff) {
</span><span class="cx">         tagValue = range.consumeIncludingWhitespace().id() == CSSValueOn;
</span><span class="cx">     }
</span><del>-    return CSSFontFeatureValue::create(tag, tagValue);
</del><ins>+    return CSSFontFeatureValue::create(WTFMove(tag), tagValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFontFeatureSettings(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFontFeatureSettings(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNormal)
</span><span class="cx">         return consumeIdent(range);
</span><del>-    CSSValueList* settings = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; settings = CSSValueList::createCommaSeparated();
</ins><span class="cx">     do {
</span><del>-        CSSFontFeatureValue* fontFeatureValue = consumeFontFeatureTag(range);
</del><ins>+        RefPtr&lt;CSSFontFeatureValue&gt; fontFeatureValue = consumeFontFeatureTag(range);
</ins><span class="cx">         if (!fontFeatureValue)
</span><span class="cx">             return nullptr;
</span><del>-        settings-&gt;append(*fontFeatureValue);
</del><ins>+        settings-&gt;append(fontFeatureValue.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx">     return settings;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumePage(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumePage(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -465,16 +448,16 @@
</span><span class="cx">     return consumeCustomIdent(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeQuotes(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeQuotes(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><del>-    CSSValueList* values = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; values = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     while (!range.atEnd()) {
</span><del>-        CSSStringValue* parsedValue = consumeString(range);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; parsedValue = consumeString(range);
</ins><span class="cx">         if (!parsedValue)
</span><span class="cx">             return nullptr;
</span><del>-        values-&gt;append(*parsedValue);
</del><ins>+        values-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">     }
</span><span class="cx">     if (values-&gt;length() &amp;&amp; values-&gt;length() % 2 == 0)
</span><span class="cx">         return values;
</span><span class="lines">@@ -481,16 +464,7 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeWebkitHighlight(CSSParserTokenRange&amp; range)
-{
-    if (range.peek().id() == CSSValueNone)
-        return consumeIdent(range);
-    return consumeString(range);
-}
-
</del><span class="cx"> class FontVariantLigaturesParser {
</span><del>-    STACK_ALLOCATED();
-
</del><span class="cx"> public:
</span><span class="cx">     FontVariantLigaturesParser()
</span><span class="cx">         : m_sawCommonLigaturesValue(false)
</span><span class="lines">@@ -538,14 +512,14 @@
</span><span class="cx">         default:
</span><span class="cx">             return ParseResult::UnknownValue;
</span><span class="cx">         }
</span><del>-        m_result-&gt;append(*consumeIdent(range));
</del><ins>+        m_result-&gt;append(consumeIdent(range).releaseNonNull());
</ins><span class="cx">         return ParseResult::ConsumedValue;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSValue* finalizeValue()
</del><ins>+    RefPtr&lt;CSSValue&gt; finalizeValue()
</ins><span class="cx">     {
</span><span class="cx">         if (!m_result-&gt;length())
</span><del>-            return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
</del><ins>+            return CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
</ins><span class="cx">         return m_result.release();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -554,10 +528,10 @@
</span><span class="cx">     bool m_sawDiscretionaryLigaturesValue;
</span><span class="cx">     bool m_sawHistoricalLigaturesValue;
</span><span class="cx">     bool m_sawContextualLigaturesValue;
</span><del>-    Member&lt;CSSValueList&gt; m_result;
</del><ins>+    RefPtr&lt;CSSValueList&gt; m_result;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFontVariantLigatures(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFontVariantLigatures(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNormal || range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -572,7 +546,7 @@
</span><span class="cx">     return ligaturesParser.finalizeValue();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeFontVariantCaps(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeFontVariantCaps(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdent&lt;CSSValueNormal, CSSValueSmallCaps, CSSValueAllSmallCaps,
</span><span class="cx">         CSSValuePetiteCaps, CSSValueAllPetiteCaps,
</span><span class="lines">@@ -580,8 +554,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class FontVariantNumericParser {
</span><del>-    STACK_ALLOCATED();
-
</del><span class="cx"> public:
</span><span class="cx">     FontVariantNumericParser()
</span><span class="cx">         : m_sawNumericFigureValue(false)
</span><span class="lines">@@ -634,14 +606,14 @@
</span><span class="cx">         default:
</span><span class="cx">             return ParseResult::UnknownValue;
</span><span class="cx">         }
</span><del>-        m_result-&gt;append(*consumeIdent(range));
</del><ins>+        m_result-&gt;append(consumeIdent(range).releaseNonNull());
</ins><span class="cx">         return ParseResult::ConsumedValue;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSValue* finalizeValue()
</del><ins>+    RefPtr&lt;CSSValue&gt; finalizeValue()
</ins><span class="cx">     {
</span><span class="cx">         if (!m_result-&gt;length())
</span><del>-            return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
</del><ins>+            return CSSValuePool::singleton().createIdentifierValue(CSSValueNormal);
</ins><span class="cx">         return m_result.release();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -652,10 +624,10 @@
</span><span class="cx">     bool m_sawNumericFractionValue;
</span><span class="cx">     bool m_sawOrdinalValue;
</span><span class="cx">     bool m_sawSlashedZeroValue;
</span><del>-    Member&lt;CSSValueList&gt; m_result;
</del><ins>+    RefPtr&lt;CSSValueList&gt; m_result;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFontVariantNumeric(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFontVariantNumeric(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNormal)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -670,14 +642,14 @@
</span><span class="cx">     return numericParser.finalizeValue();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeFontVariantCSS21(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeFontVariantCSS21(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdent&lt;CSSValueNormal, CSSValueSmallCaps&gt;(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFontVariantList(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFontVariantList(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><del>-    CSSValueList* values = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; values = CSSValueList::createCommaSeparated();
</ins><span class="cx">     do {
</span><span class="cx">         if (range.peek().id() == CSSValueAll) {
</span><span class="cx">             // FIXME: CSSPropertyParser::parseFontVariant() implements
</span><span class="lines">@@ -688,9 +660,9 @@
</span><span class="cx">                 return nullptr;
</span><span class="cx">             return consumeIdent(range);
</span><span class="cx">         }
</span><del>-        CSSPrimitiveValue* fontVariant = consumeFontVariantCSS21(range);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; fontVariant = consumeFontVariantCSS21(range);
</ins><span class="cx">         if (fontVariant)
</span><del>-            values-&gt;append(*fontVariant);
</del><ins>+            values-&gt;append(fontVariant.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx"> 
</span><span class="cx">     if (values-&gt;length())
</span><span class="lines">@@ -699,7 +671,7 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeFontWeight(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeFontWeight(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     const CSSParserToken&amp; token = range.peek();
</span><span class="cx">     if (token.id() &gt;= CSSValueNormal &amp;&amp; token.id() &lt;= CSSValueLighter)
</span><span class="lines">@@ -710,7 +682,7 @@
</span><span class="cx">     if ((weight % 100) || weight &lt; 100 || weight &gt; 900)
</span><span class="cx">         return nullptr;
</span><span class="cx">     range.consumeIncludingWhitespace();
</span><del>-    return CSSPrimitiveValue::createIdentifier(static_cast&lt;CSSValueID&gt;(CSSValue100 + weight / 100 - 1));
</del><ins>+    return CSSValuePool::singleton().createIdentifierValue(static_cast&lt;CSSValueID&gt;(CSSValue100 + weight / 100 - 1));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static String concatenateFamilyName(CSSParserTokenRange&amp; range)
</span><span class="lines">@@ -730,34 +702,34 @@
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFamilyName(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFamilyName(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().type() == StringToken)
</span><del>-        return CSSFontFamilyValue::create(range.consumeIncludingWhitespace().value().toString());
</del><ins>+        return CSSPrimitiveValue::create(range.consumeIncludingWhitespace().value().toString(), CSSPrimitiveValue::UnitTypes::CSS_STRING);
</ins><span class="cx">     if (range.peek().type() != IdentToken)
</span><span class="cx">         return nullptr;
</span><span class="cx">     String familyName = concatenateFamilyName(range);
</span><span class="cx">     if (familyName.isNull())
</span><span class="cx">         return nullptr;
</span><del>-    return CSSFontFamilyValue::create(familyName);
</del><ins>+    return CSSPrimitiveValue::create(familyName, CSSPrimitiveValue::UnitTypes::CSS_STRING);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeGenericFamily(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeGenericFamily(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdentRange(range, CSSValueSerif, CSSValueWebkitBody);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumeFontFamily(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValueList&gt; consumeFontFamily(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><del>-    CSSValueList* list = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createCommaSeparated();
</ins><span class="cx">     do {
</span><del>-        CSSValue* parsedValue = consumeGenericFamily(range);
</del><ins>+        RefPtr&lt;CSSValue&gt; parsedValue = consumeGenericFamily(range);
</ins><span class="cx">         if (parsedValue) {
</span><del>-            list-&gt;append(*parsedValue);
</del><ins>+            list-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">         } else {
</span><span class="cx">             parsedValue = consumeFamilyName(range);
</span><span class="cx">             if (parsedValue) {
</span><del>-                list-&gt;append(*parsedValue);
</del><ins>+                list-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">             } else {
</span><span class="cx">                 return nullptr;
</span><span class="cx">             }
</span><span class="lines">@@ -766,7 +738,7 @@
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeSpacing(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeSpacing(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNormal)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -774,15 +746,15 @@
</span><span class="cx">     return consumeLength(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeTabSize(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeTabSize(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* parsedValue = consumeInteger(range, 0);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; parsedValue = consumeInteger(range, 0);
</ins><span class="cx">     if (parsedValue)
</span><span class="cx">         return parsedValue;
</span><span class="cx">     return consumeLength(range, cssParserMode, ValueRangeNonNegative);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeTextSizeAdjust(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeTextSizeAdjust(CSSParserTokenRange&amp; range, CSSParserMode /* cssParserMode */)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -791,7 +763,7 @@
</span><span class="cx">     return consumePercent(range, ValueRangeNonNegative);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFontSize(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless = UnitlessQuirk::Forbid)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFontSize(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless = UnitlessQuirk::Forbid)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() &gt;= CSSValueXxSmall &amp;&amp; range.peek().id() &lt;= CSSValueLarger)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -798,123 +770,65 @@
</span><span class="cx">     return consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative, unitless);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeLineHeight(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeLineHeight(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNormal)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* lineHeight = consumeNumber(range, ValueRangeNonNegative);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; lineHeight = consumeNumber(range, ValueRangeNonNegative);
</ins><span class="cx">     if (lineHeight)
</span><span class="cx">         return lineHeight;
</span><span class="cx">     return consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumeRotation(CSSParserTokenRange&amp; range)
</del><ins>+template&lt;typename... Args&gt;
+static Ref&lt;CSSPrimitiveValue&gt; createPrimitiveValuePair(Args&amp;&amp;... args)
</ins><span class="cx"> {
</span><del>-    ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
-    CSSValueList* list = CSSValueList::createSpaceSeparated();
-
-    CSSValue* rotation = consumeAngle(range);
-    if (!rotation)
-        return nullptr;
-    list-&gt;append(*rotation);
-
-    if (range.atEnd())
-        return list;
-
-    for (unsigned i = 0; i &lt; 3; i++) { // 3 dimensions of rotation
-        CSSValue* dimension = consumeNumber(range, ValueRangeAll);
-        if (!dimension)
-            return nullptr;
-        list-&gt;append(*dimension);
-    }
-
-    return list;
</del><ins>+    return CSSValuePool::singleton().createValue(Pair::create(std::forward&lt;Args&gt;(args)...));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumeScale(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeCounter(CSSParserTokenRange&amp; range, int defaultValue)
</ins><span class="cx"> {
</span><del>-    ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
-
-    CSSValue* scale = consumeNumber(range, ValueRangeAll);
-    if (!scale)
-        return nullptr;
-    CSSValueList* list = CSSValueList::createSpaceSeparated();
-    list-&gt;append(*scale);
-    scale = consumeNumber(range, ValueRangeAll);
-    if (scale) {
-        list-&gt;append(*scale);
-        scale = consumeNumber(range, ValueRangeAll);
-        if (scale)
-            list-&gt;append(*scale);
-    }
-
-    return list;
-}
-
-static CSSValueList* consumeTranslate(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
-{
-    ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
-    CSSValue* translate = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll);
-    if (!translate)
-        return nullptr;
-    CSSValueList* list = CSSValueList::createSpaceSeparated();
-    list-&gt;append(*translate);
-    translate = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll);
-    if (translate) {
-        list-&gt;append(*translate);
-        translate = consumeLength(range, cssParserMode, ValueRangeAll);
-        if (translate)
-            list-&gt;append(*translate);
-    }
-
-    return list;
-}
-
-static CSSValue* consumeCounter(CSSParserTokenRange&amp; range, int defaultValue)
-{
</del><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* list = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     do {
</span><del>-        CSSCustomIdentValue* counterName = consumeCustomIdent(range);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; counterName = consumeCustomIdent(range);
</ins><span class="cx">         if (!counterName)
</span><span class="cx">             return nullptr;
</span><span class="cx">         int i = defaultValue;
</span><del>-        if (CSSPrimitiveValue* counterValue = consumeInteger(range))
-            i = counterValue-&gt;intValue());
-        list-&gt;append(*CSSValuePair::create(counterName,
-            CSSPrimitiveValue::create(i, CSSPrimitiveValue::UnitType::Integer),
-            CSSValuePair::DropIdenticalValues));
</del><ins>+        if (RefPtr&lt;CSSPrimitiveValue&gt; counterValue = consumeInteger(range))
+            i = counterValue-&gt;intValue();
+        list-&gt;append(createPrimitiveValuePair(counterName.releaseNonNull(), CSSPrimitiveValue::create(i, CSSPrimitiveValue::UnitTypes::CSS_NUMBER), Pair::IdenticalValueEncoding::Coalesce));
</ins><span class="cx">     } while (!range.atEnd());
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumePageSize(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumePageSize(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdent&lt;CSSValueA3, CSSValueA4, CSSValueA5, CSSValueB4, CSSValueB5, CSSValueLedger, CSSValueLegal, CSSValueLetter&gt;(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumeSize(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValueList&gt; consumeSize(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><del>-    CSSValueList* result = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; result = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> 
</span><span class="cx">     if (range.peek().id() == CSSValueAuto) {
</span><del>-        result-&gt;append(*consumeIdent(range));
</del><ins>+        result-&gt;append(consumeIdent(range).releaseNonNull());
</ins><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (CSSValue* width = consumeLength(range, cssParserMode, ValueRangeNonNegative)) {
-        CSSValue* height = consumeLength(range, cssParserMode, ValueRangeNonNegative);
-        result-&gt;append(*width);
</del><ins>+    if (RefPtr&lt;CSSValue&gt; width = consumeLength(range, cssParserMode, ValueRangeNonNegative)) {
+        RefPtr&lt;CSSValue&gt; height = consumeLength(range, cssParserMode, ValueRangeNonNegative);
+        result-&gt;append(width.releaseNonNull());
</ins><span class="cx">         if (height)
</span><del>-            result-&gt;append(*height);
</del><ins>+            result-&gt;append(height.releaseNonNull());
</ins><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSValue* pageSize = consumePageSize(range);
-    CSSValue* orientation = consumeIdent&lt;CSSValuePortrait, CSSValueLandscape&gt;(range);
</del><ins>+    RefPtr&lt;CSSValue&gt; pageSize = consumePageSize(range);
+    RefPtr&lt;CSSValue&gt; orientation = consumeIdent&lt;CSSValuePortrait, CSSValueLandscape&gt;(range);
</ins><span class="cx">     if (!pageSize)
</span><span class="cx">         pageSize = consumePageSize(range);
</span><span class="cx"> 
</span><span class="lines">@@ -921,42 +835,25 @@
</span><span class="cx">     if (!orientation &amp;&amp; !pageSize)
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (pageSize)
</span><del>-        result-&gt;append(*pageSize);
</del><ins>+        result-&gt;append(pageSize.releaseNonNull());
</ins><span class="cx">     if (orientation)
</span><del>-        result-&gt;append(*orientation);
</del><ins>+        result-&gt;append(orientation.releaseNonNull());
</ins><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeSnapHeight(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeTextIndent(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* unit = consumeLength(range, cssParserMode, ValueRangeNonNegative);
-    if (!unit)
-        return nullptr;
-    CSSValueList* list = CSSValueList::createSpaceSeparated();
-    list-&gt;append(*unit);
-
-    if (CSSPrimitiveValue* position = consumePositiveInteger(range)) {
-        if (position-&gt;intValue() &gt; 100)
-            return nullptr;
-        list-&gt;append(*position);
-    }
-
-    return list;
-}
-
-static CSSValue* consumeTextIndent(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
-{
</del><span class="cx">     // [ &lt;length&gt; | &lt;percentage&gt; ] &amp;&amp; hanging? &amp;&amp; each-line?
</span><span class="cx">     // Keywords only allowed when css3Text is enabled.
</span><del>-    CSSValueList* list = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> 
</span><span class="cx">     bool hasLengthOrPercentage = false;
</span><del>-    bool hasEachLine = false;
</del><ins>+//    bool hasEachLine = false;
</ins><span class="cx">     bool hasHanging = false;
</span><span class="cx"> 
</span><span class="cx">     do {
</span><span class="cx">         if (!hasLengthOrPercentage) {
</span><del>-            if (CSSValue* textIndent = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow)) {
</del><ins>+            if (RefPtr&lt;CSSValue&gt; textIndent = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow)) {
</ins><span class="cx">                 list-&gt;append(*textIndent);
</span><span class="cx">                 hasLengthOrPercentage = true;
</span><span class="cx">                 continue;
</span><span class="lines">@@ -963,19 +860,21 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (RuntimeEnabledFeatures::css3TextEnabled()) {
-            CSSValueID id = range.peek().id();
-            if (!hasEachLine &amp;&amp; id == CSSValueEachLine) {
-                list-&gt;append(*consumeIdent(range));
-                hasEachLine = true;
-                continue;
-            }
-            if (!hasHanging &amp;&amp; id == CSSValueHanging) {
-                list-&gt;append(*consumeIdent(range));
-                hasHanging = true;
-                continue;
-            }
</del><ins>+        CSSValueID id = range.peek().id();
+ /* FIXME-NEWPARSER: We don't support this yet.
+        if (!hasEachLine &amp;&amp; id == CSSValueEachLine) {
+            list-&gt;append(*consumeIdent(range));
+            hasEachLine = true;
+            continue;
</ins><span class="cx">         }
</span><ins>+*/
+        
+        if (!hasHanging &amp;&amp; id == CSSValueHanging) {
+            list-&gt;append(consumeIdent(range).releaseNonNull());
+            hasHanging = true;
+            continue;
+        }
+        
</ins><span class="cx">         return nullptr;
</span><span class="cx">     } while (!range.atEnd());
</span><span class="cx"> 
</span><span class="lines">@@ -985,48 +884,31 @@
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool validWidthOrHeightKeyword(CSSValueID id, const CSSParserContext&amp; context)
</del><ins>+// FIXME-NEWPARSER: Drop the prefix on min-content, max-content and fit-content.
+static bool validWidthOrHeightKeyword(CSSValueID id, const CSSParserContext&amp; /*context*/)
</ins><span class="cx"> {
</span><span class="cx">     if (id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent
</span><del>-        || id == CSSValueMinContent || id == CSSValueMaxContent || id == CSSValueFitContent) {
-        if (context.useCounter()) {
-            switch (id) {
-            case CSSValueWebkitMinContent:
-                context.useCounter()-&gt;count(UseCounter::CSSValuePrefixedMinContent);
-                break;
-            case CSSValueWebkitMaxContent:
-                context.useCounter()-&gt;count(UseCounter::CSSValuePrefixedMaxContent);
-                break;
-            case CSSValueWebkitFillAvailable:
-                context.useCounter()-&gt;count(UseCounter::CSSValuePrefixedFillAvailable);
-                break;
-            case CSSValueWebkitFitContent:
-                context.useCounter()-&gt;count(UseCounter::CSSValuePrefixedFitContent);
-                break;
-            default:
-                break;
-            }
-        }
</del><ins>+        || id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || id == CSSValueWebkitFitContent) {
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeMaxWidthOrHeight(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, UnitlessQuirk unitless = UnitlessQuirk::Forbid)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeMaxWidthOrHeight(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, UnitlessQuirk unitless = UnitlessQuirk::Forbid)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone || validWidthOrHeightKeyword(range.peek().id(), context))
</span><span class="cx">         return consumeIdent(range);
</span><del>-    return consumeLengthOrPercent(range, context.mode(), ValueRangeNonNegative, unitless);
</del><ins>+    return consumeLengthOrPercent(range, context.mode, ValueRangeNonNegative, unitless);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeWidthOrHeight(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, UnitlessQuirk unitless = UnitlessQuirk::Forbid)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeWidthOrHeight(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, UnitlessQuirk unitless = UnitlessQuirk::Forbid)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto || validWidthOrHeightKeyword(range.peek().id(), context))
</span><span class="cx">         return consumeIdent(range);
</span><del>-    return consumeLengthOrPercent(range, context.mode(), ValueRangeNonNegative, unitless);
</del><ins>+    return consumeLengthOrPercent(range, context.mode, ValueRangeNonNegative, unitless);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeMarginOrOffset(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeMarginOrOffset(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1033,7 +915,7 @@
</span><span class="cx">     return consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, unitless);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeClipComponent(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeClipComponent(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1040,7 +922,7 @@
</span><span class="cx">     return consumeLength(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeClip(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeClip(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1050,67 +932,47 @@
</span><span class="cx"> 
</span><span class="cx">     CSSParserTokenRange args = consumeFunction(range);
</span><span class="cx">     // rect(t, r, b, l) || rect(t r b l)
</span><del>-    CSSPrimitiveValue* top = consumeClipComponent(args, cssParserMode);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; top = consumeClipComponent(args, cssParserMode);
</ins><span class="cx">     if (!top)
</span><span class="cx">         return nullptr;
</span><span class="cx">     bool needsComma = consumeCommaIncludingWhitespace(args);
</span><del>-    CSSPrimitiveValue* right = consumeClipComponent(args, cssParserMode);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; right = consumeClipComponent(args, cssParserMode);
</ins><span class="cx">     if (!right || (needsComma &amp;&amp; !consumeCommaIncludingWhitespace(args)))
</span><span class="cx">         return nullptr;
</span><del>-    CSSPrimitiveValue* bottom = consumeClipComponent(args, cssParserMode);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; bottom = consumeClipComponent(args, cssParserMode);
</ins><span class="cx">     if (!bottom || (needsComma &amp;&amp; !consumeCommaIncludingWhitespace(args)))
</span><span class="cx">         return nullptr;
</span><del>-    CSSPrimitiveValue* left = consumeClipComponent(args, cssParserMode);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; left = consumeClipComponent(args, cssParserMode);
</ins><span class="cx">     if (!left || !args.atEnd())
</span><span class="cx">         return nullptr;
</span><del>-    return CSSQuadValue::create(top, right, bottom, left, CSSQuadValue::SerializeAsRect);
</del><ins>+    
+    auto rect = Rect::create();
+    rect-&gt;setLeft(left.releaseNonNull());
+    rect-&gt;setTop(top.releaseNonNull());
+    rect-&gt;setRight(right.releaseNonNull());
+    rect-&gt;setBottom(bottom.releaseNonNull());
+    return CSSValuePool::singleton().createValue(WTFMove(rect));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumePan(CSSParserTokenRange&amp; range, CSSValue*&amp; panX, CSSValue*&amp; panY)
</del><ins>+#if ENABLE(TOUCH_EVENTS)
+static RefPtr&lt;CSSValue&gt; consumeTouchAction(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     CSSValueID id = range.peek().id();
</span><del>-    if ((id == CSSValuePanX || id == CSSValuePanRight || id == CSSValuePanLeft) &amp;&amp; !panX) {
-        if (id != CSSValuePanX &amp;&amp; !RuntimeEnabledFeatures::cssTouchActionPanDirectionsEnabled())
-            return false;
-        panX = consumeIdent(range);
-    } else if ((id == CSSValuePanY || id == CSSValuePanDown || id == CSSValuePanUp) &amp;&amp; !panY) {
-        if (id != CSSValuePanY &amp;&amp; !RuntimeEnabledFeatures::cssTouchActionPanDirectionsEnabled())
-            return false;
-        panY = consumeIdent(range);
-    } else {
-        return false;
-    }
-    return true;
-}
-
-static CSSValue* consumeTouchAction(CSSParserTokenRange&amp; range)
-{
-    CSSValueList* list = CSSValueList::createSpaceSeparated();
-    CSSValueID id = range.peek().id();
</del><span class="cx">     if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueManipulation) {
</span><del>-        list-&gt;append(*consumeIdent(range));
</del><ins>+        list-&gt;append(consumeIdent(range).releaseNonNull());
</ins><span class="cx">         return list;
</span><span class="cx">     }
</span><del>-
-    CSSValue* panX = nullptr;
-    CSSValue* panY = nullptr;
-    if (!consumePan(range, panX, panY))
-        return nullptr;
-    if (!range.atEnd() &amp;&amp; !consumePan(range, panX, panY))
-        return nullptr;
-
-    if (panX)
-        list-&gt;append(*panX);
-    if (panY)
-        list-&gt;append(*panY);
-    return list;
</del><ins>+    // FIXME-NEWPARSER: Support pan.
+    return nullptr;
</ins><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeLineClamp(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeLineClamp(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().type() != PercentageToken &amp;&amp; range.peek().type() != NumberToken)
</span><span class="cx">         return nullptr;
</span><del>-    CSSPrimitiveValue* clampValue = consumePercent(range, ValueRangeNonNegative);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; clampValue = consumePercent(range, ValueRangeNonNegative);
</ins><span class="cx">     if (clampValue)
</span><span class="cx">         return clampValue;
</span><span class="cx">     // When specifying number of lines, don't allow 0 as a valid value.
</span><span class="lines">@@ -1117,7 +979,7 @@
</span><span class="cx">     return consumePositiveInteger(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeLocale(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeLocale(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1124,19 +986,19 @@
</span><span class="cx">     return consumeString(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeColumnWidth(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeColumnWidth(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx">     // Always parse lengths in strict mode here, since it would be ambiguous otherwise when used in
</span><span class="cx">     // the 'columns' shorthand property.
</span><del>-    CSSPrimitiveValue* columnWidth = consumeLength(range, HTMLStandardMode, ValueRangeNonNegative);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; columnWidth = consumeLength(range, HTMLStandardMode, ValueRangeNonNegative);
</ins><span class="cx">     if (!columnWidth || (!columnWidth-&gt;isCalculated() &amp;&amp; columnWidth-&gt;doubleValue() == 0))
</span><span class="cx">         return nullptr;
</span><span class="cx">     return columnWidth;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeColumnCount(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeColumnCount(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1143,7 +1005,7 @@
</span><span class="cx">     return consumePositiveInteger(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeColumnGap(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeColumnGap(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNormal)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1150,31 +1012,26 @@
</span><span class="cx">     return consumeLength(range, cssParserMode, ValueRangeNonNegative);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeColumnSpan(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeColumnSpan(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdent&lt;CSSValueAll, CSSValueNone&gt;(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeZoom(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeZoom(CSSParserTokenRange&amp; range, const CSSParserContext&amp; /*context*/)
</ins><span class="cx"> {
</span><span class="cx">     const CSSParserToken&amp; token = range.peek();
</span><del>-    CSSPrimitiveValue* zoom = nullptr;
-    if (token.type() == IdentToken) {
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; zoom;
+    if (token.type() == IdentToken)
</ins><span class="cx">         zoom = consumeIdent&lt;CSSValueNormal, CSSValueReset, CSSValueDocument&gt;(range);
</span><del>-    } else {
</del><ins>+    else {
</ins><span class="cx">         zoom = consumePercent(range, ValueRangeNonNegative);
</span><span class="cx">         if (!zoom)
</span><span class="cx">             zoom = consumeNumber(range, ValueRangeNonNegative);
</span><span class="cx">     }
</span><del>-    if (zoom &amp;&amp; context.useCounter()
-        &amp;&amp; !(token.id() == CSSValueNormal
-            || (token.type() == NumberToken &amp;&amp; zoom-&gt;doubleValue() == 1)
-            || (token.type() == PercentageToken &amp;&amp; zoom-&gt;doubleValue() == 100)))
-        context.useCounter()-&gt;count(UseCounter::CSSZoomNotEqualToOne);
</del><span class="cx">     return zoom;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeAnimationIterationCount(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeAnimationIterationCount(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueInfinite)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1181,19 +1038,15 @@
</span><span class="cx">     return consumeNumber(range, ValueRangeNonNegative);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeAnimationName(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, bool allowQuotedName)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeAnimationName(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    if (allowQuotedName &amp;&amp; range.peek().type() == StringToken) {
-        // Legacy support for strings in prefixed animations.
-        if (context.useCounter())
-            context.useCounter()-&gt;count(UseCounter::QuotedAnimationName);
-
</del><ins>+    if (range.peek().type() == StringToken) {
</ins><span class="cx">         const CSSParserToken&amp; token = range.consumeIncludingWhitespace();
</span><span class="cx">         if (equalIgnoringASCIICase(token.value(), &quot;none&quot;))
</span><del>-            return CSSPrimitiveValue::createIdentifier(CSSValueNone);
</del><ins>+            return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
</ins><span class="cx">         return CSSCustomIdentValue::create(token.value().toString());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1200,7 +1053,7 @@
</span><span class="cx">     return consumeCustomIdent(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeTransitionProperty(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeTransitionProperty(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     const CSSParserToken&amp; token = range.peek();
</span><span class="cx">     if (token.type() != IdentToken)
</span><span class="lines">@@ -1208,8 +1061,7 @@
</span><span class="cx">     if (token.id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    if (CSSPropertyID property = token.parseAsUnresolvedCSSPropertyID()) {
-        ASSERT(CSSPropertyMetadata::isEnabledProperty(property));
</del><ins>+    if (CSSPropertyID property = token.parseAsCSSPropertyID()) {
</ins><span class="cx">         range.consumeIncludingWhitespace();
</span><span class="cx">         return CSSCustomIdentValue::create(property);
</span><span class="cx">     }
</span><span class="lines">@@ -1216,43 +1068,39 @@
</span><span class="cx">     return consumeCustomIdent(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeSteps(CSSParserTokenRange&amp; range)
-{
</del><ins>+    
+static RefPtr&lt;CSSValue&gt; consumeSteps(CSSParserTokenRange&amp; range) {
</ins><span class="cx">     ASSERT(range.peek().functionId() == CSSValueSteps);
</span><span class="cx">     CSSParserTokenRange rangeCopy = range;
</span><span class="cx">     CSSParserTokenRange args = consumeFunction(rangeCopy);
</span><del>-
-    CSSPrimitiveValue* steps = consumePositiveInteger(args);
</del><ins>+    
+    RefPtr&lt;CSSPrimitiveValue&gt; steps = consumePositiveInteger(args);
</ins><span class="cx">     if (!steps)
</span><span class="cx">         return nullptr;
</span><del>-
-    StepsTimingFunction::StepPosition position = StepsTimingFunction::StepPosition::END;
</del><ins>+    
+    // FIXME-NEWPARSER: Support the middle value and change from a boolean to an enum.
+    bool stepAtStart = false;
</ins><span class="cx">     if (consumeCommaIncludingWhitespace(args)) {
</span><span class="cx">         switch (args.consumeIncludingWhitespace().id()) {
</span><del>-        case CSSValueMiddle:
-            if (!RuntimeEnabledFeatures::webAnimationsAPIEnabled())
</del><ins>+            case CSSValueStart:
+                stepAtStart = true;
+            break;
+            case CSSValueEnd:
+                stepAtStart = false;
+                break;
+            default:
</ins><span class="cx">                 return nullptr;
</span><del>-            position = StepsTimingFunction::StepPosition::MIDDLE;
-            break;
-        case CSSValueStart:
-            position = StepsTimingFunction::StepPosition::START;
-            break;
-        case CSSValueEnd:
-            position = StepsTimingFunction::StepPosition::END;
-            break;
-        default:
-            return nullptr;
</del><span class="cx">         }
</span><span class="cx">     }
</span><del>-
</del><ins>+    
</ins><span class="cx">     if (!args.atEnd())
</span><span class="cx">         return nullptr;
</span><del>-
</del><ins>+    
</ins><span class="cx">     range = rangeCopy;
</span><del>-    return CSSStepsTimingFunctionValue::create(steps-&gt;intValue(), position);
</del><ins>+    return CSSStepsTimingFunctionValue::create(steps-&gt;intValue(), stepAtStart);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeCubicBezier(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeCubicBezier(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(range.peek().functionId() == CSSValueCubicBezier);
</span><span class="cx">     CSSParserTokenRange rangeCopy = range;
</span><span class="lines">@@ -1276,39 +1124,38 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeAnimationTimingFunction(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeAnimationTimingFunction(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueEase || id == CSSValueLinear || id == CSSValueEaseIn
</span><del>-        || id == CSSValueEaseOut || id == CSSValueEaseInOut || id == CSSValueStepStart
-        || id == CSSValueStepEnd || id == CSSValueStepMiddle)
</del><ins>+        || id == CSSValueEaseOut || id == CSSValueEaseInOut || id == CSSValueStepStart || id == CSSValueStepEnd)
</ins><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><span class="cx">     CSSValueID function = range.peek().functionId();
</span><ins>+    if (function == CSSValueCubicBezier)
+        return consumeCubicBezier(range);
</ins><span class="cx">     if (function == CSSValueSteps)
</span><span class="cx">         return consumeSteps(range);
</span><del>-    if (function == CSSValueCubicBezier)
-        return consumeCubicBezier(range);
</del><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeAnimationValue(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, bool useLegacyParsing)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeAnimationValue(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     switch (property) {
</span><span class="cx">     case CSSPropertyAnimationDelay:
</span><span class="cx">     case CSSPropertyTransitionDelay:
</span><del>-        return consumeTime(range, ValueRangeAll);
</del><ins>+        return consumeTime(range, context.mode, ValueRangeAll, UnitlessQuirk::Forbid);
</ins><span class="cx">     case CSSPropertyAnimationDirection:
</span><span class="cx">         return consumeIdent&lt;CSSValueNormal, CSSValueAlternate, CSSValueReverse, CSSValueAlternateReverse&gt;(range);
</span><span class="cx">     case CSSPropertyAnimationDuration:
</span><span class="cx">     case CSSPropertyTransitionDuration:
</span><del>-        return consumeTime(range, ValueRangeNonNegative);
</del><ins>+        return consumeTime(range, context.mode, ValueRangeNonNegative, UnitlessQuirk::Forbid);
</ins><span class="cx">     case CSSPropertyAnimationFillMode:
</span><span class="cx">         return consumeIdent&lt;CSSValueNone, CSSValueForwards, CSSValueBackwards, CSSValueBoth&gt;(range);
</span><span class="cx">     case CSSPropertyAnimationIterationCount:
</span><span class="cx">         return consumeAnimationIterationCount(range);
</span><span class="cx">     case CSSPropertyAnimationName:
</span><del>-        return consumeAnimationName(range, context, useLegacyParsing);
</del><ins>+        return consumeAnimationName(range);
</ins><span class="cx">     case CSSPropertyAnimationPlayState:
</span><span class="cx">         return consumeIdent&lt;CSSValueRunning, CSSValuePaused&gt;(range);
</span><span class="cx">     case CSSPropertyTransitionProperty:
</span><span class="lines">@@ -1327,21 +1174,21 @@
</span><span class="cx">     if (property != CSSPropertyTransitionProperty || valueList.length() &lt; 2)
</span><span class="cx">         return true;
</span><span class="cx">     for (auto&amp; value : valueList) {
</span><del>-        if (value-&gt;isPrimitiveValue() &amp;&amp; toCSSPrimitiveValue(*value).isValueID()
-            &amp;&amp; toCSSPrimitiveValue(*value).valueID() == CSSValueNone)
</del><ins>+        if (value-&gt;isPrimitiveValue() &amp;&amp; downcast&lt;CSSPrimitiveValue&gt;(value.get()).isValueID()
+            &amp;&amp; downcast&lt;CSSPrimitiveValue&gt;(value.get()).valueID() == CSSValueNone)
</ins><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumeAnimationPropertyList(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, bool useLegacyParsing)
</del><ins>+static RefPtr&lt;CSSValueList&gt; consumeAnimationPropertyList(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    CSSValueList* list = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createCommaSeparated();
</ins><span class="cx">     do {
</span><del>-        CSSValue* value = consumeAnimationValue(property, range, context, useLegacyParsing);
</del><ins>+        RefPtr&lt;CSSValue&gt; value = consumeAnimationValue(property, range, context);
</ins><span class="cx">         if (!value)
</span><span class="cx">             return nullptr;
</span><del>-        list-&gt;append(*value);
</del><ins>+        list-&gt;append(value.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx">     if (!isValidAnimationPropertyList(property, *list))
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -1349,10 +1196,10 @@
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSPropertyParser::consumeAnimationShorthand(const StylePropertyShorthand&amp; shorthand, bool useLegacyParsing, bool important)
</del><ins>+bool CSSPropertyParser::consumeAnimationShorthand(const StylePropertyShorthand&amp; shorthand, bool important)
</ins><span class="cx"> {
</span><span class="cx">     const unsigned longhandCount = shorthand.length();
</span><del>-    CSSValueList* longhands[8];
</del><ins>+    RefPtr&lt;CSSValueList&gt; longhands[8];
</ins><span class="cx">     ASSERT(longhandCount &lt;= 8);
</span><span class="cx">     for (size_t i = 0; i &lt; longhandCount; ++i)
</span><span class="cx">         longhands[i] = CSSValueList::createCommaSeparated();
</span><span class="lines">@@ -1365,7 +1212,7 @@
</span><span class="cx">                 if (parsedLonghand[i])
</span><span class="cx">                     continue;
</span><span class="cx"> 
</span><del>-                if (CSSValue* value = consumeAnimationValue(shorthand.properties()[i], m_range, m_context, useLegacyParsing)) {
</del><ins>+                if (RefPtr&lt;CSSValue&gt; value = consumeAnimationValue(shorthand.properties()[i], m_range, m_context)) {
</ins><span class="cx">                     parsedLonghand[i] = true;
</span><span class="cx">                     foundProperty = true;
</span><span class="cx">                     longhands[i]-&gt;append(*value);
</span><span class="lines">@@ -1379,7 +1226,7 @@
</span><span class="cx">         // FIXME: This will make invalid longhands, see crbug.com/386459
</span><span class="cx">         for (size_t i = 0; i &lt; longhandCount; ++i) {
</span><span class="cx">             if (!parsedLonghand[i])
</span><del>-                longhands[i]-&gt;append(*CSSInitialValue::createLegacyImplicit());
</del><ins>+                longhands[i]-&gt;append(CSSValuePool::singleton().createImplicitInitialValue());
</ins><span class="cx">             parsedLonghand[i] = false;
</span><span class="cx">         }
</span><span class="cx">     } while (consumeCommaIncludingWhitespace(m_range));
</span><span class="lines">@@ -1395,7 +1242,7 @@
</span><span class="cx">     return m_range.atEnd();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeZIndex(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeZIndex(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1402,10 +1249,10 @@
</span><span class="cx">     return consumeInteger(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSShadowValue* parseSingleShadow(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, bool allowInset, bool allowSpread)
</del><ins>+static RefPtr&lt;CSSShadowValue&gt; parseSingleShadow(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, bool allowInset, bool allowSpread)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* style = nullptr;
-    CSSValue* color = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; style;
+    RefPtr&lt;CSSPrimitiveValue&gt; color;
</ins><span class="cx"> 
</span><span class="cx">     if (range.atEnd())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -1416,16 +1263,16 @@
</span><span class="cx">     }
</span><span class="cx">     color = consumeColor(range, cssParserMode);
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* horizontalOffset = consumeLength(range, cssParserMode, ValueRangeAll);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; horizontalOffset = consumeLength(range, cssParserMode, ValueRangeAll);
</ins><span class="cx">     if (!horizontalOffset)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* verticalOffset = consumeLength(range, cssParserMode, ValueRangeAll);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; verticalOffset = consumeLength(range, cssParserMode, ValueRangeAll);
</ins><span class="cx">     if (!verticalOffset)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* blurRadius = consumeLength(range, cssParserMode, ValueRangeAll);
-    CSSPrimitiveValue* spreadDistance = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; blurRadius = consumeLength(range, cssParserMode, ValueRangeAll);
+    RefPtr&lt;CSSPrimitiveValue&gt; spreadDistance;
</ins><span class="cx">     if (blurRadius) {
</span><span class="cx">         // Blur radius must be non-negative.
</span><span class="cx">         if (blurRadius-&gt;doubleValue() &lt; 0)
</span><span class="lines">@@ -1443,18 +1290,18 @@
</span><span class="cx">             style = consumeIdent(range);
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    return CSSShadowValue::create(horizontalOffset, verticalOffset, blurRadius,
-        spreadDistance, style, color);
</del><ins>+    return CSSShadowValue::create(horizontalOffset.releaseNonNull(), verticalOffset.releaseNonNull(), blurRadius.releaseNonNull(),
+        spreadDistance.releaseNonNull(), style.releaseNonNull(), color.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeShadow(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, bool isBoxShadowProperty)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeShadow(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, bool isBoxShadowProperty)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* shadowValueList = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; shadowValueList = CSSValueList::createCommaSeparated();
</ins><span class="cx">     do {
</span><del>-        if (CSSShadowValue* shadowValue = parseSingleShadow(range, cssParserMode, isBoxShadowProperty, isBoxShadowProperty))
</del><ins>+        if (RefPtr&lt;CSSShadowValue&gt; shadowValue = parseSingleShadow(range, cssParserMode, isBoxShadowProperty, isBoxShadowProperty))
</ins><span class="cx">             shadowValueList-&gt;append(*shadowValue);
</span><span class="cx">         else
</span><span class="cx">             return nullptr;
</span><span class="lines">@@ -1462,31 +1309,28 @@
</span><span class="cx">     return shadowValueList;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSFunctionValue* consumeFilterFunction(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSFunctionValue&gt; consumeFilterFunction(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID filterType = range.peek().functionId();
</span><span class="cx">     if (filterType &lt; CSSValueInvert || filterType &gt; CSSValueDropShadow)
</span><span class="cx">         return nullptr;
</span><span class="cx">     CSSParserTokenRange args = consumeFunction(range);
</span><del>-    CSSFunctionValue* filterValue = CSSFunctionValue::create(filterType);
-    CSSValue* parsedValue = nullptr;
</del><ins>+    RefPtr&lt;CSSFunctionValue&gt;filterValue = CSSFunctionValue::create(filterType);
+    RefPtr&lt;CSSValue&gt; parsedValue;
</ins><span class="cx"> 
</span><del>-    if (filterType == CSSValueDropShadow) {
-        parsedValue = parseSingleShadow(args, context.mode(), false, false);
-    } else {
-        if (args.atEnd()) {
-            if (context.useCounter())
-                context.useCounter()-&gt;count(UseCounter::CSSFilterFunctionNoArguments);
</del><ins>+    if (filterType == CSSValueDropShadow)
+        parsedValue = parseSingleShadow(args, context.mode, false, false);
+    else {
+        if (args.atEnd())
</ins><span class="cx">             return filterValue;
</span><del>-        }
</del><span class="cx">         if (filterType == CSSValueBrightness) {
</span><span class="cx">             // FIXME (crbug.com/397061): Support calc expressions like calc(10% + 0.5)
</span><span class="cx">             parsedValue = consumePercent(args, ValueRangeAll);
</span><span class="cx">             if (!parsedValue)
</span><span class="cx">                 parsedValue = consumeNumber(args, ValueRangeAll);
</span><del>-        } else if (filterType == CSSValueHueRotate) {
-            parsedValue = consumeAngle(args);
-        } else if (filterType == CSSValueBlur) {
</del><ins>+        } else if (filterType == CSSValueHueRotate)
+            parsedValue = consumeAngle(args, context.mode, UnitlessQuirk::Forbid);
+        else if (filterType == CSSValueBlur) {
</ins><span class="cx">             parsedValue = consumeLength(args, HTMLStandardMode, ValueRangeNonNegative);
</span><span class="cx">         } else {
</span><span class="cx">             // FIXME (crbug.com/397061): Support calc expressions like calc(10% + 0.5)
</span><span class="lines">@@ -1494,12 +1338,10 @@
</span><span class="cx">             if (!parsedValue)
</span><span class="cx">                 parsedValue = consumeNumber(args, ValueRangeNonNegative);
</span><span class="cx">             if (parsedValue &amp;&amp; filterType != CSSValueSaturate &amp;&amp; filterType != CSSValueContrast) {
</span><del>-                bool isPercentage = toCSSPrimitiveValue(parsedValue)-&gt;isPercentage();
</del><ins>+                bool isPercentage = downcast&lt;CSSPrimitiveValue&gt;(*parsedValue).isPercentage();
</ins><span class="cx">                 double maxAllowed = isPercentage ? 100.0 : 1.0;
</span><del>-                if (toCSSPrimitiveValue(parsedValue)-&gt;doubleValue() &gt; maxAllowed) {
-                    parsedValue = CSSPrimitiveValue::create(
-                        maxAllowed,
-                        isPercentage ? CSSPrimitiveValue::UnitType::Percentage : CSSPrimitiveValue::UnitType::Number);
</del><ins>+                if (downcast&lt;CSSPrimitiveValue&gt;(*parsedValue).doubleValue() &gt; maxAllowed) {
+                    parsedValue = CSSPrimitiveValue::create(maxAllowed, isPercentage ? CSSPrimitiveValue::UnitTypes::CSS_PERCENTAGE : CSSPrimitiveValue::UnitTypes::CSS_NUMBER);
</ins><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="lines">@@ -1510,38 +1352,38 @@
</span><span class="cx">     return filterValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFilter(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFilter(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* list = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     do {
</span><del>-        CSSValue* filterValue = consumeUrl(range);
</del><ins>+        RefPtr&lt;CSSValue&gt; filterValue = consumeUrl(range);
</ins><span class="cx">         if (!filterValue) {
</span><span class="cx">             filterValue = consumeFilterFunction(range, context);
</span><span class="cx">             if (!filterValue)
</span><span class="cx">                 return nullptr;
</span><span class="cx">         }
</span><del>-        list-&gt;append(*filterValue);
</del><ins>+        list-&gt;append(filterValue.releaseNonNull());
</ins><span class="cx">     } while (!range.atEnd());
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeTextDecorationLine(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeTextDecorationLine(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* list = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     while (true) {
</span><del>-        CSSPrimitiveValue* ident = consumeIdent&lt;CSSValueBlink, CSSValueUnderline, CSSValueOverline, CSSValueLineThrough&gt;(range);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; ident = consumeIdent&lt;CSSValueBlink, CSSValueUnderline, CSSValueOverline, CSSValueLineThrough&gt;(range);
</ins><span class="cx">         if (!ident)
</span><span class="cx">             break;
</span><del>-        if (list-&gt;hasValue(*ident))
</del><ins>+        if (list-&gt;hasValue(ident.get()))
</ins><span class="cx">             return nullptr;
</span><del>-        list-&gt;append(*ident);
</del><ins>+        list-&gt;append(ident.releaseNonNull());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!list-&gt;length())
</span><span class="lines">@@ -1549,100 +1391,23 @@
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// none | strict | content | [ layout || style || paint || size ]
-static CSSValue* consumeContain(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeTextEmphasisStyle(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* list = CSSValueList::createSpaceSeparated();
-    if (id == CSSValueStrict || id == CSSValueContent) {
-        list-&gt;append(*consumeIdent(range));
-        return list;
-    }
-    while (true) {
-        CSSPrimitiveValue* ident = consumeIdent&lt;CSSValuePaint, CSSValueLayout, CSSValueStyle, CSSValueSize&gt;(range);
-        if (!ident)
-            break;
-        if (list-&gt;hasValue(*ident))
-            return nullptr;
-        list-&gt;append(*ident);
-    }
-
-    if (!list-&gt;length())
-        return nullptr;
-    return list;
-}
-
-static CSSValue* consumePath(CSSParserTokenRange&amp; range)
-{
-    // FIXME: Add support for &lt;url&gt;, &lt;basic-shape&gt;, &lt;geometry-box&gt;.
-    if (range.peek().functionId() != CSSValuePath)
-        return nullptr;
-
-    CSSParserTokenRange functionRange = range;
-    CSSParserTokenRange functionArgs = consumeFunction(functionRange);
-
-    if (functionArgs.peek().type() != StringToken)
-        return nullptr;
-    String pathString = functionArgs.consumeIncludingWhitespace().value().toString();
-
-    std::unique_ptr&lt;SVGPathByteStream&gt; byteStream = SVGPathByteStream::create();
-    if (buildByteStreamFromString(pathString, *byteStream) != SVGParseStatus::NoError
-        || !functionArgs.atEnd())
-        return nullptr;
-
-    range = functionRange;
-    if (byteStream-&gt;isEmpty())
-        return CSSPrimitiveValue::createIdentifier(CSSValueNone);
-    return CSSPathValue::create(std::move(byteStream));
-}
-
-static CSSValue* consumePathOrNone(CSSParserTokenRange&amp; range)
-{
-    CSSValueID id = range.peek().id();
-    if (id == CSSValueNone)
-        return consumeIdent(range);
-
-    return consumePath(range);
-}
-
-static CSSValue* consumeMotionRotation(CSSParserTokenRange&amp; range)
-{
-    CSSValue* angle = consumeAngle(range);
-    CSSValue* keyword = consumeIdent&lt;CSSValueAuto, CSSValueReverse&gt;(range);
-    if (!angle &amp;&amp; !keyword)
-        return nullptr;
-
-    if (!angle)
-        angle = consumeAngle(range);
-
-    CSSValueList* list = CSSValueList::createSpaceSeparated();
-    if (keyword)
-        list-&gt;append(*keyword);
-    if (angle)
-        list-&gt;append(*angle);
-    return list;
-}
-
-static CSSValue* consumeTextEmphasisStyle(CSSParserTokenRange&amp; range)
-{
-    CSSValueID id = range.peek().id();
-    if (id == CSSValueNone)
-        return consumeIdent(range);
-
-    if (CSSValue* textEmphasisStyle = consumeString(range))
</del><ins>+    if (RefPtr&lt;CSSValue&gt; textEmphasisStyle = consumeString(range))
</ins><span class="cx">         return textEmphasisStyle;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* fill = consumeIdent&lt;CSSValueFilled, CSSValueOpen&gt;(range);
-    CSSPrimitiveValue* shape = consumeIdent&lt;CSSValueDot, CSSValueCircle, CSSValueDoubleCircle, CSSValueTriangle, CSSValueSesame&gt;(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; fill = consumeIdent&lt;CSSValueFilled, CSSValueOpen&gt;(range);
+    RefPtr&lt;CSSPrimitiveValue&gt; shape = consumeIdent&lt;CSSValueDot, CSSValueCircle, CSSValueDoubleCircle, CSSValueTriangle, CSSValueSesame&gt;(range);
</ins><span class="cx">     if (!fill)
</span><span class="cx">         fill = consumeIdent&lt;CSSValueFilled, CSSValueOpen&gt;(range);
</span><span class="cx">     if (fill &amp;&amp; shape) {
</span><del>-        CSSValueList* parsedValues = CSSValueList::createSpaceSeparated();
-        parsedValues-&gt;append(*fill);
-        parsedValues-&gt;append(*shape);
</del><ins>+        RefPtr&lt;CSSValueList&gt; parsedValues = CSSValueList::createSpaceSeparated();
+        parsedValues-&gt;append(fill.releaseNonNull());
+        parsedValues-&gt;append(shape.releaseNonNull());
</ins><span class="cx">         return parsedValues;
</span><span class="cx">     }
</span><span class="cx">     if (fill)
</span><span class="lines">@@ -1652,7 +1417,7 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeOutlineColor(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeOutlineColor(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     // Allow the special focus color even in HTML Standard parsing mode.
</span><span class="cx">     if (range.peek().id() == CSSValueWebkitFocusRingColor)
</span><span class="lines">@@ -1660,7 +1425,7 @@
</span><span class="cx">     return consumeColor(range, cssParserMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeLineWidth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeLineWidth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick)
</span><span class="lines">@@ -1668,25 +1433,25 @@
</span><span class="cx">     return consumeLength(range, cssParserMode, ValueRangeNonNegative, unitless);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeBorderWidth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeBorderWidth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless)
</ins><span class="cx"> {
</span><span class="cx">     return consumeLineWidth(range, cssParserMode, unitless);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeTextStrokeWidth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeTextStrokeWidth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     return consumeLineWidth(range, cssParserMode, UnitlessQuirk::Forbid);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeColumnRuleWidth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeColumnRuleWidth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     return consumeLineWidth(range, cssParserMode, UnitlessQuirk::Forbid);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumeTranslate3d(CSSParserTokenRange&amp; args, CSSParserMode cssParserMode, CSSFunctionValue*&amp; transformValue)
</del><ins>+static bool consumeTranslate3d(CSSParserTokenRange&amp; args, CSSParserMode cssParserMode, RefPtr&lt;CSSFunctionValue&gt;&amp; transformValue)
</ins><span class="cx"> {
</span><span class="cx">     unsigned numberOfArguments = 2;
</span><del>-    CSSValue* parsedValue = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; parsedValue;
</ins><span class="cx">     do {
</span><span class="cx">         parsedValue = consumeLengthOrPercent(args, cssParserMode, ValueRangeAll);
</span><span class="cx">         if (!parsedValue)
</span><span class="lines">@@ -1702,13 +1467,13 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumeNumbers(CSSParserTokenRange&amp; args, CSSFunctionValue*&amp; transformValue, unsigned numberOfArguments)
</del><ins>+static bool consumeNumbers(CSSParserTokenRange&amp; args, RefPtr&lt;CSSFunctionValue&gt;&amp; transformValue, unsigned numberOfArguments)
</ins><span class="cx"> {
</span><span class="cx">     do {
</span><del>-        CSSValue* parsedValue = consumeNumber(args, ValueRangeAll);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; parsedValue = consumeNumber(args, ValueRangeAll);
</ins><span class="cx">         if (!parsedValue)
</span><span class="cx">             return false;
</span><del>-        transformValue-&gt;append(*parsedValue);
</del><ins>+        transformValue-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">         if (--numberOfArguments &amp;&amp; !consumeCommaIncludingWhitespace(args))
</span><span class="cx">             return false;
</span><span class="cx">     } while (numberOfArguments);
</span><span class="lines">@@ -1715,22 +1480,22 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumePerspective(CSSParserTokenRange&amp; args, CSSParserMode cssParserMode, CSSFunctionValue*&amp; transformValue, bool useLegacyParsing)
</del><ins>+static bool consumePerspective(CSSParserTokenRange&amp; args, CSSParserMode cssParserMode, RefPtr&lt;CSSFunctionValue&gt;&amp; transformValue)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* parsedValue = consumeLength(args, cssParserMode, ValueRangeNonNegative);
-    if (!parsedValue &amp;&amp; useLegacyParsing) {
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; parsedValue = consumeLength(args, cssParserMode, ValueRangeNonNegative);
+    if (!parsedValue) {
</ins><span class="cx">         double perspective;
</span><span class="cx">         if (!consumeNumberRaw(args, perspective) || perspective &lt; 0)
</span><span class="cx">             return false;
</span><del>-        parsedValue = CSSPrimitiveValue::create(perspective, CSSPrimitiveValue::UnitType::Pixels);
</del><ins>+        parsedValue = CSSPrimitiveValue::create(perspective, CSSPrimitiveValue::UnitTypes::CSS_PX);
</ins><span class="cx">     }
</span><span class="cx">     if (!parsedValue)
</span><span class="cx">         return false;
</span><del>-    transformValue-&gt;append(*parsedValue);
</del><ins>+    transformValue-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeTransformValue(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, bool useLegacyParsing)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeTransformValue(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID functionId = range.peek().functionId();
</span><span class="cx">     if (functionId == CSSValueInvalid)
</span><span class="lines">@@ -1738,29 +1503,29 @@
</span><span class="cx">     CSSParserTokenRange args = consumeFunction(range);
</span><span class="cx">     if (args.atEnd())
</span><span class="cx">         return nullptr;
</span><del>-    CSSFunctionValue* transformValue = CSSFunctionValue::create(functionId);
-    CSSValue* parsedValue = nullptr;
</del><ins>+    RefPtr&lt;CSSFunctionValue&gt; transformValue = CSSFunctionValue::create(functionId);
+    RefPtr&lt;CSSValue&gt; parsedValue;
</ins><span class="cx">     switch (functionId) {
</span><span class="cx">     case CSSValueRotate:
</span><del>-    case CSSValueRotateX:
-    case CSSValueRotateY:
-    case CSSValueRotateZ:
-    case CSSValueSkewX:
-    case CSSValueSkewY:
</del><ins>+    case CSSValueRotatex:
+    case CSSValueRotatey:
+    case CSSValueRotatez:
+    case CSSValueSkewx:
+    case CSSValueSkewy:
</ins><span class="cx">     case CSSValueSkew:
</span><del>-        parsedValue = consumeAngle(args);
</del><ins>+        parsedValue = consumeAngle(args, cssParserMode, UnitlessQuirk::Forbid);
</ins><span class="cx">         if (!parsedValue)
</span><span class="cx">             return nullptr;
</span><span class="cx">         if (functionId == CSSValueSkew &amp;&amp; consumeCommaIncludingWhitespace(args)) {
</span><span class="cx">             transformValue-&gt;append(*parsedValue);
</span><del>-            parsedValue = consumeAngle(args);
</del><ins>+            parsedValue = consumeAngle(args, cssParserMode, UnitlessQuirk::Forbid);
</ins><span class="cx">             if (!parsedValue)
</span><span class="cx">                 return nullptr;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><del>-    case CSSValueScaleX:
-    case CSSValueScaleY:
-    case CSSValueScaleZ:
</del><ins>+    case CSSValueScalex:
+    case CSSValueScaley:
+    case CSSValueScalez:
</ins><span class="cx">     case CSSValueScale:
</span><span class="cx">         parsedValue = consumeNumber(args, ValueRangeAll);
</span><span class="cx">         if (!parsedValue)
</span><span class="lines">@@ -1773,11 +1538,11 @@
</span><span class="cx">         }
</span><span class="cx">         break;
</span><span class="cx">     case CSSValuePerspective:
</span><del>-        if (!consumePerspective(args, cssParserMode, transformValue, useLegacyParsing))
</del><ins>+        if (!consumePerspective(args, cssParserMode, transformValue))
</ins><span class="cx">             return nullptr;
</span><span class="cx">         break;
</span><del>-    case CSSValueTranslateX:
-    case CSSValueTranslateY:
</del><ins>+    case CSSValueTranslatex:
+    case CSSValueTranslatey:
</ins><span class="cx">     case CSSValueTranslate:
</span><span class="cx">         parsedValue = consumeLengthOrPercent(args, cssParserMode, ValueRangeAll);
</span><span class="cx">         if (!parsedValue)
</span><span class="lines">@@ -1789,7 +1554,7 @@
</span><span class="cx">                 return nullptr;
</span><span class="cx">         }
</span><span class="cx">         break;
</span><del>-    case CSSValueTranslateZ:
</del><ins>+    case CSSValueTranslatez:
</ins><span class="cx">         parsedValue = consumeLength(args, cssParserMode, ValueRangeAll);
</span><span class="cx">         break;
</span><span class="cx">     case CSSValueMatrix:
</span><span class="lines">@@ -1804,7 +1569,7 @@
</span><span class="cx">     case CSSValueRotate3d:
</span><span class="cx">         if (!consumeNumbers(args, transformValue, 3) || !consumeCommaIncludingWhitespace(args))
</span><span class="cx">             return nullptr;
</span><del>-        parsedValue = consumeAngle(args);
</del><ins>+        parsedValue = consumeAngle(args, cssParserMode, UnitlessQuirk::Forbid);
</ins><span class="cx">         if (!parsedValue)
</span><span class="cx">             return nullptr;
</span><span class="cx">         break;
</span><span class="lines">@@ -1822,17 +1587,17 @@
</span><span class="cx">     return transformValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeTransform(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, bool useLegacyParsing)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeTransform(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* list = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     do {
</span><del>-        CSSValue* parsedTransformValue = consumeTransformValue(range, cssParserMode, useLegacyParsing);
</del><ins>+        RefPtr&lt;CSSValue&gt; parsedTransformValue = consumeTransformValue(range, cssParserMode);
</ins><span class="cx">         if (!parsedTransformValue)
</span><span class="cx">             return nullptr;
</span><del>-        list-&gt;append(*parsedTransformValue);
</del><ins>+        list-&gt;append(parsedTransformValue.releaseNonNull());
</ins><span class="cx">     } while (!range.atEnd());
</span><span class="cx"> 
</span><span class="cx">     return list;
</span><span class="lines">@@ -1839,7 +1604,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;CSSValueID start, CSSValueID end&gt;
</span><del>-static CSSValue* consumePositionLonghand(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumePositionLonghand(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().type() == IdentToken) {
</span><span class="cx">         CSSValueID id = range.peek().id();
</span><span class="lines">@@ -1853,36 +1618,36 @@
</span><span class="cx">         else
</span><span class="cx">             return nullptr;
</span><span class="cx">         range.consumeIncludingWhitespace();
</span><del>-        return CSSPrimitiveValue::create(percent, CSSPrimitiveValue::UnitType::Percentage);
</del><ins>+        return CSSPrimitiveValue::create(percent, CSSPrimitiveValue::UnitTypes::CSS_PERCENTAGE);
</ins><span class="cx">     }
</span><span class="cx">     return consumeLengthOrPercent(range, cssParserMode, ValueRangeAll);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumePositionX(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumePositionX(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     return consumePositionLonghand&lt;CSSValueLeft, CSSValueRight&gt;(range, cssParserMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumePositionY(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumePositionY(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     return consumePositionLonghand&lt;CSSValueTop, CSSValueBottom&gt;(range, cssParserMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumePaintStroke(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumePaintStroke(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><del>-    CSSURIValue* url = consumeUrl(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; url = consumeUrl(range);
</ins><span class="cx">     if (url) {
</span><del>-        CSSValue* parsedValue = nullptr;
</del><ins>+        RefPtr&lt;CSSValue&gt; parsedValue;
</ins><span class="cx">         if (range.peek().id() == CSSValueNone)
</span><span class="cx">             parsedValue = consumeIdent(range);
</span><span class="cx">         else
</span><span class="cx">             parsedValue = consumeColor(range, cssParserMode);
</span><span class="cx">         if (parsedValue) {
</span><del>-            CSSValueList* values = CSSValueList::createSpaceSeparated();
-            values-&gt;append(*url);
-            values-&gt;append(*parsedValue);
</del><ins>+            RefPtr&lt;CSSValueList&gt; values = CSSValueList::createSpaceSeparated();
+            values-&gt;append(url.releaseNonNull());
+            values-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">             return values;
</span><span class="cx">         }
</span><span class="cx">         return url;
</span><span class="lines">@@ -1890,15 +1655,15 @@
</span><span class="cx">     return consumeColor(range, cssParserMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumePaintOrder(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumePaintOrder(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNormal)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;CSSValueID, 3&gt; paintTypeList;
</span><del>-    CSSPrimitiveValue* fill = nullptr;
-    CSSPrimitiveValue* stroke = nullptr;
-    CSSPrimitiveValue* markers = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; fill;
+    RefPtr&lt;CSSPrimitiveValue&gt; stroke;
+    RefPtr&lt;CSSPrimitiveValue&gt; markers;
</ins><span class="cx">     do {
</span><span class="cx">         CSSValueID id = range.peek().id();
</span><span class="cx">         if (id == CSSValueFill &amp;&amp; !fill)
</span><span class="lines">@@ -1916,21 +1681,21 @@
</span><span class="cx">     // pop a last list items from CSSValueList without bigger cost, we create the
</span><span class="cx">     // list after parsing.
</span><span class="cx">     CSSValueID firstPaintOrderType = paintTypeList.at(0);
</span><del>-    CSSValueList* paintOrderList = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; paintOrderList = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     switch (firstPaintOrderType) {
</span><span class="cx">     case CSSValueFill:
</span><span class="cx">     case CSSValueStroke:
</span><del>-        paintOrderList-&gt;append(firstPaintOrderType == CSSValueFill ? *fill : *stroke);
</del><ins>+        paintOrderList-&gt;append(firstPaintOrderType == CSSValueFill ? fill.releaseNonNull() : stroke.releaseNonNull());
</ins><span class="cx">         if (paintTypeList.size() &gt; 1) {
</span><span class="cx">             if (paintTypeList.at(1) == CSSValueMarkers)
</span><del>-                paintOrderList-&gt;append(*markers);
</del><ins>+                paintOrderList-&gt;append(markers.releaseNonNull());
</ins><span class="cx">         }
</span><span class="cx">         break;
</span><span class="cx">     case CSSValueMarkers:
</span><del>-        paintOrderList-&gt;append(*markers);
</del><ins>+        paintOrderList-&gt;append(markers.releaseNonNull());
</ins><span class="cx">         if (paintTypeList.size() &gt; 1) {
</span><span class="cx">             if (paintTypeList.at(1) == CSSValueStroke)
</span><del>-                paintOrderList-&gt;append(*stroke);
</del><ins>+                paintOrderList-&gt;append(stroke.releaseNonNull());
</ins><span class="cx">         }
</span><span class="cx">         break;
</span><span class="cx">     default:
</span><span class="lines">@@ -1940,7 +1705,7 @@
</span><span class="cx">     return paintOrderList;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeNoneOrURI(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeNoneOrURI(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1947,7 +1712,7 @@
</span><span class="cx">     return consumeUrl(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFlexBasis(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFlexBasis(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: Support intrinsic dimensions too.
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="lines">@@ -1955,23 +1720,23 @@
</span><span class="cx">     return consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeStrokeDasharray(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeStrokeDasharray(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* dashes = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; dashes = CSSValueList::createCommaSeparated();
</ins><span class="cx">     do {
</span><del>-        CSSPrimitiveValue* dash = consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeNonNegative);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; dash = consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeNonNegative);
</ins><span class="cx">         if (!dash || (consumeCommaIncludingWhitespace(range) &amp;&amp; range.atEnd()))
</span><span class="cx">             return nullptr;
</span><del>-        dashes-&gt;append(*dash);
</del><ins>+        dashes-&gt;append(dash.releaseNonNull());
</ins><span class="cx">     } while (!range.atEnd());
</span><span class="cx">     return dashes;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeBaselineShift(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeBaselineShift(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueBaseline || id == CSSValueSub || id == CSSValueSuper)
</span><span class="lines">@@ -1979,7 +1744,7 @@
</span><span class="cx">     return consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeAll);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeRxOrRy(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeRxOrRy(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -1986,10 +1751,10 @@
</span><span class="cx">     return consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeAll, UnitlessQuirk::Forbid);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeCursor(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, bool inQuirksMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeCursor(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, bool inQuirksMode)
</ins><span class="cx"> {
</span><del>-    CSSValueList* list = nullptr;
-    while (CSSValue* image = consumeImage(range, context, ConsumeGeneratedImage::Forbid)) {
</del><ins>+    RefPtr&lt;CSSValueList&gt; list;
+    while (RefPtr&lt;CSSValue&gt; image = consumeImage(range, context, ConsumeGeneratedImage::Forbid)) {
</ins><span class="cx">         double num;
</span><span class="cx">         IntPoint hotSpot(-1, -1);
</span><span class="cx">         bool hotSpotSpecified = false;
</span><span class="lines">@@ -2004,23 +1769,17 @@
</span><span class="cx">         if (!list)
</span><span class="cx">             list = CSSValueList::createCommaSeparated();
</span><span class="cx"> 
</span><del>-        list-&gt;append(*CSSCursorImageValue::create(image, hotSpotSpecified, hotSpot));
</del><ins>+        list-&gt;append(CSSCursorImageValue::create(image.releaseNonNull(), hotSpotSpecified, hotSpot));
</ins><span class="cx">         if (!consumeCommaIncludingWhitespace(range))
</span><span class="cx">             return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><del>-    if (!range.atEnd() &amp;&amp; context.useCounter()) {
-        if (id == CSSValueWebkitZoomIn)
-            context.useCounter()-&gt;count(UseCounter::PrefixedCursorZoomIn);
-        else if (id == CSSValueWebkitZoomOut)
-            context.useCounter()-&gt;count(UseCounter::PrefixedCursorZoomOut);
-    }
-    CSSValue* cursorType = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; cursorType;
</ins><span class="cx">     if (id == CSSValueHand) {
</span><span class="cx">         if (!inQuirksMode) // Non-standard behavior
</span><span class="cx">             return nullptr;
</span><del>-        cursorType = CSSPrimitiveValue::createIdentifier(CSSValuePointer);
</del><ins>+        cursorType = CSSValuePool::singleton().createIdentifierValue(CSSValuePointer);
</ins><span class="cx">         range.consumeIncludingWhitespace();
</span><span class="cx">     } else if ((id &gt;= CSSValueAuto &amp;&amp; id &lt;= CSSValueWebkitZoomOut) || id == CSSValueCopy || id == CSSValueNone) {
</span><span class="cx">         cursorType = consumeIdent(range);
</span><span class="lines">@@ -2030,66 +1789,68 @@
</span><span class="cx"> 
</span><span class="cx">     if (!list)
</span><span class="cx">         return cursorType;
</span><del>-    list-&gt;append(*cursorType);
</del><ins>+    list-&gt;append(cursorType.releaseNonNull());
</ins><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeAttr(CSSParserTokenRange args, CSSParserContext context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeAttr(CSSParserTokenRange args, CSSParserContext context)
</ins><span class="cx"> {
</span><span class="cx">     if (args.peek().type() != IdentToken)
</span><span class="cx">         return nullptr;
</span><ins>+    
+    StringView stringView = args.consumeIncludingWhitespace().value();
+    if (context.isHTMLDocument)
+        convertToASCIILowercaseInPlace(stringView);
</ins><span class="cx"> 
</span><del>-    String attrName = args.consumeIncludingWhitespace().value().toString();
</del><ins>+    String attrName = stringView.toString();
</ins><span class="cx">     if (!args.atEnd())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    if (context.isHTMLDocument())
-        attrName = attrName.lower();
-
-    CSSFunctionValue* attrValue = CSSFunctionValue::create(CSSValueAttr);
-    attrValue-&gt;append(*CSSCustomIdentValue::create(attrName));
</del><ins>+    RefPtr&lt;CSSFunctionValue&gt; attrValue = CSSFunctionValue::create(CSSValueAttr);
+    attrValue-&gt;append(CSSCustomIdentValue::create(attrName));
</ins><span class="cx">     return attrValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeCounterContent(CSSParserTokenRange args, bool counters)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeCounterContent(CSSParserTokenRange args, bool counters)
</ins><span class="cx"> {
</span><del>-    CSSCustomIdentValue* identifier = consumeCustomIdent(args);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; identifier = consumeCustomIdent(args);
</ins><span class="cx">     if (!identifier)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    CSSStringValue* separator = nullptr;
-    if (!counters) {
-        separator = CSSStringValue::create(String());
-    } else {
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; separator;
+    if (!counters)
+        separator = CSSPrimitiveValue::create(String(), CSSPrimitiveValue::UnitTypes::CSS_STRING);
+    else {
</ins><span class="cx">         if (!consumeCommaIncludingWhitespace(args) || args.peek().type() != StringToken)
</span><span class="cx">             return nullptr;
</span><del>-        separator = CSSStringValue::create(args.consumeIncludingWhitespace().value().toString());
</del><ins>+        separator = CSSPrimitiveValue::create(args.consumeIncludingWhitespace().value().toString(), CSSPrimitiveValue::UnitTypes::CSS_STRING);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* listStyle = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; listStyle;
</ins><span class="cx">     if (consumeCommaIncludingWhitespace(args)) {
</span><span class="cx">         CSSValueID id = args.peek().id();
</span><span class="cx">         if ((id != CSSValueNone &amp;&amp; (id &lt; CSSValueDisc || id &gt; CSSValueKatakanaIroha)))
</span><span class="cx">             return nullptr;
</span><span class="cx">         listStyle = consumeIdent(args);
</span><del>-    } else {
-        listStyle = CSSPrimitiveValue::createIdentifier(CSSValueDecimal);
-    }
</del><ins>+    } else
+        listStyle = CSSValuePool::singleton().createIdentifierValue(CSSValueDecimal);
</ins><span class="cx"> 
</span><span class="cx">     if (!args.atEnd())
</span><span class="cx">         return nullptr;
</span><del>-    return CSSCounterValue::create(identifier, listStyle, separator);
</del><ins>+    
+    // FIXME-NEWPARSER: Should just have a CSSCounterValue.
+    return CSSValuePool::singleton().createValue(Counter::create(identifier.releaseNonNull(), listStyle.releaseNonNull(), separator.releaseNonNull()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeContent(CSSParserTokenRange&amp; range, CSSParserContext context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeContent(CSSParserTokenRange&amp; range, CSSParserContext context)
</ins><span class="cx"> {
</span><span class="cx">     if (identMatches&lt;CSSValueNone, CSSValueNormal&gt;(range.peek().id()))
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSValueList* values = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; values = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> 
</span><span class="cx">     do {
</span><del>-        CSSValue* parsedValue = consumeImage(range, context);
</del><ins>+        RefPtr&lt;CSSValue&gt; parsedValue = consumeImage(range, context);
</ins><span class="cx">         if (!parsedValue)
</span><span class="cx">             parsedValue = consumeIdent&lt;CSSValueOpenQuote, CSSValueCloseQuote, CSSValueNoOpenQuote, CSSValueNoCloseQuote&gt;(range);
</span><span class="cx">         if (!parsedValue)
</span><span class="lines">@@ -2104,22 +1865,23 @@
</span><span class="cx">             if (!parsedValue)
</span><span class="cx">                 return nullptr;
</span><span class="cx">         }
</span><del>-        values-&gt;append(*parsedValue);
</del><ins>+        values-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">     } while (!range.atEnd());
</span><span class="cx"> 
</span><span class="cx">     return values;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumePerspective(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, CSSPropertyID unresolvedProperty)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumePerspective(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><del>-    CSSPrimitiveValue* parsedValue = consumeLength(range, cssParserMode, ValueRangeAll);
-    if (!parsedValue &amp;&amp; (unresolvedProperty == CSSPropertyAliasWebkitPerspective)) {
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; parsedValue = consumeLength(range, cssParserMode, ValueRangeAll);
+    if (!parsedValue) {
+        // FIXME: Make this quirk only apply to the webkit prefixed version of the property.
</ins><span class="cx">         double perspective;
</span><span class="cx">         if (!consumeNumberRaw(range, perspective))
</span><span class="cx">             return nullptr;
</span><del>-        parsedValue = CSSPrimitiveValue::create(perspective, CSSPrimitiveValue::UnitType::Pixels);
</del><ins>+        parsedValue = CSSPrimitiveValue::create(perspective, CSSPrimitiveValue::UnitTypes::CSS_PX);
</ins><span class="cx">     }
</span><span class="cx">     if (parsedValue &amp;&amp; (parsedValue-&gt;isCalculated() || parsedValue-&gt;doubleValue() &gt; 0))
</span><span class="cx">         return parsedValue;
</span><span class="lines">@@ -2126,19 +1888,19 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumePositionList(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValueList&gt; consumePositionList(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><del>-    CSSValueList* positions = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; positions = CSSValueList::createCommaSeparated();
</ins><span class="cx">     do {
</span><del>-        CSSValue* position = consumePosition(range, cssParserMode, UnitlessQuirk::Forbid);
</del><ins>+        RefPtr&lt;CSSValue&gt; position = consumePosition(range, cssParserMode, UnitlessQuirk::Forbid);
</ins><span class="cx">         if (!position)
</span><span class="cx">             return nullptr;
</span><del>-        positions-&gt;append(*position);
</del><ins>+        positions-&gt;append(position.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx">     return positions;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeScrollSnapCoordinate(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeScrollSnapCoordinate(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -2145,16 +1907,16 @@
</span><span class="cx">     return consumePositionList(range, cssParserMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeScrollSnapPoints(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeScrollSnapPoints(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx">     if (range.peek().functionId() == CSSValueRepeat) {
</span><span class="cx">         CSSParserTokenRange args = consumeFunction(range);
</span><del>-        CSSPrimitiveValue* parsedValue = consumeLengthOrPercent(args, cssParserMode, ValueRangeNonNegative);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; parsedValue = consumeLengthOrPercent(args, cssParserMode, ValueRangeNonNegative);
</ins><span class="cx">         if (args.atEnd() &amp;&amp; parsedValue &amp;&amp; (parsedValue-&gt;isCalculated() || parsedValue-&gt;doubleValue() &gt; 0)) {
</span><del>-            CSSFunctionValue* result = CSSFunctionValue::create(CSSValueRepeat);
-            result-&gt;append(*parsedValue);
</del><ins>+            RefPtr&lt;CSSFunctionValue&gt; result = CSSFunctionValue::create(CSSValueRepeat);
+            result-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">             return result;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -2161,26 +1923,26 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBorderRadiusCorner(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeBorderRadiusCorner(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><del>-    CSSValue* parsedValue1 = consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; parsedValue1 = consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
</ins><span class="cx">     if (!parsedValue1)
</span><span class="cx">         return nullptr;
</span><del>-    CSSValue* parsedValue2 = consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; parsedValue2 = consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
</ins><span class="cx">     if (!parsedValue2)
</span><span class="cx">         parsedValue2 = parsedValue1;
</span><del>-    return CSSValuePair::create(parsedValue1, parsedValue2, CSSValuePair::DropIdenticalValues);
</del><ins>+    return createPrimitiveValuePair(parsedValue1.releaseNonNull(), parsedValue2.releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeVerticalAlign(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeVerticalAlign(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* parsedValue = consumeIdentRange(range, CSSValueBaseline, CSSValueWebkitBaselineMiddle);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; parsedValue = consumeIdentRange(range, CSSValueBaseline, CSSValueWebkitBaselineMiddle);
</ins><span class="cx">     if (!parsedValue)
</span><span class="cx">         parsedValue = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Allow);
</span><span class="cx">     return parsedValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeShapeRadius(CSSParserTokenRange&amp; args, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeShapeRadius(CSSParserTokenRange&amp; args, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (identMatches&lt;CSSValueClosestSide, CSSValueFarthestSide&gt;(args.peek().id()))
</span><span class="cx">         return consumeIdent(args);
</span><span class="lines">@@ -2187,48 +1949,48 @@
</span><span class="cx">     return consumeLengthOrPercent(args, cssParserMode, ValueRangeNonNegative);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSBasicShapeCircleValue* consumeBasicShapeCircle(CSSParserTokenRange&amp; args, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSBasicShapeCircle&gt; consumeBasicShapeCircle(CSSParserTokenRange&amp; args, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     // spec: https://drafts.csswg.org/css-shapes/#supported-basic-shapes
</span><span class="cx">     // circle( [&lt;shape-radius&gt;]? [at &lt;position&gt;]? )
</span><del>-    CSSBasicShapeCircleValue* shape = CSSBasicShapeCircleValue::create();
-    if (CSSPrimitiveValue* radius = consumeShapeRadius(args, context.mode()))
-        shape-&gt;setRadius(radius);
</del><ins>+    RefPtr&lt;CSSBasicShapeCircle&gt; shape = CSSBasicShapeCircle::create();
+    if (RefPtr&lt;CSSPrimitiveValue&gt; radius = consumeShapeRadius(args, context.mode))
+        shape-&gt;setRadius(radius.releaseNonNull());
</ins><span class="cx">     if (consumeIdent&lt;CSSValueAt&gt;(args)) {
</span><del>-        CSSValue* centerX = nullptr;
-        CSSValue* centerY = nullptr;
-        if (!consumePosition(args, context.mode(), UnitlessQuirk::Forbid, centerX, centerY))
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; centerX;
+        RefPtr&lt;CSSPrimitiveValue&gt; centerY;
+        if (!consumePosition(args, context.mode, UnitlessQuirk::Forbid, centerX, centerY))
</ins><span class="cx">             return nullptr;
</span><del>-        shape-&gt;setCenterX(centerX);
-        shape-&gt;setCenterY(centerY);
</del><ins>+        shape-&gt;setCenterX(centerX.releaseNonNull());
+        shape-&gt;setCenterY(centerY.releaseNonNull());
</ins><span class="cx">     }
</span><span class="cx">     return shape;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSBasicShapeEllipseValue* consumeBasicShapeEllipse(CSSParserTokenRange&amp; args, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSBasicShapeEllipse&gt; consumeBasicShapeEllipse(CSSParserTokenRange&amp; args, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     // spec: https://drafts.csswg.org/css-shapes/#supported-basic-shapes
</span><span class="cx">     // ellipse( [&lt;shape-radius&gt;{2}]? [at &lt;position&gt;]? )
</span><del>-    CSSBasicShapeEllipseValue* shape = CSSBasicShapeEllipseValue::create();
-    if (CSSPrimitiveValue* radiusX = consumeShapeRadius(args, context.mode())) {
-        shape-&gt;setRadiusX(radiusX);
-        if (CSSPrimitiveValue* radiusY = consumeShapeRadius(args, context.mode()))
-            shape-&gt;setRadiusY(radiusY);
</del><ins>+    RefPtr&lt;CSSBasicShapeEllipse&gt; shape = CSSBasicShapeEllipse::create();
+    if (RefPtr&lt;CSSPrimitiveValue&gt; radiusX = consumeShapeRadius(args, context.mode)) {
+        shape-&gt;setRadiusX(radiusX.releaseNonNull());
+        if (RefPtr&lt;CSSPrimitiveValue&gt; radiusY = consumeShapeRadius(args, context.mode))
+            shape-&gt;setRadiusY(radiusY.releaseNonNull());
</ins><span class="cx">     }
</span><span class="cx">     if (consumeIdent&lt;CSSValueAt&gt;(args)) {
</span><del>-        CSSValue* centerX = nullptr;
-        CSSValue* centerY = nullptr;
-        if (!consumePosition(args, context.mode(), UnitlessQuirk::Forbid, centerX, centerY))
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; centerX;
+        RefPtr&lt;CSSPrimitiveValue&gt; centerY;
+        if (!consumePosition(args, context.mode, UnitlessQuirk::Forbid, centerX, centerY))
</ins><span class="cx">             return nullptr;
</span><del>-        shape-&gt;setCenterX(centerX);
-        shape-&gt;setCenterY(centerY);
</del><ins>+        shape-&gt;setCenterX(centerX.releaseNonNull());
+        shape-&gt;setCenterY(centerY.releaseNonNull());
</ins><span class="cx">     }
</span><span class="cx">     return shape;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSBasicShapePolygonValue* consumeBasicShapePolygon(CSSParserTokenRange&amp; args, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSBasicShapePolygon&gt; consumeBasicShapePolygon(CSSParserTokenRange&amp; args, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    CSSBasicShapePolygonValue* shape = CSSBasicShapePolygonValue::create();
</del><ins>+    RefPtr&lt;CSSBasicShapePolygon&gt; shape = CSSBasicShapePolygon::create();
</ins><span class="cx">     if (identMatches&lt;CSSValueEvenodd, CSSValueNonzero&gt;(args.peek().id())) {
</span><span class="cx">         shape-&gt;setWindRule(args.consumeIncludingWhitespace().id() == CSSValueEvenodd ? RULE_EVENODD : RULE_NONZERO);
</span><span class="cx">         if (!consumeCommaIncludingWhitespace(args))
</span><span class="lines">@@ -2236,18 +1998,18 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     do {
</span><del>-        CSSPrimitiveValue* xLength = consumeLengthOrPercent(args, context.mode(), ValueRangeAll);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; xLength = consumeLengthOrPercent(args, context.mode, ValueRangeAll);
</ins><span class="cx">         if (!xLength)
</span><span class="cx">             return nullptr;
</span><del>-        CSSPrimitiveValue* yLength = consumeLengthOrPercent(args, context.mode(), ValueRangeAll);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; yLength = consumeLengthOrPercent(args, context.mode, ValueRangeAll);
</ins><span class="cx">         if (!yLength)
</span><span class="cx">             return nullptr;
</span><del>-        shape-&gt;appendPoint(xLength, yLength);
</del><ins>+        shape-&gt;appendPoint(xLength.releaseNonNull(), yLength.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(args));
</span><span class="cx">     return shape;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void complete4Sides(CSSPrimitiveValue* side[4])
</del><ins>+static void complete4Sides(RefPtr&lt;CSSPrimitiveValue&gt; side[4])
</ins><span class="cx"> {
</span><span class="cx">     if (side[3])
</span><span class="cx">         return;
</span><span class="lines">@@ -2259,7 +2021,7 @@
</span><span class="cx">     side[3] = side[1];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumeRadii(CSSPrimitiveValue* horizontalRadii[4], CSSPrimitiveValue* verticalRadii[4], CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, bool useLegacyParsing)
</del><ins>+static bool consumeRadii(RefPtr&lt;CSSPrimitiveValue&gt; horizontalRadii[4], RefPtr&lt;CSSPrimitiveValue&gt; verticalRadii[4], CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, bool useLegacyParsing)
</ins><span class="cx"> {
</span><span class="cx">     unsigned i = 0;
</span><span class="cx">     for (; i &lt; 4 &amp;&amp; !range.atEnd() &amp;&amp; range.peek().type() != DelimiterToken; ++i) {
</span><span class="lines">@@ -2296,50 +2058,53 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSBasicShapeInsetValue* consumeBasicShapeInset(CSSParserTokenRange&amp; args, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSBasicShapeInset&gt; consumeBasicShapeInset(CSSParserTokenRange&amp; args, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    CSSBasicShapeInsetValue* shape = CSSBasicShapeInsetValue::create();
-    CSSPrimitiveValue* top = consumeLengthOrPercent(args, context.mode(), ValueRangeAll);
</del><ins>+    RefPtr&lt;CSSBasicShapeInset&gt; shape = CSSBasicShapeInset::create();
+    RefPtr&lt;CSSPrimitiveValue&gt; top = consumeLengthOrPercent(args, context.mode, ValueRangeAll);
</ins><span class="cx">     if (!top)
</span><span class="cx">         return nullptr;
</span><del>-    CSSPrimitiveValue* right = consumeLengthOrPercent(args, context.mode(), ValueRangeAll);
-    CSSPrimitiveValue* bottom = nullptr;
-    CSSPrimitiveValue* left = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; right = consumeLengthOrPercent(args, context.mode, ValueRangeAll);
+    RefPtr&lt;CSSPrimitiveValue&gt; bottom;
+    RefPtr&lt;CSSPrimitiveValue&gt; left;
</ins><span class="cx">     if (right) {
</span><del>-        bottom = consumeLengthOrPercent(args, context.mode(), ValueRangeAll);
</del><ins>+        bottom = consumeLengthOrPercent(args, context.mode, ValueRangeAll);
</ins><span class="cx">         if (bottom)
</span><del>-            left = consumeLengthOrPercent(args, context.mode(), ValueRangeAll);
</del><ins>+            left = consumeLengthOrPercent(args, context.mode, ValueRangeAll);
</ins><span class="cx">     }
</span><span class="cx">     if (left)
</span><del>-        shape-&gt;updateShapeSize4Values(top, right, bottom, left);
</del><ins>+        shape-&gt;updateShapeSize4Values(top.releaseNonNull(), right.releaseNonNull(), bottom.releaseNonNull(), left.releaseNonNull());
</ins><span class="cx">     else if (bottom)
</span><del>-        shape-&gt;updateShapeSize3Values(top, right, bottom);
</del><ins>+        shape-&gt;updateShapeSize3Values(top.releaseNonNull(), right.releaseNonNull(), bottom.releaseNonNull());
</ins><span class="cx">     else if (right)
</span><del>-        shape-&gt;updateShapeSize2Values(top, right);
</del><ins>+        shape-&gt;updateShapeSize2Values(top.releaseNonNull(), right.releaseNonNull());
</ins><span class="cx">     else
</span><del>-        shape-&gt;updateShapeSize1Value(top);
</del><ins>+        shape-&gt;updateShapeSize1Value(top.releaseNonNull());
</ins><span class="cx"> 
</span><span class="cx">     if (consumeIdent&lt;CSSValueRound&gt;(args)) {
</span><del>-        CSSPrimitiveValue* horizontalRadii[4] = { 0 };
-        CSSPrimitiveValue* verticalRadii[4] = { 0 };
-        if (!consumeRadii(horizontalRadii, verticalRadii, args, context.mode(), false))
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; horizontalRadii[4] = { 0 };
+        RefPtr&lt;CSSPrimitiveValue&gt; verticalRadii[4] = { 0 };
+        if (!consumeRadii(horizontalRadii, verticalRadii, args, context.mode, false))
</ins><span class="cx">             return nullptr;
</span><del>-        shape-&gt;setTopLeftRadius(CSSValuePair::create(horizontalRadii[0], verticalRadii[0], CSSValuePair::DropIdenticalValues));
-        shape-&gt;setTopRightRadius(CSSValuePair::create(horizontalRadii[1], verticalRadii[1], CSSValuePair::DropIdenticalValues));
-        shape-&gt;setBottomRightRadius(CSSValuePair::create(horizontalRadii[2], verticalRadii[2], CSSValuePair::DropIdenticalValues));
-        shape-&gt;setBottomLeftRadius(CSSValuePair::create(horizontalRadii[3], verticalRadii[3], CSSValuePair::DropIdenticalValues));
</del><ins>+        shape-&gt;setTopLeftRadius(createPrimitiveValuePair(horizontalRadii[0].releaseNonNull(), verticalRadii[0].releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce));
+        shape-&gt;setTopRightRadius(createPrimitiveValuePair(horizontalRadii[1].releaseNonNull(), verticalRadii[1].releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce));
+        shape-&gt;setBottomRightRadius(createPrimitiveValuePair(horizontalRadii[2].releaseNonNull(), verticalRadii[2].releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce));
+        shape-&gt;setBottomLeftRadius(createPrimitiveValuePair(horizontalRadii[3].releaseNonNull(), verticalRadii[3].releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce));
</ins><span class="cx">     }
</span><span class="cx">     return shape;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBasicShape(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeBasicShape(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    CSSValue* shape = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; result;
</ins><span class="cx">     if (range.peek().type() != FunctionToken)
</span><span class="cx">         return nullptr;
</span><span class="cx">     CSSValueID id = range.peek().functionId();
</span><span class="cx">     CSSParserTokenRange rangeCopy = range;
</span><span class="cx">     CSSParserTokenRange args = consumeFunction(rangeCopy);
</span><ins>+    
+    // FIXME-NEWPARSER: CSSBasicShape should be a CSSValue, and shapes should not be primitive values.
+    RefPtr&lt;CSSBasicShape&gt; shape;
</ins><span class="cx">     if (id == CSSValueCircle)
</span><span class="cx">         shape = consumeBasicShapeCircle(args, context);
</span><span class="cx">     else if (id == CSSValueEllipse)
</span><span class="lines">@@ -2351,30 +2116,31 @@
</span><span class="cx">     if (!shape || !args.atEnd())
</span><span class="cx">         return nullptr;
</span><span class="cx">     range = rangeCopy;
</span><del>-    return shape;
</del><ins>+    
+    return CSSValuePool::singleton().createValue(shape.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeWebkitClipPath(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeWebkitClipPath(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><del>-    if (CSSURIValue* url = consumeUrl(range))
</del><ins>+    if (RefPtr&lt;CSSPrimitiveValue&gt; url = consumeUrl(range))
</ins><span class="cx">         return url;
</span><span class="cx">     return consumeBasicShape(range, context);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeShapeOutside(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeShapeOutside(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    if (CSSValue* imageValue = consumeImageOrNone(range, context))
</del><ins>+    if (RefPtr&lt;CSSValue&gt; imageValue = consumeImageOrNone(range, context))
</ins><span class="cx">         return imageValue;
</span><del>-    CSSValueList* list = CSSValueList::createSpaceSeparated();
-    if (CSSValue* boxValue = consumeIdent&lt;CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, CSSValueMarginBox&gt;(range))
-        list-&gt;append(*boxValue);
-    if (CSSValue* shapeValue = consumeBasicShape(range, context)) {
-        list-&gt;append(*shapeValue);
</del><ins>+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
+    if (RefPtr&lt;CSSValue&gt; boxValue = consumeIdent&lt;CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, CSSValueMarginBox&gt;(range))
+        list-&gt;append(boxValue.releaseNonNull());
+    if (RefPtr&lt;CSSValue&gt; shapeValue = consumeBasicShape(range, context)) {
+        list-&gt;append(shapeValue.releaseNonNull());
</ins><span class="cx">         if (list-&gt;length() &lt; 2) {
</span><del>-            if (CSSValue* boxValue = consumeIdent&lt;CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, CSSValueMarginBox&gt;(range))
-                list-&gt;append(*boxValue);
</del><ins>+            if (RefPtr&lt;CSSValue&gt; boxValue = consumeIdent&lt;CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, CSSValueMarginBox&gt;(range))
+                list-&gt;append(boxValue.releaseNonNull());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     if (!list-&gt;length())
</span><span class="lines">@@ -2382,7 +2148,7 @@
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeContentDistributionOverflowPosition(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeContentDistributionOverflowPosition(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (identMatches&lt;CSSValueNormal, CSSValueBaseline, CSSValueLastBaseline&gt;(range.peek().id()))
</span><span class="cx">         return CSSContentDistributionValue::create(CSSValueInvalid, range.consumeIncludingWhitespace().id(), CSSValueInvalid);
</span><span class="lines">@@ -2421,29 +2187,29 @@
</span><span class="cx">     return CSSContentDistributionValue::create(distribution, position, overflow);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeBorderImageRepeatKeyword(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeBorderImageRepeatKeyword(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdent&lt;CSSValueStretch, CSSValueRepeat, CSSValueSpace, CSSValueRound&gt;(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBorderImageRepeat(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeBorderImageRepeat(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* horizontal = consumeBorderImageRepeatKeyword(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; horizontal = consumeBorderImageRepeatKeyword(range);
</ins><span class="cx">     if (!horizontal)
</span><span class="cx">         return nullptr;
</span><del>-    CSSPrimitiveValue* vertical = consumeBorderImageRepeatKeyword(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; vertical = consumeBorderImageRepeatKeyword(range);
</ins><span class="cx">     if (!vertical)
</span><span class="cx">         vertical = horizontal;
</span><del>-    return CSSValuePair::create(horizontal, vertical, CSSValuePair::DropIdenticalValues);
</del><ins>+    return createPrimitiveValuePair(horizontal.releaseNonNull(), vertical.releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBorderImageSlice(CSSPropertyID property, CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeBorderImageSlice(CSSPropertyID property, CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     bool fill = consumeIdent&lt;CSSValueFill&gt;(range);
</span><del>-    CSSPrimitiveValue* slices[4] = { 0 };
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; slices[4] = { 0 };
</ins><span class="cx"> 
</span><span class="cx">     for (size_t index = 0; index &lt; 4; ++index) {
</span><del>-        CSSPrimitiveValue* value = consumePercent(range, ValueRangeNonNegative);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; value = consumePercent(range, ValueRangeNonNegative);
</ins><span class="cx">         if (!value)
</span><span class="cx">             value = consumeNumber(range, ValueRangeNonNegative);
</span><span class="cx">         if (!value)
</span><span class="lines">@@ -2462,14 +2228,24 @@
</span><span class="cx">     // FIXME: What do we do with -webkit-box-reflect and -webkit-mask-box-image? Probably just have to leave them filling...
</span><span class="cx">     if (property == CSSPropertyWebkitBorderImage || property == CSSPropertyWebkitMaskBoxImage || property == CSSPropertyWebkitBoxReflect)
</span><span class="cx">         fill = true;
</span><del>-    return CSSBorderImageSliceValue::create(CSSQuadValue::create(slices[0], slices[1], slices[2], slices[3], CSSQuadValue::SerializeAsQuad), fill);
</del><ins>+    
+    // Now build a rect value to hold all four of our primitive values.
+    // FIXME-NEWPARSER: Should just have a CSSQuadValue.
+    auto quad = Quad::create();
+    quad-&gt;setTop(slices[0].releaseNonNull());
+    quad-&gt;setRight(slices[1].releaseNonNull());
+    quad-&gt;setBottom(slices[2].releaseNonNull());
+    quad-&gt;setLeft(slices[3].releaseNonNull());
+    
+    // Make our new border image value now.
+    return CSSBorderImageSliceValue::create(CSSValuePool::singleton().createValue(WTFMove(quad)), fill);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBorderImageOutset(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeBorderImageOutset(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* outsets[4] = { 0 };
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; outsets[4] = { 0 };
</ins><span class="cx"> 
</span><del>-    CSSPrimitiveValue* value = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; value;
</ins><span class="cx">     for (size_t index = 0; index &lt; 4; ++index) {
</span><span class="cx">         value = consumeNumber(range, ValueRangeNonNegative);
</span><span class="cx">         if (!value)
</span><span class="lines">@@ -2481,14 +2257,22 @@
</span><span class="cx">     if (!outsets[0])
</span><span class="cx">         return nullptr;
</span><span class="cx">     complete4Sides(outsets);
</span><del>-    return CSSQuadValue::create(outsets[0], outsets[1], outsets[2], outsets[3], CSSQuadValue::SerializeAsQuad);
</del><ins>+    
+    // FIXME-NEWPARSER: Should just have a CSSQuadValue.
+    auto quad = Quad::create();
+    quad-&gt;setTop(outsets[0].releaseNonNull());
+    quad-&gt;setRight(outsets[1].releaseNonNull());
+    quad-&gt;setBottom(outsets[2].releaseNonNull());
+    quad-&gt;setLeft(outsets[3].releaseNonNull());
+    
+    return CSSValuePool::singleton().createValue(WTFMove(quad));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBorderImageWidth(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeBorderImageWidth(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* widths[4] = { 0 };
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; widths[4];
</ins><span class="cx"> 
</span><del>-    CSSPrimitiveValue* value = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; value;
</ins><span class="cx">     for (size_t index = 0; index &lt; 4; ++index) {
</span><span class="cx">         value = consumeNumber(range, ValueRangeNonNegative);
</span><span class="cx">         if (!value)
</span><span class="lines">@@ -2502,11 +2286,19 @@
</span><span class="cx">     if (!widths[0])
</span><span class="cx">         return nullptr;
</span><span class="cx">     complete4Sides(widths);
</span><del>-    return CSSQuadValue::create(widths[0], widths[1], widths[2], widths[3], CSSQuadValue::SerializeAsQuad);
</del><ins>+    
+    // FIXME-NEWPARSER: Should just have a CSSQuadValue.
+    auto quad = Quad::create();
+    quad-&gt;setTop(widths[0].releaseNonNull());
+    quad-&gt;setRight(widths[1].releaseNonNull());
+    quad-&gt;setBottom(widths[2].releaseNonNull());
+    quad-&gt;setLeft(widths[3].releaseNonNull());
+    
+    return CSSValuePool::singleton().createValue(WTFMove(quad));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumeBorderImageComponents(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, CSSValue*&amp; source,
-    CSSValue*&amp; slice, CSSValue*&amp; width, CSSValue*&amp; outset, CSSValue*&amp; repeat)
</del><ins>+static bool consumeBorderImageComponents(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, RefPtr&lt;CSSValue&gt;&amp; source,
+    RefPtr&lt;CSSValue&gt;&amp; slice, RefPtr&lt;CSSValue&gt;&amp; width, RefPtr&lt;CSSValue&gt;&amp; outset, RefPtr&lt;CSSValue&gt;&amp; repeat)
</ins><span class="cx"> {
</span><span class="cx">     do {
</span><span class="cx">         if (!source) {
</span><span class="lines">@@ -2543,62 +2335,55 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeWebkitBorderImage(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeWebkitBorderImage(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    CSSValue* source = nullptr;
-    CSSValue* slice = nullptr;
-    CSSValue* width = nullptr;
-    CSSValue* outset = nullptr;
-    CSSValue* repeat = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; source;
+    RefPtr&lt;CSSValue&gt; slice;
+    RefPtr&lt;CSSValue&gt; width;
+    RefPtr&lt;CSSValue&gt; outset;
+    RefPtr&lt;CSSValue&gt; repeat;
</ins><span class="cx">     if (consumeBorderImageComponents(property, range, context, source, slice, width, outset, repeat))
</span><del>-        return createBorderImageValue(source, slice, width, outset, repeat);
</del><ins>+        return createBorderImageValue(WTFMove(source), WTFMove(slice), WTFMove(width), WTFMove(outset), WTFMove(repeat));
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeReflect(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeReflect(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* direction = consumeIdent&lt;CSSValueAbove, CSSValueBelow, CSSValueLeft, CSSValueRight&gt;(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; direction = consumeIdent&lt;CSSValueAbove, CSSValueBelow, CSSValueLeft, CSSValueRight&gt;(range);
</ins><span class="cx">     if (!direction)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* offset = nullptr;
-    if (range.atEnd()) {
-        offset = CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitType::Pixels);
-    } else {
-        offset = consumeLengthOrPercent(range, context.mode(), ValueRangeAll, UnitlessQuirk::Forbid);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; offset;
+    if (range.atEnd())
+        offset = CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitTypes::CSS_PX);
+    else {
+        offset = consumeLengthOrPercent(range, context.mode, ValueRangeAll, UnitlessQuirk::Forbid);
</ins><span class="cx">         if (!offset)
</span><span class="cx">             return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSValue* mask = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; mask;
</ins><span class="cx">     if (!range.atEnd()) {
</span><span class="cx">         mask = consumeWebkitBorderImage(CSSPropertyWebkitBoxReflect, range, context);
</span><span class="cx">         if (!mask)
</span><span class="cx">             return nullptr;
</span><span class="cx">     }
</span><del>-    return CSSReflectValue::create(direction, offset, mask);
</del><ins>+    return CSSReflectValue::create(direction.releaseNonNull(), offset.releaseNonNull(), mask.releaseNonNull());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFontSizeAdjust(CSSParserTokenRange&amp; range)
</del><ins>+#if ENABLE(CSS_IMAGE_ORIENTATION)
+static RefPtr&lt;CSSValue&gt; consumeImageOrientation(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, UnitlessQuirk unitless = UnitlessQuirk::Forbid)
</ins><span class="cx"> {
</span><del>-    if (range.peek().id() == CSSValueNone)
-        return consumeIdent(range);
-    return consumeNumber(range, ValueRangeNonNegative);
-}
-
-static CSSValue* consumeImageOrientation(CSSParserTokenRange&amp; range)
-{
-    if (range.peek().id() == CSSValueFromImage)
-        return consumeIdent(range);
</del><span class="cx">     if (range.peek().type() != NumberToken) {
</span><del>-        CSSPrimitiveValue* angle = consumeAngle(range);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; angle = consumeAngle(range, cssParserMode, unitless);
</ins><span class="cx">         if (angle &amp;&amp; angle-&gt;doubleValue() == 0)
</span><span class="cx">             return angle;
</span><span class="cx">     }
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><ins>+#endif
</ins><span class="cx"> 
</span><del>-static CSSValue* consumeBackgroundBlendMode(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeBackgroundBlendMode(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueNormal || id == CSSValueOverlay || (id &gt;= CSSValueMultiply &amp;&amp; id &lt;= CSSValueLuminosity))
</span><span class="lines">@@ -2606,31 +2391,25 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBackgroundAttachment(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeBackgroundAttachment(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdent&lt;CSSValueScroll, CSSValueFixed, CSSValueLocal&gt;(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBackgroundBox(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeBackgroundBox(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdent&lt;CSSValueBorderBox, CSSValuePaddingBox, CSSValueContentBox&gt;(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBackgroundComposite(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeBackgroundComposite(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     return consumeIdentRange(range, CSSValueClear, CSSValuePlusLighter);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeMaskSourceType(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumePrefixedBackgroundBox(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; /*context*/)
</ins><span class="cx"> {
</span><del>-    ASSERT(RuntimeEnabledFeatures::cssMaskSourceTypeEnabled());
-    return consumeIdent&lt;CSSValueAuto, CSSValueAlpha, CSSValueLuminance&gt;(range);
-}
-
-static CSSValue* consumePrefixedBackgroundBox(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
-{
</del><span class="cx">     // The values 'border', 'padding' and 'content' are deprecated and do not apply to the version of the property that has the -webkit- prefix removed.
</span><del>-    if (CSSValue* value = consumeIdentRange(range, CSSValueBorder, CSSValuePaddingBox))
</del><ins>+    if (RefPtr&lt;CSSPrimitiveValue&gt; value = consumeIdentRange(range, CSSValueBorder, CSSValuePaddingBox))
</ins><span class="cx">         return value;
</span><span class="cx">     if ((property == CSSPropertyWebkitBackgroundClip || property == CSSPropertyWebkitMaskClip) &amp;&amp; range.peek().id() == CSSValueText)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -2637,50 +2416,50 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBackgroundSize(CSSPropertyID unresolvedProperty, CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeBackgroundSize(CSSPropertyID property, CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (identMatches&lt;CSSValueContain, CSSValueCover&gt;(range.peek().id()))
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* horizontal = consumeIdent&lt;CSSValueAuto&gt;(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; horizontal = consumeIdent&lt;CSSValueAuto&gt;(range);
</ins><span class="cx">     if (!horizontal)
</span><span class="cx">         horizontal = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Forbid);
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* vertical = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; vertical;
</ins><span class="cx">     if (!range.atEnd()) {
</span><span class="cx">         if (range.peek().id() == CSSValueAuto) // `auto' is the default
</span><span class="cx">             range.consumeIncludingWhitespace();
</span><span class="cx">         else
</span><span class="cx">             vertical = consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, UnitlessQuirk::Forbid);
</span><del>-    } else if (unresolvedProperty == CSSPropertyAliasWebkitBackgroundSize) {
</del><ins>+    } else if (!vertical &amp;&amp; property == CSSPropertyWebkitBackgroundSize) {
</ins><span class="cx">         // Legacy syntax: &quot;-webkit-background-size: 10px&quot; is equivalent to &quot;background-size: 10px 10px&quot;.
</span><span class="cx">         vertical = horizontal;
</span><span class="cx">     }
</span><span class="cx">     if (!vertical)
</span><span class="cx">         return horizontal;
</span><del>-    return CSSValuePair::create(horizontal, vertical, CSSValuePair::KeepIdenticalValues);
</del><ins>+    return createPrimitiveValuePair(horizontal.releaseNonNull(), vertical.releaseNonNull(), Pair::IdenticalValueEncoding::DoNotCoalesce);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumeGridAutoFlow(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValueList&gt; consumeGridAutoFlow(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><del>-    CSSPrimitiveValue* rowOrColumnValue = consumeIdent&lt;CSSValueRow, CSSValueColumn&gt;(range);
-    CSSPrimitiveValue* denseAlgorithm = consumeIdent&lt;CSSValueDense&gt;(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; rowOrColumnValue = consumeIdent&lt;CSSValueRow, CSSValueColumn&gt;(range);
+    RefPtr&lt;CSSPrimitiveValue&gt; denseAlgorithm = consumeIdent&lt;CSSValueDense&gt;(range);
</ins><span class="cx">     if (!rowOrColumnValue) {
</span><span class="cx">         rowOrColumnValue = consumeIdent&lt;CSSValueRow, CSSValueColumn&gt;(range);
</span><span class="cx">         if (!rowOrColumnValue &amp;&amp; !denseAlgorithm)
</span><span class="cx">             return nullptr;
</span><span class="cx">     }
</span><del>-    CSSValueList* parsedValues = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; parsedValues = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     if (rowOrColumnValue)
</span><del>-        parsedValues-&gt;append(*rowOrColumnValue);
</del><ins>+        parsedValues-&gt;append(rowOrColumnValue.releaseNonNull());
</ins><span class="cx">     if (denseAlgorithm)
</span><del>-        parsedValues-&gt;append(*denseAlgorithm);
</del><ins>+        parsedValues-&gt;append(denseAlgorithm.releaseNonNull());
</ins><span class="cx">     return parsedValues;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeBackgroundComponent(CSSPropertyID unresolvedProperty, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeBackgroundComponent(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    switch (unresolvedProperty) {
</del><ins>+    switch (property) {
</ins><span class="cx">     case CSSPropertyBackgroundClip:
</span><span class="cx">         return consumeBackgroundBox(range);
</span><span class="cx">     case CSSPropertyBackgroundBlendMode:
</span><span class="lines">@@ -2691,28 +2470,26 @@
</span><span class="cx">         return consumeBackgroundBox(range);
</span><span class="cx">     case CSSPropertyWebkitMaskComposite:
</span><span class="cx">         return consumeBackgroundComposite(range);
</span><del>-    case CSSPropertyMaskSourceType:
-        return consumeMaskSourceType(range);
</del><span class="cx">     case CSSPropertyWebkitBackgroundClip:
</span><span class="cx">     case CSSPropertyWebkitBackgroundOrigin:
</span><span class="cx">     case CSSPropertyWebkitMaskClip:
</span><span class="cx">     case CSSPropertyWebkitMaskOrigin:
</span><del>-        return consumePrefixedBackgroundBox(unresolvedProperty, range, context);
</del><ins>+        return consumePrefixedBackgroundBox(property, range, context);
</ins><span class="cx">     case CSSPropertyBackgroundImage:
</span><span class="cx">     case CSSPropertyWebkitMaskImage:
</span><span class="cx">         return consumeImageOrNone(range, context);
</span><span class="cx">     case CSSPropertyBackgroundPositionX:
</span><span class="cx">     case CSSPropertyWebkitMaskPositionX:
</span><del>-        return consumePositionX(range, context.mode());
</del><ins>+        return consumePositionX(range, context.mode);
</ins><span class="cx">     case CSSPropertyBackgroundPositionY:
</span><span class="cx">     case CSSPropertyWebkitMaskPositionY:
</span><del>-        return consumePositionY(range, context.mode());
</del><ins>+        return consumePositionY(range, context.mode);
</ins><span class="cx">     case CSSPropertyBackgroundSize:
</span><del>-    case CSSPropertyAliasWebkitBackgroundSize:
</del><ins>+    case CSSPropertyWebkitBackgroundSize:
</ins><span class="cx">     case CSSPropertyWebkitMaskSize:
</span><del>-        return consumeBackgroundSize(unresolvedProperty, range, context.mode());
</del><ins>+        return consumeBackgroundSize(property, range, context.mode);
</ins><span class="cx">     case CSSPropertyBackgroundColor:
</span><del>-        return consumeColor(range, context.mode());
</del><ins>+        return consumeColor(range, context.mode);
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     };
</span><span class="lines">@@ -2719,34 +2496,34 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void addBackgroundValue(CSSValue*&amp; list, CSSValue* value)
</del><ins>+static void addBackgroundValue(RefPtr&lt;CSSValue&gt;&amp; list, Ref&lt;CSSValue&gt;&amp;&amp; value)
</ins><span class="cx"> {
</span><span class="cx">     if (list) {
</span><span class="cx">         if (!list-&gt;isBaseValueList()) {
</span><del>-            CSSValue* firstValue = list;
</del><ins>+            RefPtr&lt;CSSValue&gt; firstValue = list;
</ins><span class="cx">             list = CSSValueList::createCommaSeparated();
</span><del>-            toCSSValueList(list)-&gt;append(*firstValue);
</del><ins>+            downcast&lt;CSSValueList&gt;(*list).append(firstValue.releaseNonNull());
</ins><span class="cx">         }
</span><del>-        toCSSValueList(list)-&gt;append(*value);
</del><ins>+        downcast&lt;CSSValueList&gt;(*list).append(WTFMove(value));
</ins><span class="cx">     } else {
</span><span class="cx">         // To conserve memory we don't actually wrap a single value in a list.
</span><del>-        list = value;
</del><ins>+        list = WTFMove(value);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeCommaSeparatedBackgroundComponent(CSSPropertyID unresolvedProperty, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeCommaSeparatedBackgroundComponent(CSSPropertyID property, CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    CSSValue* result = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; result;
</ins><span class="cx">     do {
</span><del>-        CSSValue* value = consumeBackgroundComponent(unresolvedProperty, range, context);
</del><ins>+        RefPtr&lt;CSSValue&gt; value = consumeBackgroundComponent(property, range, context);
</ins><span class="cx">         if (!value)
</span><span class="cx">             return nullptr;
</span><del>-        addBackgroundValue(result, value);
</del><ins>+        addBackgroundValue(result, value.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeSelfPositionKeyword(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeSelfPositionKeyword(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     if (id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter
</span><span class="lines">@@ -2756,23 +2533,23 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeSelfPositionOverflowPosition(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeSelfPositionOverflowPosition(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (identMatches&lt;CSSValueAuto, CSSValueNormal, CSSValueStretch, CSSValueBaseline, CSSValueLastBaseline&gt;(range.peek().id()))
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* overflowPosition = consumeIdent&lt;CSSValueUnsafe, CSSValueSafe&gt;(range);
-    CSSPrimitiveValue* selfPosition = consumeSelfPositionKeyword(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; overflowPosition = consumeIdent&lt;CSSValueUnsafe, CSSValueSafe&gt;(range);
+    RefPtr&lt;CSSPrimitiveValue&gt; selfPosition = consumeSelfPositionKeyword(range);
</ins><span class="cx">     if (!selfPosition)
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!overflowPosition)
</span><span class="cx">         overflowPosition = consumeIdent&lt;CSSValueUnsafe, CSSValueSafe&gt;(range);
</span><span class="cx">     if (overflowPosition)
</span><del>-        return CSSValuePair::create(selfPosition, overflowPosition, CSSValuePair::DropIdenticalValues);
</del><ins>+        return createPrimitiveValuePair(selfPosition.releaseNonNull(), overflowPosition.releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce);
</ins><span class="cx">     return selfPosition;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeAlignItems(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeAlignItems(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     // align-items property does not allow the 'auto' value.
</span><span class="cx">     if (identMatches&lt;CSSValueAuto&gt;(range.peek().id()))
</span><span class="lines">@@ -2780,34 +2557,34 @@
</span><span class="cx">     return consumeSelfPositionOverflowPosition(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeJustifyItems(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeJustifyItems(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSParserTokenRange rangeCopy = range;
</span><del>-    CSSPrimitiveValue* legacy = consumeIdent&lt;CSSValueLegacy&gt;(rangeCopy);
-    CSSPrimitiveValue* positionKeyword = consumeIdent&lt;CSSValueCenter, CSSValueLeft, CSSValueRight&gt;(rangeCopy);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; legacy = consumeIdent&lt;CSSValueLegacy&gt;(rangeCopy);
+    RefPtr&lt;CSSPrimitiveValue&gt; positionKeyword = consumeIdent&lt;CSSValueCenter, CSSValueLeft, CSSValueRight&gt;(rangeCopy);
</ins><span class="cx">     if (!legacy)
</span><span class="cx">         legacy = consumeIdent&lt;CSSValueLegacy&gt;(rangeCopy);
</span><span class="cx">     if (legacy &amp;&amp; positionKeyword) {
</span><span class="cx">         range = rangeCopy;
</span><del>-        return CSSValuePair::create(legacy, positionKeyword, CSSValuePair::DropIdenticalValues);
</del><ins>+        return createPrimitiveValuePair(legacy.releaseNonNull(), positionKeyword.releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce);
</ins><span class="cx">     }
</span><span class="cx">     return consumeSelfPositionOverflowPosition(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFitContent(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFitContent(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     CSSParserTokenRange rangeCopy = range;
</span><span class="cx">     CSSParserTokenRange args = consumeFunction(rangeCopy);
</span><del>-    CSSPrimitiveValue* length = consumeLengthOrPercent(args, cssParserMode, ValueRangeNonNegative, UnitlessQuirk::Allow);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; length = consumeLengthOrPercent(args, cssParserMode, ValueRangeNonNegative, UnitlessQuirk::Allow);
</ins><span class="cx">     if (!length || !args.atEnd())
</span><span class="cx">         return nullptr;
</span><span class="cx">     range = rangeCopy;
</span><del>-    CSSFunctionValue* result = CSSFunctionValue::create(CSSValueFitContent);
-    result-&gt;append(*length);
</del><ins>+    RefPtr&lt;CSSFunctionValue&gt; result = CSSFunctionValue::create(CSSValueWebkitFitContent);
+    result-&gt;append(length.releaseNonNull());
</ins><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSCustomIdentValue* consumeCustomIdentForGridLine(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeCustomIdentForGridLine(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto || range.peek().id() == CSSValueSpan)
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -2814,14 +2591,14 @@
</span><span class="cx">     return consumeCustomIdent(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeGridLine(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeGridLine(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto)
</span><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* spanValue = nullptr;
-    CSSCustomIdentValue* gridLineName = nullptr;
-    CSSPrimitiveValue* numericValue = consumeInteger(range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; spanValue;
+    RefPtr&lt;CSSPrimitiveValue&gt; gridLineName;
+    RefPtr&lt;CSSPrimitiveValue&gt; numericValue = consumeInteger(range);
</ins><span class="cx">     if (numericValue) {
</span><span class="cx">         gridLineName = consumeCustomIdentForGridLine(range);
</span><span class="cx">         spanValue = consumeIdent&lt;CSSValueSpan&gt;(range);
</span><span class="lines">@@ -2852,13 +2629,13 @@
</span><span class="cx">     if (numericValue &amp;&amp; numericValue-&gt;intValue() == 0)
</span><span class="cx">         return nullptr; // An &lt;integer&gt; value of zero makes the declaration invalid.
</span><span class="cx"> 
</span><del>-    CSSValueList* values = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; values = CSSValueList::createSpaceSeparated();
</ins><span class="cx">     if (spanValue)
</span><del>-        values-&gt;append(*spanValue);
</del><ins>+        values-&gt;append(spanValue.releaseNonNull());
</ins><span class="cx">     if (numericValue)
</span><del>-        values-&gt;append(*numericValue);
</del><ins>+        values-&gt;append(numericValue.releaseNonNull());
</ins><span class="cx">     if (gridLineName)
</span><del>-        values-&gt;append(*gridLineName);
</del><ins>+        values-&gt;append(gridLineName.releaseNonNull());
</ins><span class="cx">     ASSERT(values-&gt;length());
</span><span class="cx">     return values;
</span><span class="cx"> }
</span><span class="lines">@@ -2866,7 +2643,7 @@
</span><span class="cx"> static bool isGridTrackFixedSized(const CSSPrimitiveValue&amp; primitiveValue)
</span><span class="cx"> {
</span><span class="cx">     CSSValueID valueID = primitiveValue.valueID();
</span><del>-    if (valueID == CSSValueMinContent || valueID == CSSValueMaxContent || valueID == CSSValueAuto || primitiveValue.isFlex())
</del><ins>+    if (valueID == CSSValueWebkitMinContent || valueID == CSSValueWebkitMaxContent || valueID == CSSValueAuto || primitiveValue.isFlex())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="lines">@@ -2875,16 +2652,16 @@
</span><span class="cx"> static bool isGridTrackFixedSized(const CSSValue&amp; value)
</span><span class="cx"> {
</span><span class="cx">     if (value.isPrimitiveValue())
</span><del>-        return isGridTrackFixedSized(toCSSPrimitiveValue(value));
</del><ins>+        return isGridTrackFixedSized(downcast&lt;CSSPrimitiveValue&gt;(value));
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(value.isFunctionValue());
</span><del>-    auto&amp; function = toCSSFunctionValue(value);
-    if (function.functionType() == CSSValueFitContent)
</del><ins>+    auto&amp; function = downcast&lt;CSSFunctionValue&gt;(value);
+    if (function.name() == CSSValueWebkitFitContent || function.arguments() == nullptr || function.arguments()-&gt;length() &lt; 2)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const CSSPrimitiveValue&amp; minPrimitiveValue = toCSSPrimitiveValue(function.item(0));
-    const CSSPrimitiveValue&amp; maxPrimitiveValue = toCSSPrimitiveValue(function.item(1));
-    return isGridTrackFixedSized(minPrimitiveValue) || isGridTrackFixedSized(maxPrimitiveValue);
</del><ins>+    CSSValue* minPrimitiveValue = downcast&lt;CSSPrimitiveValue&gt;(function.arguments()-&gt;item(0));
+    CSSValue* maxPrimitiveValue = downcast&lt;CSSPrimitiveValue&gt;(function.arguments()-&gt;item(1));
+    return isGridTrackFixedSized(*minPrimitiveValue) || isGridTrackFixedSized(*maxPrimitiveValue);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Vector&lt;String&gt; parseGridTemplateAreasColumnNames(const String&amp; gridRowNames)
</span><span class="lines">@@ -2981,20 +2758,20 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeGridBreadth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSPrimitiveValue&gt; consumeGridBreadth(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     const CSSParserToken&amp; token = range.peek();
</span><del>-    if (identMatches&lt;CSSValueMinContent, CSSValueMaxContent, CSSValueAuto&gt;(token.id()))
</del><ins>+    if (identMatches&lt;CSSValueWebkitMinContent, CSSValueWebkitMaxContent, CSSValueAuto&gt;(token.id()))
</ins><span class="cx">         return consumeIdent(range);
</span><del>-    if (token.type() == DimensionToken &amp;&amp; token.unitType() == CSSPrimitiveValue::UnitType::Fraction) {
</del><ins>+    if (token.type() == DimensionToken &amp;&amp; token.unitType() == CSSPrimitiveValue::UnitTypes::CSS_FR) {
</ins><span class="cx">         if (range.peek().numericValue() &lt; 0)
</span><span class="cx">             return nullptr;
</span><del>-        return CSSPrimitiveValue::create(range.consumeIncludingWhitespace().numericValue(), CSSPrimitiveValue::UnitType::Fraction);
</del><ins>+        return CSSPrimitiveValue::create(range.consumeIncludingWhitespace().numericValue(), CSSPrimitiveValue::UnitTypes::CSS_FR);
</ins><span class="cx">     }
</span><span class="cx">     return consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative, UnitlessQuirk::Allow);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeGridTrackSize(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeGridTrackSize(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     const CSSParserToken&amp; token = range.peek();
</span><span class="cx">     if (identMatches&lt;CSSValueAuto&gt;(token.id()))
</span><span class="lines">@@ -3003,20 +2780,20 @@
</span><span class="cx">     if (token.functionId() == CSSValueMinmax) {
</span><span class="cx">         CSSParserTokenRange rangeCopy = range;
</span><span class="cx">         CSSParserTokenRange args = consumeFunction(rangeCopy);
</span><del>-        CSSPrimitiveValue* minTrackBreadth = consumeGridBreadth(args, cssParserMode);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; minTrackBreadth = consumeGridBreadth(args, cssParserMode);
</ins><span class="cx">         if (!minTrackBreadth || minTrackBreadth-&gt;isFlex() || !consumeCommaIncludingWhitespace(args))
</span><span class="cx">             return nullptr;
</span><del>-        CSSPrimitiveValue* maxTrackBreadth = consumeGridBreadth(args, cssParserMode);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; maxTrackBreadth = consumeGridBreadth(args, cssParserMode);
</ins><span class="cx">         if (!maxTrackBreadth || !args.atEnd())
</span><span class="cx">             return nullptr;
</span><span class="cx">         range = rangeCopy;
</span><del>-        CSSFunctionValue* result = CSSFunctionValue::create(CSSValueMinmax);
-        result-&gt;append(*minTrackBreadth);
-        result-&gt;append(*maxTrackBreadth);
</del><ins>+        RefPtr&lt;CSSFunctionValue&gt; result = CSSFunctionValue::create(CSSValueMinmax);
+        result-&gt;append(minTrackBreadth.releaseNonNull());
+        result-&gt;append(maxTrackBreadth.releaseNonNull());
</ins><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (token.functionId() == CSSValueFitContent)
</del><ins>+    if (token.functionId() == CSSValueWebkitFitContent)
</ins><span class="cx">         return consumeFitContent(range, cssParserMode);
</span><span class="cx"> 
</span><span class="cx">     return consumeGridBreadth(range, cssParserMode);
</span><span class="lines">@@ -3023,19 +2800,21 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Appends to the passed in CSSGridLineNamesValue if any, otherwise creates a new one.
</span><del>-static CSSGridLineNamesValue* consumeGridLineNames(CSSParserTokenRange&amp; range, CSSGridLineNamesValue* lineNames = nullptr)
</del><ins>+static RefPtr&lt;CSSGridLineNamesValue&gt; consumeGridLineNames(CSSParserTokenRange&amp; range, CSSGridLineNamesValue* lineNames = nullptr)
</ins><span class="cx"> {
</span><span class="cx">     CSSParserTokenRange rangeCopy = range;
</span><span class="cx">     if (rangeCopy.consumeIncludingWhitespace().type() != LeftBracketToken)
</span><span class="cx">         return nullptr;
</span><del>-    if (!lineNames)
-        lineNames = CSSGridLineNamesValue::create();
-    while (CSSCustomIdentValue* lineName = consumeCustomIdentForGridLine(rangeCopy))
-        lineNames-&gt;append(*lineName);
</del><ins>+    
+    RefPtr&lt;CSSGridLineNamesValue&gt; result = lineNames;
+    if (!result)
+        result = CSSGridLineNamesValue::create();
+    while (RefPtr&lt;CSSPrimitiveValue&gt; lineName = consumeCustomIdentForGridLine(rangeCopy))
+        result-&gt;append(lineName.releaseNonNull());
</ins><span class="cx">     if (rangeCopy.consumeIncludingWhitespace().type() != RightBracketToken)
</span><span class="cx">         return nullptr;
</span><span class="cx">     range = rangeCopy;
</span><del>-    return lineNames;
</del><ins>+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool consumeGridTrackRepeatFunction(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, CSSValueList&amp; list, bool&amp; isAutoRepeat, bool&amp; allTracksAreFixedSized)
</span><span class="lines">@@ -3045,12 +2824,12 @@
</span><span class="cx">     // because it will be computed later, let's set it to 1.
</span><span class="cx">     size_t repetitions = 1;
</span><span class="cx">     isAutoRepeat = identMatches&lt;CSSValueAutoFill, CSSValueAutoFit&gt;(args.peek().id());
</span><del>-    CSSValueList* repeatedValues;
-    if (isAutoRepeat) {
</del><ins>+    RefPtr&lt;CSSValueList&gt; repeatedValues;
+    if (isAutoRepeat)
</ins><span class="cx">         repeatedValues = CSSGridAutoRepeatValue::create(args.consumeIncludingWhitespace().id());
</span><del>-    } else {
</del><ins>+    else {
</ins><span class="cx">         // FIXME: a consumeIntegerRaw would be more efficient here.
</span><del>-        CSSPrimitiveValue* repetition = consumePositiveInteger(args);
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; repetition = consumePositiveInteger(args);
</ins><span class="cx">         if (!repetition)
</span><span class="cx">             return false;
</span><span class="cx">         repetitions = clampTo&lt;size_t&gt;(repetition-&gt;doubleValue(), 0, kGridMaxTracks);
</span><span class="lines">@@ -3058,13 +2837,13 @@
</span><span class="cx">     }
</span><span class="cx">     if (!consumeCommaIncludingWhitespace(args))
</span><span class="cx">         return false;
</span><del>-    CSSGridLineNamesValue* lineNames = consumeGridLineNames(args);
</del><ins>+    RefPtr&lt;CSSGridLineNamesValue&gt; lineNames = consumeGridLineNames(args);
</ins><span class="cx">     if (lineNames)
</span><del>-        repeatedValues-&gt;append(*lineNames);
</del><ins>+        repeatedValues-&gt;append(lineNames.releaseNonNull());
</ins><span class="cx"> 
</span><span class="cx">     size_t numberOfTracks = 0;
</span><span class="cx">     while (!args.atEnd()) {
</span><del>-        CSSValue* trackSize = consumeGridTrackSize(args, cssParserMode);
</del><ins>+        RefPtr&lt;CSSValue&gt; trackSize = consumeGridTrackSize(args, cssParserMode);
</ins><span class="cx">         if (!trackSize)
</span><span class="cx">             return false;
</span><span class="cx">         if (allTracksAreFixedSized)
</span><span class="lines">@@ -3073,20 +2852,20 @@
</span><span class="cx">         ++numberOfTracks;
</span><span class="cx">         lineNames = consumeGridLineNames(args);
</span><span class="cx">         if (lineNames)
</span><del>-            repeatedValues-&gt;append(*lineNames);
</del><ins>+            repeatedValues-&gt;append(lineNames.releaseNonNull());
</ins><span class="cx">     }
</span><span class="cx">     // We should have found at least one &lt;track-size&gt; or else it is not a valid &lt;track-list&gt;.
</span><span class="cx">     if (!numberOfTracks)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (isAutoRepeat) {
-        list.append(*repeatedValues);
-    } else {
</del><ins>+    if (isAutoRepeat)
+        list.append(repeatedValues.releaseNonNull());
+    else {
</ins><span class="cx">         // We clamp the repetitions to a multiple of the repeat() track list's size, while staying below the max grid size.
</span><span class="cx">         repetitions = std::min(repetitions, kGridMaxTracks / numberOfTracks);
</span><span class="cx">         for (size_t i = 0; i &lt; repetitions; ++i) {
</span><span class="cx">             for (size_t j = 0; j &lt; repeatedValues-&gt;length(); ++j)
</span><del>-                list.append(repeatedValues-&gt;item(j));
</del><ins>+                list.append(adoptRef(*repeatedValues-&gt;item(j)));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     return true;
</span><span class="lines">@@ -3094,15 +2873,15 @@
</span><span class="cx"> 
</span><span class="cx"> enum TrackListType { GridTemplate, GridTemplateNoRepeat, GridAuto };
</span><span class="cx"> 
</span><del>-static CSSValue* consumeGridTrackList(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, TrackListType trackListType)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeGridTrackList(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode, TrackListType trackListType)
</ins><span class="cx"> {
</span><span class="cx">     bool allowGridLineNames = trackListType != GridAuto;
</span><del>-    CSSValueList* values = CSSValueList::createSpaceSeparated();
-    CSSGridLineNamesValue* lineNames = consumeGridLineNames(range);
</del><ins>+    RefPtr&lt;CSSValueList&gt; values = CSSValueList::createSpaceSeparated();
+    RefPtr&lt;CSSGridLineNamesValue&gt; lineNames = consumeGridLineNames(range);
</ins><span class="cx">     if (lineNames) {
</span><span class="cx">         if (!allowGridLineNames)
</span><span class="cx">             return nullptr;
</span><del>-        values-&gt;append(*lineNames);
</del><ins>+        values-&gt;append(lineNames.releaseNonNull());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool allowRepeat = trackListType == GridTemplate;
</span><span class="lines">@@ -3118,10 +2897,10 @@
</span><span class="cx">             if (isAutoRepeat &amp;&amp; seenAutoRepeat)
</span><span class="cx">                 return nullptr;
</span><span class="cx">             seenAutoRepeat = seenAutoRepeat || isAutoRepeat;
</span><del>-        } else if (CSSValue* value = consumeGridTrackSize(range, cssParserMode)) {
</del><ins>+        } else if (RefPtr&lt;CSSValue&gt; value = consumeGridTrackSize(range, cssParserMode)) {
</ins><span class="cx">             if (allTracksAreFixedSized)
</span><span class="cx">                 allTracksAreFixedSized = isGridTrackFixedSized(*value);
</span><del>-            values-&gt;append(*value);
</del><ins>+            values-&gt;append(value.releaseNonNull());
</ins><span class="cx">         } else {
</span><span class="cx">             return nullptr;
</span><span class="cx">         }
</span><span class="lines">@@ -3137,7 +2916,7 @@
</span><span class="cx">     return values;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeGridTemplatesRowsOrColumns(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeGridTemplatesRowsOrColumns(CSSParserTokenRange&amp; range, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -3144,7 +2923,7 @@
</span><span class="cx">     return consumeGridTrackList(range, cssParserMode, GridTemplate);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeGridTemplateAreas(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeGridTemplateAreas(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueNone)
</span><span class="cx">         return consumeIdent(range);
</span><span class="lines">@@ -3165,51 +2944,11 @@
</span><span class="cx">     return CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void countKeywordOnlyPropertyUsage(CSSPropertyID property, UseCounter* counter, CSSValueID valueID)
</del><ins>+RefPtr&lt;CSSValue&gt; CSSPropertyParser::parseSingleValue(CSSPropertyID property, CSSPropertyID currentShorthand)
</ins><span class="cx"> {
</span><del>-    if (!counter)
-        return;
-    switch (property) {
-    case CSSPropertyWebkitAppearance:
-        if (valueID == CSSValueNone) {
-            counter-&gt;count(UseCounter::CSSValueAppearanceNone);
-        } else {
-            counter-&gt;count(UseCounter::CSSValueAppearanceNotNone);
-            if (valueID == CSSValueButton)
-                counter-&gt;count(UseCounter::CSSValueAppearanceButton);
-            else if (valueID == CSSValueCaret)
-                counter-&gt;count(UseCounter::CSSValueAppearanceCaret);
-            else if (valueID == CSSValueCheckbox)
-                counter-&gt;count(UseCounter::CSSValueAppearanceCheckbox);
-            else if (valueID == CSSValueMenulist)
-                counter-&gt;count(UseCounter::CSSValueAppearanceMenulist);
-            else if (valueID == CSSValueMenulistButton)
-                counter-&gt;count(UseCounter::CSSValueAppearanceMenulistButton);
-            else if (valueID == CSSValueListbox)
-                counter-&gt;count(UseCounter::CSSValueAppearanceListbox);
-            else if (valueID == CSSValueRadio)
-                counter-&gt;count(UseCounter::CSSValueAppearanceRadio);
-            else if (valueID == CSSValueSearchfield)
-                counter-&gt;count(UseCounter::CSSValueAppearanceSearchField);
-            else if (valueID == CSSValueTextfield)
-                counter-&gt;count(UseCounter::CSSValueAppearanceTextField);
-            else
-                counter-&gt;count(UseCounter::CSSValueAppearanceOthers);
-        }
-        break;
-
-    default:
-        break;
-    }
-}
-
-const CSSValue* CSSPropertyParser::parseSingleValue(CSSPropertyID unresolvedProperty, CSSPropertyID currentShorthand)
-{
-    CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty);
</del><span class="cx">     if (CSSParserFastPaths::isKeywordPropertyID(property)) {
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context.mode()))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context.mode))
</ins><span class="cx">             return nullptr;
</span><del>-        countKeywordOnlyPropertyUsage(property, m_context.useCounter(), m_range.peek().id());
</del><span class="cx">         return consumeIdent(m_range);
</span><span class="cx">     }
</span><span class="cx">     switch (property) {
</span><span class="lines">@@ -3219,8 +2958,6 @@
</span><span class="cx">         return consumePage(m_range);
</span><span class="cx">     case CSSPropertyQuotes:
</span><span class="cx">         return consumeQuotes(m_range);
</span><del>-    case CSSPropertyWebkitHighlight:
-        return consumeWebkitHighlight(m_range);
</del><span class="cx">     case CSSPropertyFontVariantCaps:
</span><span class="cx">         return consumeFontVariantCaps(m_range);
</span><span class="cx">     case CSSPropertyFontVariantLigatures:
</span><span class="lines">@@ -3235,33 +2972,25 @@
</span><span class="cx">         return consumeFontWeight(m_range);
</span><span class="cx">     case CSSPropertyLetterSpacing:
</span><span class="cx">     case CSSPropertyWordSpacing:
</span><del>-        return consumeSpacing(m_range, m_context.mode());
</del><ins>+        return consumeSpacing(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyTabSize:
</span><del>-        return consumeTabSize(m_range, m_context.mode());
-    case CSSPropertyTextSizeAdjust:
-        return consumeTextSizeAdjust(m_range, m_context.mode());
</del><ins>+        return consumeTabSize(m_range, m_context.mode);
+    case CSSPropertyWebkitTextSizeAdjust:
+        return consumeTextSizeAdjust(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyFontSize:
</span><del>-        return consumeFontSize(m_range, m_context.mode(), UnitlessQuirk::Allow);
</del><ins>+        return consumeFontSize(m_range, m_context.mode, UnitlessQuirk::Allow);
</ins><span class="cx">     case CSSPropertyLineHeight:
</span><del>-        return consumeLineHeight(m_range, m_context.mode());
-    case CSSPropertyRotate:
-        return consumeRotation(m_range);
-    case CSSPropertyScale:
-        return consumeScale(m_range);
-    case CSSPropertyTranslate:
-        return consumeTranslate(m_range, m_context.mode());
</del><ins>+        return consumeLineHeight(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyWebkitBorderHorizontalSpacing:
</span><span class="cx">     case CSSPropertyWebkitBorderVerticalSpacing:
</span><del>-        return consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
</del><ins>+        return consumeLength(m_range, m_context.mode, ValueRangeNonNegative);
</ins><span class="cx">     case CSSPropertyCounterIncrement:
</span><span class="cx">     case CSSPropertyCounterReset:
</span><span class="cx">         return consumeCounter(m_range, property == CSSPropertyCounterIncrement ? 1 : 0);
</span><span class="cx">     case CSSPropertySize:
</span><del>-        return consumeSize(m_range, m_context.mode());
-    case CSSPropertySnapHeight:
-        return consumeSnapHeight(m_range, m_context.mode());
</del><ins>+        return consumeSize(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyTextIndent:
</span><del>-        return consumeTextIndent(m_range, m_context.mode());
</del><ins>+        return consumeTextIndent(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyMaxWidth:
</span><span class="cx">     case CSSPropertyMaxHeight:
</span><span class="cx">         return consumeMaxWidthOrHeight(m_range, m_context, UnitlessQuirk::Allow);
</span><span class="lines">@@ -3286,34 +3015,35 @@
</span><span class="cx">     case CSSPropertyLeft:
</span><span class="cx">     case CSSPropertyRight:
</span><span class="cx">     case CSSPropertyTop:
</span><del>-        return consumeMarginOrOffset(m_range, m_context.mode(), UnitlessQuirk::Allow);
</del><ins>+        return consumeMarginOrOffset(m_range, m_context.mode, UnitlessQuirk::Allow);
</ins><span class="cx">     case CSSPropertyWebkitMarginStart:
</span><span class="cx">     case CSSPropertyWebkitMarginEnd:
</span><span class="cx">     case CSSPropertyWebkitMarginBefore:
</span><span class="cx">     case CSSPropertyWebkitMarginAfter:
</span><del>-        return consumeMarginOrOffset(m_range, m_context.mode(), UnitlessQuirk::Forbid);
</del><ins>+        return consumeMarginOrOffset(m_range, m_context.mode, UnitlessQuirk::Forbid);
</ins><span class="cx">     case CSSPropertyPaddingTop:
</span><span class="cx">     case CSSPropertyPaddingRight:
</span><span class="cx">     case CSSPropertyPaddingBottom:
</span><span class="cx">     case CSSPropertyPaddingLeft:
</span><del>-        return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative, UnitlessQuirk::Allow);
</del><ins>+        return consumeLengthOrPercent(m_range, m_context.mode, ValueRangeNonNegative, UnitlessQuirk::Allow);
</ins><span class="cx">     case CSSPropertyWebkitPaddingStart:
</span><span class="cx">     case CSSPropertyWebkitPaddingEnd:
</span><span class="cx">     case CSSPropertyWebkitPaddingBefore:
</span><span class="cx">     case CSSPropertyWebkitPaddingAfter:
</span><del>-        return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative, UnitlessQuirk::Forbid);
</del><ins>+        return consumeLengthOrPercent(m_range, m_context.mode, ValueRangeNonNegative, UnitlessQuirk::Forbid);
</ins><span class="cx">     case CSSPropertyClip:
</span><del>-        return consumeClip(m_range, m_context.mode());
</del><ins>+        return consumeClip(m_range, m_context.mode);
+#if ENABLE(TOUCH_EVENTS)
</ins><span class="cx">     case CSSPropertyTouchAction:
</span><span class="cx">         return consumeTouchAction(m_range);
</span><del>-    case CSSPropertyScrollSnapDestination:
</del><ins>+#endif
</ins><span class="cx">     case CSSPropertyObjectPosition:
</span><span class="cx">     case CSSPropertyPerspectiveOrigin:
</span><del>-        return consumePosition(m_range, m_context.mode(), UnitlessQuirk::Forbid);
</del><ins>+        return consumePosition(m_range, m_context.mode, UnitlessQuirk::Forbid);
</ins><span class="cx">     case CSSPropertyWebkitLineClamp:
</span><span class="cx">         return consumeLineClamp(m_range);
</span><span class="cx">     case CSSPropertyWebkitFontSizeDelta:
</span><del>-        return consumeLength(m_range, m_context.mode(), ValueRangeAll, UnitlessQuirk::Allow);
</del><ins>+        return consumeLength(m_range, m_context.mode, ValueRangeAll, UnitlessQuirk::Allow);
</ins><span class="cx">     case CSSPropertyWebkitHyphenateCharacter:
</span><span class="cx">     case CSSPropertyWebkitLocale:
</span><span class="cx">         return consumeLocale(m_range);
</span><span class="lines">@@ -3322,7 +3052,7 @@
</span><span class="cx">     case CSSPropertyColumnCount:
</span><span class="cx">         return consumeColumnCount(m_range);
</span><span class="cx">     case CSSPropertyColumnGap:
</span><del>-        return consumeColumnGap(m_range, m_context.mode());
</del><ins>+        return consumeColumnGap(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyColumnSpan:
</span><span class="cx">         return consumeColumnSpan(m_range);
</span><span class="cx">     case CSSPropertyZoom:
</span><span class="lines">@@ -3339,25 +3069,26 @@
</span><span class="cx">     case CSSPropertyTransitionProperty:
</span><span class="cx">     case CSSPropertyAnimationTimingFunction:
</span><span class="cx">     case CSSPropertyTransitionTimingFunction:
</span><del>-        return consumeAnimationPropertyList(property, m_range, m_context, unresolvedProperty == CSSPropertyAliasWebkitAnimationName);
</del><ins>+        return consumeAnimationPropertyList(property, m_range, m_context);
</ins><span class="cx">     case CSSPropertyGridColumnGap:
</span><span class="cx">     case CSSPropertyGridRowGap:
</span><del>-        return consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
-    case CSSPropertyShapeMargin:
-        return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative);
-    case CSSPropertyShapeImageThreshold:
</del><ins>+        return consumeLength(m_range, m_context.mode, ValueRangeNonNegative);
+    case CSSPropertyWebkitShapeMargin:
+        return consumeLengthOrPercent(m_range, m_context.mode, ValueRangeNonNegative);
+    case CSSPropertyWebkitShapeImageThreshold:
</ins><span class="cx">         return consumeNumber(m_range, ValueRangeAll);
</span><span class="cx">     case CSSPropertyWebkitBoxOrdinalGroup:
</span><span class="cx">     case CSSPropertyOrphans:
</span><span class="cx">     case CSSPropertyWidows:
</span><span class="cx">         return consumePositiveInteger(m_range);
</span><del>-    case CSSPropertyTextDecorationColor:
-        ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
-        return consumeColor(m_range, m_context.mode());
</del><ins>+    case CSSPropertyWebkitTextDecorationColor:
+        return consumeColor(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyWebkitTextStrokeWidth:
</span><del>-        return consumeTextStrokeWidth(m_range, m_context.mode());
</del><ins>+        return consumeTextStrokeWidth(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyWebkitTextFillColor:
</span><ins>+#if ENABLE(TOUCH_EVENTS)
</ins><span class="cx">     case CSSPropertyWebkitTapHighlightColor:
</span><ins>+#endif
</ins><span class="cx">     case CSSPropertyWebkitTextEmphasisColor:
</span><span class="cx">     case CSSPropertyWebkitBorderStartColor:
</span><span class="cx">     case CSSPropertyWebkitBorderEndColor:
</span><span class="lines">@@ -3368,15 +3099,15 @@
</span><span class="cx">     case CSSPropertyFloodColor:
</span><span class="cx">     case CSSPropertyLightingColor:
</span><span class="cx">     case CSSPropertyColumnRuleColor:
</span><del>-        return consumeColor(m_range, m_context.mode());
</del><ins>+        return consumeColor(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyColor:
</span><span class="cx">     case CSSPropertyBackgroundColor:
</span><del>-        return consumeColor(m_range, m_context.mode(), inQuirksMode());
</del><ins>+        return consumeColor(m_range, m_context.mode, inQuirksMode());
</ins><span class="cx">     case CSSPropertyWebkitBorderStartWidth:
</span><span class="cx">     case CSSPropertyWebkitBorderEndWidth:
</span><span class="cx">     case CSSPropertyWebkitBorderBeforeWidth:
</span><span class="cx">     case CSSPropertyWebkitBorderAfterWidth:
</span><del>-        return consumeBorderWidth(m_range, m_context.mode(), UnitlessQuirk::Forbid);
</del><ins>+        return consumeBorderWidth(m_range, m_context.mode, UnitlessQuirk::Forbid);
</ins><span class="cx">     case CSSPropertyBorderBottomColor:
</span><span class="cx">     case CSSPropertyBorderLeftColor:
</span><span class="cx">     case CSSPropertyBorderRightColor:
</span><span class="lines">@@ -3383,7 +3114,7 @@
</span><span class="cx">     case CSSPropertyBorderTopColor: {
</span><span class="cx">         bool allowQuirkyColors = inQuirksMode()
</span><span class="cx">             &amp;&amp; (currentShorthand == CSSPropertyInvalid || currentShorthand == CSSPropertyBorderColor);
</span><del>-        return consumeColor(m_range, m_context.mode(), allowQuirkyColors);
</del><ins>+        return consumeColor(m_range, m_context.mode, allowQuirkyColors);
</ins><span class="cx">     }
</span><span class="cx">     case CSSPropertyBorderBottomWidth:
</span><span class="cx">     case CSSPropertyBorderLeftWidth:
</span><span class="lines">@@ -3392,50 +3123,41 @@
</span><span class="cx">         bool allowQuirkyLengths = inQuirksMode()
</span><span class="cx">             &amp;&amp; (currentShorthand == CSSPropertyInvalid || currentShorthand == CSSPropertyBorderWidth);
</span><span class="cx">         UnitlessQuirk unitless = allowQuirkyLengths ? UnitlessQuirk::Allow : UnitlessQuirk::Forbid;
</span><del>-        return consumeBorderWidth(m_range, m_context.mode(), unitless);
</del><ins>+        return consumeBorderWidth(m_range, m_context.mode, unitless);
</ins><span class="cx">     }
</span><span class="cx">     case CSSPropertyZIndex:
</span><span class="cx">         return consumeZIndex(m_range);
</span><span class="cx">     case CSSPropertyTextShadow: // CSS2 property, dropped in CSS2.1, back in CSS3, so treat as CSS3
</span><span class="cx">     case CSSPropertyBoxShadow:
</span><del>-        return consumeShadow(m_range, m_context.mode(), property == CSSPropertyBoxShadow);
</del><ins>+        return consumeShadow(m_range, m_context.mode, property == CSSPropertyBoxShadow);
</ins><span class="cx">     case CSSPropertyFilter:
</span><del>-    case CSSPropertyBackdropFilter:
</del><ins>+    case CSSPropertyWebkitBackdropFilter:
</ins><span class="cx">         return consumeFilter(m_range, m_context);
</span><span class="cx">     case CSSPropertyTextDecoration:
</span><del>-        ASSERT(!RuntimeEnabledFeatures::css3TextDecorationsEnabled());
-        // fallthrough
</del><span class="cx">     case CSSPropertyWebkitTextDecorationsInEffect:
</span><del>-    case CSSPropertyTextDecorationLine:
</del><ins>+    case CSSPropertyWebkitTextDecorationLine:
</ins><span class="cx">         return consumeTextDecorationLine(m_range);
</span><del>-    case CSSPropertyD:
-    case CSSPropertyMotionPath:
-        return consumePathOrNone(m_range);
-    case CSSPropertyMotionOffset:
-        return consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeAll);
-    case CSSPropertyMotionRotation:
-        return consumeMotionRotation(m_range);
</del><span class="cx">     case CSSPropertyWebkitTextEmphasisStyle:
</span><span class="cx">         return consumeTextEmphasisStyle(m_range);
</span><span class="cx">     case CSSPropertyOutlineColor:
</span><del>-        return consumeOutlineColor(m_range, m_context.mode());
</del><ins>+        return consumeOutlineColor(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyOutlineOffset:
</span><del>-        return consumeLength(m_range, m_context.mode(), ValueRangeAll);
</del><ins>+        return consumeLength(m_range, m_context.mode, ValueRangeAll);
</ins><span class="cx">     case CSSPropertyOutlineWidth:
</span><del>-        return consumeLineWidth(m_range, m_context.mode(), UnitlessQuirk::Forbid);
</del><ins>+        return consumeLineWidth(m_range, m_context.mode, UnitlessQuirk::Forbid);
</ins><span class="cx">     case CSSPropertyTransform:
</span><del>-        return consumeTransform(m_range, m_context.mode(), unresolvedProperty == CSSPropertyAliasWebkitTransform);
-    case CSSPropertyWebkitTransformOriginX:
-    case CSSPropertyWebkitPerspectiveOriginX:
-        return consumePositionX(m_range, m_context.mode());
-    case CSSPropertyWebkitTransformOriginY:
-    case CSSPropertyWebkitPerspectiveOriginY:
-        return consumePositionY(m_range, m_context.mode());
-    case CSSPropertyWebkitTransformOriginZ:
-        return consumeLength(m_range, m_context.mode(), ValueRangeAll);
</del><ins>+        return consumeTransform(m_range, m_context.mode);
+    case CSSPropertyTransformOriginX:
+    case CSSPropertyPerspectiveOriginX:
+        return consumePositionX(m_range, m_context.mode);
+    case CSSPropertyTransformOriginY:
+    case CSSPropertyPerspectiveOriginY:
+        return consumePositionY(m_range, m_context.mode);
+    case CSSPropertyTransformOriginZ:
+        return consumeLength(m_range, m_context.mode, ValueRangeAll);
</ins><span class="cx">     case CSSPropertyFill:
</span><span class="cx">     case CSSPropertyStroke:
</span><del>-        return consumePaintStroke(m_range, m_context.mode());
</del><ins>+        return consumePaintStroke(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyPaintOrder:
</span><span class="cx">         return consumePaintOrder(m_range);
</span><span class="cx">     case CSSPropertyMarkerStart:
</span><span class="lines">@@ -3445,7 +3167,7 @@
</span><span class="cx">     case CSSPropertyMask:
</span><span class="cx">         return consumeNoneOrURI(m_range);
</span><span class="cx">     case CSSPropertyFlexBasis:
</span><del>-        return consumeFlexBasis(m_range, m_context.mode());
</del><ins>+        return consumeFlexBasis(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyFlexGrow:
</span><span class="cx">     case CSSPropertyFlexShrink:
</span><span class="cx">         return consumeNumber(m_range, ValueRangeNonNegative);
</span><span class="lines">@@ -3452,7 +3174,7 @@
</span><span class="cx">     case CSSPropertyStrokeDasharray:
</span><span class="cx">         return consumeStrokeDasharray(m_range);
</span><span class="cx">     case CSSPropertyColumnRuleWidth:
</span><del>-        return consumeColumnRuleWidth(m_range, m_context.mode());
</del><ins>+        return consumeColumnRuleWidth(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyStrokeOpacity:
</span><span class="cx">     case CSSPropertyFillOpacity:
</span><span class="cx">     case CSSPropertyStopOpacity:
</span><span class="lines">@@ -3477,10 +3199,8 @@
</span><span class="cx">         return consumeRxOrRy(m_range);
</span><span class="cx">     case CSSPropertyCursor:
</span><span class="cx">         return consumeCursor(m_range, m_context, inQuirksMode());
</span><del>-    case CSSPropertyContain:
-        return consumeContain(m_range);
</del><span class="cx">     case CSSPropertyTransformOrigin:
</span><del>-        return consumeTransformOrigin(m_range, m_context.mode(), UnitlessQuirk::Forbid);
</del><ins>+        return consumeTransformOrigin(m_range, m_context.mode, UnitlessQuirk::Forbid);
</ins><span class="cx">     case CSSPropertyContent:
</span><span class="cx">         return consumeContent(m_range, m_context);
</span><span class="cx">     case CSSPropertyListStyleImage:
</span><span class="lines">@@ -3488,34 +3208,32 @@
</span><span class="cx">     case CSSPropertyWebkitMaskBoxImageSource:
</span><span class="cx">         return consumeImageOrNone(m_range, m_context);
</span><span class="cx">     case CSSPropertyPerspective:
</span><del>-        return consumePerspective(m_range, m_context.mode(), unresolvedProperty);
-    case CSSPropertyScrollSnapCoordinate:
-        return consumeScrollSnapCoordinate(m_range, m_context.mode());
-    case CSSPropertyScrollSnapPointsX:
-    case CSSPropertyScrollSnapPointsY:
-        return consumeScrollSnapPoints(m_range, m_context.mode());
</del><ins>+        return consumePerspective(m_range, m_context.mode);
+    case CSSPropertyWebkitScrollSnapCoordinate:
+        return consumeScrollSnapCoordinate(m_range, m_context.mode);
+    case CSSPropertyWebkitScrollSnapPointsX:
+    case CSSPropertyWebkitScrollSnapPointsY:
+        return consumeScrollSnapPoints(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyBorderTopRightRadius:
</span><span class="cx">     case CSSPropertyBorderTopLeftRadius:
</span><span class="cx">     case CSSPropertyBorderBottomLeftRadius:
</span><span class="cx">     case CSSPropertyBorderBottomRightRadius:
</span><del>-        return consumeBorderRadiusCorner(m_range, m_context.mode());
</del><ins>+        return consumeBorderRadiusCorner(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyWebkitBoxFlexGroup:
</span><span class="cx">         return consumeInteger(m_range, 0);
</span><span class="cx">     case CSSPropertyOrder:
</span><span class="cx">         return consumeInteger(m_range);
</span><del>-    case CSSPropertyTextUnderlinePosition:
</del><ins>+    case CSSPropertyWebkitTextUnderlinePosition:
</ins><span class="cx">         // auto | [ under || [ left | right ] ], but we only support auto | under for now
</span><del>-        ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
</del><span class="cx">         return consumeIdent&lt;CSSValueAuto, CSSValueUnder&gt;(m_range);
</span><span class="cx">     case CSSPropertyVerticalAlign:
</span><del>-        return consumeVerticalAlign(m_range, m_context.mode());
-    case CSSPropertyShapeOutside:
</del><ins>+        return consumeVerticalAlign(m_range, m_context.mode);
+    case CSSPropertyWebkitShapeOutside:
</ins><span class="cx">         return consumeShapeOutside(m_range, m_context);
</span><span class="cx">     case CSSPropertyWebkitClipPath:
</span><span class="cx">         return consumeWebkitClipPath(m_range, m_context);
</span><span class="cx">     case CSSPropertyJustifyContent:
</span><span class="cx">     case CSSPropertyAlignContent:
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">         return consumeContentDistributionOverflowPosition(m_range);
</span><span class="cx">     case CSSPropertyBorderImageRepeat:
</span><span class="cx">     case CSSPropertyWebkitMaskBoxImageRepeat:
</span><span class="lines">@@ -3533,12 +3251,10 @@
</span><span class="cx">         return consumeWebkitBorderImage(property, m_range, m_context);
</span><span class="cx">     case CSSPropertyWebkitBoxReflect:
</span><span class="cx">         return consumeReflect(m_range, m_context);
</span><del>-    case CSSPropertyFontSizeAdjust:
-        ASSERT(RuntimeEnabledFeatures::cssFontSizeAdjustEnabled());
-        return consumeFontSizeAdjust(m_range);
</del><ins>+#if ENABLE(CSS_IMAGE_ORIENTATION)
</ins><span class="cx">     case CSSPropertyImageOrientation:
</span><del>-        ASSERT(RuntimeEnabledFeatures::imageOrientationEnabled());
</del><span class="cx">         return consumeImageOrientation(m_range);
</span><ins>+#endif
</ins><span class="cx">     case CSSPropertyBackgroundAttachment:
</span><span class="cx">     case CSSPropertyBackgroundBlendMode:
</span><span class="cx">     case CSSPropertyBackgroundClip:
</span><span class="lines">@@ -3547,7 +3263,6 @@
</span><span class="cx">     case CSSPropertyBackgroundPositionX:
</span><span class="cx">     case CSSPropertyBackgroundPositionY:
</span><span class="cx">     case CSSPropertyBackgroundSize:
</span><del>-    case CSSPropertyMaskSourceType:
</del><span class="cx">     case CSSPropertyWebkitBackgroundClip:
</span><span class="cx">     case CSSPropertyWebkitBackgroundOrigin:
</span><span class="cx">     case CSSPropertyWebkitMaskClip:
</span><span class="lines">@@ -3557,39 +3272,31 @@
</span><span class="cx">     case CSSPropertyWebkitMaskPositionX:
</span><span class="cx">     case CSSPropertyWebkitMaskPositionY:
</span><span class="cx">     case CSSPropertyWebkitMaskSize:
</span><del>-        return consumeCommaSeparatedBackgroundComponent(unresolvedProperty, m_range, m_context);
</del><ins>+        return consumeCommaSeparatedBackgroundComponent(property, m_range, m_context);
</ins><span class="cx">     case CSSPropertyWebkitMaskRepeatX:
</span><span class="cx">     case CSSPropertyWebkitMaskRepeatY:
</span><span class="cx">         return nullptr;
</span><span class="cx">     case CSSPropertyAlignItems:
</span><del>-        DCHECK(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">         return consumeAlignItems(m_range);
</span><span class="cx">     case CSSPropertyJustifySelf:
</span><span class="cx">     case CSSPropertyAlignSelf:
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">         return consumeSelfPositionOverflowPosition(m_range);
</span><span class="cx">     case CSSPropertyJustifyItems:
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">         return consumeJustifyItems(m_range);
</span><span class="cx">     case CSSPropertyGridColumnEnd:
</span><span class="cx">     case CSSPropertyGridColumnStart:
</span><span class="cx">     case CSSPropertyGridRowEnd:
</span><span class="cx">     case CSSPropertyGridRowStart:
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">         return consumeGridLine(m_range);
</span><span class="cx">     case CSSPropertyGridAutoColumns:
</span><span class="cx">     case CSSPropertyGridAutoRows:
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
-        return consumeGridTrackList(m_range, m_context.mode(), GridAuto);
</del><ins>+        return consumeGridTrackList(m_range, m_context.mode, GridAuto);
</ins><span class="cx">     case CSSPropertyGridTemplateColumns:
</span><span class="cx">     case CSSPropertyGridTemplateRows:
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
-        return consumeGridTemplatesRowsOrColumns(m_range, m_context.mode());
</del><ins>+        return consumeGridTemplatesRowsOrColumns(m_range, m_context.mode);
</ins><span class="cx">     case CSSPropertyGridTemplateAreas:
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">         return consumeGridTemplateAreas(m_range);
</span><span class="cx">     case CSSPropertyGridAutoFlow:
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">         return consumeGridAutoFlow(m_range);
</span><span class="cx">     default:
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -3596,15 +3303,10 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSPrimitiveValue* consumeFontDisplay(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValueList&gt; consumeFontFaceUnicodeRange(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><del>-    return consumeIdent&lt;CSSValueAuto, CSSValueBlock, CSSValueSwap, CSSValueFallback, CSSValueOptional&gt;(range);
-}
</del><ins>+    RefPtr&lt;CSSValueList&gt; values = CSSValueList::createCommaSeparated();
</ins><span class="cx"> 
</span><del>-static CSSValueList* consumeFontFaceUnicodeRange(CSSParserTokenRange&amp; range)
-{
-    CSSValueList* values = CSSValueList::createCommaSeparated();
-
</del><span class="cx">     do {
</span><span class="cx">         const CSSParserToken&amp; token = range.consumeIncludingWhitespace();
</span><span class="cx">         if (token.type() != UnicodeRangeToken)
</span><span class="lines">@@ -3614,19 +3316,19 @@
</span><span class="cx">         UChar32 end = token.unicodeRangeEnd();
</span><span class="cx">         if (start &gt; end)
</span><span class="cx">             return nullptr;
</span><del>-        values-&gt;append(*CSSUnicodeRangeValue::create(start, end));
</del><ins>+        values-&gt;append(CSSUnicodeRangeValue::create(start, end));
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx"> 
</span><span class="cx">     return values;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFontFaceSrcURI(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFontFaceSrcURI(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     String url = consumeUrlAsStringView(range).toString();
</span><span class="cx">     if (url.isNull())
</span><span class="cx">         return nullptr;
</span><del>-    CSSFontFaceSrcValue* uriValue(CSSFontFaceSrcValue::create(url, context.completeURL(url), context.shouldCheckContentSecurityPolicy()));
-    uriValue-&gt;setReferrer(context.referrer());
</del><ins>+    
+    RefPtr&lt;CSSFontFaceSrcValue&gt; uriValue = CSSFontFaceSrcValue::create(context.completeURL(url));
</ins><span class="cx"> 
</span><span class="cx">     if (range.peek().functionId() != CSSValueFormat)
</span><span class="cx">         return uriValue;
</span><span class="lines">@@ -3641,39 +3343,38 @@
</span><span class="cx">     return uriValue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeFontFaceSrcLocal(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeFontFaceSrcLocal(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSParserTokenRange args = consumeFunction(range);
</span><del>-    ContentSecurityPolicyDisposition shouldCheckContentSecurityPolicy = context.shouldCheckContentSecurityPolicy();
</del><span class="cx">     if (args.peek().type() == StringToken) {
</span><span class="cx">         const CSSParserToken&amp; arg = args.consumeIncludingWhitespace();
</span><span class="cx">         if (!args.atEnd())
</span><span class="cx">             return nullptr;
</span><del>-        return CSSFontFaceSrcValue::createLocal(arg.value().toString(), shouldCheckContentSecurityPolicy);
</del><ins>+        return CSSFontFaceSrcValue::createLocal(arg.value().toString());
</ins><span class="cx">     }
</span><span class="cx">     if (args.peek().type() == IdentToken) {
</span><span class="cx">         String familyName = concatenateFamilyName(args);
</span><span class="cx">         if (!args.atEnd())
</span><span class="cx">             return nullptr;
</span><del>-        return CSSFontFaceSrcValue::createLocal(familyName, shouldCheckContentSecurityPolicy);
</del><ins>+        return CSSFontFaceSrcValue::createLocal(familyName);
</ins><span class="cx">     }
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValueList* consumeFontFaceSrc(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</del><ins>+static RefPtr&lt;CSSValueList&gt; consumeFontFaceSrc(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context)
</ins><span class="cx"> {
</span><del>-    CSSValueList* values = CSSValueList::createCommaSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; values = CSSValueList::createCommaSeparated();
</ins><span class="cx"> 
</span><span class="cx">     do {
</span><span class="cx">         const CSSParserToken&amp; token = range.peek();
</span><del>-        CSSValue* parsedValue = nullptr;
</del><ins>+        RefPtr&lt;CSSValue&gt; parsedValue;
</ins><span class="cx">         if (token.functionId() == CSSValueLocal)
</span><del>-            parsedValue = consumeFontFaceSrcLocal(range, context);
</del><ins>+            parsedValue = consumeFontFaceSrcLocal(range);
</ins><span class="cx">         else
</span><span class="cx">             parsedValue = consumeFontFaceSrcURI(range, context);
</span><span class="cx">         if (!parsedValue)
</span><span class="cx">             return nullptr;
</span><del>-        values-&gt;append(*parsedValue);
</del><ins>+        values-&gt;append(parsedValue.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx">     return values;
</span><span class="cx"> }
</span><span class="lines">@@ -3680,7 +3381,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::parseFontFaceDescriptor(CSSPropertyID propId)
</span><span class="cx"> {
</span><del>-    CSSValue* parsedValue = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; parsedValue;
</ins><span class="cx">     switch (propId) {
</span><span class="cx">     case CSSPropertyFontFamily:
</span><span class="cx">         if (consumeGenericFamily(m_range))
</span><span class="lines">@@ -3693,15 +3394,12 @@
</span><span class="cx">     case CSSPropertyUnicodeRange:
</span><span class="cx">         parsedValue = consumeFontFaceUnicodeRange(m_range);
</span><span class="cx">         break;
</span><del>-    case CSSPropertyFontDisplay:
-        parsedValue = consumeFontDisplay(m_range);
-        break;
</del><span class="cx">     case CSSPropertyFontStretch:
</span><span class="cx">     case CSSPropertyFontStyle: {
</span><span class="cx">         CSSValueID id = m_range.consumeIncludingWhitespace().id();
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(propId, id, m_context.mode()))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(propId, id, m_context.mode))
</ins><span class="cx">             return false;
</span><del>-        parsedValue = CSSPrimitiveValue::createIdentifier(id);
</del><ins>+        parsedValue = CSSValuePool::singleton().createIdentifierValue(id);
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyFontVariant:
</span><span class="lines">@@ -3730,25 +3428,23 @@
</span><span class="cx">     ASSERT(systemFontID &gt;= CSSValueCaption &amp;&amp; systemFontID &lt;= CSSValueStatusBar);
</span><span class="cx">     if (!m_range.atEnd())
</span><span class="cx">         return false;
</span><ins>+    
+    FontCascadeDescription fontDescription;
+    RenderTheme::defaultTheme()-&gt;systemFont(systemFontID, fontDescription);
+    if (!fontDescription.isAbsoluteSize())
+        return false;
+    
+    addProperty(CSSPropertyFontStyle, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(fontDescription.italic() == FontItalicOn ? CSSValueItalic : CSSValueNormal), important);
+    addProperty(CSSPropertyFontWeight, CSSPropertyFont, CSSValuePool::singleton().createValue(fontDescription.weight()), important);
+    addProperty(CSSPropertyFontSize, CSSPropertyFont, CSSValuePool::singleton().createValue(fontDescription.specifiedSize(), CSSPrimitiveValue::CSS_PX), important);
+    Ref&lt;CSSValueList&gt; fontFamilyList = CSSValueList::createCommaSeparated();
+    fontFamilyList-&gt;append(CSSValuePool::singleton().createFontFamilyValue(fontDescription.familyAt(0), FromSystemFontID::Yes));
+    addProperty(CSSPropertyFontFamily, CSSPropertyFont, WTFMove(fontFamilyList), important);
+    addProperty(CSSPropertyFontVariantCaps, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyLineHeight, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</ins><span class="cx"> 
</span><del>-    FontStyle fontStyle = FontStyleNormal;
-    FontWeight fontWeight = FontWeightNormal;
-    float fontSize = 0;
-    AtomicString fontFamily;
-    LayoutTheme::theme().systemFont(systemFontID, fontStyle, fontWeight, fontSize, fontFamily);
</del><ins>+    // FIXME_NEWPARSER: What about FontVariantNumeric and FontVariantLigatures?
</ins><span class="cx"> 
</span><del>-    addProperty(CSSPropertyFontStyle, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(fontStyle == FontStyleItalic ? CSSValueItalic : CSSValueNormal), important);
-    addProperty(CSSPropertyFontWeight, CSSPropertyFont, *CSSPrimitiveValue::create(fontWeight), important);
-    addProperty(CSSPropertyFontSize, CSSPropertyFont, *CSSPrimitiveValue::create(fontSize, CSSPrimitiveValue::UnitType::Pixels), important);
-    CSSValueList* fontFamilyList = CSSValueList::createCommaSeparated();
-    fontFamilyList-&gt;append(*CSSFontFamilyValue::create(fontFamily));
-    addProperty(CSSPropertyFontFamily, CSSPropertyFont, *fontFamilyList, important);
-
-    addProperty(CSSPropertyFontStretch, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
-    addProperty(CSSPropertyFontVariantCaps, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
-    addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
-    addProperty(CSSPropertyFontVariantNumeric, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
-    addProperty(CSSPropertyLineHeight, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
</del><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3762,13 +3458,13 @@
</span><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="cx">     // Optional font-style, font-variant, font-stretch and font-weight.
</span><del>-    CSSPrimitiveValue* fontStyle = nullptr;
-    CSSPrimitiveValue* fontVariantCaps = nullptr;
-    CSSPrimitiveValue* fontWeight = nullptr;
-    CSSPrimitiveValue* fontStretch = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; fontStyle;
+    RefPtr&lt;CSSPrimitiveValue&gt; fontVariantCaps;
+    RefPtr&lt;CSSPrimitiveValue&gt; fontWeight;
+    RefPtr&lt;CSSPrimitiveValue&gt; fontStretch;
</ins><span class="cx">     while (!m_range.atEnd()) {
</span><span class="cx">         CSSValueID id = m_range.peek().id();
</span><del>-        if (!fontStyle &amp;&amp; CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyFontStyle, id, m_context.mode())) {
</del><ins>+        if (!fontStyle &amp;&amp; CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyFontStyle, id, m_context.mode)) {
</ins><span class="cx">             fontStyle = consumeIdent(m_range);
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="lines">@@ -3784,7 +3480,7 @@
</span><span class="cx">             if (fontWeight)
</span><span class="cx">                 continue;
</span><span class="cx">         }
</span><del>-        if (!fontStretch &amp;&amp; CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyFontStretch, id, m_context.mode()))
</del><ins>+        if (!fontStretch &amp;&amp; CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyFontStretch, id, m_context.mode))
</ins><span class="cx">             fontStretch = consumeIdent(m_range);
</span><span class="cx">         else
</span><span class="cx">             break;
</span><span class="lines">@@ -3793,16 +3489,16 @@
</span><span class="cx">     if (m_range.atEnd())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    addProperty(CSSPropertyFontStyle, CSSPropertyFont, fontStyle ? *fontStyle : *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
-    addProperty(CSSPropertyFontVariantCaps, CSSPropertyFont, fontVariantCaps ? *fontVariantCaps : *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
-    addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
-    addProperty(CSSPropertyFontVariantNumeric, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
</del><ins>+    addProperty(CSSPropertyFontStyle, CSSPropertyFont, fontStyle ? fontStyle.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyFontVariantCaps, CSSPropertyFont, fontVariantCaps ? fontVariantCaps.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyFontVariantNumeric, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</ins><span class="cx"> 
</span><del>-    addProperty(CSSPropertyFontWeight, CSSPropertyFont, fontWeight ? *fontWeight : *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
-    addProperty(CSSPropertyFontStretch, CSSPropertyFont, fontStretch ? *fontStretch : *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
</del><ins>+    addProperty(CSSPropertyFontWeight, CSSPropertyFont, fontWeight ? fontWeight.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
+    addProperty(CSSPropertyFontStretch, CSSPropertyFont, fontStretch ? fontStretch.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</ins><span class="cx"> 
</span><span class="cx">     // Now a font size _must_ come.
</span><del>-    CSSValue* fontSize = consumeFontSize(m_range, m_context.mode());
</del><ins>+    RefPtr&lt;CSSValue&gt; fontSize = consumeFontSize(m_range, m_context.mode);
</ins><span class="cx">     if (!fontSize || m_range.atEnd())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -3809,20 +3505,20 @@
</span><span class="cx">     addProperty(CSSPropertyFontSize, CSSPropertyFont, *fontSize, important);
</span><span class="cx"> 
</span><span class="cx">     if (consumeSlashIncludingWhitespace(m_range)) {
</span><del>-        CSSPrimitiveValue* lineHeight = consumeLineHeight(m_range, m_context.mode());
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; lineHeight = consumeLineHeight(m_range, m_context.mode);
</ins><span class="cx">         if (!lineHeight)
</span><span class="cx">             return false;
</span><del>-        addProperty(CSSPropertyLineHeight, CSSPropertyFont, *lineHeight, important);
</del><ins>+        addProperty(CSSPropertyLineHeight, CSSPropertyFont, lineHeight.releaseNonNull(), important);
</ins><span class="cx">     } else {
</span><del>-        addProperty(CSSPropertyLineHeight, CSSPropertyFont, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
</del><ins>+        addProperty(CSSPropertyLineHeight, CSSPropertyFont, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Font family must come now.
</span><del>-    CSSValue* parsedFamilyValue = consumeFontFamily(m_range);
</del><ins>+    RefPtr&lt;CSSValue&gt; parsedFamilyValue = consumeFontFamily(m_range);
</ins><span class="cx">     if (!parsedFamilyValue)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    addProperty(CSSPropertyFontFamily, CSSPropertyFont, *parsedFamilyValue, important);
</del><ins>+    addProperty(CSSPropertyFontFamily, CSSPropertyFont, parsedFamilyValue.releaseNonNull(), important);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: http://www.w3.org/TR/2011/WD-css3-fonts-20110324/#font-prop requires that
</span><span class="cx">     // &quot;font-stretch&quot;, &quot;font-size-adjust&quot;, and &quot;font-kerning&quot; be reset to their initial values
</span><span class="lines">@@ -3833,12 +3529,12 @@
</span><span class="cx"> bool CSSPropertyParser::consumeFontVariantShorthand(bool important)
</span><span class="cx"> {
</span><span class="cx">     if (identMatches&lt;CSSValueNormal, CSSValueNone&gt;(m_range.peek().id())) {
</span><del>-        addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFontVariant, *consumeIdent(m_range), important);
-        addProperty(CSSPropertyFontVariantCaps, CSSPropertyFontVariant, *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
</del><ins>+        addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFontVariant, consumeIdent(m_range).releaseNonNull(), important);
+        addProperty(CSSPropertyFontVariantCaps, CSSPropertyFontVariant, CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</ins><span class="cx">         return m_range.atEnd();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CSSPrimitiveValue* capsValue = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; capsValue;
</ins><span class="cx">     FontVariantLigaturesParser ligaturesParser;
</span><span class="cx">     FontVariantNumericParser numericParser;
</span><span class="cx">     do {
</span><span class="lines">@@ -3870,28 +3566,30 @@
</span><span class="cx">         }
</span><span class="cx">     } while (!m_range.atEnd());
</span><span class="cx"> 
</span><del>-    addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFontVariant, *ligaturesParser.finalizeValue(), important);
-    addProperty(CSSPropertyFontVariantNumeric, CSSPropertyFontVariant, *numericParser.finalizeValue(), important);
-    addProperty(CSSPropertyFontVariantCaps, CSSPropertyFontVariant, capsValue ? *capsValue : *CSSPrimitiveValue::createIdentifier(CSSValueNormal), important);
</del><ins>+    addProperty(CSSPropertyFontVariantLigatures, CSSPropertyFontVariant, ligaturesParser.finalizeValue().releaseNonNull(), important);
+    addProperty(CSSPropertyFontVariantNumeric, CSSPropertyFontVariant, numericParser.finalizeValue().releaseNonNull(), important);
+    addProperty(CSSPropertyFontVariantCaps, CSSPropertyFontVariant, capsValue ? capsValue.releaseNonNull() : CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::consumeBorderSpacing(bool important)
</span><span class="cx"> {
</span><del>-    CSSValue* horizontalSpacing = consumeLength(m_range, m_context.mode(), ValueRangeNonNegative, UnitlessQuirk::Allow);
</del><ins>+    RefPtr&lt;CSSValue&gt; horizontalSpacing = consumeLength(m_range, m_context.mode, ValueRangeNonNegative, UnitlessQuirk::Allow);
</ins><span class="cx">     if (!horizontalSpacing)
</span><span class="cx">         return false;
</span><del>-    CSSValue* verticalSpacing = horizontalSpacing;
</del><ins>+    RefPtr&lt;CSSValue&gt; verticalSpacing = horizontalSpacing;
</ins><span class="cx">     if (!m_range.atEnd())
</span><del>-        verticalSpacing = consumeLength(m_range, m_context.mode(), ValueRangeNonNegative, UnitlessQuirk::Allow);
</del><ins>+        verticalSpacing = consumeLength(m_range, m_context.mode, ValueRangeNonNegative, UnitlessQuirk::Allow);
</ins><span class="cx">     if (!verticalSpacing || !m_range.atEnd())
</span><span class="cx">         return false;
</span><del>-    addProperty(CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyBorderSpacing, *horizontalSpacing, important);
-    addProperty(CSSPropertyWebkitBorderVerticalSpacing, CSSPropertyBorderSpacing, *verticalSpacing, important);
</del><ins>+    addProperty(CSSPropertyWebkitBorderHorizontalSpacing, CSSPropertyBorderSpacing, horizontalSpacing.releaseNonNull(), important);
+    addProperty(CSSPropertyWebkitBorderVerticalSpacing, CSSPropertyBorderSpacing, verticalSpacing.releaseNonNull(), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* consumeSingleViewportDescriptor(CSSParserTokenRange&amp; range, CSSPropertyID propId, CSSParserMode cssParserMode)
</del><ins>+#if ENABLE(CSS_DEVICE_ADAPTATION)
+
+static RefPtr&lt;CSSValue&gt; consumeSingleViewportDescriptor(CSSParserTokenRange&amp; range, CSSPropertyID propId, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><span class="cx">     switch (propId) {
</span><span class="lines">@@ -3899,7 +3597,7 @@
</span><span class="cx">     case CSSPropertyMaxWidth:
</span><span class="cx">     case CSSPropertyMinHeight:
</span><span class="cx">     case CSSPropertyMaxHeight:
</span><del>-        if (id == CSSValueAuto || id == CSSValueInternalExtendToZoom)
</del><ins>+        if (id == CSSValueAuto)
</ins><span class="cx">             return consumeIdent(range);
</span><span class="cx">         return consumeLengthOrPercent(range, cssParserMode, ValueRangeNonNegative);
</span><span class="cx">     case CSSPropertyMinZoom:
</span><span class="lines">@@ -3907,7 +3605,7 @@
</span><span class="cx">     case CSSPropertyZoom: {
</span><span class="cx">         if (id == CSSValueAuto)
</span><span class="cx">             return consumeIdent(range);
</span><del>-        CSSValue* parsedValue = consumeNumber(range, ValueRangeNonNegative);
</del><ins>+        RefPtr&lt;CSSValue&gt; parsedValue = consumeNumber(range, ValueRangeNonNegative);
</ins><span class="cx">         if (parsedValue)
</span><span class="cx">             return parsedValue;
</span><span class="cx">         return consumePercent(range, ValueRangeNonNegative);
</span><span class="lines">@@ -3927,16 +3625,14 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::parseViewportDescriptor(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><del>-    ASSERT(RuntimeEnabledFeatures::cssViewportEnabled() || isUASheetBehavior(m_context.mode()));
-
</del><span class="cx">     switch (propId) {
</span><span class="cx">     case CSSPropertyWidth: {
</span><del>-        CSSValue* minWidth = consumeSingleViewportDescriptor(m_range, CSSPropertyMinWidth, m_context.mode());
</del><ins>+        RefPtr&lt;CSSValue&gt; minWidth = consumeSingleViewportDescriptor(m_range, CSSPropertyMinWidth, m_context.mode);
</ins><span class="cx">         if (!minWidth)
</span><span class="cx">             return false;
</span><del>-        CSSValue* maxWidth = minWidth;
</del><ins>+        RefPtr&lt;CSSValue&gt; maxWidth = minWidth;
</ins><span class="cx">         if (!m_range.atEnd())
</span><del>-            maxWidth = consumeSingleViewportDescriptor(m_range, CSSPropertyMaxWidth, m_context.mode());
</del><ins>+            maxWidth = consumeSingleViewportDescriptor(m_range, CSSPropertyMaxWidth, m_context.mode);
</ins><span class="cx">         if (!maxWidth || !m_range.atEnd())
</span><span class="cx">             return false;
</span><span class="cx">         addProperty(CSSPropertyMinWidth, CSSPropertyInvalid, *minWidth, important);
</span><span class="lines">@@ -3944,12 +3640,12 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyHeight: {
</span><del>-        CSSValue* minHeight = consumeSingleViewportDescriptor(m_range, CSSPropertyMinHeight, m_context.mode());
</del><ins>+        RefPtr&lt;CSSValue&gt; minHeight = consumeSingleViewportDescriptor(m_range, CSSPropertyMinHeight, m_context.mode);
</ins><span class="cx">         if (!minHeight)
</span><span class="cx">             return false;
</span><del>-        CSSValue* maxHeight = minHeight;
</del><ins>+        RefPtr&lt;CSSValue&gt; maxHeight = minHeight;
</ins><span class="cx">         if (!m_range.atEnd())
</span><del>-            maxHeight = consumeSingleViewportDescriptor(m_range, CSSPropertyMaxHeight, m_context.mode());
</del><ins>+            maxHeight = consumeSingleViewportDescriptor(m_range, CSSPropertyMaxHeight, m_context.mode);
</ins><span class="cx">         if (!maxHeight || !m_range.atEnd())
</span><span class="cx">             return false;
</span><span class="cx">         addProperty(CSSPropertyMinHeight, CSSPropertyInvalid, *minHeight, important);
</span><span class="lines">@@ -3965,10 +3661,10 @@
</span><span class="cx">     case CSSPropertyZoom:
</span><span class="cx">     case CSSPropertyUserZoom:
</span><span class="cx">     case CSSPropertyOrientation: {
</span><del>-        CSSValue* parsedValue = consumeSingleViewportDescriptor(m_range, propId, m_context.mode());
</del><ins>+        RefPtr&lt;CSSValue&gt; parsedValue = consumeSingleViewportDescriptor(m_range, propId, m_context.mode);
</ins><span class="cx">         if (!parsedValue || !m_range.atEnd())
</span><span class="cx">             return false;
</span><del>-        addProperty(propId, CSSPropertyInvalid, *parsedValue, important);
</del><ins>+        addProperty(propId, CSSPropertyInvalid, parsedValue.releaseNonNull(), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     default:
</span><span class="lines">@@ -3976,7 +3672,9 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumeColumnWidthOrCount(CSSParserTokenRange&amp; range, CSSValue*&amp; columnWidth, CSSValue*&amp; columnCount)
</del><ins>+#endif
+
+static bool consumeColumnWidthOrCount(CSSParserTokenRange&amp; range, RefPtr&lt;CSSValue&gt;&amp; columnWidth, RefPtr&lt;CSSValue&gt;&amp; columnCount)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().id() == CSSValueAuto) {
</span><span class="cx">         consumeIdent(range);
</span><span class="lines">@@ -3994,8 +3692,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::consumeColumns(bool important)
</span><span class="cx"> {
</span><del>-    CSSValue* columnWidth = nullptr;
-    CSSValue* columnCount = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; columnWidth;
+    RefPtr&lt;CSSValue&gt; columnCount;
</ins><span class="cx">     if (!consumeColumnWidthOrCount(m_range, columnWidth, columnCount))
</span><span class="cx">         return false;
</span><span class="cx">     consumeColumnWidthOrCount(m_range, columnWidth, columnCount);
</span><span class="lines">@@ -4002,11 +3700,11 @@
</span><span class="cx">     if (!m_range.atEnd())
</span><span class="cx">         return false;
</span><span class="cx">     if (!columnWidth)
</span><del>-        columnWidth = CSSPrimitiveValue::createIdentifier(CSSValueAuto);
</del><ins>+        columnWidth = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</ins><span class="cx">     if (!columnCount)
</span><del>-        columnCount = CSSPrimitiveValue::createIdentifier(CSSValueAuto);
-    addProperty(CSSPropertyColumnWidth, CSSPropertyInvalid, *columnWidth, important);
-    addProperty(CSSPropertyColumnCount, CSSPropertyInvalid, *columnCount, important);
</del><ins>+        columnCount = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
+    addProperty(CSSPropertyColumnWidth, CSSPropertyInvalid, columnWidth.releaseNonNull(), important);
+    addProperty(CSSPropertyColumnCount, CSSPropertyInvalid, columnCount.releaseNonNull(), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4013,7 +3711,7 @@
</span><span class="cx"> bool CSSPropertyParser::consumeShorthandGreedily(const StylePropertyShorthand&amp; shorthand, bool important)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(shorthand.length() &lt;= 6); // Existing shorthands have at most 6 longhands.
</span><del>-    const CSSValue* longhands[6] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
</del><ins>+    RefPtr&lt;CSSValue&gt; longhands[6];
</ins><span class="cx">     const CSSPropertyID* shorthandProperties = shorthand.properties();
</span><span class="cx">     do {
</span><span class="cx">         bool foundLonghand = false;
</span><span class="lines">@@ -4030,9 +3728,9 @@
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; shorthand.length(); ++i) {
</span><span class="cx">         if (longhands[i])
</span><del>-            addProperty(shorthandProperties[i], shorthand.id(), *longhands[i], important);
</del><ins>+            addProperty(shorthandProperties[i], shorthand.id(), longhands[i].releaseNonNull(), important);
</ins><span class="cx">         else
</span><del>-            addProperty(shorthandProperties[i], shorthand.id(), *CSSInitialValue::createLegacyImplicit(), important);
</del><ins>+            addProperty(shorthandProperties[i], shorthand.id(), CSSValuePool::singleton().createImplicitInitialValue(), important);
</ins><span class="cx">     }
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4042,12 +3740,12 @@
</span><span class="cx">     static const double unsetValue = -1;
</span><span class="cx">     double flexGrow = unsetValue;
</span><span class="cx">     double flexShrink = unsetValue;
</span><del>-    CSSPrimitiveValue* flexBasis = nullptr;
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; flexBasis;
</ins><span class="cx"> 
</span><span class="cx">     if (m_range.peek().id() == CSSValueNone) {
</span><span class="cx">         flexGrow = 0;
</span><span class="cx">         flexShrink = 0;
</span><del>-        flexBasis = CSSPrimitiveValue::createIdentifier(CSSValueAuto);
</del><ins>+        flexBasis = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</ins><span class="cx">         m_range.consumeIncludingWhitespace();
</span><span class="cx">     } else {
</span><span class="cx">         unsigned index = 0;
</span><span class="lines">@@ -4061,7 +3759,7 @@
</span><span class="cx">                 else if (flexShrink == unsetValue)
</span><span class="cx">                     flexShrink = num;
</span><span class="cx">                 else if (!num) // flex only allows a basis of 0 (sans units) if flex-grow and flex-shrink values have already been set.
</span><del>-                    flexBasis = CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitType::Pixels);
</del><ins>+                    flexBasis = CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitTypes::CSS_PX);
</ins><span class="cx">                 else
</span><span class="cx">                     return false;
</span><span class="cx">             } else if (!flexBasis) {
</span><span class="lines">@@ -4068,7 +3766,7 @@
</span><span class="cx">                 if (m_range.peek().id() == CSSValueAuto)
</span><span class="cx">                     flexBasis = consumeIdent(m_range);
</span><span class="cx">                 if (!flexBasis)
</span><del>-                    flexBasis = consumeLengthOrPercent(m_range, m_context.mode(), ValueRangeNonNegative);
</del><ins>+                    flexBasis = consumeLengthOrPercent(m_range, m_context.mode, ValueRangeNonNegative);
</ins><span class="cx">                 if (index == 2 &amp;&amp; !m_range.atEnd())
</span><span class="cx">                     return false;
</span><span class="cx">             }
</span><span class="lines">@@ -4080,26 +3778,26 @@
</span><span class="cx">         if (flexShrink == unsetValue)
</span><span class="cx">             flexShrink = 1;
</span><span class="cx">         if (!flexBasis)
</span><del>-            flexBasis = CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitType::Percentage);
</del><ins>+            flexBasis = CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitTypes::CSS_PERCENTAGE);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_range.atEnd())
</span><span class="cx">         return false;
</span><del>-    addProperty(CSSPropertyFlexGrow, CSSPropertyFlex, *CSSPrimitiveValue::create(clampTo&lt;float&gt;(flexGrow), CSSPrimitiveValue::UnitType::Number), important);
-    addProperty(CSSPropertyFlexShrink, CSSPropertyFlex, *CSSPrimitiveValue::create(clampTo&lt;float&gt;(flexShrink), CSSPrimitiveValue::UnitType::Number), important);
-    addProperty(CSSPropertyFlexBasis, CSSPropertyFlex, *flexBasis, important);
</del><ins>+    addProperty(CSSPropertyFlexGrow, CSSPropertyFlex, CSSPrimitiveValue::create(clampTo&lt;float&gt;(flexGrow), CSSPrimitiveValue::UnitTypes::CSS_NUMBER), important);
+    addProperty(CSSPropertyFlexShrink, CSSPropertyFlex, CSSPrimitiveValue::create(clampTo&lt;float&gt;(flexShrink), CSSPrimitiveValue::UnitTypes::CSS_NUMBER), important);
+    addProperty(CSSPropertyFlexBasis, CSSPropertyFlex, flexBasis.releaseNonNull(), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::consumeBorder(bool important)
</span><span class="cx"> {
</span><del>-    CSSValue* width = nullptr;
-    const CSSValue* style = nullptr;
-    CSSValue* color = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; width;
+    RefPtr&lt;CSSValue&gt; style;
+    RefPtr&lt;CSSValue&gt; color;
</ins><span class="cx"> 
</span><span class="cx">     while (!width || !style || !color) {
</span><span class="cx">         if (!width) {
</span><del>-            width = consumeLineWidth(m_range, m_context.mode(), UnitlessQuirk::Forbid);
</del><ins>+            width = consumeLineWidth(m_range, m_context.mode, UnitlessQuirk::Forbid);
</ins><span class="cx">             if (width)
</span><span class="cx">                 continue;
</span><span class="cx">         }
</span><span class="lines">@@ -4109,7 +3807,7 @@
</span><span class="cx">                 continue;
</span><span class="cx">         }
</span><span class="cx">         if (!color) {
</span><del>-            color = consumeColor(m_range, m_context.mode());
</del><ins>+            color = consumeColor(m_range, m_context.mode);
</ins><span class="cx">             if (color)
</span><span class="cx">                 continue;
</span><span class="cx">         }
</span><span class="lines">@@ -4120,16 +3818,16 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (!width)
</span><del>-        width = CSSInitialValue::createLegacyImplicit();
</del><ins>+        width = CSSValuePool::singleton().createImplicitInitialValue();
</ins><span class="cx">     if (!style)
</span><del>-        style = CSSInitialValue::createLegacyImplicit();
</del><ins>+        style = CSSValuePool::singleton().createImplicitInitialValue();
</ins><span class="cx">     if (!color)
</span><del>-        color = CSSInitialValue::createLegacyImplicit();
</del><ins>+        color = CSSValuePool::singleton().createImplicitInitialValue();
</ins><span class="cx"> 
</span><del>-    addExpandedPropertyForValue(CSSPropertyBorderWidth, *width, important);
-    addExpandedPropertyForValue(CSSPropertyBorderStyle, *style, important);
-    addExpandedPropertyForValue(CSSPropertyBorderColor, *color, important);
-    addExpandedPropertyForValue(CSSPropertyBorderImage, *CSSInitialValue::createLegacyImplicit(), important);
</del><ins>+    addExpandedPropertyForValue(CSSPropertyBorderWidth, width.releaseNonNull(), important);
+    addExpandedPropertyForValue(CSSPropertyBorderStyle, style.releaseNonNull(), important);
+    addExpandedPropertyForValue(CSSPropertyBorderColor, color.releaseNonNull(), important);
+    addExpandedPropertyForValue(CSSPropertyBorderImage, CSSValuePool::singleton().createImplicitInitialValue(), important);
</ins><span class="cx"> 
</span><span class="cx">     return m_range.atEnd();
</span><span class="cx"> }
</span><span class="lines">@@ -4138,13 +3836,13 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(shorthand.length() == 4);
</span><span class="cx">     const CSSPropertyID* longhands = shorthand.properties();
</span><del>-    const CSSValue* top = parseSingleValue(longhands[0], shorthand.id());
</del><ins>+    RefPtr&lt;CSSValue&gt; top = parseSingleValue(longhands[0], shorthand.id());
</ins><span class="cx">     if (!top)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const CSSValue* right = parseSingleValue(longhands[1], shorthand.id());
-    const CSSValue* bottom = nullptr;
-    const CSSValue* left = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; right = parseSingleValue(longhands[1], shorthand.id());
+    RefPtr&lt;CSSValue&gt; bottom;
+    RefPtr&lt;CSSValue&gt; left;
</ins><span class="cx">     if (right) {
</span><span class="cx">         bottom = parseSingleValue(longhands[2], shorthand.id());
</span><span class="cx">         if (bottom)
</span><span class="lines">@@ -4158,10 +3856,10 @@
</span><span class="cx">     if (!left)
</span><span class="cx">         left = right;
</span><span class="cx"> 
</span><del>-    addProperty(longhands[0], shorthand.id(), *top, important);
-    addProperty(longhands[1], shorthand.id(), *right, important);
-    addProperty(longhands[2], shorthand.id(), *bottom, important);
-    addProperty(longhands[3], shorthand.id(), *left, important);
</del><ins>+    addProperty(longhands[0], shorthand.id(), top.releaseNonNull(), important);
+    addProperty(longhands[1], shorthand.id(), right.releaseNonNull(), important);
+    addProperty(longhands[2], shorthand.id(), bottom.releaseNonNull(), important);
+    addProperty(longhands[3], shorthand.id(), left.releaseNonNull(), important);
</ins><span class="cx"> 
</span><span class="cx">     return m_range.atEnd();
</span><span class="cx"> }
</span><span class="lines">@@ -4168,26 +3866,37 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::consumeBorderImage(CSSPropertyID property, bool important)
</span><span class="cx"> {
</span><del>-    CSSValue* source = nullptr;
-    CSSValue* slice = nullptr;
-    CSSValue* width = nullptr;
-    CSSValue* outset = nullptr;
-    CSSValue* repeat = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; source;
+    RefPtr&lt;CSSValue&gt; slice;
+    RefPtr&lt;CSSValue&gt; width;
+    RefPtr&lt;CSSValue&gt; outset;
+    RefPtr&lt;CSSValue&gt; repeat;
+    
</ins><span class="cx">     if (consumeBorderImageComponents(property, m_range, m_context, source, slice, width, outset, repeat)) {
</span><ins>+        if (!source)
+            source = CSSValuePool::singleton().createImplicitInitialValue();
+        if (!slice)
+            slice = CSSValuePool::singleton().createImplicitInitialValue();
+        if (!width)
+            width = CSSValuePool::singleton().createImplicitInitialValue();
+        if (!outset)
+            outset = CSSValuePool::singleton().createImplicitInitialValue();
+        if (!repeat)
+            repeat = CSSValuePool::singleton().createImplicitInitialValue();
</ins><span class="cx">         switch (property) {
</span><span class="cx">         case CSSPropertyWebkitMaskBoxImage:
</span><del>-            addProperty(CSSPropertyWebkitMaskBoxImageSource, CSSPropertyWebkitMaskBoxImage, source ? *source : *CSSInitialValue::createLegacyImplicit(), important);
-            addProperty(CSSPropertyWebkitMaskBoxImageSlice, CSSPropertyWebkitMaskBoxImage, slice ? *slice : *CSSInitialValue::createLegacyImplicit(), important);
-            addProperty(CSSPropertyWebkitMaskBoxImageWidth, CSSPropertyWebkitMaskBoxImage, width ? *width : *CSSInitialValue::createLegacyImplicit(), important);
-            addProperty(CSSPropertyWebkitMaskBoxImageOutset, CSSPropertyWebkitMaskBoxImage, outset ? *outset : *CSSInitialValue::createLegacyImplicit(), important);
-            addProperty(CSSPropertyWebkitMaskBoxImageRepeat, CSSPropertyWebkitMaskBoxImage, repeat ? *repeat : *CSSInitialValue::createLegacyImplicit(), important);
</del><ins>+            addProperty(CSSPropertyWebkitMaskBoxImageSource, CSSPropertyWebkitMaskBoxImage, source.releaseNonNull(), important);
+            addProperty(CSSPropertyWebkitMaskBoxImageSlice, CSSPropertyWebkitMaskBoxImage, slice.releaseNonNull(), important);
+            addProperty(CSSPropertyWebkitMaskBoxImageWidth, CSSPropertyWebkitMaskBoxImage, width.releaseNonNull(), important);
+            addProperty(CSSPropertyWebkitMaskBoxImageOutset, CSSPropertyWebkitMaskBoxImage, outset.releaseNonNull(), important);
+            addProperty(CSSPropertyWebkitMaskBoxImageRepeat, CSSPropertyWebkitMaskBoxImage, repeat.releaseNonNull(), important);
</ins><span class="cx">             return true;
</span><span class="cx">         case CSSPropertyBorderImage:
</span><del>-            addProperty(CSSPropertyBorderImageSource, CSSPropertyBorderImage, source ? *source : *CSSInitialValue::createLegacyImplicit(), important);
-            addProperty(CSSPropertyBorderImageSlice, CSSPropertyBorderImage, slice ? *slice : *CSSInitialValue::createLegacyImplicit(), important);
-            addProperty(CSSPropertyBorderImageWidth, CSSPropertyBorderImage, width ? *width : *CSSInitialValue::createLegacyImplicit(), important);
-            addProperty(CSSPropertyBorderImageOutset, CSSPropertyBorderImage, outset ? *outset : *CSSInitialValue::createLegacyImplicit(), important);
-            addProperty(CSSPropertyBorderImageRepeat, CSSPropertyBorderImage, repeat ? *repeat : *CSSInitialValue::createLegacyImplicit(), important);
</del><ins>+            addProperty(CSSPropertyBorderImageSource, CSSPropertyBorderImage, source.releaseNonNull(), important);
+            addProperty(CSSPropertyBorderImageSlice, CSSPropertyBorderImage, slice.releaseNonNull(), important);
+            addProperty(CSSPropertyBorderImageWidth, CSSPropertyBorderImage, width.releaseNonNull() , important);
+            addProperty(CSSPropertyBorderImageOutset, CSSPropertyBorderImage, outset.releaseNonNull(), important);
+            addProperty(CSSPropertyBorderImageRepeat, CSSPropertyBorderImage, repeat.releaseNonNull(), important);
</ins><span class="cx">             return true;
</span><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="lines">@@ -4237,7 +3946,7 @@
</span><span class="cx">     // The fragmentation spec says that page-break-(after|before|inside) are to be treated as
</span><span class="cx">     // shorthands for their break-(after|before|inside) counterparts. We'll do the same for the
</span><span class="cx">     // non-standard properties -webkit-column-break-(after|before|inside).
</span><del>-    CSSPrimitiveValue* keyword = consumeIdent(m_range);
</del><ins>+    RefPtr&lt;CSSPrimitiveValue&gt; keyword = consumeIdent(m_range);
</ins><span class="cx">     if (!keyword)
</span><span class="cx">         return false;
</span><span class="cx">     if (!m_range.atEnd())
</span><span class="lines">@@ -4263,34 +3972,34 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     CSSPropertyID genericBreakProperty = mapFromLegacyBreakProperty(property);
</span><del>-    addProperty(genericBreakProperty, property, *CSSPrimitiveValue::createIdentifier(value), important);
</del><ins>+    addProperty(genericBreakProperty, property, CSSValuePool::singleton().createIdentifierValue(value), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumeBackgroundPosition(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, UnitlessQuirk unitless, CSSValue*&amp; resultX, CSSValue*&amp; resultY)
</del><ins>+static bool consumeBackgroundPosition(CSSParserTokenRange&amp; range, const CSSParserContext&amp; context, UnitlessQuirk unitless, RefPtr&lt;CSSValue&gt;&amp; resultX, RefPtr&lt;CSSValue&gt;&amp; resultY)
</ins><span class="cx"> {
</span><span class="cx">     do {
</span><del>-        CSSValue* positionX = nullptr;
-        CSSValue* positionY = nullptr;
-        if (!consumePosition(range, context.mode(), unitless, positionX, positionY))
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; positionX;
+        RefPtr&lt;CSSPrimitiveValue&gt; positionY;
+        if (!consumePosition(range, context.mode, unitless, positionX, positionY))
</ins><span class="cx">             return false;
</span><del>-        addBackgroundValue(resultX, positionX);
-        addBackgroundValue(resultY, positionY);
</del><ins>+        addBackgroundValue(resultX, positionX.releaseNonNull());
+        addBackgroundValue(resultY, positionY.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumeRepeatStyleComponent(CSSParserTokenRange&amp; range, CSSValue*&amp; value1, CSSValue*&amp; value2, bool&amp; implicit)
</del><ins>+static bool consumeRepeatStyleComponent(CSSParserTokenRange&amp; range, RefPtr&lt;CSSPrimitiveValue&gt;&amp; value1, RefPtr&lt;CSSPrimitiveValue&gt;&amp; value2, bool&amp; implicit)
</ins><span class="cx"> {
</span><span class="cx">     if (consumeIdent&lt;CSSValueRepeatX&gt;(range)) {
</span><del>-        value1 = CSSPrimitiveValue::createIdentifier(CSSValueRepeat);
-        value2 = CSSPrimitiveValue::createIdentifier(CSSValueNoRepeat);
</del><ins>+        value1 = CSSValuePool::singleton().createIdentifierValue(CSSValueRepeat);
+        value2 = CSSValuePool::singleton().createIdentifierValue(CSSValueNoRepeat);
</ins><span class="cx">         implicit = true;
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     if (consumeIdent&lt;CSSValueRepeatY&gt;(range)) {
</span><del>-        value1 = CSSPrimitiveValue::createIdentifier(CSSValueNoRepeat);
-        value2 = CSSPrimitiveValue::createIdentifier(CSSValueRepeat);
</del><ins>+        value1 = CSSValuePool::singleton().createIdentifierValue(CSSValueNoRepeat);
+        value2 = CSSValuePool::singleton().createIdentifierValue(CSSValueRepeat);
</ins><span class="cx">         implicit = true;
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="lines">@@ -4306,15 +4015,15 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool consumeRepeatStyle(CSSParserTokenRange&amp; range, CSSValue*&amp; resultX, CSSValue*&amp; resultY, bool&amp; implicit)
</del><ins>+static bool consumeRepeatStyle(CSSParserTokenRange&amp; range, RefPtr&lt;CSSValue&gt;&amp; resultX, RefPtr&lt;CSSValue&gt;&amp; resultY, bool&amp; implicit)
</ins><span class="cx"> {
</span><span class="cx">     do {
</span><del>-        CSSValue* repeatX = nullptr;
-        CSSValue* repeatY = nullptr;
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; repeatX;
+        RefPtr&lt;CSSPrimitiveValue&gt; repeatY;
</ins><span class="cx">         if (!consumeRepeatStyleComponent(range, repeatX, repeatY, implicit))
</span><span class="cx">             return false;
</span><del>-        addBackgroundValue(resultX, repeatX);
-        addBackgroundValue(resultY, repeatY);
</del><ins>+        addBackgroundValue(resultX, repeatX.releaseNonNull());
+        addBackgroundValue(resultY, repeatY.releaseNonNull());
</ins><span class="cx">     } while (consumeCommaIncludingWhitespace(range));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4324,13 +4033,13 @@
</span><span class="cx"> bool CSSPropertyParser::consumeBackgroundShorthand(const StylePropertyShorthand&amp; shorthand, bool important)
</span><span class="cx"> {
</span><span class="cx">     const unsigned longhandCount = shorthand.length();
</span><del>-    CSSValue* longhands[10] = { 0 };
</del><ins>+    RefPtr&lt;CSSValue&gt; longhands[10];
</ins><span class="cx">     ASSERT(longhandCount &lt;= 10);
</span><span class="cx"> 
</span><span class="cx">     bool implicit = false;
</span><span class="cx">     do {
</span><span class="cx">         bool parsedLonghand[10] = { false };
</span><del>-        CSSValue* originValue = nullptr;
</del><ins>+        RefPtr&lt;CSSValue&gt; originValue;
</ins><span class="cx">         do {
</span><span class="cx">             bool foundProperty = false;
</span><span class="cx">             for (size_t i = 0; i &lt; longhandCount; ++i) {
</span><span class="lines">@@ -4337,20 +4046,28 @@
</span><span class="cx">                 if (parsedLonghand[i])
</span><span class="cx">                     continue;
</span><span class="cx"> 
</span><del>-                CSSValue* value = nullptr;
-                CSSValue* valueY = nullptr;
</del><ins>+                RefPtr&lt;CSSValue&gt; value;
+                RefPtr&lt;CSSValue&gt; valueY;
</ins><span class="cx">                 CSSPropertyID property = shorthand.properties()[i];
</span><span class="cx">                 if (property == CSSPropertyBackgroundRepeatX || property == CSSPropertyWebkitMaskRepeatX) {
</span><del>-                    consumeRepeatStyleComponent(m_range, value, valueY, implicit);
</del><ins>+                    RefPtr&lt;CSSPrimitiveValue&gt; primitiveValue;
+                    RefPtr&lt;CSSPrimitiveValue&gt; primitiveValueY;
+                    consumeRepeatStyleComponent(m_range, primitiveValue, primitiveValueY, implicit);
+                    value = primitiveValue;
+                    valueY = primitiveValueY;
</ins><span class="cx">                 } else if (property == CSSPropertyBackgroundPositionX || property == CSSPropertyWebkitMaskPositionX) {
</span><span class="cx">                     CSSParserTokenRange rangeCopy = m_range;
</span><del>-                    if (!consumePosition(rangeCopy, m_context.mode(), UnitlessQuirk::Forbid, value, valueY))
</del><ins>+                    RefPtr&lt;CSSPrimitiveValue&gt; primitiveValue;
+                    RefPtr&lt;CSSPrimitiveValue&gt; primitiveValueY;
+                    if (!consumePosition(rangeCopy, m_context.mode, UnitlessQuirk::Forbid, primitiveValue, primitiveValueY))
</ins><span class="cx">                         continue;
</span><ins>+                    value = primitiveValue;
+                    valueY = primitiveValueY;
</ins><span class="cx">                     m_range = rangeCopy;
</span><span class="cx">                 } else if (property == CSSPropertyBackgroundSize || property == CSSPropertyWebkitMaskSize) {
</span><span class="cx">                     if (!consumeSlashIncludingWhitespace(m_range))
</span><span class="cx">                         continue;
</span><del>-                    value = consumeBackgroundSize(property, m_range, m_context.mode());
</del><ins>+                    value = consumeBackgroundSize(property, m_range, m_context.mode);
</ins><span class="cx">                     if (!value || !parsedLonghand[i - 1]) // Position must have been parsed in the current layer.
</span><span class="cx">                         return false;
</span><span class="cx">                 } else if (property == CSSPropertyBackgroundPositionY || property == CSSPropertyBackgroundRepeatY
</span><span class="lines">@@ -4364,10 +4081,10 @@
</span><span class="cx">                         originValue = value;
</span><span class="cx">                     parsedLonghand[i] = true;
</span><span class="cx">                     foundProperty = true;
</span><del>-                    addBackgroundValue(longhands[i], value);
</del><ins>+                    addBackgroundValue(longhands[i], value.releaseNonNull());
</ins><span class="cx">                     if (valueY) {
</span><span class="cx">                         parsedLonghand[i + 1] = true;
</span><del>-                        addBackgroundValue(longhands[i + 1], valueY);
</del><ins>+                        addBackgroundValue(longhands[i + 1], valueY.releaseNonNull());
</ins><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -4384,11 +4101,11 @@
</span><span class="cx">                 continue;
</span><span class="cx">             }
</span><span class="cx">             if ((property == CSSPropertyBackgroundClip || property == CSSPropertyWebkitMaskClip) &amp;&amp; !parsedLonghand[i] &amp;&amp; originValue) {
</span><del>-                addBackgroundValue(longhands[i], originValue);
</del><ins>+                addBackgroundValue(longhands[i], originValue.releaseNonNull());
</ins><span class="cx">                 continue;
</span><span class="cx">             }
</span><span class="cx">             if (!parsedLonghand[i])
</span><del>-                addBackgroundValue(longhands[i], CSSInitialValue::createLegacyImplicit());
</del><ins>+                addBackgroundValue(longhands[i], CSSValuePool::singleton().createImplicitInitialValue());
</ins><span class="cx">         }
</span><span class="cx">     } while (consumeCommaIncludingWhitespace(m_range));
</span><span class="cx">     if (!m_range.atEnd())
</span><span class="lines">@@ -4396,7 +4113,7 @@
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; longhandCount; ++i) {
</span><span class="cx">         CSSPropertyID property = shorthand.properties()[i];
</span><del>-        if (property == CSSPropertyBackgroundSize &amp;&amp; longhands[i] &amp;&amp; m_context.useLegacyBackgroundSizeShorthandBehavior())
</del><ins>+        if (property == CSSPropertyBackgroundSize &amp;&amp; longhands[i] &amp;&amp; m_context.useLegacyBackgroundSizeShorthandBehavior)
</ins><span class="cx">             continue;
</span><span class="cx">         addProperty(property, shorthand.id(), *longhands[i], important, implicit);
</span><span class="cx">     }
</span><span class="lines">@@ -4405,38 +4122,35 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::consumeGridItemPositionShorthand(CSSPropertyID shorthandId, bool important)
</span><span class="cx"> {
</span><del>-    ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">     const StylePropertyShorthand&amp; shorthand = shorthandForProperty(shorthandId);
</span><span class="cx">     ASSERT(shorthand.length() == 2);
</span><del>-    CSSValue* startValue = consumeGridLine(m_range);
</del><ins>+    RefPtr&lt;CSSValue&gt; startValue = consumeGridLine(m_range);
</ins><span class="cx">     if (!startValue)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    CSSValue* endValue = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; endValue;
</ins><span class="cx">     if (consumeSlashIncludingWhitespace(m_range)) {
</span><span class="cx">         endValue = consumeGridLine(m_range);
</span><span class="cx">         if (!endValue)
</span><span class="cx">             return false;
</span><span class="cx">     } else {
</span><del>-        endValue = startValue-&gt;isCustomIdentValue() ? startValue : CSSPrimitiveValue::createIdentifier(CSSValueAuto);
</del><ins>+        endValue = startValue-&gt;isCustomIdentValue() ? startValue : CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</ins><span class="cx">     }
</span><span class="cx">     if (!m_range.atEnd())
</span><span class="cx">         return false;
</span><del>-    addProperty(shorthand.properties()[0], shorthandId, *startValue, important);
-    addProperty(shorthand.properties()[1], shorthandId, *endValue, important);
</del><ins>+    addProperty(shorthand.properties()[0], shorthandId, startValue.releaseNonNull(), important);
+    addProperty(shorthand.properties()[1], shorthandId, endValue.releaseNonNull(), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::consumeGridAreaShorthand(bool important)
</span><span class="cx"> {
</span><del>-    ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
-    ASSERT(gridAreaShorthand().length() == 4);
-    CSSValue* rowStartValue = consumeGridLine(m_range);
</del><ins>+    RefPtr&lt;CSSValue&gt; rowStartValue = consumeGridLine(m_range);
</ins><span class="cx">     if (!rowStartValue)
</span><span class="cx">         return false;
</span><del>-    CSSValue* columnStartValue = nullptr;
-    CSSValue* rowEndValue = nullptr;
-    CSSValue* columnEndValue = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; columnStartValue;
+    RefPtr&lt;CSSValue&gt; rowEndValue;
+    RefPtr&lt;CSSValue&gt; columnEndValue;
</ins><span class="cx">     if (consumeSlashIncludingWhitespace(m_range)) {
</span><span class="cx">         columnStartValue = consumeGridLine(m_range);
</span><span class="cx">         if (!columnStartValue)
</span><span class="lines">@@ -4455,16 +4169,16 @@
</span><span class="cx">     if (!m_range.atEnd())
</span><span class="cx">         return false;
</span><span class="cx">     if (!columnStartValue)
</span><del>-        columnStartValue = rowStartValue-&gt;isCustomIdentValue() ? rowStartValue : CSSPrimitiveValue::createIdentifier(CSSValueAuto);
</del><ins>+        columnStartValue = rowStartValue-&gt;isCustomIdentValue() ? rowStartValue : CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</ins><span class="cx">     if (!rowEndValue)
</span><del>-        rowEndValue = rowStartValue-&gt;isCustomIdentValue() ? rowStartValue : CSSPrimitiveValue::createIdentifier(CSSValueAuto);
</del><ins>+        rowEndValue = rowStartValue-&gt;isCustomIdentValue() ? rowStartValue : CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</ins><span class="cx">     if (!columnEndValue)
</span><del>-        columnEndValue = columnStartValue-&gt;isCustomIdentValue() ? columnStartValue : CSSPrimitiveValue::createIdentifier(CSSValueAuto);
</del><ins>+        columnEndValue = columnStartValue-&gt;isCustomIdentValue() ? columnStartValue : CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</ins><span class="cx"> 
</span><del>-    addProperty(CSSPropertyGridRowStart, CSSPropertyGridArea, *rowStartValue, important);
-    addProperty(CSSPropertyGridColumnStart, CSSPropertyGridArea, *columnStartValue, important);
-    addProperty(CSSPropertyGridRowEnd, CSSPropertyGridArea, *rowEndValue, important);
-    addProperty(CSSPropertyGridColumnEnd, CSSPropertyGridArea, *columnEndValue, important);
</del><ins>+    addProperty(CSSPropertyGridRowStart, CSSPropertyGridArea, rowStartValue.releaseNonNull(), important);
+    addProperty(CSSPropertyGridColumnStart, CSSPropertyGridArea, columnStartValue.releaseNonNull(), important);
+    addProperty(CSSPropertyGridRowEnd, CSSPropertyGridArea, rowEndValue.releaseNonNull(), important);
+    addProperty(CSSPropertyGridColumnEnd, CSSPropertyGridArea, columnEndValue.releaseNonNull(), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4473,16 +4187,16 @@
</span><span class="cx">     NamedGridAreaMap gridAreaMap;
</span><span class="cx">     size_t rowCount = 0;
</span><span class="cx">     size_t columnCount = 0;
</span><del>-    CSSValueList* templateRows = CSSValueList::createSpaceSeparated();
</del><ins>+    RefPtr&lt;CSSValueList&gt; templateRows = CSSValueList::createSpaceSeparated();
</ins><span class="cx"> 
</span><span class="cx">     // Persists between loop iterations so we can use the same value for
</span><span class="cx">     // consecutive &lt;line-names&gt; values
</span><del>-    CSSGridLineNamesValue* lineNames = nullptr;
</del><ins>+    RefPtr&lt;CSSGridLineNamesValue&gt; lineNames;
</ins><span class="cx"> 
</span><span class="cx">     do {
</span><span class="cx">         // Handle leading &lt;custom-ident&gt;*.
</span><span class="cx">         bool hasPreviousLineNames = lineNames;
</span><del>-        lineNames = consumeGridLineNames(m_range, lineNames);
</del><ins>+        lineNames = consumeGridLineNames(m_range, lineNames.get());
</ins><span class="cx">         if (lineNames &amp;&amp; !hasPreviousLineNames)
</span><span class="cx">             templateRows-&gt;append(*lineNames);
</span><span class="cx"> 
</span><span class="lines">@@ -4492,63 +4206,60 @@
</span><span class="cx">         ++rowCount;
</span><span class="cx"> 
</span><span class="cx">         // Handle template-rows's track-size.
</span><del>-        CSSValue* value = consumeGridTrackSize(m_range, m_context.mode());
</del><ins>+        RefPtr&lt;CSSValue&gt; value = consumeGridTrackSize(m_range, m_context.mode);
</ins><span class="cx">         if (!value)
</span><del>-            value = CSSPrimitiveValue::createIdentifier(CSSValueAuto);
</del><ins>+            value = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</ins><span class="cx">         templateRows-&gt;append(*value);
</span><span class="cx"> 
</span><span class="cx">         // This will handle the trailing/leading &lt;custom-ident&gt;* in the grammar.
</span><span class="cx">         lineNames = consumeGridLineNames(m_range);
</span><span class="cx">         if (lineNames)
</span><del>-            templateRows-&gt;append(*lineNames);
</del><ins>+            templateRows-&gt;append(lineNames.releaseNonNull());
</ins><span class="cx">     } while (!m_range.atEnd() &amp;&amp; !(m_range.peek().type() == DelimiterToken &amp;&amp; m_range.peek().delimiter() == '/'));
</span><span class="cx"> 
</span><del>-    CSSValue* columnsValue = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; columnsValue;
</ins><span class="cx">     if (!m_range.atEnd()) {
</span><span class="cx">         if (!consumeSlashIncludingWhitespace(m_range))
</span><span class="cx">             return false;
</span><del>-        columnsValue = consumeGridTrackList(m_range, m_context.mode(), GridTemplateNoRepeat);
</del><ins>+        columnsValue = consumeGridTrackList(m_range, m_context.mode, GridTemplateNoRepeat);
</ins><span class="cx">         if (!columnsValue || !m_range.atEnd())
</span><span class="cx">             return false;
</span><span class="cx">     } else {
</span><del>-        columnsValue = CSSPrimitiveValue::createIdentifier(CSSValueNone);
</del><ins>+        columnsValue = CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
</ins><span class="cx">     }
</span><del>-    addProperty(CSSPropertyGridTemplateRows, shorthandId, *templateRows, important);
-    addProperty(CSSPropertyGridTemplateColumns, shorthandId, *columnsValue, important);
-    addProperty(CSSPropertyGridTemplateAreas, shorthandId, *CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount), important);
</del><ins>+    addProperty(CSSPropertyGridTemplateRows, shorthandId, templateRows.releaseNonNull(), important);
+    addProperty(CSSPropertyGridTemplateColumns, shorthandId, columnsValue.releaseNonNull(), important);
+    addProperty(CSSPropertyGridTemplateAreas, shorthandId, CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::consumeGridTemplateShorthand(CSSPropertyID shorthandId, bool important)
</span><span class="cx"> {
</span><del>-    ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
-    ASSERT(gridTemplateShorthand().length() == 3);
-
</del><span class="cx">     CSSParserTokenRange rangeCopy = m_range;
</span><del>-    CSSValue* rowsValue = consumeIdent&lt;CSSValueNone&gt;(m_range);
</del><ins>+    RefPtr&lt;CSSValue&gt; rowsValue = consumeIdent&lt;CSSValueNone&gt;(m_range);
</ins><span class="cx"> 
</span><span class="cx">     // 1- 'none' case.
</span><span class="cx">     if (rowsValue &amp;&amp; m_range.atEnd()) {
</span><del>-        addProperty(CSSPropertyGridTemplateRows, shorthandId, *CSSPrimitiveValue::createIdentifier(CSSValueNone), important);
-        addProperty(CSSPropertyGridTemplateColumns, shorthandId, *CSSPrimitiveValue::createIdentifier(CSSValueNone), important);
-        addProperty(CSSPropertyGridTemplateAreas, shorthandId, *CSSPrimitiveValue::createIdentifier(CSSValueNone), important);
</del><ins>+        addProperty(CSSPropertyGridTemplateRows, shorthandId, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important);
+        addProperty(CSSPropertyGridTemplateColumns, shorthandId, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important);
+        addProperty(CSSPropertyGridTemplateAreas, shorthandId, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // 2- &lt;grid-template-rows&gt; / &lt;grid-template-columns&gt;
</span><span class="cx">     if (!rowsValue)
</span><del>-        rowsValue = consumeGridTrackList(m_range, m_context.mode(), GridTemplate);
</del><ins>+        rowsValue = consumeGridTrackList(m_range, m_context.mode, GridTemplate);
</ins><span class="cx"> 
</span><span class="cx">     if (rowsValue) {
</span><span class="cx">         if (!consumeSlashIncludingWhitespace(m_range))
</span><span class="cx">             return false;
</span><del>-        CSSValue* columnsValue = consumeGridTemplatesRowsOrColumns(m_range, m_context.mode());
</del><ins>+        RefPtr&lt;CSSValue&gt; columnsValue = consumeGridTemplatesRowsOrColumns(m_range, m_context.mode);
</ins><span class="cx">         if (!columnsValue || !m_range.atEnd())
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        addProperty(CSSPropertyGridTemplateRows, shorthandId, *rowsValue, important);
-        addProperty(CSSPropertyGridTemplateColumns, shorthandId, *columnsValue, important);
-        addProperty(CSSPropertyGridTemplateAreas, shorthandId, *CSSPrimitiveValue::createIdentifier(CSSValueNone), important);
</del><ins>+        addProperty(CSSPropertyGridTemplateRows, shorthandId, rowsValue.releaseNonNull(), important);
+        addProperty(CSSPropertyGridTemplateColumns, shorthandId, columnsValue.releaseNonNull(), important);
+        addProperty(CSSPropertyGridTemplateAreas, shorthandId, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -4559,7 +4270,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool CSSPropertyParser::consumeGridShorthand(bool important)
</span><span class="cx"> {
</span><del>-    ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
</del><span class="cx">     ASSERT(shorthandForProperty(CSSPropertyGrid).length() == 8);
</span><span class="cx"> 
</span><span class="cx">     CSSParserTokenRange rangeCopy = m_range;
</span><span class="lines">@@ -4568,11 +4278,11 @@
</span><span class="cx">     if (consumeGridTemplateShorthand(CSSPropertyGrid, important)) {
</span><span class="cx">         // It can only be specified the explicit or the implicit grid properties in a single grid declaration.
</span><span class="cx">         // The sub-properties not specified are set to their initial value, as normal for shorthands.
</span><del>-        addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
-        addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
-        addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
-        addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
-        addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
</del><ins>+        addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
+        addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
+        addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
+        addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
+        addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -4579,19 +4289,19 @@
</span><span class="cx">     m_range = rangeCopy;
</span><span class="cx"> 
</span><span class="cx">     // 2- &lt;grid-auto-flow&gt; [ &lt;grid-auto-rows&gt; [ / &lt;grid-auto-columns&gt; ]? ]
</span><del>-    CSSValueList* gridAutoFlow = consumeGridAutoFlow(m_range);
</del><ins>+    RefPtr&lt;CSSValueList&gt; gridAutoFlow = consumeGridAutoFlow(m_range);
</ins><span class="cx">     if (!gridAutoFlow)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    CSSValue* autoColumnsValue = nullptr;
-    CSSValue* autoRowsValue = nullptr;
</del><ins>+    RefPtr&lt;CSSValue&gt; autoColumnsValue;
+    RefPtr&lt;CSSValue&gt; autoRowsValue;
</ins><span class="cx"> 
</span><span class="cx">     if (!m_range.atEnd()) {
</span><del>-        autoRowsValue = consumeGridTrackList(m_range, m_context.mode(), GridAuto);
</del><ins>+        autoRowsValue = consumeGridTrackList(m_range, m_context.mode, GridAuto);
</ins><span class="cx">         if (!autoRowsValue)
</span><span class="cx">             return false;
</span><span class="cx">         if (consumeSlashIncludingWhitespace(m_range)) {
</span><del>-            autoColumnsValue = consumeGridTrackList(m_range, m_context.mode(), GridAuto);
</del><ins>+            autoColumnsValue = consumeGridTrackList(m_range, m_context.mode, GridAuto);
</ins><span class="cx">             if (!autoColumnsValue)
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="lines">@@ -4599,8 +4309,8 @@
</span><span class="cx">             return false;
</span><span class="cx">     } else {
</span><span class="cx">         // Other omitted values are set to their initial values.
</span><del>-        autoColumnsValue = CSSInitialValue::createLegacyImplicit();
-        autoRowsValue = CSSInitialValue::createLegacyImplicit();
</del><ins>+        autoColumnsValue = CSSValuePool::singleton().createImplicitInitialValue();
+        autoRowsValue = CSSValuePool::singleton().createImplicitInitialValue();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // if &lt;grid-auto-columns&gt; value is omitted, it is set to the value specified for grid-auto-rows.
</span><span class="lines">@@ -4609,54 +4319,51 @@
</span><span class="cx"> 
</span><span class="cx">     // It can only be specified the explicit or the implicit grid properties in a single grid declaration.
</span><span class="cx">     // The sub-properties not specified are set to their initial value, as normal for shorthands.
</span><del>-    addProperty(CSSPropertyGridTemplateColumns, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
-    addProperty(CSSPropertyGridTemplateRows, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
-    addProperty(CSSPropertyGridTemplateAreas, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
-    addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, *gridAutoFlow, important);
-    addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, *autoColumnsValue, important);
-    addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, *autoRowsValue, important);
-    addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
-    addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, *CSSInitialValue::createLegacyImplicit(), important);
</del><ins>+    addProperty(CSSPropertyGridTemplateColumns, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
+    addProperty(CSSPropertyGridTemplateRows, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
+    addProperty(CSSPropertyGridTemplateAreas, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
+    addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, gridAutoFlow.releaseNonNull(), important);
+    addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, autoColumnsValue.releaseNonNull(), important);
+    addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, autoRowsValue.releaseNonNull(), important);
+    addProperty(CSSPropertyGridColumnGap, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
+    addProperty(CSSPropertyGridRowGap, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSPropertyParser::parseShorthand(CSSPropertyID unresolvedProperty, bool important)
</del><ins>+bool CSSPropertyParser::parseShorthand(CSSPropertyID property, bool important)
</ins><span class="cx"> {
</span><del>-    CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty);
-
</del><span class="cx">     switch (property) {
</span><span class="cx">     case CSSPropertyWebkitMarginCollapse: {
</span><span class="cx">         CSSValueID id = m_range.consumeIncludingWhitespace().id();
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginBeforeCollapse, id, m_context.mode()))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginBeforeCollapse, id, m_context.mode))
</ins><span class="cx">             return false;
</span><del>-        CSSValue* beforeCollapse = CSSPrimitiveValue::createIdentifier(id);
-        addProperty(CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginCollapse, *beforeCollapse, important);
</del><ins>+        RefPtr&lt;CSSValue&gt; beforeCollapse = CSSValuePool::singleton().createIdentifierValue(id);
+        addProperty(CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginCollapse, beforeCollapse.releaseNonNull(), important);
</ins><span class="cx">         if (m_range.atEnd()) {
</span><del>-            addProperty(CSSPropertyWebkitMarginAfterCollapse, CSSPropertyWebkitMarginCollapse, *beforeCollapse, important);
</del><ins>+            addProperty(CSSPropertyWebkitMarginAfterCollapse, CSSPropertyWebkitMarginCollapse, beforeCollapse.releaseNonNull(), important);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         id = m_range.consumeIncludingWhitespace().id();
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginAfterCollapse, id, m_context.mode()))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyWebkitMarginAfterCollapse, id, m_context.mode))
</ins><span class="cx">             return false;
</span><del>-        addProperty(CSSPropertyWebkitMarginAfterCollapse, CSSPropertyWebkitMarginCollapse, *CSSPrimitiveValue::createIdentifier(id), important);
</del><ins>+        addProperty(CSSPropertyWebkitMarginAfterCollapse, CSSPropertyWebkitMarginCollapse, CSSValuePool::singleton().createIdentifierValue(id), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyOverflow: {
</span><span class="cx">         CSSValueID id = m_range.consumeIncludingWhitespace().id();
</span><del>-        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyOverflowY, id, m_context.mode()))
</del><ins>+        if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyOverflowY, id, m_context.mode))
</ins><span class="cx">             return false;
</span><span class="cx">         if (!m_range.atEnd())
</span><span class="cx">             return false;
</span><del>-        CSSValue* overflowYValue = CSSPrimitiveValue::createIdentifier(id);
</del><ins>+        RefPtr&lt;CSSValue&gt; overflowYValue = CSSValuePool::singleton().createIdentifierValue(id);
+        RefPtr&lt;CSSValue&gt; overflowXValue;
</ins><span class="cx"> 
</span><del>-        CSSValue* overflowXValue = nullptr;
-
</del><span class="cx">         // FIXME: -webkit-paged-x or -webkit-paged-y only apply to overflow-y. If this value has been
</span><span class="cx">         // set using the shorthand, then for now overflow-x will default to auto, but once we implement
</span><span class="cx">         // pagination controls, it should default to hidden. If the overflow-y value is anything but
</span><span class="cx">         // paged-x or paged-y, then overflow-x and overflow-y should have the same value.
</span><span class="cx">         if (id == CSSValueWebkitPagedX || id == CSSValueWebkitPagedY)
</span><del>-            overflowXValue = CSSPrimitiveValue::createIdentifier(CSSValueAuto);
</del><ins>+            overflowXValue = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto);
</ins><span class="cx">         else
</span><span class="cx">             overflowXValue = overflowYValue;
</span><span class="cx">         addProperty(CSSPropertyOverflowX, CSSPropertyOverflow, *overflowXValue, important);
</span><span class="lines">@@ -4676,18 +4383,15 @@
</span><span class="cx">     case CSSPropertyColumns:
</span><span class="cx">         return consumeColumns(important);
</span><span class="cx">     case CSSPropertyAnimation:
</span><del>-        return consumeAnimationShorthand(animationShorthandForParsing(), unresolvedProperty == CSSPropertyAliasWebkitAnimation, important);
</del><ins>+        return consumeAnimationShorthand(animationShorthandForParsing(), important);
</ins><span class="cx">     case CSSPropertyTransition:
</span><del>-        return consumeAnimationShorthand(transitionShorthandForParsing(), false, important);
</del><ins>+        return consumeAnimationShorthand(transitionShorthandForParsing(), important);
</ins><span class="cx">     case CSSPropertyTextDecoration:
</span><del>-        ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
-        return consumeShorthandGreedily(textDecorationShorthand(), important);
</del><ins>+        return consumeShorthandGreedily(webkitTextDecorationShorthand(), important);
</ins><span class="cx">     case CSSPropertyMargin:
</span><span class="cx">         return consume4Values(marginShorthand(), important);
</span><span class="cx">     case CSSPropertyPadding:
</span><span class="cx">         return consume4Values(paddingShorthand(), important);
</span><del>-    case CSSPropertyMotion:
-        return consumeShorthandGreedily(motionShorthand(), important);
</del><span class="cx">     case CSSPropertyWebkitTextEmphasis:
</span><span class="cx">         return consumeShorthandGreedily(webkitTextEmphasisShorthand(), important);
</span><span class="cx">     case CSSPropertyOutline:
</span><span class="lines">@@ -4703,12 +4407,12 @@
</span><span class="cx">     case CSSPropertyWebkitTextStroke:
</span><span class="cx">         return consumeShorthandGreedily(webkitTextStrokeShorthand(), important);
</span><span class="cx">     case CSSPropertyMarker: {
</span><del>-        const CSSValue* marker = parseSingleValue(CSSPropertyMarkerStart);
</del><ins>+        RefPtr&lt;CSSValue&gt; marker = parseSingleValue(CSSPropertyMarkerStart);
</ins><span class="cx">         if (!marker || !m_range.atEnd())
</span><span class="cx">             return false;
</span><del>-        addProperty(CSSPropertyMarkerStart, CSSPropertyMarker, *marker, important);
-        addProperty(CSSPropertyMarkerMid, CSSPropertyMarker, *marker, important);
-        addProperty(CSSPropertyMarkerEnd, CSSPropertyMarker, *marker, important);
</del><ins>+        addProperty(CSSPropertyMarkerStart, CSSPropertyMarker, marker.releaseNonNull(), important);
+        addProperty(CSSPropertyMarkerMid, CSSPropertyMarker, marker.releaseNonNull(), important);
+        addProperty(CSSPropertyMarkerEnd, CSSPropertyMarker, marker.releaseNonNull(), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyFlex:
</span><span class="lines">@@ -4720,14 +4424,14 @@
</span><span class="cx">     case CSSPropertyListStyle:
</span><span class="cx">         return consumeShorthandGreedily(listStyleShorthand(), important);
</span><span class="cx">     case CSSPropertyBorderRadius: {
</span><del>-        CSSPrimitiveValue* horizontalRadii[4] = { 0 };
-        CSSPrimitiveValue* verticalRadii[4] = { 0 };
-        if (!consumeRadii(horizontalRadii, verticalRadii, m_range, m_context.mode(), unresolvedProperty == CSSPropertyAliasWebkitBorderRadius))
</del><ins>+        RefPtr&lt;CSSPrimitiveValue&gt; horizontalRadii[4];
+        RefPtr&lt;CSSPrimitiveValue&gt; verticalRadii[4];
+        if (!consumeRadii(horizontalRadii, verticalRadii, m_range, m_context.mode, property == CSSPropertyWebkitBorderRadius))
</ins><span class="cx">             return false;
</span><del>-        addProperty(CSSPropertyBorderTopLeftRadius, CSSPropertyBorderRadius, *CSSValuePair::create(horizontalRadii[0], verticalRadii[0], CSSValuePair::DropIdenticalValues), important);
-        addProperty(CSSPropertyBorderTopRightRadius, CSSPropertyBorderRadius, *CSSValuePair::create(horizontalRadii[1], verticalRadii[1], CSSValuePair::DropIdenticalValues), important);
-        addProperty(CSSPropertyBorderBottomRightRadius, CSSPropertyBorderRadius, *CSSValuePair::create(horizontalRadii[2], verticalRadii[2], CSSValuePair::DropIdenticalValues), important);
-        addProperty(CSSPropertyBorderBottomLeftRadius, CSSPropertyBorderRadius, *CSSValuePair::create(horizontalRadii[3], verticalRadii[3], CSSValuePair::DropIdenticalValues), important);
</del><ins>+        addProperty(CSSPropertyBorderTopLeftRadius, CSSPropertyBorderRadius, createPrimitiveValuePair(horizontalRadii[0].releaseNonNull(), verticalRadii[0].releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce), important);
+        addProperty(CSSPropertyBorderTopRightRadius, CSSPropertyBorderRadius, createPrimitiveValuePair(horizontalRadii[1].releaseNonNull(), verticalRadii[1].releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce), important);
+        addProperty(CSSPropertyBorderBottomRightRadius, CSSPropertyBorderRadius, createPrimitiveValuePair(horizontalRadii[2].releaseNonNull(), verticalRadii[2].releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce), important);
+        addProperty(CSSPropertyBorderBottomLeftRadius, CSSPropertyBorderRadius, createPrimitiveValuePair(horizontalRadii[3].releaseNonNull(), verticalRadii[3].releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyBorderColor:
</span><span class="lines">@@ -4758,23 +4462,23 @@
</span><span class="cx">         return consumeLegacyBreakProperty(property, important);
</span><span class="cx">     case CSSPropertyWebkitMaskPosition:
</span><span class="cx">     case CSSPropertyBackgroundPosition: {
</span><del>-        CSSValue* resultX = nullptr;
-        CSSValue* resultY = nullptr;
</del><ins>+        RefPtr&lt;CSSValue&gt; resultX;
+        RefPtr&lt;CSSValue&gt; resultY;
</ins><span class="cx">         if (!consumeBackgroundPosition(m_range, m_context, UnitlessQuirk::Allow, resultX, resultY) || !m_range.atEnd())
</span><span class="cx">             return false;
</span><del>-        addProperty(property == CSSPropertyBackgroundPosition ? CSSPropertyBackgroundPositionX : CSSPropertyWebkitMaskPositionX, property, *resultX, important);
-        addProperty(property == CSSPropertyBackgroundPosition ? CSSPropertyBackgroundPositionY : CSSPropertyWebkitMaskPositionY, property, *resultY, important);
</del><ins>+        addProperty(property == CSSPropertyBackgroundPosition ? CSSPropertyBackgroundPositionX : CSSPropertyWebkitMaskPositionX, property, resultX.releaseNonNull(), important);
+        addProperty(property == CSSPropertyBackgroundPosition ? CSSPropertyBackgroundPositionY : CSSPropertyWebkitMaskPositionY, property, resultY.releaseNonNull(), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyBackgroundRepeat:
</span><span class="cx">     case CSSPropertyWebkitMaskRepeat: {
</span><del>-        CSSValue* resultX = nullptr;
-        CSSValue* resultY = nullptr;
</del><ins>+        RefPtr&lt;CSSValue&gt; resultX;
+        RefPtr&lt;CSSValue&gt; resultY;
</ins><span class="cx">         bool implicit = false;
</span><span class="cx">         if (!consumeRepeatStyle(m_range, resultX, resultY, implicit) || !m_range.atEnd())
</span><span class="cx">             return false;
</span><del>-        addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgroundRepeatX : CSSPropertyWebkitMaskRepeatX, property, *resultX, important, implicit);
-        addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgroundRepeatY : CSSPropertyWebkitMaskRepeatY, property, *resultY, important, implicit);
</del><ins>+        addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgroundRepeatX : CSSPropertyWebkitMaskRepeatX, property, resultX.releaseNonNull(), important, implicit);
+        addProperty(property == CSSPropertyBackgroundRepeat ? CSSPropertyBackgroundRepeatY : CSSPropertyWebkitMaskRepeatY, property, resultY.releaseNonNull(), important, implicit);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyBackground:
</span><span class="lines">@@ -4782,15 +4486,14 @@
</span><span class="cx">     case CSSPropertyWebkitMask:
</span><span class="cx">         return consumeBackgroundShorthand(webkitMaskShorthand(), important);
</span><span class="cx">     case CSSPropertyGridGap: {
</span><del>-        ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled() &amp;&amp; shorthandForProperty(CSSPropertyGridGap).length() == 2);
-        CSSValue* rowGap = consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
-        CSSValue* columnGap = consumeLength(m_range, m_context.mode(), ValueRangeNonNegative);
</del><ins>+        RefPtr&lt;CSSValue&gt; rowGap = consumeLength(m_range, m_context.mode, ValueRangeNonNegative);
+        RefPtr&lt;CSSValue&gt; columnGap = consumeLength(m_range, m_context.mode, ValueRangeNonNegative);
</ins><span class="cx">         if (!rowGap || !m_range.atEnd())
</span><span class="cx">             return false;
</span><span class="cx">         if (!columnGap)
</span><span class="cx">             columnGap = rowGap;
</span><del>-        addProperty(CSSPropertyGridRowGap, CSSPropertyGridGap, *rowGap, important);
-        addProperty(CSSPropertyGridColumnGap, CSSPropertyGridGap, *columnGap, important);
</del><ins>+        addProperty(CSSPropertyGridRowGap, CSSPropertyGridGap, rowGap.releaseNonNull(), important);
+        addProperty(CSSPropertyGridColumnGap, CSSPropertyGridGap, columnGap.releaseNonNull(), important);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     case CSSPropertyGridColumn:
</span><span class="lines">@@ -4806,6 +4509,5 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> }
</span><del>-*/
</del><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.h (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.h        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.h        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">         Vector&lt;CSSProperty, 256&gt;&amp;, StyleRule::Type);
</span><span class="cx"> 
</span><span class="cx">     // Parses a non-shorthand CSS property
</span><del>-    static const CSSValue* parseSingleValue(CSSPropertyID, const CSSParserTokenRange&amp;, const CSSParserContext&amp;);
</del><ins>+    static RefPtr&lt;CSSValue&gt; parseSingleValue(CSSPropertyID, const CSSParserTokenRange&amp;, const CSSParserContext&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     CSSPropertyParser(const CSSParserTokenRange&amp;, const CSSParserContext&amp;,
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx">         Vector&lt;CSSProperty, 256&gt;*);
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Rename once the CSSParserValue-based parseValue is removed
</span><del>-    bool parseValueStart(CSSPropertyID unresolvedProperty, bool important);
-    bool consumeCSSWideKeyword(CSSPropertyID unresolvedProperty, bool important);
-    const CSSValue* parseSingleValue(CSSPropertyID, CSSPropertyID = CSSPropertyInvalid);
</del><ins>+    bool parseValueStart(CSSPropertyID, bool important);
+    bool consumeCSSWideKeyword(CSSPropertyID, bool important);
+    RefPtr&lt;CSSValue&gt; parseSingleValue(CSSPropertyID, CSSPropertyID = CSSPropertyInvalid);
</ins><span class="cx"> 
</span><span class="cx">     bool inQuirksMode() const { return m_context.mode == HTMLQuirksMode; }
</span><span class="cx"> 
</span><span class="lines">@@ -60,8 +60,8 @@
</span><span class="cx">     bool parseViewportDescriptor(CSSPropertyID propId, bool important);
</span><span class="cx">     bool parseFontFaceDescriptor(CSSPropertyID);
</span><span class="cx"> 
</span><del>-    void addProperty(CSSPropertyID, CSSPropertyID, const CSSValue&amp;, bool important, bool implicit = false);
-    void addExpandedPropertyForValue(CSSPropertyID propId, const CSSValue&amp;, bool);
</del><ins>+    void addProperty(CSSPropertyID, CSSPropertyID, Ref&lt;CSSValue&gt;&amp;&amp;, bool important, bool implicit = false);
+    void addExpandedPropertyForValue(CSSPropertyID propId, Ref&lt;CSSValue&gt;&amp;&amp;, bool);
</ins><span class="cx"> 
</span><span class="cx">     bool consumeBorder(bool important);
</span><span class="cx"> 
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">     bool consume4Values(const StylePropertyShorthand&amp;, bool important);
</span><span class="cx"> 
</span><span class="cx">     // Legacy parsing allows &lt;string&gt;s for animation-name
</span><del>-    bool consumeAnimationShorthand(const StylePropertyShorthand&amp;, bool useLegacyParsing, bool important);
</del><ins>+    bool consumeAnimationShorthand(const StylePropertyShorthand&amp;, bool important);
</ins><span class="cx">     bool consumeBackgroundShorthand(const StylePropertyShorthand&amp;, bool important);
</span><span class="cx"> 
</span><span class="cx">     bool consumeColumns(bool important);
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     Vector&lt;CSSProperty, 256&gt;* m_parsedProperties;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-CSSPropertyID unresolvedCSSPropertyID(StringView);
</del><ins>+CSSPropertyID cssPropertyID(StringView);
</ins><span class="cx"> CSSValueID cssValueKeywordID(StringView);
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParserHelperscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (range.peek().type() != IdentToken)
</span><span class="cx">         return nullptr;
</span><del>-    return CSSPrimitiveValue::createIdentifier(range.consumeIncludingWhitespace().id());
</del><ins>+    return CSSValuePool::singleton().createIdentifierValue(range.consumeIncludingWhitespace().id());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;CSSPrimitiveValue&gt; consumeIdentRange(CSSParserTokenRange&amp; range, CSSValueID lower, CSSValueID upper)
</span><span class="lines">@@ -333,11 +333,14 @@
</span><span class="cx">     return consumeIdent(range);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;CSSCustomIdentValue&gt; consumeCustomIdent(CSSParserTokenRange&amp; range)
</del><ins>+// FIXME-NEWPARSER: Eventually we'd like this to use CSSCustomIdentValue, but we need
+// to do other plumbing work first (like changing Pair to CSSValuePair and make it not
+// use only primitive values).
+RefPtr&lt;CSSPrimitiveValue&gt; consumeCustomIdent(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     if (range.peek().type() != IdentToken || isCSSWideKeyword(range.peek().id()))
</span><span class="cx">         return nullptr;
</span><del>-    return CSSCustomIdentValue::create(range.consumeIncludingWhitespace().value().toString());
</del><ins>+    return CSSValuePool::singleton().createValue(range.consumeIncludingWhitespace().value().toString(), CSSPrimitiveValue::UnitTypes::CSS_STRING);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;CSSPrimitiveValue&gt; consumeString(CSSParserTokenRange&amp; range)
</span><span class="lines">@@ -344,7 +347,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (range.peek().type() != StringToken)
</span><span class="cx">         return nullptr;
</span><del>-    return CSSPrimitiveValue::create(range.consumeIncludingWhitespace().value().toString(), CSSPrimitiveValue::UnitTypes::CSS_STRING);
</del><ins>+    return CSSValuePool::singleton().createValue(range.consumeIncludingWhitespace().value().toString(), CSSPrimitiveValue::UnitTypes::CSS_STRING);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> StringView consumeUrlAsStringView(CSSParserTokenRange&amp; range)
</span><span class="lines">@@ -1034,7 +1037,7 @@
</span><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><span class="cx">         RefPtr&lt;CSSValue&gt; image = CSSImageValue::create(completeURL(context, urlValue));
</span><del>-        imageSet-&gt;append(*image);
</del><ins>+        imageSet-&gt;append(image.releaseNonNull());
</ins><span class="cx"> 
</span><span class="cx">         const CSSParserToken&amp; token = args.consumeIncludingWhitespace();
</span><span class="cx">         if (token.type() != DimensionToken)
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParserHelpersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.h (207478 => 207479)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.h        2016-10-18 19:22:11 UTC (rev 207478)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.h        2016-10-18 20:03:18 UTC (rev 207479)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> template&lt;CSSValueID, CSSValueID...&gt; inline bool identMatches(CSSValueID id);
</span><span class="cx"> template&lt;CSSValueID... allowedIdents&gt; RefPtr&lt;CSSPrimitiveValue&gt; consumeIdent(CSSParserTokenRange&amp;);
</span><span class="cx"> 
</span><del>-RefPtr&lt;CSSCustomIdentValue&gt; consumeCustomIdent(CSSParserTokenRange&amp;);
</del><ins>+RefPtr&lt;CSSPrimitiveValue&gt; consumeCustomIdent(CSSParserTokenRange&amp;);
</ins><span class="cx"> RefPtr&lt;CSSPrimitiveValue&gt; consumeString(CSSParserTokenRange&amp;);
</span><span class="cx"> StringView consumeUrlAsStringView(CSSParserTokenRange&amp;);
</span><span class="cx"> RefPtr&lt;CSSPrimitiveValue&gt; consumeUrl(CSSParserTokenRange&amp;);
</span></span></pre>
</div>
</div>

</body>
</html>