<!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>[206007] 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/206007">206007</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2016-09-15 17:33:45 -0700 (Thu, 15 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Parser] Get CSSParserFastPaths.cpp compiling
https://bugs.webkit.org/show_bug.cgi?id=162033

Reviewed by Dean Jackson.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
Add new StyleColor.h/.cpp files to the projecty

* css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::CSSFunctionValue):
(WebCore::CSSFunctionValue::customCSSText):
(WebCore::CSSFunctionValue::append):
(WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
* css/CSSFunctionValue.h:
Tweak CSSFunctionValue so that the name can be represented as a keyword ID instead of a String. Eventually we also
want to make CSSFunctionValue subclass CSSValueList rather than referencing a separate CSSValueList as a member. For now
I left that alone though in order to not change too much in the old parser.

* css/CSSProperty.cpp:
(WebCore::CSSProperty::isDescriptorOnly):
Whether or not a property is only a descriptor, e.g., used in viewport and font face stuff.

* css/CSSProperty.h:
* css/CSSValueKeywords.in:
Added new keywords for functions that can be used as values. The new parser uses keywords to represent function names.

* css/StyleColor.cpp: Added.
(WebCore::StyleColor::colorFromKeyword):
(WebCore::StyleColor::isColorKeyword):
(WebCore::StyleColor::isSystemColor):
* css/StyleColor.h: Added.
(WebCore::StyleColor::StyleColor):
(WebCore::StyleColor::currentColor):
(WebCore::StyleColor::isCurrentColor):
(WebCore::StyleColor::getColor):
(WebCore::StyleColor::resolve):
(WebCore::operator==):
(WebCore::operator!=):
New color helper that contains code for checking and looking up colors. This code is similar to some code we already
had in the old CSSParser.cpp file, but this way it can be used outside the parser and/or in different files.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::parseSimpleLengthValue):
(WebCore::isColorPropertyID):
(WebCore::parseColorIntOrPercentage):
(WebCore::fastParseColorInternal):
(WebCore::CSSParserFastPaths::parseColor):
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::isUniversalKeyword):
(WebCore::parseKeywordValue):
(WebCore::parseTransformTranslateArguments):
(WebCore::parseTransformNumberArguments):
(WebCore::parseSimpleTransformValue):
(WebCore::transformCanLikelyUseFastPath):
(WebCore::parseSimpleTransformList):
(WebCore::parseSimpleTransform):
(WebCore::CSSParserFastPaths::maybeParseValue):
* css/parser/CSSParserFastPaths.h:
Get everything compiling in this file. Key changes included reverting to our old unit names, making CSSFunctionValue compatible,
adding support for StyleColor, adding support for mode checking of keywords, and fixing up the memory management model so that
RefPtrs are used on returns from parsing functions.

