<!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>[209671] 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/209671">209671</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2016-12-10 12:38:50 -0800 (Sat, 10 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Parser] Move CSSParserValues.h/.cpp to CSSParserSelector.h/.cpp
https://bugs.webkit.org/show_bug.cgi?id=165730

Reviewed by Simon Fraser.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSCustomPropertyValue.cpp:
* css/CSSPrimitiveValue.cpp:
* css/CSSSelectorList.cpp:
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
* css/parser/CSSParserImpl.cpp:
* css/parser/CSSParserSelector.cpp: Copied from Source/WebCore/css/parser/CSSParserValues.cpp.
* css/parser/CSSParserSelector.h: Copied from Source/WebCore/css/parser/CSSParserValues.h.
* css/parser/CSSParserValues.cpp: Removed.
* css/parser/CSSParserValues.h: Removed.
* css/parser/CSSSelectorParser.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="#trunkSourceWebCorecssCSSAllInOnecpp">trunk/Source/WebCore/css/CSSAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCustomPropertyValuecpp">trunk/Source/WebCore/css/CSSCustomPropertyValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValuecpp">trunk/Source/WebCore/css/CSSPrimitiveValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSSelectorListcpp">trunk/Source/WebCore/css/CSSSelectorList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssmakeSelectorPseudoClassAndCompatibilityElementMappy">trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserImplcpp">trunk/Source/WebCore/css/parser/CSSParserImpl.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSSelectorParserh">trunk/Source/WebCore/css/parser/CSSSelectorParser.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssparserCSSParserSelectorcpp">trunk/Source/WebCore/css/parser/CSSParserSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserSelectorh">trunk/Source/WebCore/css/parser/CSSParserSelector.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssparserCSSParserValuescpp">trunk/Source/WebCore/css/parser/CSSParserValues.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserValuesh">trunk/Source/WebCore/css/parser/CSSParserValues.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 (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -1380,7 +1380,7 @@
</span><span class="cx">     css/parser/CSSParserObserverWrapper.cpp
</span><span class="cx">     css/parser/CSSParserToken.cpp
</span><span class="cx">     css/parser/CSSParserTokenRange.cpp
</span><del>-    css/parser/CSSParserValues.cpp
</del><ins>+    css/parser/CSSParserSelector.cpp
</ins><span class="cx">     css/parser/CSSPropertyParser.cpp
</span><span class="cx">     css/parser/CSSPropertyParserHelpers.cpp
</span><span class="cx">     css/parser/CSSSelectorParser.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/ChangeLog        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -1,5 +1,24 @@
</span><span class="cx"> 2016-12-10  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        [CSS Parser] Move CSSParserValues.h/.cpp to CSSParserSelector.h/.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=165730
+
+        Reviewed by Simon Fraser.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSCustomPropertyValue.cpp:
+        * css/CSSPrimitiveValue.cpp:
+        * css/CSSSelectorList.cpp:
+        * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
+        * css/parser/CSSParserImpl.cpp:
+        * css/parser/CSSParserSelector.cpp: Copied from Source/WebCore/css/parser/CSSParserValues.cpp.
+        * css/parser/CSSParserSelector.h: Copied from Source/WebCore/css/parser/CSSParserValues.h.
+        * css/parser/CSSParserValues.cpp: Removed.
+        * css/parser/CSSParserValues.h: Removed.
+        * css/parser/CSSSelectorParser.h:
+
+2016-12-10  Dave Hyatt  &lt;hyatt@apple.com&gt;
+
</ins><span class="cx">         [CSS Parser] Remove the pseudoclass/element hacks
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=165729
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -3518,8 +3518,8 @@
</span><span class="cx">                 946D372D1D6CB2940077084F /* CSSParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 946D37281D6CB28B0077084F /* CSSParser.cpp */; };
</span><span class="cx">                 946D372E1D6CB2940077084F /* CSSParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 946D37291D6CB28B0077084F /* CSSParser.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 946D372F1D6CB2940077084F /* CSSParserMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 946D372A1D6CB28B0077084F /* CSSParserMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                946D37301D6CB2940077084F /* CSSParserValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 946D372B1D6CB28B0077084F /* CSSParserValues.cpp */; };
-                946D37311D6CB2940077084F /* CSSParserValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 946D372C1D6CB28B0077084F /* CSSParserValues.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                946D37301D6CB2940077084F /* CSSParserSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 946D372B1D6CB28B0077084F /* CSSParserSelector.cpp */; };
+                946D37311D6CB2940077084F /* CSSParserSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 946D372C1D6CB28B0077084F /* CSSParserSelector.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 946D37391D6CDFC00077084F /* CSSTokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 946D37341D6CDF980077084F /* CSSTokenizer.cpp */; };
</span><span class="cx">                 946D373A1D6CDFC00077084F /* CSSTokenizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 946D37371D6CDF980077084F /* CSSTokenizer.h */; };
</span><span class="cx">                 946D373B1D6CDFC00077084F /* CSSTokenizerInputStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 946D37351D6CDF980077084F /* CSSTokenizerInputStream.cpp */; };
</span><span class="lines">@@ -11094,8 +11094,8 @@
</span><span class="cx">                 946D37281D6CB28B0077084F /* CSSParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSParser.cpp; path = parser/CSSParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 946D37291D6CB28B0077084F /* CSSParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSParser.h; path = parser/CSSParser.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 946D372A1D6CB28B0077084F /* CSSParserMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSParserMode.h; path = parser/CSSParserMode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                946D372B1D6CB28B0077084F /* CSSParserValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSParserValues.cpp; path = parser/CSSParserValues.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                946D372C1D6CB28B0077084F /* CSSParserValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSParserValues.h; path = parser/CSSParserValues.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                946D372B1D6CB28B0077084F /* CSSParserSelector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSParserSelector.cpp; path = parser/CSSParserSelector.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                946D372C1D6CB28B0077084F /* CSSParserSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSParserSelector.h; path = parser/CSSParserSelector.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 946D37341D6CDF980077084F /* CSSTokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSTokenizer.cpp; path = parser/CSSTokenizer.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 946D37351D6CDF980077084F /* CSSTokenizerInputStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSTokenizerInputStream.cpp; path = parser/CSSTokenizerInputStream.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 946D37371D6CDF980077084F /* CSSTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CSSTokenizer.h; path = parser/CSSTokenizer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19073,8 +19073,8 @@
</span><span class="cx">                                 946D373D1D6CE31A0077084F /* CSSParserToken.h */,
</span><span class="cx">                                 946D374B1D6D07F50077084F /* CSSParserTokenRange.cpp */,
</span><span class="cx">                                 946D374C1D6D07F50077084F /* CSSParserTokenRange.h */,
</span><del>-                                946D372B1D6CB28B0077084F /* CSSParserValues.cpp */,
-                                946D372C1D6CB28B0077084F /* CSSParserValues.h */,
</del><ins>+                                946D372B1D6CB28B0077084F /* CSSParserSelector.cpp */,
+                                946D372C1D6CB28B0077084F /* CSSParserSelector.h */,
</ins><span class="cx">                                 946D37411D6CF6320077084F /* CSSPropertyParser.cpp */,
</span><span class="cx">                                 946D37421D6CF6320077084F /* CSSPropertyParser.h */,
</span><span class="cx">                                 949C77021D6E393500C0DE4F /* CSSPropertyParserHelpers.cpp */,
</span><span class="lines">@@ -25250,7 +25250,7 @@
</span><span class="cx">                                 949C77091D6E498700C0DE4F /* CSSParserObserverWrapper.h in Headers */,
</span><span class="cx">                                 946D37401D6CE3C20077084F /* CSSParserToken.h in Headers */,
</span><span class="cx">                                 946D374E1D6D08AA0077084F /* CSSParserTokenRange.h in Headers */,
</span><del>-                                946D37311D6CB2940077084F /* CSSParserValues.h in Headers */,
</del><ins>+                                946D37311D6CB2940077084F /* CSSParserSelector.h in Headers */,
</ins><span class="cx">                                 9418278F1D8CAF9200492764 /* CSSPendingSubstitutionValue.h in Headers */,
</span><span class="cx">                                 977B3863122883E900B81FF8 /* CSSPreloadScanner.h in Headers */,
</span><span class="cx">                                 A80E6CE60A1989CA007FB8C5 /* CSSPrimitiveValue.h in Headers */,
</span><span class="lines">@@ -29063,7 +29063,7 @@
</span><span class="cx">                                 949C77081D6E498700C0DE4F /* CSSParserObserverWrapper.cpp in Sources */,
</span><span class="cx">                                 946D373F1D6CE3C20077084F /* CSSParserToken.cpp in Sources */,
</span><span class="cx">                                 946D374D1D6D08A60077084F /* CSSParserTokenRange.cpp in Sources */,
</span><del>-                                946D37301D6CB2940077084F /* CSSParserValues.cpp in Sources */,
</del><ins>+                                946D37301D6CB2940077084F /* CSSParserSelector.cpp in Sources */,
</ins><span class="cx">                                 9418278E1D8CAF9200492764 /* CSSPendingSubstitutionValue.cpp in Sources */,
</span><span class="cx">                                 977B3862122883E900B81FF8 /* CSSPreloadScanner.cpp in Sources */,
</span><span class="cx">                                 A80E6D050A1989CA007FB8C5 /* CSSPrimitiveValue.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSAllInOne.cpp (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSAllInOne.cpp        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/CSSAllInOne.cpp        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> #include &quot;CSSNamedImageValue.cpp&quot;
</span><span class="cx"> #include &quot;CSSPageRule.cpp&quot;
</span><span class="cx"> #include &quot;CSSParser.cpp&quot;
</span><del>-#include &quot;CSSParserValues.cpp&quot;
</del><ins>+#include &quot;CSSParserSelector.cpp&quot;
</ins><span class="cx"> #include &quot;CSSProperty.cpp&quot;
</span><span class="cx"> #include &quot;CSSPropertySourceData.cpp&quot;
</span><span class="cx"> #include &quot;CSSReflectValue.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCustomPropertyValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCustomPropertyValue.cpp (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCustomPropertyValue.cpp        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/CSSCustomPropertyValue.cpp        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CSSCustomPropertyValue.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CSSParserValues.h&quot;
</del><ins>+#include &quot;CSSParserSelector.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include &quot;CSSFontFamily.h&quot;
</span><span class="cx"> #include &quot;CSSHelper.h&quot;
</span><span class="cx"> #include &quot;CSSMarkup.h&quot;
</span><del>-#include &quot;CSSParserValues.h&quot;
</del><ins>+#include &quot;CSSParserSelector.h&quot;
</ins><span class="cx"> #include &quot;CSSPrimitiveValueMappings.h&quot;
</span><span class="cx"> #include &quot;CSSPropertyNames.h&quot;
</span><span class="cx"> #include &quot;CSSToLengthConversionData.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelectorList.cpp (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelectorList.cpp        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/CSSSelectorList.cpp        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CSSSelectorList.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CSSParserValues.h&quot;
</del><ins>+#include &quot;CSSParserSelector.h&quot;
</ins><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCorecssmakeSelectorPseudoClassAndCompatibilityElementMappy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;SelectorPseudoTypeMap.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CSSParserValues.h&quot;
</del><ins>+#include &quot;CSSParserSelector.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> #if defined(__clang__)
</span><span class="cx"> #pragma clang diagnostic push
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserImpl.cpp (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserImpl.cpp        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/parser/CSSParserImpl.cpp        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> #include &quot;CSSKeyframesRule.h&quot;
</span><span class="cx"> #include &quot;CSSParserObserver.h&quot;
</span><span class="cx"> #include &quot;CSSParserObserverWrapper.h&quot;
</span><del>-#include &quot;CSSParserValues.h&quot; // FIXME-NEWPARSER We need to move CSSParserSelector to its own file.
</del><ins>+#include &quot;CSSParserSelector.h&quot;
</ins><span class="cx"> #include &quot;CSSPropertyParser.h&quot;
</span><span class="cx"> #include &quot;CSSSelectorParser.h&quot;
</span><span class="cx"> #include &quot;CSSStyleSheet.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserSelectorcppfromrev209670trunkSourceWebCorecssparserCSSParserValuescpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/css/parser/CSSParserSelector.cpp (from rev 209670, trunk/Source/WebCore/css/parser/CSSParserValues.cpp) (0 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserSelector.cpp                                (rev 0)
+++ trunk/Source/WebCore/css/parser/CSSParserSelector.cpp        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -0,0 +1,245 @@
</span><ins>+/*
+ * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006, 2008, 2014 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CSSParserSelector.h&quot;
+
+#include &quot;CSSCustomPropertyValue.h&quot;
+#include &quot;CSSParserIdioms.h&quot;
+#include &quot;CSSPrimitiveValue.h&quot;
+#include &quot;CSSFunctionValue.h&quot;
+#include &quot;CSSSelector.h&quot;
+#include &quot;CSSSelectorList.h&quot;
+#include &quot;SelectorPseudoTypeMap.h&quot;
+
+#if COMPILER(MSVC)
+// See https://msdn.microsoft.com/en-us/library/1wea5zwe.aspx
+#pragma warning(disable: 4701)
+#endif
+
+namespace WebCore {
+
+using namespace WTF;
+
+CSSParserSelector* CSSParserSelector::parsePagePseudoSelector(const AtomicString&amp; pseudoTypeString)
+{
+    CSSSelector::PagePseudoClassType pseudoType;
+    if (equalLettersIgnoringASCIICase(pseudoTypeString, &quot;first&quot;))
+        pseudoType = CSSSelector::PagePseudoClassFirst;
+    else if (equalLettersIgnoringASCIICase(pseudoTypeString, &quot;left&quot;))
+        pseudoType = CSSSelector::PagePseudoClassLeft;
+    else if (equalLettersIgnoringASCIICase(pseudoTypeString, &quot;right&quot;))
+        pseudoType = CSSSelector::PagePseudoClassRight;
+    else
+        return nullptr;
+    
+    auto selector = std::make_unique&lt;CSSParserSelector&gt;();
+    selector-&gt;m_selector-&gt;setMatch(CSSSelector::PagePseudoClass);
+    selector-&gt;m_selector-&gt;setPagePseudoType(pseudoType);
+    return selector.release();
+}
+
+CSSParserSelector* CSSParserSelector::parsePseudoElementSelectorFromStringView(StringView&amp; pseudoTypeString)
+{
+    AtomicString name = pseudoTypeString.toAtomicString();
+    
+    CSSSelector::PseudoElementType pseudoType = CSSSelector::parsePseudoElementType(name);
+    if (pseudoType == CSSSelector::PseudoElementUnknown) {
+        // FIXME-NEWPARSER: We can't add &quot;slotted&quot; to the map without breaking the old
+        // parser, so this hack ensures the new parser still recognizes it. When the new
+        // parser turns on, we can add &quot;slotted&quot; to the map and remove this code.
+        if (pseudoTypeString.startsWithIgnoringASCIICase(&quot;slotted&quot;))
+            pseudoType = CSSSelector::PseudoElementSlotted;
+        else
+            return nullptr;
+    }
+
+    auto selector = std::make_unique&lt;CSSParserSelector&gt;();
+    selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoElement);
+    selector-&gt;m_selector-&gt;setPseudoElementType(pseudoType);
+    if (pseudoType == CSSSelector::PseudoElementWebKitCustomLegacyPrefixed) {
+        ASSERT_WITH_MESSAGE(name == &quot;-webkit-input-placeholder&quot;, &quot;-webkit-input-placeholder is the only LegacyPrefix pseudo type.&quot;);
+        if (name == &quot;-webkit-input-placeholder&quot;)
+            name = AtomicString(&quot;placeholder&quot;, AtomicString::ConstructFromLiteral);
+    }
+    selector-&gt;m_selector-&gt;setValue(name);
+    return selector.release();
+}
+
+CSSParserSelector* CSSParserSelector::parsePseudoClassSelectorFromStringView(StringView&amp; pseudoTypeString)
+{
+    PseudoClassOrCompatibilityPseudoElement pseudoType = parsePseudoClassAndCompatibilityElementString(pseudoTypeString);
+    if (pseudoType.pseudoClass != CSSSelector::PseudoClassUnknown) {
+        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
+        selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoClass);
+        selector-&gt;m_selector-&gt;setPseudoClassType(pseudoType.pseudoClass);
+        return selector.release();
+    }
+    if (pseudoType.compatibilityPseudoElement != CSSSelector::PseudoElementUnknown) {
+        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
+        selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoElement);
+        selector-&gt;m_selector-&gt;setPseudoElementType(pseudoType.compatibilityPseudoElement);
+        AtomicString name = pseudoTypeString.toAtomicString();
+        selector-&gt;m_selector-&gt;setValue(name);
+        return selector.release();
+    }
+    return nullptr;
+}
+
+CSSParserSelector::CSSParserSelector()
+    : m_selector(std::make_unique&lt;CSSSelector&gt;())
+{
+}
+
+CSSParserSelector::CSSParserSelector(const QualifiedName&amp; tagQName)
+    : m_selector(std::make_unique&lt;CSSSelector&gt;(tagQName))
+{
+}
+
+CSSParserSelector::~CSSParserSelector()
+{
+    if (!m_tagHistory)
+        return;
+    Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;, 16&gt; toDelete;
+    std::unique_ptr&lt;CSSParserSelector&gt; selector = WTFMove(m_tagHistory);
+    while (true) {
+        std::unique_ptr&lt;CSSParserSelector&gt; next = WTFMove(selector-&gt;m_tagHistory);
+        toDelete.append(WTFMove(selector));
+        if (!next)
+            break;
+        selector = WTFMove(next);
+    }
+}
+
+void CSSParserSelector::adoptSelectorVector(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&amp; selectorVector)
+{
+    auto selectorList = std::make_unique&lt;CSSSelectorList&gt;();
+    selectorList-&gt;adoptSelectorVector(selectorVector);
+    m_selector-&gt;setSelectorList(WTFMove(selectorList));
+}
+
+void CSSParserSelector::setLangArgumentList(std::unique_ptr&lt;Vector&lt;AtomicString&gt;&gt; argumentList)
+{
+    ASSERT_WITH_MESSAGE(!argumentList-&gt;isEmpty(), &quot;No CSS Selector takes an empty argument list.&quot;);
+    m_selector-&gt;setLangArgumentList(WTFMove(argumentList));
+}
+
+void CSSParserSelector::setSelectorList(std::unique_ptr&lt;CSSSelectorList&gt; selectorList)
+{
+    m_selector-&gt;setSelectorList(WTFMove(selectorList));
+}
+
+static bool selectorListMatchesPseudoElement(const CSSSelectorList* selectorList)
+{
+    if (!selectorList)
+        return false;
+
+    for (const CSSSelector* subSelector = selectorList-&gt;first(); subSelector; subSelector = CSSSelectorList::next(subSelector)) {
+        for (const CSSSelector* selector = subSelector; selector; selector = selector-&gt;tagHistory()) {
+            if (selector-&gt;matchesPseudoElement())
+                return true;
+            if (const CSSSelectorList* subselectorList = selector-&gt;selectorList()) {
+                if (selectorListMatchesPseudoElement(subselectorList))
+                    return true;
+            }
+        }
+    }
+    return false;
+}
+
+bool CSSParserSelector::matchesPseudoElement() const
+{
+    return m_selector-&gt;matchesPseudoElement() || selectorListMatchesPseudoElement(m_selector-&gt;selectorList());
+}
+
+void CSSParserSelector::insertTagHistory(CSSSelector::RelationType before, std::unique_ptr&lt;CSSParserSelector&gt; selector, CSSSelector::RelationType after)
+{
+    if (m_tagHistory)
+        selector-&gt;setTagHistory(WTFMove(m_tagHistory));
+    setRelation(before);
+    selector-&gt;setRelation(after);
+    m_tagHistory = WTFMove(selector);
+}
+
+void CSSParserSelector::appendTagHistory(CSSSelector::RelationType relation, std::unique_ptr&lt;CSSParserSelector&gt; selector)
+{
+    CSSParserSelector* end = this;
+    while (end-&gt;tagHistory())
+        end = end-&gt;tagHistory();
+
+    end-&gt;setRelation(relation);
+    end-&gt;setTagHistory(WTFMove(selector));
+}
+
+void CSSParserSelector::appendTagHistory(CSSParserSelectorCombinator relation, std::unique_ptr&lt;CSSParserSelector&gt; selector)
+{
+    CSSParserSelector* end = this;
+    while (end-&gt;tagHistory())
+        end = end-&gt;tagHistory();
+
+    CSSSelector::RelationType selectorRelation;
+    switch (relation) {
+    case CSSParserSelectorCombinator::Child:
+        selectorRelation = CSSSelector::Child;
+        break;
+    case CSSParserSelectorCombinator::DescendantSpace:
+        selectorRelation = CSSSelector::DescendantSpace;
+        break;
+#if ENABLE(CSS_SELECTORS_LEVEL4)
+    case CSSParserSelectorCombinator::DescendantDoubleChild:
+        selectorRelation = CSSSelector::DescendantDoubleChild;
+        break;
+#endif
+    case CSSParserSelectorCombinator::DirectAdjacent:
+        selectorRelation = CSSSelector::DirectAdjacent;
+        break;
+    case CSSParserSelectorCombinator::IndirectAdjacent:
+        selectorRelation = CSSSelector::IndirectAdjacent;
+        break;
+    }
+    end-&gt;setRelation(selectorRelation);
+    end-&gt;setTagHistory(WTFMove(selector));
+}
+
+void CSSParserSelector::prependTagSelector(const QualifiedName&amp; tagQName, bool tagIsForNamespaceRule)
+{
+    auto second = std::make_unique&lt;CSSParserSelector&gt;();
+    second-&gt;m_selector = WTFMove(m_selector);
+    second-&gt;m_tagHistory = WTFMove(m_tagHistory);
+    m_tagHistory = WTFMove(second);
+
+    m_selector = std::make_unique&lt;CSSSelector&gt;(tagQName, tagIsForNamespaceRule);
+    m_selector-&gt;setRelation(CSSSelector::Subselector);
+}
+
+std::unique_ptr&lt;CSSParserSelector&gt; CSSParserSelector::releaseTagHistory()
+{
+    setRelation(CSSSelector::Subselector);
+    return WTFMove(m_tagHistory);
+}
+
+// FIXME-NEWPARSER: Add support for :host-context
+bool CSSParserSelector::isHostPseudoSelector() const
+{
+    return match() == CSSSelector::PseudoClass &amp;&amp; pseudoClassType() == CSSSelector::PseudoClassHost;
+}
+
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserSelectorhfromrev209670trunkSourceWebCorecssparserCSSParserValuesh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/css/parser/CSSParserSelector.h (from rev 209670, trunk/Source/WebCore/css/parser/CSSParserValues.h) (0 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserSelector.h                                (rev 0)
+++ trunk/Source/WebCore/css/parser/CSSParserSelector.h        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -0,0 +1,135 @@
</span><ins>+/*
+ * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
+ * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2014 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include &quot;CSSSelector.h&quot;
+#include &quot;CSSValueKeywords.h&quot;
+#include &quot;CSSValueList.h&quot;
+#include &lt;wtf/text/AtomicString.h&gt;
+#include &lt;wtf/text/AtomicStringHash.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class CSSValue;
+class QualifiedName;
+
+enum class CSSParserSelectorCombinator {
+    Child,
+    DescendantSpace,
+#if ENABLE(CSS_SELECTORS_LEVEL4)
+    DescendantDoubleChild,
+#endif
+    DirectAdjacent,
+    IndirectAdjacent
+};
+
+class CSSParserSelector {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    static CSSParserSelector* parsePseudoClassSelectorFromStringView(StringView&amp;);
+    static CSSParserSelector* parsePseudoElementSelectorFromStringView(StringView&amp;);
+    static CSSParserSelector* parsePagePseudoSelector(const AtomicString&amp;);
+    
+    CSSParserSelector();
+    explicit CSSParserSelector(const QualifiedName&amp;);
+    ~CSSParserSelector();
+
+    std::unique_ptr&lt;CSSSelector&gt; releaseSelector() { return WTFMove(m_selector); }
+
+    void setValue(const AtomicString&amp; value, bool matchLowerCase = false) { m_selector-&gt;setValue(value, matchLowerCase); }
+    
+    // FIXME-NEWPARSER: These two methods can go away once old parser is gone.
+    void setAttribute(const QualifiedName&amp; value, bool isCaseInsensitive) { m_selector-&gt;setAttribute(value, isCaseInsensitive); }
+    void setAttributeValueMatchingIsCaseInsensitive(bool isCaseInsensitive) { m_selector-&gt;setAttributeValueMatchingIsCaseInsensitive(isCaseInsensitive); }
+    
+    void setAttribute(const QualifiedName&amp; value, bool convertToLowercase, CSSSelector::AttributeMatchType type) { m_selector-&gt;setAttribute(value, convertToLowercase, type); }
+    
+    void setArgument(const AtomicString&amp; value) { m_selector-&gt;setArgument(value); }
+    void setNth(int a, int b) { m_selector-&gt;setNth(a, b); }
+    void setMatch(CSSSelector::Match value) { m_selector-&gt;setMatch(value); }
+    void setRelation(CSSSelector::RelationType value) { m_selector-&gt;setRelation(value); }
+    void setForPage() { m_selector-&gt;setForPage(); }
+
+    CSSSelector::Match match() const { return m_selector-&gt;match(); }
+    CSSSelector::PseudoElementType pseudoElementType() const { return m_selector-&gt;pseudoElementType(); }
+    const CSSSelectorList* selectorList() const { return m_selector-&gt;selectorList(); }
+    
+    void setPseudoElementType(CSSSelector::PseudoElementType type) { m_selector-&gt;setPseudoElementType(type); }
+
+    void adoptSelectorVector(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&amp; selectorVector);
+    void setLangArgumentList(std::unique_ptr&lt;Vector&lt;AtomicString&gt;&gt;);
+    void setSelectorList(std::unique_ptr&lt;CSSSelectorList&gt;);
+
+    CSSSelector::PseudoClassType pseudoClassType() const { return m_selector-&gt;pseudoClassType(); }
+    bool isCustomPseudoElement() const { return m_selector-&gt;isCustomPseudoElement(); }
+
+    bool isPseudoElementCueFunction() const
+    {
+#if ENABLE(VIDEO_TRACK)
+        return m_selector-&gt;match() == CSSSelector::PseudoElement &amp;&amp; m_selector-&gt;pseudoElementType() == CSSSelector::PseudoElementCue;
+#else
+        return false;
+#endif
+    }
+
+    bool hasShadowDescendant() const;
+    bool matchesPseudoElement() const;
+
+    bool isHostPseudoSelector() const;
+
+    // FIXME-NEWPARSER: &quot;slotted&quot; was removed here for now, since it leads to a combinator
+    // connection of ShadowDescendant, and the current shadow DOM code doesn't expect this. When
+    // we do fix this issue, make sure to patch the namespace prependTag code to remove the slotted
+    // special case, since it will be covered by this function once again.
+    bool needsImplicitShadowCombinatorForMatching() const;
+
+    CSSParserSelector* tagHistory() const { return m_tagHistory.get(); }
+    void setTagHistory(std::unique_ptr&lt;CSSParserSelector&gt; selector) { m_tagHistory = WTFMove(selector); }
+    void clearTagHistory() { m_tagHistory.reset(); }
+    void insertTagHistory(CSSSelector::RelationType before, std::unique_ptr&lt;CSSParserSelector&gt;, CSSSelector::RelationType after);
+    void appendTagHistory(CSSSelector::RelationType, std::unique_ptr&lt;CSSParserSelector&gt;);
+    void appendTagHistory(CSSParserSelectorCombinator, std::unique_ptr&lt;CSSParserSelector&gt;);
+    void prependTagSelector(const QualifiedName&amp;, bool tagIsForNamespaceRule = false);
+    std::unique_ptr&lt;CSSParserSelector&gt; releaseTagHistory();
+
+private:
+    std::unique_ptr&lt;CSSSelector&gt; m_selector;
+    std::unique_ptr&lt;CSSParserSelector&gt; m_tagHistory;
+};
+
+inline bool CSSParserSelector::hasShadowDescendant() const
+{
+    return m_selector-&gt;relation() == CSSSelector::ShadowDescendant;
+}
+
+inline bool CSSParserSelector::needsImplicitShadowCombinatorForMatching() const
+{
+    return match() == CSSSelector::PseudoElement
+        &amp;&amp; (pseudoElementType() == CSSSelector::PseudoElementWebKitCustom
+            || pseudoElementType() == CSSSelector::PseudoElementUserAgentCustom
+#if ENABLE(VIDEO_TRACK)
+            || pseudoElementType() == CSSSelector::PseudoElementCue
+#endif
+            || pseudoElementType() == CSSSelector::PseudoElementWebKitCustomLegacyPrefixed);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserValuescpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/css/parser/CSSParserValues.cpp (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserValues.cpp        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/parser/CSSParserValues.cpp        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -1,245 +0,0 @@
</span><del>-/*
- * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2008, 2014 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;CSSParserValues.h&quot;
-
-#include &quot;CSSCustomPropertyValue.h&quot;
-#include &quot;CSSParserIdioms.h&quot;
-#include &quot;CSSPrimitiveValue.h&quot;
-#include &quot;CSSFunctionValue.h&quot;
-#include &quot;CSSSelector.h&quot;
-#include &quot;CSSSelectorList.h&quot;
-#include &quot;SelectorPseudoTypeMap.h&quot;
-
-#if COMPILER(MSVC)
-// See https://msdn.microsoft.com/en-us/library/1wea5zwe.aspx
-#pragma warning(disable: 4701)
-#endif
-
-namespace WebCore {
-
-using namespace WTF;
-
-CSSParserSelector* CSSParserSelector::parsePagePseudoSelector(const AtomicString&amp; pseudoTypeString)
-{
-    CSSSelector::PagePseudoClassType pseudoType;
-    if (equalLettersIgnoringASCIICase(pseudoTypeString, &quot;first&quot;))
-        pseudoType = CSSSelector::PagePseudoClassFirst;
-    else if (equalLettersIgnoringASCIICase(pseudoTypeString, &quot;left&quot;))
-        pseudoType = CSSSelector::PagePseudoClassLeft;
-    else if (equalLettersIgnoringASCIICase(pseudoTypeString, &quot;right&quot;))
-        pseudoType = CSSSelector::PagePseudoClassRight;
-    else
-        return nullptr;
-    
-    auto selector = std::make_unique&lt;CSSParserSelector&gt;();
-    selector-&gt;m_selector-&gt;setMatch(CSSSelector::PagePseudoClass);
-    selector-&gt;m_selector-&gt;setPagePseudoType(pseudoType);
-    return selector.release();
-}
-
-CSSParserSelector* CSSParserSelector::parsePseudoElementSelectorFromStringView(StringView&amp; pseudoTypeString)
-{
-    AtomicString name = pseudoTypeString.toAtomicString();
-    
-    CSSSelector::PseudoElementType pseudoType = CSSSelector::parsePseudoElementType(name);
-    if (pseudoType == CSSSelector::PseudoElementUnknown) {
-        // FIXME-NEWPARSER: We can't add &quot;slotted&quot; to the map without breaking the old
-        // parser, so this hack ensures the new parser still recognizes it. When the new
-        // parser turns on, we can add &quot;slotted&quot; to the map and remove this code.
-        if (pseudoTypeString.startsWithIgnoringASCIICase(&quot;slotted&quot;))
-            pseudoType = CSSSelector::PseudoElementSlotted;
-        else
-            return nullptr;
-    }
-
-    auto selector = std::make_unique&lt;CSSParserSelector&gt;();
-    selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoElement);
-    selector-&gt;m_selector-&gt;setPseudoElementType(pseudoType);
-    if (pseudoType == CSSSelector::PseudoElementWebKitCustomLegacyPrefixed) {
-        ASSERT_WITH_MESSAGE(name == &quot;-webkit-input-placeholder&quot;, &quot;-webkit-input-placeholder is the only LegacyPrefix pseudo type.&quot;);
-        if (name == &quot;-webkit-input-placeholder&quot;)
-            name = AtomicString(&quot;placeholder&quot;, AtomicString::ConstructFromLiteral);
-    }
-    selector-&gt;m_selector-&gt;setValue(name);
-    return selector.release();
-}
-
-CSSParserSelector* CSSParserSelector::parsePseudoClassSelectorFromStringView(StringView&amp; pseudoTypeString)
-{
-    PseudoClassOrCompatibilityPseudoElement pseudoType = parsePseudoClassAndCompatibilityElementString(pseudoTypeString);
-    if (pseudoType.pseudoClass != CSSSelector::PseudoClassUnknown) {
-        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
-        selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoClass);
-        selector-&gt;m_selector-&gt;setPseudoClassType(pseudoType.pseudoClass);
-        return selector.release();
-    }
-    if (pseudoType.compatibilityPseudoElement != CSSSelector::PseudoElementUnknown) {
-        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
-        selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoElement);
-        selector-&gt;m_selector-&gt;setPseudoElementType(pseudoType.compatibilityPseudoElement);
-        AtomicString name = pseudoTypeString.toAtomicString();
-        selector-&gt;m_selector-&gt;setValue(name);
-        return selector.release();
-    }
-    return nullptr;
-}
-
-CSSParserSelector::CSSParserSelector()
-    : m_selector(std::make_unique&lt;CSSSelector&gt;())
-{
-}
-
-CSSParserSelector::CSSParserSelector(const QualifiedName&amp; tagQName)
-    : m_selector(std::make_unique&lt;CSSSelector&gt;(tagQName))
-{
-}
-
-CSSParserSelector::~CSSParserSelector()
-{
-    if (!m_tagHistory)
-        return;
-    Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;, 16&gt; toDelete;
-    std::unique_ptr&lt;CSSParserSelector&gt; selector = WTFMove(m_tagHistory);
-    while (true) {
-        std::unique_ptr&lt;CSSParserSelector&gt; next = WTFMove(selector-&gt;m_tagHistory);
-        toDelete.append(WTFMove(selector));
-        if (!next)
-            break;
-        selector = WTFMove(next);
-    }
-}
-
-void CSSParserSelector::adoptSelectorVector(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&amp; selectorVector)
-{
-    auto selectorList = std::make_unique&lt;CSSSelectorList&gt;();
-    selectorList-&gt;adoptSelectorVector(selectorVector);
-    m_selector-&gt;setSelectorList(WTFMove(selectorList));
-}
-
-void CSSParserSelector::setLangArgumentList(std::unique_ptr&lt;Vector&lt;AtomicString&gt;&gt; argumentList)
-{
-    ASSERT_WITH_MESSAGE(!argumentList-&gt;isEmpty(), &quot;No CSS Selector takes an empty argument list.&quot;);
-    m_selector-&gt;setLangArgumentList(WTFMove(argumentList));
-}
-
-void CSSParserSelector::setSelectorList(std::unique_ptr&lt;CSSSelectorList&gt; selectorList)
-{
-    m_selector-&gt;setSelectorList(WTFMove(selectorList));
-}
-
-static bool selectorListMatchesPseudoElement(const CSSSelectorList* selectorList)
-{
-    if (!selectorList)
-        return false;
-
-    for (const CSSSelector* subSelector = selectorList-&gt;first(); subSelector; subSelector = CSSSelectorList::next(subSelector)) {
-        for (const CSSSelector* selector = subSelector; selector; selector = selector-&gt;tagHistory()) {
-            if (selector-&gt;matchesPseudoElement())
-                return true;
-            if (const CSSSelectorList* subselectorList = selector-&gt;selectorList()) {
-                if (selectorListMatchesPseudoElement(subselectorList))
-                    return true;
-            }
-        }
-    }
-    return false;
-}
-
-bool CSSParserSelector::matchesPseudoElement() const
-{
-    return m_selector-&gt;matchesPseudoElement() || selectorListMatchesPseudoElement(m_selector-&gt;selectorList());
-}
-
-void CSSParserSelector::insertTagHistory(CSSSelector::RelationType before, std::unique_ptr&lt;CSSParserSelector&gt; selector, CSSSelector::RelationType after)
-{
-    if (m_tagHistory)
-        selector-&gt;setTagHistory(WTFMove(m_tagHistory));
-    setRelation(before);
-    selector-&gt;setRelation(after);
-    m_tagHistory = WTFMove(selector);
-}
-
-void CSSParserSelector::appendTagHistory(CSSSelector::RelationType relation, std::unique_ptr&lt;CSSParserSelector&gt; selector)
-{
-    CSSParserSelector* end = this;
-    while (end-&gt;tagHistory())
-        end = end-&gt;tagHistory();
-
-    end-&gt;setRelation(relation);
-    end-&gt;setTagHistory(WTFMove(selector));
-}
-
-void CSSParserSelector::appendTagHistory(CSSParserSelectorCombinator relation, std::unique_ptr&lt;CSSParserSelector&gt; selector)
-{
-    CSSParserSelector* end = this;
-    while (end-&gt;tagHistory())
-        end = end-&gt;tagHistory();
-
-    CSSSelector::RelationType selectorRelation;
-    switch (relation) {
-    case CSSParserSelectorCombinator::Child:
-        selectorRelation = CSSSelector::Child;
-        break;
-    case CSSParserSelectorCombinator::DescendantSpace:
-        selectorRelation = CSSSelector::DescendantSpace;
-        break;
-#if ENABLE(CSS_SELECTORS_LEVEL4)
-    case CSSParserSelectorCombinator::DescendantDoubleChild:
-        selectorRelation = CSSSelector::DescendantDoubleChild;
-        break;
-#endif
-    case CSSParserSelectorCombinator::DirectAdjacent:
-        selectorRelation = CSSSelector::DirectAdjacent;
-        break;
-    case CSSParserSelectorCombinator::IndirectAdjacent:
-        selectorRelation = CSSSelector::IndirectAdjacent;
-        break;
-    }
-    end-&gt;setRelation(selectorRelation);
-    end-&gt;setTagHistory(WTFMove(selector));
-}
-
-void CSSParserSelector::prependTagSelector(const QualifiedName&amp; tagQName, bool tagIsForNamespaceRule)
-{
-    auto second = std::make_unique&lt;CSSParserSelector&gt;();
-    second-&gt;m_selector = WTFMove(m_selector);
-    second-&gt;m_tagHistory = WTFMove(m_tagHistory);
-    m_tagHistory = WTFMove(second);
-
-    m_selector = std::make_unique&lt;CSSSelector&gt;(tagQName, tagIsForNamespaceRule);
-    m_selector-&gt;setRelation(CSSSelector::Subselector);
-}
-
-std::unique_ptr&lt;CSSParserSelector&gt; CSSParserSelector::releaseTagHistory()
-{
-    setRelation(CSSSelector::Subselector);
-    return WTFMove(m_tagHistory);
-}
-
-// FIXME-NEWPARSER: Add support for :host-context
-bool CSSParserSelector::isHostPseudoSelector() const
-{
-    return match() == CSSSelector::PseudoClass &amp;&amp; pseudoClassType() == CSSSelector::PseudoClassHost;
-}
-
-}
-
</del></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserValuesh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/css/parser/CSSParserValues.h (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserValues.h        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/parser/CSSParserValues.h        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -1,135 +0,0 @@
</span><del>-/*
- * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2014 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include &quot;CSSSelector.h&quot;
-#include &quot;CSSValueKeywords.h&quot;
-#include &quot;CSSValueList.h&quot;
-#include &lt;wtf/text/AtomicString.h&gt;
-#include &lt;wtf/text/AtomicStringHash.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebCore {
-
-class CSSValue;
-class QualifiedName;
-
-enum class CSSParserSelectorCombinator {
-    Child,
-    DescendantSpace,
-#if ENABLE(CSS_SELECTORS_LEVEL4)
-    DescendantDoubleChild,
-#endif
-    DirectAdjacent,
-    IndirectAdjacent
-};
-
-class CSSParserSelector {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    static CSSParserSelector* parsePseudoClassSelectorFromStringView(StringView&amp;);
-    static CSSParserSelector* parsePseudoElementSelectorFromStringView(StringView&amp;);
-    static CSSParserSelector* parsePagePseudoSelector(const AtomicString&amp;);
-    
-    CSSParserSelector();
-    explicit CSSParserSelector(const QualifiedName&amp;);
-    ~CSSParserSelector();
-
-    std::unique_ptr&lt;CSSSelector&gt; releaseSelector() { return WTFMove(m_selector); }
-
-    void setValue(const AtomicString&amp; value, bool matchLowerCase = false) { m_selector-&gt;setValue(value, matchLowerCase); }
-    
-    // FIXME-NEWPARSER: These two methods can go away once old parser is gone.
-    void setAttribute(const QualifiedName&amp; value, bool isCaseInsensitive) { m_selector-&gt;setAttribute(value, isCaseInsensitive); }
-    void setAttributeValueMatchingIsCaseInsensitive(bool isCaseInsensitive) { m_selector-&gt;setAttributeValueMatchingIsCaseInsensitive(isCaseInsensitive); }
-    
-    void setAttribute(const QualifiedName&amp; value, bool convertToLowercase, CSSSelector::AttributeMatchType type) { m_selector-&gt;setAttribute(value, convertToLowercase, type); }
-    
-    void setArgument(const AtomicString&amp; value) { m_selector-&gt;setArgument(value); }
-    void setNth(int a, int b) { m_selector-&gt;setNth(a, b); }
-    void setMatch(CSSSelector::Match value) { m_selector-&gt;setMatch(value); }
-    void setRelation(CSSSelector::RelationType value) { m_selector-&gt;setRelation(value); }
-    void setForPage() { m_selector-&gt;setForPage(); }
-
-    CSSSelector::Match match() const { return m_selector-&gt;match(); }
-    CSSSelector::PseudoElementType pseudoElementType() const { return m_selector-&gt;pseudoElementType(); }
-    const CSSSelectorList* selectorList() const { return m_selector-&gt;selectorList(); }
-    
-    void setPseudoElementType(CSSSelector::PseudoElementType type) { m_selector-&gt;setPseudoElementType(type); }
-
-    void adoptSelectorVector(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&amp; selectorVector);
-    void setLangArgumentList(std::unique_ptr&lt;Vector&lt;AtomicString&gt;&gt;);
-    void setSelectorList(std::unique_ptr&lt;CSSSelectorList&gt;);
-
-    CSSSelector::PseudoClassType pseudoClassType() const { return m_selector-&gt;pseudoClassType(); }
-    bool isCustomPseudoElement() const { return m_selector-&gt;isCustomPseudoElement(); }
-
-    bool isPseudoElementCueFunction() const
-    {
-#if ENABLE(VIDEO_TRACK)
-        return m_selector-&gt;match() == CSSSelector::PseudoElement &amp;&amp; m_selector-&gt;pseudoElementType() == CSSSelector::PseudoElementCue;
-#else
-        return false;
-#endif
-    }
-
-    bool hasShadowDescendant() const;
-    bool matchesPseudoElement() const;
-
-    bool isHostPseudoSelector() const;
-
-    // FIXME-NEWPARSER: &quot;slotted&quot; was removed here for now, since it leads to a combinator
-    // connection of ShadowDescendant, and the current shadow DOM code doesn't expect this. When
-    // we do fix this issue, make sure to patch the namespace prependTag code to remove the slotted
-    // special case, since it will be covered by this function once again.
-    bool needsImplicitShadowCombinatorForMatching() const;
-
-    CSSParserSelector* tagHistory() const { return m_tagHistory.get(); }
-    void setTagHistory(std::unique_ptr&lt;CSSParserSelector&gt; selector) { m_tagHistory = WTFMove(selector); }
-    void clearTagHistory() { m_tagHistory.reset(); }
-    void insertTagHistory(CSSSelector::RelationType before, std::unique_ptr&lt;CSSParserSelector&gt;, CSSSelector::RelationType after);
-    void appendTagHistory(CSSSelector::RelationType, std::unique_ptr&lt;CSSParserSelector&gt;);
-    void appendTagHistory(CSSParserSelectorCombinator, std::unique_ptr&lt;CSSParserSelector&gt;);
-    void prependTagSelector(const QualifiedName&amp;, bool tagIsForNamespaceRule = false);
-    std::unique_ptr&lt;CSSParserSelector&gt; releaseTagHistory();
-
-private:
-    std::unique_ptr&lt;CSSSelector&gt; m_selector;
-    std::unique_ptr&lt;CSSParserSelector&gt; m_tagHistory;
-};
-
-inline bool CSSParserSelector::hasShadowDescendant() const
-{
-    return m_selector-&gt;relation() == CSSSelector::ShadowDescendant;
-}
-
-inline bool CSSParserSelector::needsImplicitShadowCombinatorForMatching() const
-{
-    return match() == CSSSelector::PseudoElement
-        &amp;&amp; (pseudoElementType() == CSSSelector::PseudoElementWebKitCustom
-            || pseudoElementType() == CSSSelector::PseudoElementUserAgentCustom
-#if ENABLE(VIDEO_TRACK)
-            || pseudoElementType() == CSSSelector::PseudoElementCue
-#endif
-            || pseudoElementType() == CSSSelector::PseudoElementWebKitCustomLegacyPrefixed);
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSSelectorParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSSelectorParser.h (209670 => 209671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSSelectorParser.h        2016-12-10 20:22:37 UTC (rev 209670)
+++ trunk/Source/WebCore/css/parser/CSSSelectorParser.h        2016-12-10 20:38:50 UTC (rev 209671)
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#include &quot;CSSParserSelector.h&quot;
</ins><span class="cx"> #include &quot;CSSParserTokenRange.h&quot;
</span><del>-#include &quot;CSSParserValues.h&quot; // FIXME-NEWPARSER Change when CSSParserSelector moves into its own file.
</del><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span></span></pre>
</div>
</div>

</body>
</html>