* css/parser/CSSParserIdioms.cpp:
(WebCore::isValueAllowedInMode):
* css/parser/CSSParserIdioms.h:
New helper function for restricting keywords to certain modes only. The -webkit-text color quirk has been moved to this function.</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="#trunkSourceWebCorecssCSSFunctionValuecpp">trunk/Source/WebCore/css/CSSFunctionValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFunctionValueh">trunk/Source/WebCore/css/CSSFunctionValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertycpp">trunk/Source/WebCore/css/CSSProperty.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyh">trunk/Source/WebCore/css/CSSProperty.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserFastPathscpp">trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserFastPathsh">trunk/Source/WebCore/css/parser/CSSParserFastPaths.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserIdiomscpp">trunk/Source/WebCore/css/parser/CSSParserIdioms.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserIdiomsh">trunk/Source/WebCore/css/parser/CSSParserIdioms.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssStyleColorcpp">trunk/Source/WebCore/css/StyleColor.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleColorh">trunk/Source/WebCore/css/StyleColor.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 (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -1332,6 +1332,7 @@
</span><span class="cx">     css/SVGCSSComputedStyleDeclaration.cpp
</span><span class="cx">     css/SelectorChecker.cpp
</span><span class="cx">     css/SelectorFilter.cpp
</span><ins>+    css/StyleColor.cpp
</ins><span class="cx">     css/StyleInvalidationAnalysis.cpp
</span><span class="cx">     css/StyleMedia.cpp
</span><span class="cx">     css/StyleProperties.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/ChangeLog        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -1,3 +1,73 @@
</span><ins>+2016-09-15  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
+        [CSS Parser] Get CSSParserFastPaths.cpp compiling
+        https://bugs.webkit.org/show_bug.cgi?id=162033
+
+        Reviewed by Dean Jackson.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        Add new StyleColor.h/.cpp files to the projecty
+
+        * css/CSSFunctionValue.cpp:
+        (WebCore::CSSFunctionValue::CSSFunctionValue):
+        (WebCore::CSSFunctionValue::customCSSText):
+        (WebCore::CSSFunctionValue::append):
+        (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables):
+        * css/CSSFunctionValue.h:
+        Tweak CSSFunctionValue so that the name can be represented as a keyword ID instead of a String. Eventually we also
+        want to make CSSFunctionValue subclass CSSValueList rather than referencing a separate CSSValueList as a member. For now
+        I left that alone though in order to not change too much in the old parser.
+
+        * css/CSSProperty.cpp:
+        (WebCore::CSSProperty::isDescriptorOnly):
+        Whether or not a property is only a descriptor, e.g., used in viewport and font face stuff.
+
+        * css/CSSProperty.h:
+        * css/CSSValueKeywords.in:
+        Added new keywords for functions that can be used as values. The new parser uses keywords to represent function names.
+
+        * css/StyleColor.cpp: Added.
+        (WebCore::StyleColor::colorFromKeyword):
+        (WebCore::StyleColor::isColorKeyword):
+        (WebCore::StyleColor::isSystemColor):
+        * css/StyleColor.h: Added.
+        (WebCore::StyleColor::StyleColor):
+        (WebCore::StyleColor::currentColor):
+        (WebCore::StyleColor::isCurrentColor):
+        (WebCore::StyleColor::getColor):
+        (WebCore::StyleColor::resolve):
+        (WebCore::operator==):
+        (WebCore::operator!=):
+        New color helper that contains code for checking and looking up colors. This code is similar to some code we already
+        had in the old CSSParser.cpp file, but this way it can be used outside the parser and/or in different files.
+
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::parseSimpleLengthValue):
+        (WebCore::isColorPropertyID):
+        (WebCore::parseColorIntOrPercentage):
+        (WebCore::fastParseColorInternal):
+        (WebCore::CSSParserFastPaths::parseColor):
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        (WebCore::isUniversalKeyword):
+        (WebCore::parseKeywordValue):
+        (WebCore::parseTransformTranslateArguments):
+        (WebCore::parseTransformNumberArguments):
+        (WebCore::parseSimpleTransformValue):
+        (WebCore::transformCanLikelyUseFastPath):
+        (WebCore::parseSimpleTransformList):
+        (WebCore::parseSimpleTransform):
+        (WebCore::CSSParserFastPaths::maybeParseValue):
+        * css/parser/CSSParserFastPaths.h:
+        Get everything compiling in this file. Key changes included reverting to our old unit names, making CSSFunctionValue compatible,
+        adding support for StyleColor, adding support for mode checking of keywords, and fixing up the memory management model so that
+        RefPtrs are used on returns from parsing functions.
+
+        * css/parser/CSSParserIdioms.cpp:
+        (WebCore::isValueAllowedInMode):
+        * css/parser/CSSParserIdioms.h:
+        New helper function for restricting keywords to certain modes only. The -webkit-text color quirk has been moved to this function.
+
</ins><span class="cx"> 2016-09-15  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WKWebView.hasOnlySecureContent always returns &quot;YES&quot; after going back to a CachedPage (even if it has http resources).
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -3339,6 +3339,8 @@
</span><span class="cx">                 93F9B7A00BA6032600854064 /* JSCDATASection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F9B79E0BA6032600854064 /* JSCDATASection.cpp */; };
</span><span class="cx">                 93F9B7A10BA6032600854064 /* JSCDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F9B79F0BA6032600854064 /* JSCDATASection.h */; };
</span><span class="cx">                 93FDAFCA0B11307400E2746F /* EditorInsertAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FDAFC90B11307400E2746F /* EditorInsertAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                9418278A1D8B244000492764 /* StyleColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 941827881D8B242200492764 /* StyleColor.cpp */; };
+                9418278B1D8B244000492764 /* StyleColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 941827891D8B242200492764 /* StyleColor.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">@@ -9377,8 +9379,8 @@
</span><span class="cx">                 5C5381AF1D8793E000E2EBE6 /* URLSearchParams.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = URLSearchParams.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C5381B01D87D45700E2EBE6 /* URLSearchParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLSearchParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C5381B11D87D45700E2EBE6 /* URLSearchParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLSearchParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                5C5381B31D87E08100E2EBE6 /* JSURLSearchParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSURLSearchParams.cpp; path = JSURLSearchParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                5C5381B41D87E08100E2EBE6 /* JSURLSearchParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSURLSearchParams.h; path = JSURLSearchParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                5C5381B31D87E08100E2EBE6 /* JSURLSearchParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSURLSearchParams.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                5C5381B41D87E08100E2EBE6 /* JSURLSearchParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSURLSearchParams.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 5C688AA01D380509000B54FA /* ThreadableWebSocketChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadableWebSocketChannel.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C688AA21D38126F000B54FA /* SocketProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketProvider.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5C6E653F1D5CEDC900F7862E /* URLParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -10507,6 +10509,8 @@
</span><span class="cx">                 93F9B79E0BA6032600854064 /* JSCDATASection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCDATASection.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93F9B79F0BA6032600854064 /* JSCDATASection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCDATASection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</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><ins>+                941827881D8B242200492764 /* StyleColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleColor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                941827891D8B242200492764 /* StyleColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleColor.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">@@ -22548,6 +22552,8 @@
</span><span class="cx">                                 8386A96C19F61B2E00E1EC4A /* StyleBuilder.h */,
</span><span class="cx">                                 83B9687919F8AB83004EF7AF /* StyleBuilderConverter.h */,
</span><span class="cx">                                 835D363619FF6193004C93AB /* StyleBuilderCustom.h */,
</span><ins>+                                941827881D8B242200492764 /* StyleColor.cpp */,
+                                941827891D8B242200492764 /* StyleColor.h */,
</ins><span class="cx">                                 E47A97CE163059FC005DCD99 /* StyleInvalidationAnalysis.cpp */,
</span><span class="cx">                                 E47A97CF163059FC005DCD99 /* StyleInvalidationAnalysis.h */,
</span><span class="cx">                                 0FF5026E102BA9660066F39A /* StyleMedia.cpp */,
</span><span class="lines">@@ -25657,6 +25663,7 @@
</span><span class="cx">                                 CEEFCD7A19DB31F7003876D7 /* MediaResourceLoader.h in Headers */,
</span><span class="cx">                                 1BF9DB3C1D3973AD0026AEB7 /* MediaSample.h in Headers */,
</span><span class="cx">                                 1B124D8D1D380B7000ECDFB0 /* MediaSampleAVFObjC.h in Headers */,
</span><ins>+                                9418278B1D8B244000492764 /* StyleColor.h in Headers */,
</ins><span class="cx">                                 CDBEAEAD19D92B6C00BEBA88 /* MediaSelectionGroupAVFObjC.h in Headers */,
</span><span class="cx">                                 C9027F421B1D0AD200BFBFEF /* MediaSession.h in Headers */,
</span><span class="cx">                                 C9F87CFE1B28F40E00979B83 /* MediaSessionEvents.h in Headers */,
</span><span class="lines">@@ -27973,6 +27980,7 @@
</span><span class="cx">                                 5C9A7A761AA0F6ED00958ACF /* DFABytecodeInterpreter.cpp in Sources */,
</span><span class="cx">                                 26A807841B18F97700E219BE /* DFACombiner.cpp in Sources */,
</span><span class="cx">                                 26A517FD1AB92238006335DF /* DFAMinimizer.cpp in Sources */,
</span><ins>+                                9418278A1D8B244000492764 /* StyleColor.cpp in Sources */,
</ins><span class="cx">                                 26D4E8461B42539D00E033A2 /* DFANode.cpp in Sources */,
</span><span class="cx">                                 CD37B39815C1B971006DC898 /* DiagnosticLoggingKeys.cpp in Sources */,
</span><span class="cx">                                 CECADFC6153778FF00E37068 /* DictationAlternative.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFunctionValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFunctionValue.cpp (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFunctionValue.cpp        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/CSSFunctionValue.cpp        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> CSSFunctionValue::CSSFunctionValue(CSSParserFunction* function)
</span><span class="cx">     : CSSValue(FunctionClass)
</span><del>-    , m_name(function-&gt;name)
</del><ins>+    , m_nameDeprecated(function-&gt;name)
</ins><span class="cx">     , m_args(function-&gt;args ? RefPtr&lt;CSSValueList&gt;(CSSValueList::createFromParserValueList(*function-&gt;args)) : nullptr)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -41,15 +41,25 @@
</span><span class="cx"> 
</span><span class="cx"> CSSFunctionValue::CSSFunctionValue(const String&amp; name, Ref&lt;CSSValueList&gt;&amp;&amp; args)
</span><span class="cx">     : CSSValue(FunctionClass)
</span><del>-    , m_name(name)
</del><ins>+    , m_nameDeprecated(name)
</ins><span class="cx">     , m_args(WTFMove(args))
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CSSFunctionValue::CSSFunctionValue(CSSValueID keyword)
+    : CSSValue(FunctionClass)
+    , m_name(keyword)
+{
+}
+    
</ins><span class="cx"> String CSSFunctionValue::customCSSText() const
</span><span class="cx"> {
</span><span class="cx">     StringBuilder result;
</span><del>-    result.append(m_name); // Includes the '('
</del><ins>+    if (m_name != CSSValueInvalid) {
+        result.append(getValueName(m_name));
+        result.append('(');
+    } else
+        result.append(m_nameDeprecated); // Includes the '('
</ins><span class="cx">     if (m_args)
</span><span class="cx">         result.append(m_args-&gt;cssText());
</span><span class="cx">     result.append(')');
</span><span class="lines">@@ -61,12 +71,19 @@
</span><span class="cx">     return m_name == other.m_name &amp;&amp; compareCSSValuePtr(m_args, other.m_args);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CSSFunctionValue::append(Ref&lt;CSSValue&gt;&amp;&amp; value)
+{
+    if (!m_args)
+        m_args = CSSValueList::createCommaSeparated();
+    m_args-&gt;append(WTFMove(value));
+}
+    
</ins><span class="cx"> bool CSSFunctionValue::buildParserValueSubstitutingVariables(CSSParserValue* result, const CustomPropertyValueMap&amp; customProperties) const
</span><span class="cx"> {
</span><span class="cx">     result-&gt;id = CSSValueInvalid;
</span><span class="cx">     result-&gt;unit = CSSParserValue::Function;
</span><span class="cx">     result-&gt;function = new CSSParserFunction;
</span><del>-    result-&gt;function-&gt;name.init(m_name);
</del><ins>+    result-&gt;function-&gt;name.init(m_nameDeprecated);
</ins><span class="cx">     bool success = true;
</span><span class="cx">     if (m_args) {
</span><span class="cx">         CSSParserValueList* argList = new CSSParserValueList;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFunctionValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFunctionValue.h (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFunctionValue.h        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/CSSFunctionValue.h        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CSSValue.h&quot;
</span><ins>+#include &quot;CSSValueKeywords.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -33,6 +34,7 @@
</span><span class="cx"> struct CSSParserFunction;
</span><span class="cx"> struct CSSParserValue;
</span><span class="cx"> 
</span><ins>+// FIXME-NEWPARSER: This can just *be* a CSSValueList subclass.
</ins><span class="cx"> class CSSFunctionValue final : public CSSValue {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;CSSFunctionValue&gt; create(CSSParserFunction* function)
</span><span class="lines">@@ -45,6 +47,11 @@
</span><span class="cx">         return adoptRef(*new CSSFunctionValue(name, WTFMove(args)));
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    static Ref&lt;CSSFunctionValue&gt; create(CSSValueID keyword)
+    {
+        return adoptRef(*new CSSFunctionValue(keyword));
+    }
+    
</ins><span class="cx">     String customCSSText() const;
</span><span class="cx"> 
</span><span class="cx">     bool equals(const CSSFunctionValue&amp;) const;
</span><span class="lines">@@ -52,12 +59,18 @@
</span><span class="cx">     CSSValueList* arguments() const { return m_args.get(); }
</span><span class="cx"> 
</span><span class="cx">     bool buildParserValueSubstitutingVariables(CSSParserValue*, const CustomPropertyValueMap&amp; customProperties) const;
</span><del>-    
</del><ins>+
+    void append(Ref&lt;CSSValue&gt;&amp;&amp;);
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit CSSFunctionValue(CSSParserFunction*);
</span><span class="cx">     CSSFunctionValue(const String&amp;, Ref&lt;CSSValueList&gt;&amp;&amp;);
</span><ins>+    CSSFunctionValue(CSSValueID);
</ins><span class="cx"> 
</span><del>-    String m_name;
</del><ins>+    CSSValueID m_name { CSSValueInvalid };
+
+    // FIXME-NEWPARSER: Remove these.
+    String m_nameDeprecated;
</ins><span class="cx">     RefPtr&lt;CSSValueList&gt; m_args;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSProperty.cpp (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSProperty.cpp        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/CSSProperty.cpp        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -154,6 +154,23 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool CSSProperty::isDescriptorOnly(CSSPropertyID propertyID)
+{
+    switch (propertyID) {
+#if ENABLE(CSS_DEVICE_ADAPTATION)
+    case CSSPropertyMinZoom:
+    case CSSPropertyMaxZoom:
+    case CSSPropertyOrientation:
+    case CSSPropertyUserZoom:
+#endif
+    case CSSPropertySrc:
+    case CSSPropertyUnicodeRange:
+        return true;
+    default:
+        return false;
+    }
+}
+
</ins><span class="cx"> bool CSSProperty::isDirectionAwareProperty(CSSPropertyID propertyID)
</span><span class="cx"> {
</span><span class="cx">     switch (propertyID) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSProperty.h (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSProperty.h        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/CSSProperty.h        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx">     static CSSPropertyID resolveDirectionAwareProperty(CSSPropertyID, TextDirection, WritingMode);
</span><span class="cx">     static bool isInheritedProperty(CSSPropertyID);
</span><span class="cx">     static bool isDirectionAwareProperty(CSSPropertyID);
</span><ins>+    static bool isDescriptorOnly(CSSPropertyID);
</ins><span class="cx"> 
</span><span class="cx">     const StylePropertyMetadata&amp; metadata() const { return m_metadata; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -1149,6 +1149,88 @@
</span><span class="cx"> // none
</span><span class="cx"> scale-down
</span><span class="cx"> 
</span><ins>+// background-image, etc.
+linear-gradient
+radial-gradient
+repeating-linear-gradient
+repeating-radial-gradient
+paint
+-webkit-cross-fade
+-webkit-gradient
+-webkit-linear-gradient
+-webkit-radial-gradient
+-webkit-repeating-linear-gradient
+-webkit-repeating-radial-gradient
+-webkit-image-set
+
+// deprecated gradients
+from
+to
+color-stop
+radial
+
+// content
+attr
+counter
+counters
+
+// clip
+rect
+
+// shapes
+polygon
+
+// @font-face src
+format
+
+// (-webkit-)filter
+// invert
+grayscale
+sepia
+saturate
+hue-rotate
+opacity
+brightness
+contrast
+blur
+drop-shadow
+url
+
+// colors
+rgb
+rgba
+hsl
+hsla
+
+// transform
+matrix
+matrix3d
+perspective
+rotate
+rotateX
+rotateY
+rotateZ
+rotate3d
+scale
+scaleX
+scaleY
+scaleZ
+scale3d
+skew
+skewX
+skewY
+translate
+translateX
+translateY
+translateZ
+translate3d
+
+// motion path
+path
+
+calc
+-webkit-calc
+
</ins><span class="cx"> #if defined(ENABLE_CSS_IMAGE_RESOLUTION) &amp;&amp; ENABLE_CSS_IMAGE_RESOLUTION
</span><span class="cx"> from-image
</span><span class="cx"> snap
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleColorcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/StyleColor.cpp (0 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleColor.cpp                                (rev 0)
+++ trunk/Source/WebCore/css/StyleColor.cpp        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2015 Google Inc. 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;StyleColor.h&quot;
+
+#include &quot;HashTools.h&quot;
+#include &quot;RenderTheme.h&quot;
+
+namespace WebCore {
+
+Color StyleColor::colorFromKeyword(CSSValueID keyword)
+{
+    if (const char* valueName = getValueName(keyword)) {
+        if (const NamedColor* namedColor = findColor(valueName, strlen(valueName)))
+            return Color(namedColor-&gt;ARGBValue);
+    }
+    return RenderTheme::defaultTheme()-&gt;systemColor(keyword);
+}
+
+bool StyleColor::isColorKeyword(CSSValueID id)
+{
+    return (id &gt;= CSSValueAlpha &amp;&amp; id &lt;= CSSValueWebkitText) || id == CSSValueMenu;
+}
+
+bool StyleColor::isSystemColor(CSSValueID id)
+{
+    return (id &gt;= CSSValueActiveborder &amp;&amp; id &lt;= CSSValueAppleSystemYellow) || id == CSSValueMenu || id == CSSValueWebkitFocusRingColor;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorecssStyleColorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/StyleColor.h (0 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleColor.h                                (rev 0)
+++ trunk/Source/WebCore/css/StyleColor.h        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+/*
+ * Copyright (C) 2013 Google Inc. 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;CSSValueKeywords.h&quot;
+#include &quot;Color.h&quot;
+
+namespace WebCore {
+
+class StyleColor {
+public:
+    StyleColor()
+        : m_currentColor(true) { }
+    StyleColor(Color color)
+        : m_color(color)
+        , m_currentColor(false) { }
+    static StyleColor currentColor() { return StyleColor(); }
+
+    bool isCurrentColor() const { return m_currentColor; }
+    Color getColor() const { ASSERT(!isCurrentColor()); return m_color; }
+
+    Color resolve(Color currentColor) const { return m_currentColor ? currentColor : m_color; }
+
+    static Color colorFromKeyword(CSSValueID);
+    static bool isColorKeyword(CSSValueID);
+    static bool isSystemColor(CSSValueID);
+
+private:
+    Color m_color;
+    bool m_currentColor;
+};
+
+inline bool operator==(const StyleColor&amp; a, const StyleColor&amp; b)
+{
+    if (a.isCurrentColor() || b.isCurrentColor())
+        return a.isCurrentColor() &amp;&amp; b.isCurrentColor();
+    return a.getColor() == b.getColor();
+}
+
+inline bool operator!=(const StyleColor&amp; a, const StyleColor&amp; b)
+{
+    return !(a == b);
+}
+
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserFastPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CSSParserFastPaths.h&quot;
</span><span class="cx"> 
</span><del>-// FIXME-NEWPARSER: #include &quot;CSSColorValue.h&quot;
</del><span class="cx"> #include &quot;CSSFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSInheritedValue.h&quot;
</span><span class="cx"> #include &quot;CSSInitialValue.h&quot;
</span><span class="lines">@@ -37,15 +36,15 @@
</span><span class="cx"> #include &quot;CSSParserIdioms.h&quot;
</span><span class="cx"> #include &quot;CSSPrimitiveValue.h&quot;
</span><span class="cx"> #include &quot;CSSPropertyParser.h&quot;
</span><ins>+#include &quot;CSSValueList.h&quot;
+#include &quot;CSSValuePool.h&quot;
</ins><span class="cx"> #include &quot;HTMLParserIdioms.h&quot;
</span><span class="cx"> #include &quot;RuntimeEnabledFeatures.h&quot;
</span><del>-// FIXME-NEWPARSER: #include &quot;StyleColor.h&quot;
</del><ins>+#include &quot;StyleColor.h&quot;
</ins><span class="cx"> #include &quot;StylePropertyShorthand.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-/* FIXME-NEWPARSER: Turn off for now.

</del><span class="cx"> static inline bool isSimpleLengthPropertyID(CSSPropertyID propertyId, bool&amp; acceptsNegativeNumbers)
</span><span class="cx"> {
</span><span class="cx">     switch (propertyId) {
</span><span class="lines">@@ -120,7 +119,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* parseSimpleLengthValue(CSSPropertyID propertyId, const String&amp; string, CSSParserMode cssParserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; parseSimpleLengthValue(CSSPropertyID propertyId, const String&amp; string, CSSParserMode cssParserMode)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!string.isEmpty());
</span><span class="cx">     bool acceptsNegativeNumbers = false;
</span><span class="lines">@@ -131,7 +130,7 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned length = string.length();
</span><span class="cx">     double number;
</span><del>-    CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::UnitTypes::Number;
</del><ins>+    CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::UnitTypes::CSS_NUMBER;
</ins><span class="cx"> 
</span><span class="cx">     if (string.is8Bit()) {
</span><span class="cx">         if (!parseSimpleLength(string.characters8(), length, unit, number))
</span><span class="lines">@@ -141,12 +140,10 @@
</span><span class="cx">             return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (unit == CSSPrimitiveValue::UnitTypes::Number) {
-        if (cssParserMode == SVGAttributeMode)
-            unit = CSSPrimitiveValue::UnitTypes::UserUnits;
-        else if (!number)
-            unit = CSSPrimitiveValue::UnitTypes::Pixels;
-        else
</del><ins>+    if (unit == CSSPrimitiveValue::UnitTypes::CSS_NUMBER) {
+        if (!number)
+            unit = CSSPrimitiveValue::UnitTypes::CSS_PX;
+        else if (cssParserMode != SVGAttributeMode)
</ins><span class="cx">             return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -179,7 +176,7 @@
</span><span class="cx">     case CSSPropertyWebkitTextEmphasisColor:
</span><span class="cx">     case CSSPropertyWebkitTextFillColor:
</span><span class="cx">     case CSSPropertyWebkitTextStrokeColor:
</span><del>-    case CSSPropertyTextDecorationColor:
</del><ins>+    case CSSPropertyWebkitTextDecorationColor:
</ins><span class="cx">         return true;
</span><span class="cx">     default:
</span><span class="cx">         return false;
</span><span class="lines">@@ -284,7 +281,7 @@
</span><span class="cx">     if (current == end)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (expect == CSSPrimitiveValue::UnitTypes::Number &amp;&amp; (*current == '.' || *current == '%'))
</del><ins>+    if (expect == CSSPrimitiveValue::UnitTypes::CSS_NUMBER &amp;&amp; (*current == '.' || *current == '%'))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (*current == '.') {
</span><span class="lines">@@ -300,11 +297,11 @@
</span><span class="cx">         localValue += percentage;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (expect == CSSPrimitiveValue::UnitTypes::Percentage &amp;&amp; *current != '%')
</del><ins>+    if (expect == CSSPrimitiveValue::UnitTypes::CSS_PERCENTAGE &amp;&amp; *current != '%')
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (*current == '%') {
</span><del>-        expect = CSSPrimitiveValue::UnitTypes::Percentage;
</del><ins>+        expect = CSSPrimitiveValue::UnitTypes::CSS_PERCENTAGE;
</ins><span class="cx">         localValue = localValue / 100.0 * 256.0;
</span><span class="cx">         // Clamp values at 255 for percentages over 100%
</span><span class="cx">         if (localValue &gt; 255)
</span><span class="lines">@@ -311,7 +308,7 @@
</span><span class="cx">             localValue = 255;
</span><span class="cx">         current++;
</span><span class="cx">     } else {
</span><del>-        expect = CSSPrimitiveValue::UnitTypes::Number;
</del><ins>+        expect = CSSPrimitiveValue::UnitTypes::CSS_NUMBER;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     while (current != end &amp;&amp; isHTMLSpace&lt;CharacterType&gt;(*current))
</span><span class="lines">@@ -416,7 +413,7 @@
</span><span class="cx"> template &lt;typename CharacterType&gt;
</span><span class="cx"> static bool fastParseColorInternal(RGBA32&amp; rgb, const CharacterType* characters, unsigned length, bool quirksMode)
</span><span class="cx"> {
</span><del>-    CSSPrimitiveValue::UnitTypes expect = CSSPrimitiveValue::UnitTypes::Unknown;
</del><ins>+    CSSPrimitiveValue::UnitTypes expect = CSSPrimitiveValue::UnitTypes::CSS_UNKNOWN;
</ins><span class="cx"> 
</span><span class="cx">     if (length &gt;= 4 &amp;&amp; characters[0] == '#')
</span><span class="cx">         return Color::parseHexColor(characters + 1, length - 1, rgb);
</span><span class="lines">@@ -471,7 +468,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSValue* CSSParserFastPaths::parseColor(const String&amp; string, CSSParserMode parserMode)
</del><ins>+RefPtr&lt;CSSValue&gt; CSSParserFastPaths::parseColor(const String&amp; string, CSSParserMode parserMode)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!string.isEmpty());
</span><span class="cx">     CSSValueID valueID = cssValueKeywordID(string);
</span><span class="lines">@@ -492,7 +489,7 @@
</span><span class="cx">         parseResult = fastParseColorInternal(color, string.characters16(), string.length(), quirksMode);
</span><span class="cx">     if (!parseResult)
</span><span class="cx">         return nullptr;
</span><del>-    return CSSColorValue::create(color);
</del><ins>+    return CSSValuePool::singleton().createColorValue(color);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId, CSSValueID valueID, CSSParserMode parserMode)
</span><span class="lines">@@ -537,9 +534,9 @@
</span><span class="cx">         return valueID == CSSValueNonzero || valueID == CSSValueEvenodd;
</span><span class="cx">     case CSSPropertyColorInterpolation:
</span><span class="cx">     case CSSPropertyColorInterpolationFilters:
</span><del>-        return valueID == CSSValueAuto || valueID == CSSValueSRGB || valueID == CSSValueLinearRGB;
</del><ins>+        return valueID == CSSValueAuto || valueID == CSSValueSrgb || valueID == CSSValueLinearrgb;
</ins><span class="cx">     case CSSPropertyColorRendering:
</span><del>-        return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || valueID == CSSValueOptimizeQuality;
</del><ins>+        return valueID == CSSValueAuto || valueID == CSSValueOptimizespeed || valueID == CSSValueOptimizequality;
</ins><span class="cx">     case CSSPropertyDirection: // ltr | rtl
</span><span class="cx">         return valueID == CSSValueLtr || valueID == CSSValueRtl;
</span><span class="cx">     case CSSPropertyDisplay:
</span><span class="lines">@@ -548,7 +545,10 @@
</span><span class="cx">         // table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none
</span><span class="cx">         // flex | inline-flex | -webkit-flex | -webkit-inline-flex | grid | inline-grid
</span><span class="cx">         return (valueID &gt;= CSSValueInline &amp;&amp; valueID &lt;= CSSValueInlineFlex) || valueID == CSSValueWebkitFlex || valueID == CSSValueWebkitInlineFlex || valueID == CSSValueNone
</span><del>-            || (RuntimeEnabledFeatures::cssGridLayoutEnabled() &amp;&amp; (valueID == CSSValueGrid || valueID == CSSValueInlineGrid));
</del><ins>+#if ENABLE(CSS_GRID_LAYOUT)
+            || (RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled() &amp;&amp; (valueID == CSSValueGrid || valueID == CSSValueInlineGrid))
+#endif
+        ;
</ins><span class="cx">     case CSSPropertyDominantBaseline:
</span><span class="cx">         // auto | use-script | no-change | reset-size | ideographic |
</span><span class="cx">         // alphabetic | hanging | mathematical | central | middle |
</span><span class="lines">@@ -566,8 +566,10 @@
</span><span class="cx">         return valueID == CSSValueNormal || (valueID &gt;= CSSValueUltraCondensed &amp;&amp; valueID &lt;= CSSValueUltraExpanded);
</span><span class="cx">     case CSSPropertyImageRendering: // auto | optimizeContrast | pixelated
</span><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueWebkitOptimizeContrast || valueID == CSSValuePixelated;
</span><ins>+#if ENABLE(CSS_COMPOSITING)
</ins><span class="cx">     case CSSPropertyIsolation: // auto | isolate
</span><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueIsolate;
</span><ins>+#endif
</ins><span class="cx">     case CSSPropertyListStylePosition: // inside | outside
</span><span class="cx">         return valueID == CSSValueInside || valueID == CSSValueOutside;
</span><span class="cx">     case CSSPropertyListStyleType:
</span><span class="lines">@@ -580,8 +582,9 @@
</span><span class="cx">         return valueID == CSSValueFill || valueID == CSSValueContain || valueID == CSSValueCover || valueID == CSSValueNone || valueID == CSSValueScaleDown;
</span><span class="cx">     case CSSPropertyOutlineStyle: // (&lt;border-style&gt; except hidden) | auto
</span><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueNone || (valueID &gt;= CSSValueInset &amp;&amp; valueID &lt;= CSSValueDouble);
</span><del>-    case CSSPropertyOverflowAnchor:
-        return valueID == CSSValueVisible || valueID == CSSValueNone || valueID == CSSValueAuto;
</del><ins>+    // FIXME-NEWPARSER: Support?
+    // case CSSPropertyOverflowAnchor:
+    //    return valueID == CSSValueVisible || valueID == CSSValueNone || valueID == CSSValueAuto;
</ins><span class="cx">     case CSSPropertyOverflowWrap: // normal | break-word
</span><span class="cx">     case CSSPropertyWordWrap:
</span><span class="cx">         return valueID == CSSValueNormal || valueID == CSSValueBreakWord;
</span><span class="lines">@@ -597,16 +600,17 @@
</span><span class="cx">     case CSSPropertyPointerEvents:
</span><span class="cx">         // none | visiblePainted | visibleFill | visibleStroke | visible |
</span><span class="cx">         // painted | fill | stroke | auto | all | bounding-box
</span><del>-        return valueID == CSSValueVisible || valueID == CSSValueNone || valueID == CSSValueAll || valueID == CSSValueAuto || (valueID &gt;= CSSValueVisiblePainted &amp;&amp; valueID &lt;= CSSValueBoundingBox);
</del><ins>+        return valueID == CSSValueVisible || valueID == CSSValueNone || valueID == CSSValueAll || valueID == CSSValueAuto || (valueID &gt;= CSSValueVisiblepainted &amp;&amp; valueID &lt;= CSSValueStroke);
</ins><span class="cx">     case CSSPropertyPosition: // static | relative | absolute | fixed | sticky
</span><del>-        return valueID == CSSValueStatic || valueID == CSSValueRelative || valueID == CSSValueAbsolute || valueID == CSSValueFixed || (RuntimeEnabledFeatures::cssStickyPositionEnabled() &amp;&amp; valueID == CSSValueSticky);
</del><ins>+        return valueID == CSSValueStatic || valueID == CSSValueRelative || valueID == CSSValueAbsolute || valueID == CSSValueFixed || valueID == CSSValueWebkitSticky;
</ins><span class="cx">     case CSSPropertyResize: // none | both | horizontal | vertical | auto
</span><span class="cx">         return valueID == CSSValueNone || valueID == CSSValueBoth || valueID == CSSValueHorizontal || valueID == CSSValueVertical || valueID == CSSValueAuto;
</span><del>-    case CSSPropertyScrollBehavior: // auto | smooth
-        ASSERT(RuntimeEnabledFeatures::cssomSmoothScrollEnabled());
-        return valueID == CSSValueAuto || valueID == CSSValueSmooth;
</del><ins>+    // FIXME-NEWPARSER: Investigate this property.
+    // case CSSPropertyScrollBehavior: // auto | smooth
+    //     ASSERT(RuntimeEnabledFeatures::cssomSmoothScrollEnabled());
+    //   return valueID == CSSValueAuto || valueID == CSSValueSmooth;
</ins><span class="cx">     case CSSPropertyShapeRendering:
</span><del>-        return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || valueID == CSSValueCrispEdges || valueID == CSSValueGeometricPrecision;
</del><ins>+        return valueID == CSSValueAuto || valueID == CSSValueOptimizespeed || valueID == CSSValueCrispEdges || valueID == CSSValueGeometricprecision;
</ins><span class="cx">     case CSSPropertySpeak: // none | normal | spell-out | digits | literal-punctuation | no-punctuation
</span><span class="cx">         return valueID == CSSValueNone || valueID == CSSValueNormal || valueID == CSSValueSpellOut || valueID == CSSValueDigits || valueID == CSSValueLiteralPunctuation || valueID == CSSValueNoPunctuation;
</span><span class="cx">     case CSSPropertyStrokeLinejoin:
</span><span class="lines">@@ -616,30 +620,32 @@
</span><span class="cx">     case CSSPropertyTableLayout: // auto | fixed
</span><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueFixed;
</span><span class="cx">     case CSSPropertyTextAlign:
</span><del>-        return (valueID &gt;= CSSValueWebkitAuto &amp;&amp; valueID &lt;= CSSValueInternalCenter) || valueID == CSSValueStart || valueID == CSSValueEnd;
-    case CSSPropertyTextAlignLast:
</del><ins>+        return (valueID &gt;= CSSValueWebkitAuto &amp;&amp; valueID &lt;= CSSValueWebkitMatchParent) || valueID == CSSValueStart || valueID == CSSValueEnd;
+#if ENABLE(CSS3_TEXT)
+    case CSSPropertyWebkitTextAlignLast:
</ins><span class="cx">         // auto | start | end | left | right | center | justify
</span><span class="cx">         return (valueID &gt;= CSSValueLeft &amp;&amp; valueID &lt;= CSSValueJustify) || valueID == CSSValueStart || valueID == CSSValueEnd || valueID == CSSValueAuto;
</span><ins>+#endif
</ins><span class="cx">     case CSSPropertyTextAnchor:
</span><span class="cx">         return valueID == CSSValueStart || valueID == CSSValueMiddle || valueID == CSSValueEnd;
</span><del>-    case CSSPropertyTextCombineUpright:
-        return valueID == CSSValueNone || valueID == CSSValueAll;
-    case CSSPropertyTextDecorationStyle:
</del><ins>+// FIXME-NEWPARSER: Support
+//    case CSSPropertyTextCombineUpright:
+//        return valueID == CSSValueNone || valueID == CSSValueAll;
+    case CSSPropertyWebkitTextDecorationStyle:
</ins><span class="cx">         // solid | double | dotted | dashed | wavy
</span><del>-        ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled());
</del><span class="cx">         return valueID == CSSValueSolid || valueID == CSSValueDouble || valueID == CSSValueDotted || valueID == CSSValueDashed || valueID == CSSValueWavy;
</span><del>-    case CSSPropertyTextJustify:
</del><ins>+#if ENABLE(CSS3_TEXT)
+    case CSSPropertyWebkitTextJustify:
</ins><span class="cx">         // auto | none | inter-word | distribute
</span><span class="cx">         ASSERT(RuntimeEnabledFeatures::css3TextEnabled());
</span><span class="cx">         return valueID == CSSValueInterWord || valueID == CSSValueDistribute || valueID == CSSValueAuto || valueID == CSSValueNone;
</span><del>-    case CSSPropertyTextOrientation: // mixed | upright | sideways | sideways-right
</del><ins>+#endif
+    case CSSPropertyWebkitTextOrientation: // mixed | upright | sideways | sideways-right
</ins><span class="cx">         return valueID == CSSValueMixed || valueID == CSSValueUpright || valueID == CSSValueSideways || valueID == CSSValueSidewaysRight;
</span><del>-    case CSSPropertyWebkitTextOrientation:
-        return valueID == CSSValueSideways || valueID == CSSValueSidewaysRight || valueID == CSSValueVerticalRight || valueID == CSSValueUpright;
</del><span class="cx">     case CSSPropertyTextOverflow: // clip | ellipsis
</span><span class="cx">         return valueID == CSSValueClip || valueID == CSSValueEllipsis;
</span><span class="cx">     case CSSPropertyTextRendering: // auto | optimizeSpeed | optimizeLegibility | geometricPrecision
</span><del>-        return valueID == CSSValueAuto || valueID == CSSValueOptimizeSpeed || valueID == CSSValueOptimizeLegibility || valueID == CSSValueGeometricPrecision;
</del><ins>+        return valueID == CSSValueAuto || valueID == CSSValueOptimizespeed || valueID == CSSValueOptimizelegibility || valueID == CSSValueGeometricprecision;
</ins><span class="cx">     case CSSPropertyTextTransform: // capitalize | uppercase | lowercase | none
</span><span class="cx">         return (valueID &gt;= CSSValueCapitalize &amp;&amp; valueID &lt;= CSSValueLowercase) || valueID == CSSValueNone;
</span><span class="cx">     case CSSPropertyUnicodeBidi:
</span><span class="lines">@@ -646,7 +652,7 @@
</span><span class="cx">         return valueID == CSSValueNormal || valueID == CSSValueEmbed
</span><span class="cx">             || valueID == CSSValueBidiOverride || valueID == CSSValueWebkitIsolate
</span><span class="cx">             || valueID == CSSValueWebkitIsolateOverride || valueID == CSSValueWebkitPlaintext
</span><del>-            || valueID == CSSValueIsolate || valueID == CSSValueIsolateOverride || valueID == CSSValuePlaintext;
</del><ins>+            || valueID == CSSValueIsolate || valueID == CSSValueWebkitIsolateOverride || valueID == CSSValueWebkitPlaintext;
</ins><span class="cx">     case CSSPropertyVectorEffect:
</span><span class="cx">         return valueID == CSSValueNone || valueID == CSSValueNonScalingStroke;
</span><span class="cx">     case CSSPropertyVisibility: // visible | hidden | collapse
</span><span class="lines">@@ -653,13 +659,15 @@
</span><span class="cx">         return valueID == CSSValueVisible || valueID == CSSValueHidden || valueID == CSSValueCollapse;
</span><span class="cx">     case CSSPropertyWebkitAppearance:
</span><span class="cx">         return (valueID &gt;= CSSValueCheckbox &amp;&amp; valueID &lt;= CSSValueTextarea) || valueID == CSSValueNone;
</span><del>-    case CSSPropertyBackfaceVisibility:
</del><ins>+    case CSSPropertyWebkitBackfaceVisibility:
</ins><span class="cx">         return valueID == CSSValueVisible || valueID == CSSValueHidden;
</span><ins>+#if ENABLE(CSS_COMPOSITING)
</ins><span class="cx">     case CSSPropertyMixBlendMode:
</span><span class="cx">         return valueID == CSSValueNormal || valueID == CSSValueMultiply || valueID == CSSValueScreen || valueID == CSSValueOverlay
</span><span class="cx">             || valueID == CSSValueDarken || valueID == CSSValueLighten || valueID == CSSValueColorDodge || valueID == CSSValueColorBurn
</span><span class="cx">             || valueID == CSSValueHardLight || valueID == CSSValueSoftLight || valueID == CSSValueDifference || valueID == CSSValueExclusion
</span><span class="cx">             || valueID == CSSValueHue || valueID == CSSValueSaturation || valueID == CSSValueColor || valueID == CSSValueLuminosity;
</span><ins>+#endif
</ins><span class="cx">     case CSSPropertyWebkitBoxAlign:
</span><span class="cx">         return valueID == CSSValueStretch || valueID == CSSValueStart || valueID == CSSValueEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline;
</span><span class="cx">     case CSSPropertyWebkitBoxDecorationBreak:
</span><span class="lines">@@ -687,12 +695,12 @@
</span><span class="cx">         return valueID == CSSValueRow || valueID == CSSValueRowReverse || valueID == CSSValueColumn || valueID == CSSValueColumnReverse;
</span><span class="cx">     case CSSPropertyFlexWrap:
</span><span class="cx">         return valueID == CSSValueNowrap || valueID == CSSValueWrap || valueID == CSSValueWrapReverse;
</span><del>-    case CSSPropertyHyphens:
</del><ins>+    case CSSPropertyWebkitHyphens:
</ins><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueManual;
</span><span class="cx">     case CSSPropertyJustifyContent:
</span><span class="cx">         // FIXME: Per CSS alignment, this property should accept an optional &lt;overflow-position&gt;. We should share this parsing code with 'justify-self'.
</span><span class="cx">         return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround;
</span><del>-    case CSSPropertyFontKerning:
</del><ins>+    case CSSPropertyWebkitFontKerning:
</ins><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueNormal || valueID == CSSValueNone;
</span><span class="cx">     case CSSPropertyWebkitFontSmoothing:
</span><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueAntialiased || valueID == CSSValueSubpixelAntialiased;
</span><span class="lines">@@ -721,7 +729,7 @@
</span><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueElement;
</span><span class="cx">     case CSSPropertyWebkitUserModify: // read-only | read-write
</span><span class="cx">         return valueID == CSSValueReadOnly || valueID == CSSValueReadWrite || valueID == CSSValueReadWritePlaintextOnly;
</span><del>-    case CSSPropertyUserSelect: // auto | none | text | all
</del><ins>+    case CSSPropertyWebkitUserSelect: // auto | none | text | all
</ins><span class="cx">         return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueText || valueID == CSSValueAll;
</span><span class="cx">     case CSSPropertyWebkitWritingMode:
</span><span class="cx">         return valueID &gt;= CSSValueHorizontalTb &amp;&amp; valueID &lt;= CSSValueVerticalLr;
</span><span class="lines">@@ -734,15 +742,29 @@
</span><span class="cx">         return valueID == CSSValueNormal || valueID == CSSValuePre || valueID == CSSValuePreWrap || valueID == CSSValuePreLine || valueID == CSSValueNowrap;
</span><span class="cx">     case CSSPropertyWordBreak: // normal | break-all | keep-all | break-word (this is a custom extension)
</span><span class="cx">         return valueID == CSSValueNormal || valueID == CSSValueBreakAll || valueID == CSSValueKeepAll || valueID == CSSValueBreakWord;
</span><del>-    case CSSPropertyScrollSnapType: // none | mandatory | proximity
-        ASSERT(RuntimeEnabledFeatures::cssScrollSnapPointsEnabled());
</del><ins>+#if ENABLE(CSS_SCROLL_SNAP)
+    case CSSPropertyWebkitScrollSnapType: // none | mandatory | proximity
</ins><span class="cx">         return valueID == CSSValueNone || valueID == CSSValueMandatory || valueID == CSSValueProximity;
</span><ins>+#endif
+#if ENABLE(TOUCH_EVENTS)
+    case CSSPropertyTouchAction: // auto | manipulation
+        return valueID == CSSValueAuto || valueID == CSSValueManipulation;
+#endif
+#if ENABLE(CSS_TRAILING_WORD)
+    case CSSPropertyAppleTrailingWord: // auto | -apple-partially-balanced
+        return valueID == CSSValueAuto || valueID == CSSValueWebkitPartiallyBalanced;
+#endif
+#if ENABLE(APPLE_PAY)
+    case CSSPropertyApplePayButtonStyle: // white | white-outline | black
+        return valueID == CSSValueWhite || valueID == CSSValueWhiteOutline || valueID == CSSValueBlack;
+    case CSSPropertyApplePayButtonType: // plain | buy | set-up | in-store
+        return valueID == CSSValuePlain || valueID == CSSValueBuy || valueID == CSSValueSetUp || valueID == CSSValueInStore;
+#endif
</ins><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> }
</span><del>-*/
</del><span class="cx"> 
</span><span class="cx"> bool CSSParserFastPaths::isKeywordPropertyID(CSSPropertyID propertyId)
</span><span class="cx"> {
</span><span class="lines">@@ -941,15 +963,22 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* FIXME-NEWPARSER: Turn off for now.
</del><ins>+static bool isUniversalKeyword(const String&amp; string)
+{
+    // These keywords can be used for all properties.
+    return equalLettersIgnoringASCIICase(string, &quot;initial&quot;)
+    || equalLettersIgnoringASCIICase(string, &quot;inherit&quot;)
+    || equalLettersIgnoringASCIICase(string, &quot;unset&quot;)
+    || equalLettersIgnoringASCIICase(string, &quot;revert&quot;);
+}
</ins><span class="cx"> 
</span><del>-static CSSValue* parseKeywordValue(CSSPropertyID propertyId, const String&amp; string, CSSParserMode parserMode)
</del><ins>+static RefPtr&lt;CSSValue&gt; parseKeywordValue(CSSPropertyID propertyId, const String&amp; string, CSSParserMode parserMode)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!string.isEmpty());
</span><span class="cx"> 
</span><span class="cx">     if (!CSSParserFastPaths::isKeywordPropertyID(propertyId)) {
</span><span class="cx">         // All properties accept the values of &quot;initial&quot; and &quot;inherit&quot;.
</span><del>-        if (!equalIgnoringASCIICase(string, &quot;initial&quot;) &amp;&amp; !equalIgnoringASCIICase(string, &quot;inherit&quot;))
</del><ins>+        if (!isUniversalKeyword(string))
</ins><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><span class="cx">         // Parse initial/inherit shorthands using the CSSPropertyParser.
</span><span class="lines">@@ -957,7 +986,7 @@
</span><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><span class="cx">         // Descriptors do not support css wide keywords.
</span><del>-        if (CSSPropertyMetadata::isDescriptorOnly(propertyId))
</del><ins>+        if (CSSProperty::isDescriptorOnly(propertyId))
</ins><span class="cx">             return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -967,9 +996,14 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     if (valueID == CSSValueInherit)
</span><del>-        return CSSInheritedValue::create();
</del><ins>+        return CSSValuePool::singleton().createInheritedValue();
</ins><span class="cx">     if (valueID == CSSValueInitial)
</span><del>-        return CSSInitialValue::create();
</del><ins>+        return CSSValuePool::singleton().createExplicitInitialValue();
+    if (valueID == CSSValueUnset)
+        return CSSValuePool::singleton().createUnsetValue();
+    if (valueID == CSSValueRevert)
+        return CSSValuePool::singleton().createRevertValue();
+    
</ins><span class="cx">     if (CSSParserFastPaths::isValidKeywordPropertyAndValue(propertyId, valueID, parserMode))
</span><span class="cx">         return CSSPrimitiveValue::createIdentifier(valueID);
</span><span class="cx">     return nullptr;
</span><span class="lines">@@ -980,16 +1014,16 @@
</span><span class="cx"> {
</span><span class="cx">     while (expectedCount) {
</span><span class="cx">         size_t delimiter = WTF::find(pos, end - pos, expectedCount == 1 ? ')' : ',');
</span><del>-        if (delimiter == kNotFound)
</del><ins>+        if (delimiter == notFound)
</ins><span class="cx">             return false;
</span><span class="cx">         unsigned argumentLength = static_cast&lt;unsigned&gt;(delimiter);
</span><del>-        CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::UnitTypes::Number;
</del><ins>+        CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::UnitTypes::CSS_NUMBER;
</ins><span class="cx">         double number;
</span><span class="cx">         if (!parseSimpleLength(pos, argumentLength, unit, number))
</span><span class="cx">             return false;
</span><del>-        if (unit != CSSPrimitiveValue::UnitTypes::Pixels &amp;&amp; (number || unit != CSSPrimitiveValue::UnitTypes::Number))
</del><ins>+        if (unit != CSSPrimitiveValue::UnitTypes::CSS_PX &amp;&amp; (number || unit != CSSPrimitiveValue::UnitTypes::CSS_NUMBER))
</ins><span class="cx">             return false;
</span><del>-        transformValue-&gt;append(*CSSPrimitiveValue::create(number, CSSPrimitiveValue::UnitTypes::Pixels));
</del><ins>+        transformValue-&gt;append(CSSPrimitiveValue::create(number, CSSPrimitiveValue::UnitTypes::CSS_PX));
</ins><span class="cx">         pos += argumentLength + 1;
</span><span class="cx">         --expectedCount;
</span><span class="cx">     }
</span><span class="lines">@@ -1001,7 +1035,7 @@
</span><span class="cx"> {
</span><span class="cx">     while (expectedCount) {
</span><span class="cx">         size_t delimiter = WTF::find(pos, end - pos, expectedCount == 1 ? ')' : ',');
</span><del>-        if (delimiter == kNotFound)
</del><ins>+        if (delimiter == notFound)
</ins><span class="cx">             return false;
</span><span class="cx">         unsigned argumentLength = static_cast&lt;unsigned&gt;(delimiter);
</span><span class="cx">         bool ok;
</span><span class="lines">@@ -1008,7 +1042,7 @@
</span><span class="cx">         double number = charactersToDouble(pos, argumentLength, &amp;ok);
</span><span class="cx">         if (!ok)
</span><span class="cx">             return false;
</span><del>-        transformValue-&gt;append(*CSSPrimitiveValue::create(number, CSSPrimitiveValue::UnitTypes::Number));
</del><ins>+        transformValue-&gt;append(CSSPrimitiveValue::create(number, CSSPrimitiveValue::UnitTypes::CSS_NUMBER));
</ins><span class="cx">         pos += argumentLength + 1;
</span><span class="cx">         --expectedCount;
</span><span class="cx">     }
</span><span class="lines">@@ -1018,7 +1052,7 @@
</span><span class="cx"> static const int kShortestValidTransformStringLength = 12;
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename CharType&gt;
</span><del>-static CSSFunctionValue* parseSimpleTransformValue(CharType*&amp; pos, CharType* end)
</del><ins>+static RefPtr&lt;CSSFunctionValue&gt; parseSimpleTransformValue(CharType*&amp; pos, CharType* end)
</ins><span class="cx"> {
</span><span class="cx">     if (end - pos &lt; kShortestValidTransformStringLength)
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -1039,11 +1073,11 @@
</span><span class="cx">         unsigned argumentStart = 11;
</span><span class="cx">         CharType c9 = toASCIILower(pos[9]);
</span><span class="cx">         if (c9 == 'x' &amp;&amp; pos[10] == '(') {
</span><del>-            transformType = CSSValueTranslateX;
</del><ins>+            transformType = CSSValueTranslatex;
</ins><span class="cx">         } else if (c9 == 'y' &amp;&amp; pos[10] == '(') {
</span><del>-            transformType = CSSValueTranslateY;
</del><ins>+            transformType = CSSValueTranslatey;
</ins><span class="cx">         } else if (c9 == 'z' &amp;&amp; pos[10] == '(') {
</span><del>-            transformType = CSSValueTranslateZ;
</del><ins>+            transformType = CSSValueTranslatez;
</ins><span class="cx">         } else if (c9 == '(') {
</span><span class="cx">             transformType = CSSValueTranslate;
</span><span class="cx">             expectedArgumentCount = 2;
</span><span class="lines">@@ -1056,8 +1090,8 @@
</span><span class="cx">             return nullptr;
</span><span class="cx">         }
</span><span class="cx">         pos += argumentStart;
</span><del>-        CSSFunctionValue* transformValue = CSSFunctionValue::create(transformType);
-        if (!parseTransformTranslateArguments(pos, end, expectedArgumentCount, transformValue))
</del><ins>+        RefPtr&lt;CSSFunctionValue&gt; transformValue = CSSFunctionValue::create(transformType);
+        if (!parseTransformTranslateArguments(pos, end, expectedArgumentCount, transformValue.get()))
</ins><span class="cx">             return nullptr;
</span><span class="cx">         return transformValue;
</span><span class="cx">     }
</span><span class="lines">@@ -1074,8 +1108,8 @@
</span><span class="cx"> 
</span><span class="cx">     if (isMatrix3d) {
</span><span class="cx">         pos += 9;
</span><del>-        CSSFunctionValue* transformValue = CSSFunctionValue::create(CSSValueMatrix3d);
-        if (!parseTransformNumberArguments(pos, end, 16, transformValue))
</del><ins>+        RefPtr&lt;CSSFunctionValue&gt; transformValue = CSSFunctionValue::create(CSSValueMatrix3d);
+        if (!parseTransformNumberArguments(pos, end, 16, transformValue.get()))
</ins><span class="cx">             return nullptr;
</span><span class="cx">         return transformValue;
</span><span class="cx">     }
</span><span class="lines">@@ -1091,8 +1125,8 @@
</span><span class="cx"> 
</span><span class="cx">     if (isScale3d) {
</span><span class="cx">         pos += 8;
</span><del>-        CSSFunctionValue* transformValue = CSSFunctionValue::create(CSSValueScale3d);
-        if (!parseTransformNumberArguments(pos, end, 3, transformValue))
</del><ins>+        RefPtr&lt;CSSFunctionValue&gt; transformValue = CSSFunctionValue::create(CSSValueScale3d);
+        if (!parseTransformNumberArguments(pos, end, 3, transformValue.get()))
</ins><span class="cx">             return nullptr;
</span><span class="cx">         return transformValue;
</span><span class="cx">     }
</span><span class="lines">@@ -1139,7 +1173,7 @@
</span><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">         size_t argumentsEnd = WTF::find(chars, length, ')', i);
</span><del>-        if (argumentsEnd == kNotFound)
</del><ins>+        if (argumentsEnd == notFound)
</ins><span class="cx">             return false;
</span><span class="cx">         // Advance to the end of the arguments.
</span><span class="cx">         i = argumentsEnd + 1;
</span><span class="lines">@@ -1148,19 +1182,19 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename CharType&gt;
</span><del>-static CSSValueList* parseSimpleTransformList(const CharType* chars, unsigned length)
</del><ins>+static RefPtr&lt;CSSValueList&gt; parseSimpleTransformList(const CharType* chars, unsigned length)
</ins><span class="cx"> {
</span><span class="cx">     if (!transformCanLikelyUseFastPath(chars, length))
</span><span class="cx">         return nullptr;
</span><span class="cx">     const CharType*&amp; pos = chars;
</span><span class="cx">     const CharType* end = chars + length;
</span><del>-    CSSValueList* transformList = nullptr;
</del><ins>+    RefPtr&lt;CSSValueList&gt; transformList;
</ins><span class="cx">     while (pos &lt; end) {
</span><span class="cx">         while (pos &lt; end &amp;&amp; isCSSSpace(*pos))
</span><span class="cx">             ++pos;
</span><span class="cx">         if (pos &gt;= end)
</span><span class="cx">             break;
</span><del>-        CSSFunctionValue* transformValue = parseSimpleTransformValue(pos, end);
</del><ins>+        RefPtr&lt;CSSFunctionValue&gt; transformValue = parseSimpleTransformValue(pos, end);
</ins><span class="cx">         if (!transformValue)
</span><span class="cx">             return nullptr;
</span><span class="cx">         if (!transformList)
</span><span class="lines">@@ -1170,7 +1204,7 @@
</span><span class="cx">     return transformList;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CSSValue* parseSimpleTransform(CSSPropertyID propertyID, const String&amp; string)
</del><ins>+static RefPtr&lt;CSSValue&gt; parseSimpleTransform(CSSPropertyID propertyID, const String&amp; string)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!string.isEmpty());
</span><span class="cx"> 
</span><span class="lines">@@ -1181,18 +1215,20 @@
</span><span class="cx">     return parseSimpleTransformList(string.characters16(), string.length());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSValue* CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String&amp; string, CSSParserMode parserMode)
</del><ins>+RefPtr&lt;CSSValue&gt; CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String&amp; string, CSSParserMode parserMode)
</ins><span class="cx"> {
</span><del>-    if (CSSValue* length = parseSimpleLengthValue(propertyID, string, parserMode))
-        return length;
</del><ins>+    RefPtr&lt;CSSValue&gt; result = parseSimpleLengthValue(propertyID, string, parserMode);
+    if (result)
+        return result;
</ins><span class="cx">     if (isColorPropertyID(propertyID))
</span><span class="cx">         return parseColor(string, parserMode);
</span><del>-    if (CSSValue* keyword = parseKeywordValue(propertyID, string, parserMode))
-        return keyword;
-    if (CSSValue* transform = parseSimpleTransform(propertyID, string))
-        return transform;
</del><ins>+    result = parseKeywordValue(propertyID, string, parserMode);
+    if (result)
+        return result;
+    result = parseSimpleTransform(propertyID, string);
+    if (result)
+        return result;
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-     */
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserFastPathsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.h (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.h        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.h        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -43,13 +43,13 @@
</span><span class="cx"> public:
</span><span class="cx">     // Parses simple values like '10px' or 'green', but makes no guarantees
</span><span class="cx">     // about handling any property completely.
</span><del>-    static CSSValue* maybeParseValue(CSSPropertyID, const String&amp;, CSSParserMode);
</del><ins>+    static RefPtr&lt;CSSValue&gt; maybeParseValue(CSSPropertyID, const String&amp;, CSSParserMode);
</ins><span class="cx"> 
</span><span class="cx">     // Properties handled here shouldn't be explicitly handled in CSSPropertyParser
</span><span class="cx">     static bool isKeywordPropertyID(CSSPropertyID);
</span><span class="cx">     static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, CSSParserMode);
</span><span class="cx"> 
</span><del>-    static CSSValue* parseColor(const String&amp;, CSSParserMode);
</del><ins>+    static RefPtr&lt;CSSValue&gt; parseColor(const String&amp;, CSSParserMode);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserIdiomscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserIdioms.cpp (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserIdioms.cpp        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/parser/CSSParserIdioms.cpp        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CSSParserIdioms.h&quot;
</span><ins>+#include &quot;CSSValueKeywords.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -48,4 +49,16 @@
</span><span class="cx">         WebCore::convertToASCIILowercaseInPlace(const_cast&lt;UChar*&gt;(stringView.characters16()), stringView.length());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool isValueAllowedInMode(unsigned short id, CSSParserMode mode)
+{
+    switch (id) {
+    case CSSValueInternalVariableValue:
+        return isUASheetBehavior(mode);
+    case CSSValueWebkitFocusRingColor:
+        return isUASheetBehavior(mode) || isQuirksModeBehavior(mode);
+    default:
+        return true;
+    }
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserIdiomsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserIdioms.h (206006 => 206007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserIdioms.h        2016-09-16 00:27:11 UTC (rev 206006)
+++ trunk/Source/WebCore/css/parser/CSSParserIdioms.h        2016-09-16 00:33:45 UTC (rev 206007)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #ifndef CSSParserIdioms_h
</span><span class="cx"> #define CSSParserIdioms_h
</span><span class="cx"> 
</span><ins>+#include &quot;CSSParserMode.h&quot;
</ins><span class="cx"> #include &lt;wtf/ASCIICType.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringView.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -60,6 +61,8 @@
</span><span class="cx"> 
</span><span class="cx"> void convertToASCIILowercaseInPlace(StringView&amp;);
</span><span class="cx"> 
</span><ins>+bool isValueAllowedInMode(unsigned short, CSSParserMode);
+    
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>