<!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>[165402] 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/165402">165402</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-10 14:00:26 -0700 (Mon, 10 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Start splitting CSS Selectors's pseudo types
https://bugs.webkit.org/show_bug.cgi?id=130003

Reviewed by Andreas Kling.

CSS Selectors pseudo types come in 3 flavors: page, pseudo class, pseudo elements.

The three types are mixed together in a single enum list named PseudoType. Only some combinations
of match type + pseudo type are valid, but this is implicitly defined from the code.

This patch is the beginning of a refactoring to add more clear boundaries between
valid and invalid combinations.

First, the handling of page pseudo types is completely split from the other values.
The parser use a different method for handling the value CSSParserSelector::parsePagePseudoSelector().

PagePseudo types no longer store their string in the CSSSelector either to reduce the redundancy
with m_pseudoType.
When we need to generate the string for those CSSSelector, we recreate the string as needed in
CSSSelector::selectorText().

The remaining two types are not yet split in this patch but this introduce the preliminary clean up
toward that goal.
The list of parsed pseudo types is now generated at compile time from the source in SelectorPseudoTypeMap.in.

* DerivedSources.make:
The mapping of strings to pseudo types is generated from SelectorPseudoTypeMap.in
by the new script makeSelectorPseudoTypeMap.py.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSGrammar.y.in:
Split the parsing of Pseudo Types. Pseudo page get its own method. The others will need some work.

* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePagePseudoSelector):
(WebCore::CSSParserSelector::setPseudoTypeValue):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForPage):
This is an example of invalid combination that is hidden by the current code.
First, Left and Right could never appear in a pseudo class match.
(WebCore::CSSSelector::pseudoId):
(WebCore::CSSSelector::parsePseudoType):
(WebCore::appendPseudoTypeTailIfNecessary):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
(WebCore::CSSSelector::pseudoType):
(WebCore::CSSSelector::matchesPseudoElement):
(WebCore::CSSSelector::setValue):
(WebCore::CSSSelector::CSSSelector):
* css/PageRuleCollector.cpp:
(WebCore::checkPageSelectorComponents):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoTypeMap.h: Added.
* css/SelectorPseudoTypeMap.in: Added.
* css/makeSelectorPseudoTypeMap.py: Added.
(enumerablePseudoType):
(expand_ifdef_condition):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoType):</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="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSGrammaryin">trunk/Source/WebCore/css/CSSGrammar.y.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserValuescpp">trunk/Source/WebCore/css/CSSParserValues.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserValuesh">trunk/Source/WebCore/css/CSSParserValues.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSSelectorcpp">trunk/Source/WebCore/css/CSSSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSSelectorh">trunk/Source/WebCore/css/CSSSelector.h</a></li>
<li><a href="#trunkSourceWebCorecssPageRuleCollectorcpp">trunk/Source/WebCore/css/PageRuleCollector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSelectorCheckercpp">trunk/Source/WebCore/css/SelectorChecker.cpp</a></li>
<li><a href="#trunkSourceWebCorecssjitSelectorCompilercpp">trunk/Source/WebCore/cssjit/SelectorCompiler.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssSelectorPseudoTypeMaph">trunk/Source/WebCore/css/SelectorPseudoTypeMap.h</a></li>
<li><a href="#trunkSourceWebCorecssSelectorPseudoTypeMapin">trunk/Source/WebCore/css/SelectorPseudoTypeMap.in</a></li>
<li><a href="#trunkSourceWebCorecssmakeSelectorPseudoTypeMappy">trunk/Source/WebCore/css/makeSelectorPseudoTypeMap.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -3119,6 +3119,15 @@
</span><span class="cx"> ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/CSSPrimitiveValueMappings.h CSSValueKeywords.h)
</span><span class="cx"> ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp CSSValueKeywords.h)
</span><span class="cx"> 
</span><ins>+# Generate CSS Selector pseudo type name to value map.
+add_custom_command(
+    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.gperf ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.cpp
+    MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeSelectorPseudoTypeMap.py
+    WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
+    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoTypeMap.py ${WEBCORE_DIR}/css/SelectorPseudoTypeMap.in &quot;${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}&quot;
+    VERBATIM)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.cpp)
+
</ins><span class="cx"> # Generate user agent styles
</span><span class="cx"> add_custom_command(
</span><span class="cx">     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheetsData.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentStyleSheets.h
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/ChangeLog        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -1,3 +1,67 @@
</span><ins>+2014-03-10  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
+        Start splitting CSS Selectors's pseudo types
+        https://bugs.webkit.org/show_bug.cgi?id=130003
+
+        Reviewed by Andreas Kling.
+
+        CSS Selectors pseudo types come in 3 flavors: page, pseudo class, pseudo elements.
+
+        The three types are mixed together in a single enum list named PseudoType. Only some combinations
+        of match type + pseudo type are valid, but this is implicitly defined from the code.
+
+        This patch is the beginning of a refactoring to add more clear boundaries between
+        valid and invalid combinations.
+
+        First, the handling of page pseudo types is completely split from the other values.
+        The parser use a different method for handling the value CSSParserSelector::parsePagePseudoSelector().
+
+        PagePseudo types no longer store their string in the CSSSelector either to reduce the redundancy
+        with m_pseudoType.
+        When we need to generate the string for those CSSSelector, we recreate the string as needed in
+        CSSSelector::selectorText().
+
+        The remaining two types are not yet split in this patch but this introduce the preliminary clean up
+        toward that goal.
+        The list of parsed pseudo types is now generated at compile time from the source in SelectorPseudoTypeMap.in.
+
+        * DerivedSources.make:
+        The mapping of strings to pseudo types is generated from SelectorPseudoTypeMap.in
+        by the new script makeSelectorPseudoTypeMap.py.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSGrammar.y.in:
+        Split the parsing of Pseudo Types. Pseudo page get its own method. The others will need some work.
+
+        * css/CSSParserValues.cpp:
+        (WebCore::CSSParserSelector::parsePagePseudoSelector):
+        (WebCore::CSSParserSelector::setPseudoTypeValue):
+        * css/CSSParserValues.h:
+        * css/CSSSelector.cpp:
+        (WebCore::CSSSelector::specificityForPage):
+        This is an example of invalid combination that is hidden by the current code.
+        First, Left and Right could never appear in a pseudo class match.
+        (WebCore::CSSSelector::pseudoId):
+        (WebCore::CSSSelector::parsePseudoType):
+        (WebCore::appendPseudoTypeTailIfNecessary):
+        (WebCore::CSSSelector::selectorText):
+        * css/CSSSelector.h:
+        (WebCore::CSSSelector::pseudoType):
+        (WebCore::CSSSelector::matchesPseudoElement):
+        (WebCore::CSSSelector::setValue):
+        (WebCore::CSSSelector::CSSSelector):
+        * css/PageRuleCollector.cpp:
+        (WebCore::checkPageSelectorComponents):
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::checkOne):
+        * css/SelectorPseudoTypeMap.h: Added.
+        * css/SelectorPseudoTypeMap.in: Added.
+        * css/makeSelectorPseudoTypeMap.py: Added.
+        (enumerablePseudoType):
+        (expand_ifdef_condition):
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::addPseudoType):
+
</ins><span class="cx"> 2014-03-10  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         iOS build fix after http://trac.webkit.org/changeset/165385
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/DerivedSources.make        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -749,6 +749,7 @@
</span><span class="cx">     PlugInsResources.h \
</span><span class="cx">     SVGElementFactory.cpp \
</span><span class="cx">     SVGNames.cpp \
</span><ins>+    SelectorPseudoTypeMap.cpp \
</ins><span class="cx">     UserAgentScripts.h \
</span><span class="cx">     UserAgentStyleSheets.h \
</span><span class="cx">     WebKitFontFamilyNames.cpp \
</span><span class="lines">@@ -792,6 +793,14 @@
</span><span class="cx"> 
</span><span class="cx"> # --------
</span><span class="cx"> 
</span><ins>+# CSS Selector pseudo type name to value map.
+
+WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS := $(WebCore)/css/SelectorPseudoTypeMap.in
+SelectorPseudoTypeMap.cpp : $(WebCore)/css/makeSelectorPseudoTypeMap.py $(WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS)
+        python &quot;$(WebCore)/css/makeSelectorPseudoTypeMap.py&quot; $(WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS) &quot;$(FEATURE_DEFINES)&quot;
+
+# --------
+
</ins><span class="cx"> # XMLViewer CSS
</span><span class="cx"> 
</span><span class="cx"> all : XMLViewerCSS.h
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -855,6 +855,7 @@
</span><span class="cx">         DerivedSources/WebCore/PlugInsResourcesData.cpp \
</span><span class="cx">         DerivedSources/WebCore/PlugInsResources.h \
</span><span class="cx">         DerivedSources/WebCore/SettingsMacros.h \
</span><ins>+        DerivedSources/WebCore/SelectorPseudoTypeMap.cpp \
</ins><span class="cx">         DerivedSources/WebCore/UserAgentScriptsData.cpp \
</span><span class="cx">         DerivedSources/WebCore/UserAgentScripts.h \
</span><span class="cx">         DerivedSources/WebCore/UserAgentStyleSheetsData.cpp \
</span><span class="lines">@@ -2688,6 +2689,7 @@
</span><span class="cx">         Source/WebCore/css/SelectorCheckerTestFunctions.h \
</span><span class="cx">         Source/WebCore/css/SelectorFilter.cpp \
</span><span class="cx">         Source/WebCore/css/SelectorFilter.h \
</span><ins>+        Source/WebCore/css/SelectorPseudoTypeMap.h \
</ins><span class="cx">         Source/WebCore/css/StyleInvalidationAnalysis.cpp \
</span><span class="cx">         Source/WebCore/css/StyleInvalidationAnalysis.h \
</span><span class="cx">         Source/WebCore/css/StyleMedia.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -290,6 +290,7 @@
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\CSSPropertyNames.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\CSSValueKeywords.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoTypeMap.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSANGLEInstancedArrays.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -5152,6 +5152,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\CSSValueKeywords.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoTypeMap.cpp&quot;&gt;
+      &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\EventFactory.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -1393,6 +1393,7 @@
</span><span class="cx">                 41FA303E1316C29C00C0BFC5 /* RenderMediaControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41FA303C1316C29C00C0BFC5 /* RenderMediaControls.cpp */; };
</span><span class="cx">                 41FA303F1316C29C00C0BFC5 /* RenderMediaControls.h in Headers */ = {isa = PBXBuildFile; fileRef = 41FA303D1316C29C00C0BFC5 /* RenderMediaControls.h */; };
</span><span class="cx">                 4306E4E614955543007F17AC /* KillRingNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4306E4E514955543007F17AC /* KillRingNone.cpp */; };
</span><ins>+                43107BE218CC19DE00CC18E8 /* SelectorPseudoTypeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 43107BE118CC19DE00CC18E8 /* SelectorPseudoTypeMap.h */; };
</ins><span class="cx">                 43142E7A13B1E97700F1C871 /* SVGAnimatedRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43142E7913B1E97700F1C871 /* SVGAnimatedRect.cpp */; };
</span><span class="cx">                 431A2F9C13B6F2B0007791E4 /* SVGAnimatedNumberOptionalNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 431A2F9A13B6F2B0007791E4 /* SVGAnimatedNumberOptionalNumber.h */; };
</span><span class="cx">                 431A2F9D13B6F2B0007791E4 /* SVGAnimatedNumberOptionalNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 431A2F9B13B6F2B0007791E4 /* SVGAnimatedNumberOptionalNumber.cpp */; };
</span><span class="lines">@@ -1466,6 +1467,8 @@
</span><span class="cx">                 43A625F813B3304000AC94B8 /* SVGAnimatedColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A625F613B3304000AC94B8 /* SVGAnimatedColor.h */; };
</span><span class="cx">                 43A625F913B3304000AC94B8 /* SVGAnimatedColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43A625F713B3304000AC94B8 /* SVGAnimatedColor.cpp */; };
</span><span class="cx">                 43A6266713B3D11000AC94B8 /* SVGAnimatedString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43A6266613B3D11000AC94B8 /* SVGAnimatedString.cpp */; };
</span><ins>+                43B85ED118CBEACE00E31AF4 /* makeSelectorPseudoTypeMap.py in Resources */ = {isa = PBXBuildFile; fileRef = 43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoTypeMap.py */; };
+                43B85ED418CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43B85ED218CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp */; };
</ins><span class="cx">                 43B9336913B261B1004584BF /* SVGAnimatedPointList.h in Headers */ = {isa = PBXBuildFile; fileRef = 43B9336713B261B1004584BF /* SVGAnimatedPointList.h */; };
</span><span class="cx">                 43B9336A13B261B1004584BF /* SVGAnimatedPointList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43B9336813B261B1004584BF /* SVGAnimatedPointList.cpp */; };
</span><span class="cx">                 43C092BC12D9E4EE00A989C3 /* RenderSVGForeignObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 43C092BA12D9E4EE00A989C3 /* RenderSVGForeignObject.h */; };
</span><span class="lines">@@ -8257,6 +8260,7 @@
</span><span class="cx">                 41FA303C1316C29C00C0BFC5 /* RenderMediaControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMediaControls.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 41FA303D1316C29C00C0BFC5 /* RenderMediaControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMediaControls.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4306E4E514955543007F17AC /* KillRingNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KillRingNone.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                43107BE118CC19DE00CC18E8 /* SelectorPseudoTypeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorPseudoTypeMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 43142E7913B1E97700F1C871 /* SVGAnimatedRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedRect.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 431A2F9A13B6F2B0007791E4 /* SVGAnimatedNumberOptionalNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedNumberOptionalNumber.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 431A2F9B13B6F2B0007791E4 /* SVGAnimatedNumberOptionalNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedNumberOptionalNumber.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -8357,6 +8361,10 @@
</span><span class="cx">                 43A625F613B3304000AC94B8 /* SVGAnimatedColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedColor.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 43A625F713B3304000AC94B8 /* SVGAnimatedColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedColor.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 43A6266613B3D11000AC94B8 /* SVGAnimatedString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedString.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoTypeMap.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = makeSelectorPseudoTypeMap.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                43B85ED218CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorPseudoTypeMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                43B85ED318CBEC5200E31AF4 /* SelectorPseudoTypeMap.gperf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SelectorPseudoTypeMap.gperf; sourceTree = &quot;&lt;group&gt;&quot;; };
+                43B85ED618CBEC9700E31AF4 /* SelectorPseudoTypeMap.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SelectorPseudoTypeMap.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 43B9336713B261B1004584BF /* SVGAnimatedPointList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPointList.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 43B9336813B261B1004584BF /* SVGAnimatedPointList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedPointList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 43C092B912D9E4EE00A989C3 /* RenderSVGForeignObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGForeignObject.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15834,6 +15842,8 @@
</span><span class="cx">                                 44A28AAE12DFB8BF00AE923B /* MathMLNames.h */,
</span><span class="cx">                                 71E2183817359FB8006E6E4D /* PlugInsResources.h */,
</span><span class="cx">                                 71E2183917359FB8006E6E4D /* PlugInsResourcesData.cpp */,
</span><ins>+                                43B85ED218CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp */,
+                                43B85ED318CBEC5200E31AF4 /* SelectorPseudoTypeMap.gperf */,
</ins><span class="cx">                                 53EF766A16530A61004CBE49 /* SettingsMacros.h */,
</span><span class="cx">                                 656581E609D1508D000E61D7 /* SVGElementFactory.cpp */,
</span><span class="cx">                                 656581E709D1508D000E61D7 /* SVGElementFactory.h */,
</span><span class="lines">@@ -21546,6 +21556,7 @@
</span><span class="cx">                                 4A9CC81F16BF9BB400EC645A /* InspectorCSSOMWrappers.h */,
</span><span class="cx">                                 E55F4979151B888000BB67DB /* LengthFunctions.cpp */,
</span><span class="cx">                                 E5BA7D62151437CA00FE1E3F /* LengthFunctions.h */,
</span><ins>+                                43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoTypeMap.py */,
</ins><span class="cx">                                 93CA4C9A09DF93FA00DF8677 /* make-css-file-arrays.pl */,
</span><span class="cx">                                 93CA4C9B09DF93FA00DF8677 /* makeprop.pl */,
</span><span class="cx">                                 93CA4C9D09DF93FA00DF8677 /* makevalues.pl */,
</span><span class="lines">@@ -21592,6 +21603,8 @@
</span><span class="cx">                                 432D3FE718A8658400D7DC03 /* SelectorCheckerTestFunctions.h */,
</span><span class="cx">                                 415071551685067300C3C7B3 /* SelectorFilter.cpp */,
</span><span class="cx">                                 415071561685067300C3C7B3 /* SelectorFilter.h */,
</span><ins>+                                43B85ED618CBEC9700E31AF4 /* SelectorPseudoTypeMap.in */,
+                                43107BE118CC19DE00CC18E8 /* SelectorPseudoTypeMap.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">@@ -23871,6 +23884,7 @@
</span><span class="cx">                                 A871DB310A150BD600B12A68 /* HTMLTableRowElement.h in Headers */,
</span><span class="cx">                                 93442C9E0D2B335C00338FF9 /* HTMLTableRowsCollection.h in Headers */,
</span><span class="cx">                                 A871DB250A150BD600B12A68 /* HTMLTableSectionElement.h in Headers */,
</span><ins>+                                43107BE218CC19DE00CC18E8 /* SelectorPseudoTypeMap.h in Headers */,
</ins><span class="cx">                                 D66817FB166FE6D700FA07B4 /* HTMLTemplateElement.h in Headers */,
</span><span class="cx">                                 A81369D6097374F600D74463 /* HTMLTextAreaElement.h in Headers */,
</span><span class="cx">                                 9BC6C21B13CCC97B008E0337 /* HTMLTextFormControlElement.h in Headers */,
</span><span class="lines">@@ -26205,6 +26219,7 @@
</span><span class="cx">                         files = (
</span><span class="cx">                                 46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */,
</span><span class="cx">                                 46D4F2490AF97E810035385A /* cellCursor.png in Resources */,
</span><ins>+                                43B85ED118CBEACE00E31AF4 /* makeSelectorPseudoTypeMap.py in Resources */,
</ins><span class="cx">                                 93153BDE141959F400FCF5BE /* deleteButton.png in Resources */,
</span><span class="cx">                                 93153BCD1417FBBF00FCF5BE /* deleteButton@2x.png in Resources */,
</span><span class="cx">                                 93153BE014195A2800FCF5BE /* deleteButtonPressed.png in Resources */,
</span><span class="lines">@@ -27023,6 +27038,7 @@
</span><span class="cx">                                 6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */,
</span><span class="cx">                                 44DAB5B115A623580097C1E4 /* Extensions3DOpenGLCommon.cpp in Sources */,
</span><span class="cx">                                 7728694E14F8882500F484DC /* EXTTextureFilterAnisotropic.cpp in Sources */,
</span><ins>+                                43B85ED418CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp in Sources */,
</ins><span class="cx">                                 A75E8B880E1DE2D6007F2481 /* FEBlend.cpp in Sources */,
</span><span class="cx">                                 A75E8B8A0E1DE2D6007F2481 /* FEColorMatrix.cpp in Sources */,
</span><span class="cx">                                 A75E8B8C0E1DE2D6007F2481 /* FEComponentTransfer.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGrammaryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGrammar.y.in        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -1170,13 +1170,7 @@
</span><span class="cx"> 
</span><span class="cx"> pseudo_page:
</span><span class="cx">     ':' IDENT {
</span><del>-        $$ = nullptr;
-        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
-        selector-&gt;setMatch(CSSSelector::PagePseudoClass);
-        $2.lower();
-        selector-&gt;setValue($2);
-        if (selector-&gt;pseudoType() != CSSSelector::PseudoUnknown)
-            $$ = selector.release();
</del><ins>+        $$ = CSSParserSelector::parsePagePseudoSelector($2);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> pseudo:
</span><span class="lines">@@ -1185,7 +1179,7 @@
</span><span class="cx">         auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><span class="cx">         selector-&gt;setMatch(CSSSelector::PseudoClass);
</span><span class="cx">         $2.lower();
</span><del>-        selector-&gt;setValue($2);
</del><ins>+        selector-&gt;setPseudoTypeValue($2);
</ins><span class="cx">         if (selector-&gt;pseudoType() != CSSSelector::PseudoUnknown)
</span><span class="cx">             $$ = selector.release();
</span><span class="cx">     }
</span><span class="lines">@@ -1194,7 +1188,7 @@
</span><span class="cx">         auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><span class="cx">         selector-&gt;setMatch(CSSSelector::PseudoElement);
</span><span class="cx">         $3.lower();
</span><del>-        selector-&gt;setValue($3);
</del><ins>+        selector-&gt;setPseudoTypeValue($3);
</ins><span class="cx">         if (selector-&gt;pseudoType() != CSSSelector::PseudoUnknown)
</span><span class="cx">             $$ = selector.release();
</span><span class="cx">     }
</span><span class="lines">@@ -1206,7 +1200,7 @@
</span><span class="cx">             auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><span class="cx">             selector-&gt;setMatch(CSSSelector::PseudoClass);
</span><span class="cx">             selector-&gt;adoptSelectorVector(*std::unique_ptr&lt;Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&gt;($5));
</span><del>-            selector-&gt;setValue($3);
</del><ins>+            selector-&gt;setPseudoTypeValue($3);
</ins><span class="cx">             if (selector-&gt;pseudoType() == CSSSelector::PseudoCue)
</span><span class="cx">                 $$ = selector.release();
</span><span class="cx">         }
</span><span class="lines">@@ -1224,7 +1218,7 @@
</span><span class="cx">             selector-&gt;setMatch(CSSSelector::PseudoClass);
</span><span class="cx">             selector-&gt;adoptSelectorVector(*std::unique_ptr&lt;Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&gt;($4));
</span><span class="cx">             $2.lower();
</span><del>-            selector-&gt;setValue($2);
</del><ins>+            selector-&gt;setPseudoTypeValue($2);
</ins><span class="cx">             if (selector-&gt;pseudoType() == CSSSelector::PseudoAny)
</span><span class="cx">                 $$ = selector.release();
</span><span class="cx">         }
</span><span class="lines">@@ -1235,7 +1229,7 @@
</span><span class="cx">         auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><span class="cx">         selector-&gt;setMatch(CSSSelector::PseudoClass);
</span><span class="cx">         selector-&gt;setArgument($4);
</span><del>-        selector-&gt;setValue($2);
</del><ins>+        selector-&gt;setPseudoTypeValue($2);
</ins><span class="cx">         if (selector-&gt;pseudoType() != CSSSelector::PseudoUnknown)
</span><span class="cx">             $$ = selector.release();
</span><span class="cx">     }
</span><span class="lines">@@ -1245,7 +1239,7 @@
</span><span class="cx">         auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><span class="cx">         selector-&gt;setMatch(CSSSelector::PseudoClass);
</span><span class="cx">         selector-&gt;setArgument(AtomicString::number($4 * $5));
</span><del>-        selector-&gt;setValue($2);
</del><ins>+        selector-&gt;setPseudoTypeValue($2);
</ins><span class="cx">         if (selector-&gt;pseudoType() != CSSSelector::PseudoUnknown)
</span><span class="cx">             $$ = selector.release();
</span><span class="cx">     }
</span><span class="lines">@@ -1255,7 +1249,7 @@
</span><span class="cx">         selector-&gt;setMatch(CSSSelector::PseudoClass);
</span><span class="cx">         selector-&gt;setArgument($4);
</span><span class="cx">         $2.lower();
</span><del>-        selector-&gt;setValue($2);
</del><ins>+        selector-&gt;setPseudoTypeValue($2);
</ins><span class="cx">         CSSSelector::PseudoType type = selector-&gt;pseudoType();
</span><span class="cx">         if (type == CSSSelector::PseudoUnknown)
</span><span class="cx">             selector = nullptr;
</span><span class="lines">@@ -1281,7 +1275,7 @@
</span><span class="cx">             $$-&gt;adoptSelectorVector(selectorVector);
</span><span class="cx"> 
</span><span class="cx">             $2.lower();
</span><del>-            $$-&gt;setValue($2);
</del><ins>+            $$-&gt;setPseudoTypeValue($2);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">   ;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.cpp (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.cpp        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/css/CSSParserValues.cpp        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -146,6 +146,24 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CSSParserSelector* CSSParserSelector::parsePagePseudoSelector(const CSSParserString&amp; pseudoTypeString)
+{
+    CSSSelector::PseudoType pseudoType;
+    if (pseudoTypeString.equalIgnoringCase(&quot;first&quot;))
+        pseudoType = CSSSelector::PseudoFirst;
+    else if (pseudoTypeString.equalIgnoringCase(&quot;left&quot;))
+        pseudoType = CSSSelector::PseudoLeft;
+    else if (pseudoTypeString.equalIgnoringCase(&quot;right&quot;))
+        pseudoType = CSSSelector::PseudoRight;
+    else
+        return nullptr;
+
+    auto selector = std::make_unique&lt;CSSParserSelector&gt;();
+    selector-&gt;m_selector-&gt;m_match = CSSSelector::PagePseudoClass;
+    selector-&gt;m_selector-&gt;m_pseudoType = pseudoType;
+    return selector.release();
+}
+
</ins><span class="cx"> CSSParserSelector::CSSParserSelector()
</span><span class="cx">     : m_selector(std::make_unique&lt;CSSSelector&gt;())
</span><span class="cx"> {
</span><span class="lines">@@ -178,6 +196,121 @@
</span><span class="cx">     m_selector-&gt;setSelectorList(std::move(selectorList));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CSSParserSelector::setPseudoTypeValue(const CSSParserString&amp; pseudoTypeString)
+{
+    AtomicString name = pseudoTypeString;
+    m_selector-&gt;setValue(name);
+
+    CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoType(name);
+    bool element = false; // pseudo-element
+    bool compat = false; // single colon compatbility mode
+
+    switch (pseudoType) {
+    case CSSSelector::PseudoAfter:
+    case CSSSelector::PseudoBefore:
+#if ENABLE(VIDEO_TRACK)
+    case CSSSelector::PseudoCue:
+#endif
+    case CSSSelector::PseudoFirstLetter:
+    case CSSSelector::PseudoFirstLine:
+        compat = true;
+        FALLTHROUGH;
+    case CSSSelector::PseudoResizer:
+    case CSSSelector::PseudoScrollbar:
+    case CSSSelector::PseudoScrollbarCorner:
+    case CSSSelector::PseudoScrollbarButton:
+    case CSSSelector::PseudoScrollbarThumb:
+    case CSSSelector::PseudoScrollbarTrack:
+    case CSSSelector::PseudoScrollbarTrackPiece:
+    case CSSSelector::PseudoSelection:
+    case CSSSelector::PseudoUserAgentCustomElement:
+    case CSSSelector::PseudoWebKitCustomElement:
+        element = true;
+        break;
+    case CSSSelector::PseudoUnknown:
+    case CSSSelector::PseudoEmpty:
+    case CSSSelector::PseudoFirstChild:
+    case CSSSelector::PseudoFirstOfType:
+    case CSSSelector::PseudoLastChild:
+    case CSSSelector::PseudoLastOfType:
+    case CSSSelector::PseudoOnlyChild:
+    case CSSSelector::PseudoOnlyOfType:
+    case CSSSelector::PseudoNthChild:
+    case CSSSelector::PseudoNthOfType:
+    case CSSSelector::PseudoNthLastChild:
+    case CSSSelector::PseudoNthLastOfType:
+    case CSSSelector::PseudoLink:
+    case CSSSelector::PseudoVisited:
+    case CSSSelector::PseudoAny:
+    case CSSSelector::PseudoAnyLink:
+    case CSSSelector::PseudoAutofill:
+    case CSSSelector::PseudoHover:
+    case CSSSelector::PseudoDrag:
+    case CSSSelector::PseudoFocus:
+    case CSSSelector::PseudoActive:
+    case CSSSelector::PseudoChecked:
+    case CSSSelector::PseudoEnabled:
+    case CSSSelector::PseudoFullPageMedia:
+    case CSSSelector::PseudoDefault:
+    case CSSSelector::PseudoDisabled:
+    case CSSSelector::PseudoOptional:
+    case CSSSelector::PseudoRequired:
+    case CSSSelector::PseudoReadOnly:
+    case CSSSelector::PseudoReadWrite:
+    case CSSSelector::PseudoScope:
+    case CSSSelector::PseudoValid:
+    case CSSSelector::PseudoInvalid:
+    case CSSSelector::PseudoIndeterminate:
+    case CSSSelector::PseudoTarget:
+    case CSSSelector::PseudoLang:
+    case CSSSelector::PseudoNot:
+    case CSSSelector::PseudoRoot:
+    case CSSSelector::PseudoScrollbarBack:
+    case CSSSelector::PseudoScrollbarForward:
+    case CSSSelector::PseudoWindowInactive:
+    case CSSSelector::PseudoCornerPresent:
+    case CSSSelector::PseudoDecrement:
+    case CSSSelector::PseudoIncrement:
+    case CSSSelector::PseudoHorizontal:
+    case CSSSelector::PseudoVertical:
+    case CSSSelector::PseudoStart:
+    case CSSSelector::PseudoEnd:
+    case CSSSelector::PseudoDoubleButton:
+    case CSSSelector::PseudoSingleButton:
+    case CSSSelector::PseudoNoButton:
+#if ENABLE(FULLSCREEN_API)
+    case CSSSelector::PseudoFullScreen:
+    case CSSSelector::PseudoFullScreenDocument:
+    case CSSSelector::PseudoFullScreenAncestor:
+    case CSSSelector::PseudoAnimatingFullScreenTransition:
+#endif
+    case CSSSelector::PseudoInRange:
+    case CSSSelector::PseudoOutOfRange:
+#if ENABLE(VIDEO_TRACK)
+    case CSSSelector::PseudoFuture:
+    case CSSSelector::PseudoPast:
+#endif
+        break;
+    case CSSSelector::PseudoFirst:
+    case CSSSelector::PseudoLeft:
+    case CSSSelector::PseudoRight:
+        ASSERT_NOT_REACHED();
+        break;
+    }
+
+    unsigned matchType = m_selector-&gt;m_match;
+    if (matchType == CSSSelector::PseudoClass &amp;&amp; element) {
+        if (!compat)
+            pseudoType = CSSSelector::PseudoUnknown;
+        else
+            matchType = CSSSelector::PseudoElement;
+    } else if (matchType == CSSSelector::PseudoElement &amp;&amp; !element)
+        pseudoType = CSSSelector::PseudoUnknown;
+
+    m_selector-&gt;m_match = matchType;
+    m_selector-&gt;m_pseudoType = pseudoType;
+}
+
</ins><span class="cx"> bool CSSParserSelector::isSimple() const
</span><span class="cx"> {
</span><span class="cx">     if (m_selector-&gt;selectorList() || m_selector-&gt;matchesPseudoElement())
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.h (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.h        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/css/CSSParserValues.h        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -171,6 +171,8 @@
</span><span class="cx"> class CSSParserSelector {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><ins>+    static CSSParserSelector* parsePagePseudoSelector(const CSSParserString&amp; pseudoTypeString);
+
</ins><span class="cx">     CSSParserSelector();
</span><span class="cx">     explicit CSSParserSelector(const QualifiedName&amp;);
</span><span class="cx">     ~CSSParserSelector();
</span><span class="lines">@@ -184,8 +186,10 @@
</span><span class="cx">     void setRelation(CSSSelector::Relation value) { m_selector-&gt;m_relation = value; }
</span><span class="cx">     void setForPage() { m_selector-&gt;setForPage(); }
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx">     void adoptSelectorVector(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&amp; selectorVector);
</span><span class="cx"> 
</span><ins>+    void setPseudoTypeValue(const CSSParserString&amp; pseudoTypeString);
</ins><span class="cx">     CSSSelector::PseudoType pseudoType() const { return m_selector-&gt;pseudoType(); }
</span><span class="cx">     bool isCustomPseudoElement() const { return m_selector-&gt;isCustomPseudoElement(); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelector.cpp (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.cpp        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/css/CSSSelector.cpp        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;CSSOMUtils.h&quot;
</span><span class="cx"> #include &quot;CSSSelectorList.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><ins>+#include &quot;SelectorPseudoTypeMap.h&quot;
</ins><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="lines">@@ -121,17 +122,15 @@
</span><span class="cx">         case Tag:
</span><span class="cx">             s += tagQName().localName() == starAtom ? 0 : 4;
</span><span class="cx">             break;
</span><del>-        case PseudoClass:
</del><ins>+        case PagePseudoClass:
</ins><span class="cx">             switch (component-&gt;pseudoType()) {
</span><del>-            case PseudoFirstPage:
</del><ins>+            case PseudoFirst:
</ins><span class="cx">                 s += 2;
</span><span class="cx">                 break;
</span><del>-            case PseudoLeftPage:
-            case PseudoRightPage:
</del><ins>+            case PseudoLeft:
+            case PseudoRight:
</ins><span class="cx">                 s += 1;
</span><span class="cx">                 break;
</span><del>-            case PseudoNotParsed:
-                break;
</del><span class="cx">             default:
</span><span class="cx">                 ASSERT_NOT_REACHED();
</span><span class="cx">             }
</span><span class="lines">@@ -231,265 +230,43 @@
</span><span class="cx">     case PseudoDoubleButton:
</span><span class="cx">     case PseudoSingleButton:
</span><span class="cx">     case PseudoNoButton:
</span><del>-    case PseudoFirstPage:
-    case PseudoLeftPage:
-    case PseudoRightPage:
</del><ins>+    case PseudoFirst:
+    case PseudoLeft:
+    case PseudoRight:
</ins><span class="cx">     case PseudoInRange:
</span><span class="cx">     case PseudoOutOfRange:
</span><span class="cx">     case PseudoUserAgentCustomElement:
</span><span class="cx">     case PseudoWebKitCustomElement:
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     case PseudoCue:
</span><del>-    case PseudoFutureCue:
-    case PseudoPastCue:
</del><ins>+    case PseudoFuture:
+    case PseudoPast:
</ins><span class="cx"> #endif
</span><span class="cx">         return NOPSEUDO;
</span><del>-    case PseudoNotParsed:
-        ASSERT_NOT_REACHED();
-        return NOPSEUDO;
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx">     return NOPSEUDO;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static NEVER_INLINE void populatePseudoTypeByNameMap(HashMap&lt;AtomicString, CSSSelector::PseudoType&gt;&amp; map)
</del><ins>+CSSSelector::PseudoType CSSSelector::parsePseudoType(const String&amp; name)
</ins><span class="cx"> {
</span><del>-    struct TableEntry {
-        const char* name;
-        unsigned nameLength;
-        CSSSelector::PseudoType type;
-    };
-
-    // Could use strlen in this macro but not all compilers can constant-fold it.
-#define TABLE_ENTRY(name, type) { name, sizeof(name) - 1, CSSSelector::type },
-
-    static const TableEntry table[] = {
-        TABLE_ENTRY(&quot;-khtml-drag&quot;, PseudoDrag)
-        TABLE_ENTRY(&quot;-webkit-any(&quot;, PseudoAny)
-        TABLE_ENTRY(&quot;-webkit-any-link&quot;, PseudoAnyLink)
-        TABLE_ENTRY(&quot;-webkit-autofill&quot;, PseudoAutofill)
-        TABLE_ENTRY(&quot;-webkit-drag&quot;, PseudoDrag)
-        TABLE_ENTRY(&quot;-webkit-full-page-media&quot;, PseudoFullPageMedia)
-        TABLE_ENTRY(&quot;-webkit-resizer&quot;, PseudoResizer)
-        TABLE_ENTRY(&quot;-webkit-scrollbar&quot;, PseudoScrollbar)
-        TABLE_ENTRY(&quot;-webkit-scrollbar-button&quot;, PseudoScrollbarButton)
-        TABLE_ENTRY(&quot;-webkit-scrollbar-corner&quot;, PseudoScrollbarCorner)
-        TABLE_ENTRY(&quot;-webkit-scrollbar-thumb&quot;, PseudoScrollbarThumb)
-        TABLE_ENTRY(&quot;-webkit-scrollbar-track&quot;, PseudoScrollbarTrack)
-        TABLE_ENTRY(&quot;-webkit-scrollbar-track-piece&quot;, PseudoScrollbarTrackPiece)
-        TABLE_ENTRY(&quot;active&quot;, PseudoActive)
-        TABLE_ENTRY(&quot;after&quot;, PseudoAfter)
-        TABLE_ENTRY(&quot;before&quot;, PseudoBefore)
-        TABLE_ENTRY(&quot;checked&quot;, PseudoChecked)
-        TABLE_ENTRY(&quot;corner-present&quot;, PseudoCornerPresent)
-        TABLE_ENTRY(&quot;decrement&quot;, PseudoDecrement)
-        TABLE_ENTRY(&quot;default&quot;, PseudoDefault)
-        TABLE_ENTRY(&quot;disabled&quot;, PseudoDisabled)
-        TABLE_ENTRY(&quot;double-button&quot;, PseudoDoubleButton)
-        TABLE_ENTRY(&quot;empty&quot;, PseudoEmpty)
-        TABLE_ENTRY(&quot;enabled&quot;, PseudoEnabled)
-        TABLE_ENTRY(&quot;end&quot;, PseudoEnd)
-        TABLE_ENTRY(&quot;first&quot;, PseudoFirstPage)
-        TABLE_ENTRY(&quot;first-child&quot;, PseudoFirstChild)
-        TABLE_ENTRY(&quot;first-letter&quot;, PseudoFirstLetter)
-        TABLE_ENTRY(&quot;first-line&quot;, PseudoFirstLine)
-        TABLE_ENTRY(&quot;first-of-type&quot;, PseudoFirstOfType)
-        TABLE_ENTRY(&quot;focus&quot;, PseudoFocus)
-        TABLE_ENTRY(&quot;horizontal&quot;, PseudoHorizontal)
-        TABLE_ENTRY(&quot;hover&quot;, PseudoHover)
-        TABLE_ENTRY(&quot;in-range&quot;, PseudoInRange)
-        TABLE_ENTRY(&quot;increment&quot;, PseudoIncrement)
-        TABLE_ENTRY(&quot;indeterminate&quot;, PseudoIndeterminate)
-        TABLE_ENTRY(&quot;invalid&quot;, PseudoInvalid)
-        TABLE_ENTRY(&quot;lang(&quot;, PseudoLang)
-        TABLE_ENTRY(&quot;last-child&quot;, PseudoLastChild)
-        TABLE_ENTRY(&quot;last-of-type&quot;, PseudoLastOfType)
-        TABLE_ENTRY(&quot;left&quot;, PseudoLeftPage)
-        TABLE_ENTRY(&quot;link&quot;, PseudoLink)
-        TABLE_ENTRY(&quot;no-button&quot;, PseudoNoButton)
-        TABLE_ENTRY(&quot;not(&quot;, PseudoNot)
-        TABLE_ENTRY(&quot;nth-child(&quot;, PseudoNthChild)
-        TABLE_ENTRY(&quot;nth-last-child(&quot;, PseudoNthLastChild)
-        TABLE_ENTRY(&quot;nth-last-of-type(&quot;, PseudoNthLastOfType)
-        TABLE_ENTRY(&quot;nth-of-type(&quot;, PseudoNthOfType)
-        TABLE_ENTRY(&quot;only-child&quot;, PseudoOnlyChild)
-        TABLE_ENTRY(&quot;only-of-type&quot;, PseudoOnlyOfType)
-        TABLE_ENTRY(&quot;optional&quot;, PseudoOptional)
-        TABLE_ENTRY(&quot;out-of-range&quot;, PseudoOutOfRange)
-        TABLE_ENTRY(&quot;read-only&quot;, PseudoReadOnly)
-        TABLE_ENTRY(&quot;read-write&quot;, PseudoReadWrite)
-        TABLE_ENTRY(&quot;required&quot;, PseudoRequired)
-        TABLE_ENTRY(&quot;right&quot;, PseudoRightPage)
-        TABLE_ENTRY(&quot;root&quot;, PseudoRoot)
-        TABLE_ENTRY(&quot;scope&quot;, PseudoScope)
-        TABLE_ENTRY(&quot;selection&quot;, PseudoSelection)
-        TABLE_ENTRY(&quot;single-button&quot;, PseudoSingleButton)
-        TABLE_ENTRY(&quot;start&quot;, PseudoStart)
-        TABLE_ENTRY(&quot;target&quot;, PseudoTarget)
-        TABLE_ENTRY(&quot;valid&quot;, PseudoValid)
-        TABLE_ENTRY(&quot;vertical&quot;, PseudoVertical)
-        TABLE_ENTRY(&quot;visited&quot;, PseudoVisited)
-        TABLE_ENTRY(&quot;window-inactive&quot;, PseudoWindowInactive)
-
-#if ENABLE(FULLSCREEN_API)
-        TABLE_ENTRY(&quot;-webkit-animating-full-screen-transition&quot;, PseudoAnimatingFullScreenTransition)
-        TABLE_ENTRY(&quot;-webkit-full-screen&quot;, PseudoFullScreen)
-        TABLE_ENTRY(&quot;-webkit-full-screen-ancestor&quot;, PseudoFullScreenAncestor)
-        TABLE_ENTRY(&quot;-webkit-full-screen-document&quot;, PseudoFullScreenDocument)
-#endif
-
-#if ENABLE(VIDEO_TRACK)
-        TABLE_ENTRY(&quot;cue(&quot;, PseudoCue)
-        TABLE_ENTRY(&quot;future&quot;, PseudoFutureCue)
-        TABLE_ENTRY(&quot;past&quot;, PseudoPastCue)
-#endif
-    };
-
-#undef TABLE_ENTRY
-
-    for (unsigned i = 0; i &lt; WTF_ARRAY_LENGTH(table); ++i)
-        map.add(AtomicString(table[i].name, table[i].nameLength, AtomicString::ConstructFromLiteral), table[i].type);
-}
-
-CSSSelector::PseudoType CSSSelector::parsePseudoType(const AtomicString&amp; name)
-{
</del><span class="cx">     if (name.isNull())
</span><span class="cx">         return PseudoUnknown;
</span><span class="cx"> 
</span><del>-    static NeverDestroyed&lt;HashMap&lt;AtomicString, CSSSelector::PseudoType&gt;&gt; types;
-    if (types.get().isEmpty())
-        populatePseudoTypeByNameMap(types);
-    if (PseudoType type = types.get().get(name))
-        return type;
</del><ins>+    PseudoType type = parsePseudoTypeString(*name.impl());
+    if (type == PseudoUnknown) {
+        if (name.startsWith(&quot;-webkit-&quot;))
+            type = PseudoWebKitCustomElement;
</ins><span class="cx"> 
</span><del>-    if (name.startsWith(&quot;-webkit-&quot;))
-        return PseudoWebKitCustomElement;
-
-    // FIXME: This is strange. Why would all strings that start with &quot;cue&quot; be &quot;user agent custom&quot;?
-    if (name.startsWith(&quot;x-&quot;) || name.startsWith(&quot;cue&quot;))
-        return PseudoUserAgentCustomElement;
-
-    return PseudoUnknown;
-}
-
-void CSSSelector::extractPseudoType() const
-{
-    if (m_match != PseudoClass &amp;&amp; m_match != PseudoElement &amp;&amp; m_match != PagePseudoClass)
-        return;
-
-    m_pseudoType = parsePseudoType(value());
-
-    bool element = false; // pseudo-element
-    bool compat = false; // single colon compatbility mode
-    bool isPagePseudoClass = false; // Page pseudo-class
-
-    switch (m_pseudoType) {
-    case PseudoAfter:
-    case PseudoBefore:
-#if ENABLE(VIDEO_TRACK)
-    case PseudoCue:
-#endif
-    case PseudoFirstLetter:
-    case PseudoFirstLine:
-        compat = true;
-        FALLTHROUGH;
-    case PseudoResizer:
-    case PseudoScrollbar:
-    case PseudoScrollbarCorner:
-    case PseudoScrollbarButton:
-    case PseudoScrollbarThumb:
-    case PseudoScrollbarTrack:
-    case PseudoScrollbarTrackPiece:
-    case PseudoSelection:
-    case PseudoUserAgentCustomElement:
-    case PseudoWebKitCustomElement:
-        element = true;
-        break;
-    case PseudoUnknown:
-    case PseudoEmpty:
-    case PseudoFirstChild:
-    case PseudoFirstOfType:
-    case PseudoLastChild:
-    case PseudoLastOfType:
-    case PseudoOnlyChild:
-    case PseudoOnlyOfType:
-    case PseudoNthChild:
-    case PseudoNthOfType:
-    case PseudoNthLastChild:
-    case PseudoNthLastOfType:
-    case PseudoLink:
-    case PseudoVisited:
-    case PseudoAny:
-    case PseudoAnyLink:
-    case PseudoAutofill:
-    case PseudoHover:
-    case PseudoDrag:
-    case PseudoFocus:
-    case PseudoActive:
-    case PseudoChecked:
-    case PseudoEnabled:
-    case PseudoFullPageMedia:
-    case PseudoDefault:
-    case PseudoDisabled:
-    case PseudoOptional:
-    case PseudoRequired:
-    case PseudoReadOnly:
-    case PseudoReadWrite:
-    case PseudoScope:
-    case PseudoValid:
-    case PseudoInvalid:
-    case PseudoIndeterminate:
-    case PseudoTarget:
-    case PseudoLang:
-    case PseudoNot:
-    case PseudoRoot:
-    case PseudoScrollbarBack:
-    case PseudoScrollbarForward:
-    case PseudoWindowInactive:
-    case PseudoCornerPresent:
-    case PseudoDecrement:
-    case PseudoIncrement:
-    case PseudoHorizontal:
-    case PseudoVertical:
-    case PseudoStart:
-    case PseudoEnd:
-    case PseudoDoubleButton:
-    case PseudoSingleButton:
-    case PseudoNoButton:
-    case PseudoNotParsed:
-#if ENABLE(FULLSCREEN_API)
-    case PseudoFullScreen:
-    case PseudoFullScreenDocument:
-    case PseudoFullScreenAncestor:
-    case PseudoAnimatingFullScreenTransition:
-#endif
-    case PseudoInRange:
-    case PseudoOutOfRange:
-#if ENABLE(VIDEO_TRACK)
-    case PseudoFutureCue:
-    case PseudoPastCue:
-#endif
-        break;
-    case PseudoFirstPage:
-    case PseudoLeftPage:
-    case PseudoRightPage:
-        isPagePseudoClass = true;
-        break;
</del><ins>+        // FIXME: This is strange. Why would all strings that start with &quot;cue&quot; be &quot;user agent custom&quot;?
+        if (name.startsWith(&quot;x-&quot;) || name.startsWith(&quot;cue&quot;))
+            type = PseudoUserAgentCustomElement;
</ins><span class="cx">     }
</span><del>-
-    bool matchPagePseudoClass = (m_match == PagePseudoClass);
-    if (matchPagePseudoClass != isPagePseudoClass)
-        m_pseudoType = PseudoUnknown;
-    else if (m_match == PseudoClass &amp;&amp; element) {
-        if (!compat)
-            m_pseudoType = PseudoUnknown;
-        else
-           m_match = PseudoElement;
-    } else if (m_match == PseudoElement &amp;&amp; !element)
-        m_pseudoType = PseudoUnknown;
</del><ins>+    return type;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> bool CSSSelector::operator==(const CSSSelector&amp; other) const
</span><span class="cx"> {
</span><span class="cx">     const CSSSelector* sel1 = this;
</span><span class="lines">@@ -518,6 +295,37 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static void appendPseudoTypeTailIfNecessary(StringBuilder&amp; str, const CSSSelector* selector)
+{
+    switch (selector-&gt;pseudoType()) {
+    case CSSSelector::PseudoNot:
+        if (const CSSSelectorList* selectorList = selector-&gt;selectorList())
+            str.append(selectorList-&gt;first()-&gt;selectorText());
+        str.append(')');
+        break;
+    case CSSSelector::PseudoLang:
+    case CSSSelector::PseudoNthChild:
+    case CSSSelector::PseudoNthLastChild:
+    case CSSSelector::PseudoNthOfType:
+    case CSSSelector::PseudoNthLastOfType:
+        str.append(selector-&gt;argument());
+        str.append(')');
+        break;
+    case CSSSelector::PseudoAny: {
+        const CSSSelector* firstSubSelector = selector-&gt;selectorList()-&gt;first();
+        for (const CSSSelector* subSelector = firstSubSelector; subSelector; subSelector = CSSSelectorList::next(subSelector)) {
+            if (subSelector != firstSubSelector)
+                str.append(',');
+            str.append(subSelector-&gt;selectorText());
+        }
+        str.append(')');
+        break;
+    }
+    default:
+        break;
+    }
+}
+
</ins><span class="cx"> String CSSSelector::selectorText(const String&amp; rightSide) const
</span><span class="cx"> {
</span><span class="cx">     StringBuilder str;
</span><span class="lines">@@ -541,34 +349,20 @@
</span><span class="cx">             str.append('.');
</span><span class="cx">             serializeIdentifier(cs-&gt;value(), str);
</span><span class="cx">         } else if (cs-&gt;m_match == CSSSelector::PseudoClass || cs-&gt;m_match == CSSSelector::PagePseudoClass) {
</span><del>-            str.append(':');
-            str.append(cs-&gt;value());
-
</del><span class="cx">             switch (cs-&gt;pseudoType()) {
</span><del>-            case PseudoNot:
-                if (const CSSSelectorList* selectorList = cs-&gt;selectorList())
-                    str.append(selectorList-&gt;first()-&gt;selectorText());
-                str.append(')');
</del><ins>+            case PseudoFirst:
+                str.appendLiteral(&quot;:first&quot;);
</ins><span class="cx">                 break;
</span><del>-            case PseudoLang:
-            case PseudoNthChild:
-            case PseudoNthLastChild:
-            case PseudoNthOfType:
-            case PseudoNthLastOfType:
-                str.append(cs-&gt;argument());
-                str.append(')');
</del><ins>+            case PseudoLeft:
+                str.appendLiteral(&quot;:left&quot;);
</ins><span class="cx">                 break;
</span><del>-            case PseudoAny: {
-                const CSSSelector* firstSubSelector = cs-&gt;selectorList()-&gt;first();
-                for (const CSSSelector* subSelector = firstSubSelector; subSelector; subSelector = CSSSelectorList::next(subSelector)) {
-                    if (subSelector != firstSubSelector)
-                        str.append(',');
-                    str.append(subSelector-&gt;selectorText());
-                }
-                str.append(')');
</del><ins>+            case PseudoRight:
+                str.appendLiteral(&quot;:right&quot;);
</ins><span class="cx">                 break;
</span><del>-            }
</del><span class="cx">             default:
</span><ins>+                str.append(':');
+                str.append(cs-&gt;value());
+                appendPseudoTypeTailIfNecessary(str, cs);
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">         } else if (cs-&gt;m_match == CSSSelector::PseudoElement) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelector.h (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.h        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/css/CSSSelector.h        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -79,8 +79,7 @@
</span><span class="cx">         };
</span><span class="cx"> 
</span><span class="cx">         enum PseudoType {
</span><del>-            PseudoNotParsed = 0,
-            PseudoUnknown,
</del><ins>+            PseudoUnknown = 0,
</ins><span class="cx">             PseudoEmpty,
</span><span class="cx">             PseudoFirstChild,
</span><span class="cx">             PseudoFirstOfType,
</span><span class="lines">@@ -143,9 +142,9 @@
</span><span class="cx">             PseudoSingleButton,
</span><span class="cx">             PseudoNoButton,
</span><span class="cx">             PseudoSelection,
</span><del>-            PseudoLeftPage,
-            PseudoRightPage,
-            PseudoFirstPage,
</del><ins>+            PseudoLeft,
+            PseudoRight,
+            PseudoFirst,
</ins><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx">             PseudoFullScreen,
</span><span class="cx">             PseudoFullScreenDocument,
</span><span class="lines">@@ -158,8 +157,8 @@
</span><span class="cx">             PseudoWebKitCustomElement,
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">             PseudoCue,
</span><del>-            PseudoFutureCue,
-            PseudoPastCue,
</del><ins>+            PseudoFuture,
+            PseudoPast,
</ins><span class="cx"> #endif
</span><span class="cx">         };
</span><span class="cx"> 
</span><span class="lines">@@ -184,12 +183,10 @@
</span><span class="cx"> 
</span><span class="cx">         PseudoType pseudoType() const
</span><span class="cx">         {
</span><del>-            if (m_pseudoType == PseudoNotParsed)
-                extractPseudoType();
</del><span class="cx">             return static_cast&lt;PseudoType&gt;(m_pseudoType);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        static PseudoType parsePseudoType(const AtomicString&amp;);
</del><ins>+        static PseudoType parsePseudoType(const String&amp;);
</ins><span class="cx">         static PseudoId pseudoId(PseudoType);
</span><span class="cx"> 
</span><span class="cx">         // Selectors are kept in an array by CSSSelectorList. The next component of the selector is
</span><span class="lines">@@ -243,7 +240,6 @@
</span><span class="cx"> 
</span><span class="cx">         unsigned specificityForOneSelector() const;
</span><span class="cx">         unsigned specificityForPage() const;
</span><del>-        void extractPseudoType() const;
</del><span class="cx"> 
</span><span class="cx">         // Hide.
</span><span class="cx">         CSSSelector&amp; operator=(const CSSSelector&amp;);
</span><span class="lines">@@ -292,8 +288,6 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool CSSSelector::matchesPseudoElement() const
</span><span class="cx"> {
</span><del>-    if (m_pseudoType == PseudoUnknown)
-        extractPseudoType();
</del><span class="cx">     return m_match == PseudoElement;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -339,7 +333,6 @@
</span><span class="cx"> inline void CSSSelector::setValue(const AtomicString&amp; value)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_match != Tag);
</span><del>-    ASSERT(m_pseudoType == PseudoNotParsed);
</del><span class="cx">     // Need to do ref counting manually for the union.
</span><span class="cx">     if (m_hasRareData) {
</span><span class="cx">         if (m_data.m_rareData-&gt;m_value)
</span><span class="lines">@@ -357,7 +350,7 @@
</span><span class="cx"> inline CSSSelector::CSSSelector()
</span><span class="cx">     : m_relation(Descendant)
</span><span class="cx">     , m_match(Unknown)
</span><del>-    , m_pseudoType(PseudoNotParsed)
</del><ins>+    , m_pseudoType(PseudoUnknown)
</ins><span class="cx">     , m_parsedNth(false)
</span><span class="cx">     , m_isLastInSelectorList(false)
</span><span class="cx">     , m_isLastInTagHistory(true)
</span><span class="lines">@@ -370,7 +363,7 @@
</span><span class="cx"> inline CSSSelector::CSSSelector(const QualifiedName&amp; tagQName, bool tagIsForNamespaceRule)
</span><span class="cx">     : m_relation(Descendant)
</span><span class="cx">     , m_match(Tag)
</span><del>-    , m_pseudoType(PseudoNotParsed)
</del><ins>+    , m_pseudoType(PseudoUnknown)
</ins><span class="cx">     , m_parsedNth(false)
</span><span class="cx">     , m_isLastInSelectorList(false)
</span><span class="cx">     , m_isLastInTagHistory(true)
</span></span></pre></div>
<a id="trunkSourceWebCorecssPageRuleCollectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PageRuleCollector.cpp (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PageRuleCollector.cpp        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/css/PageRuleCollector.cpp        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -99,9 +99,9 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         CSSSelector::PseudoType pseudoType = component-&gt;pseudoType();
</span><del>-        if ((pseudoType == CSSSelector::PseudoLeftPage &amp;&amp; !isLeftPage)
-            || (pseudoType == CSSSelector::PseudoRightPage &amp;&amp; isLeftPage)
-            || (pseudoType == CSSSelector::PseudoFirstPage &amp;&amp; !isFirstPage))
</del><ins>+        if ((pseudoType == CSSSelector::PseudoLeft &amp;&amp; !isLeftPage)
+            || (pseudoType == CSSSelector::PseudoRight &amp;&amp; isLeftPage)
+            || (pseudoType == CSSSelector::PseudoFirst &amp;&amp; !isFirstPage))
</ins><span class="cx">         {
</span><span class="cx">             return false;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorChecker.cpp        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -699,9 +699,9 @@
</span><span class="cx">             element-&gt;document().setContainsValidityStyleRules();
</span><span class="cx">             return element-&gt;isOutOfRange();
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-        case CSSSelector::PseudoFutureCue:
</del><ins>+        case CSSSelector::PseudoFuture:
</ins><span class="cx">             return matchesFutureCuePseudoClass(element);
</span><del>-        case CSSSelector::PseudoPastCue:
</del><ins>+        case CSSSelector::PseudoPast:
</ins><span class="cx">             return matchesPastCuePseudoClass(element);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -726,7 +726,6 @@
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><span class="cx">         case CSSSelector::PseudoUnknown:
</span><del>-        case CSSSelector::PseudoNotParsed:
</del><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorPseudoTypeMaph"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/SelectorPseudoTypeMap.h (0 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorPseudoTypeMap.h                                (rev 0)
+++ trunk/Source/WebCore/css/SelectorPseudoTypeMap.h        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2014 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * 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 APPLE INC. OR ITS 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.
+ */
+
+#ifndef SelectorPseudoTypeMap_h
+#define SelectorPseudoTypeMap_h
+
+#include &quot;CSSParserValues.h&quot;
+#include &quot;CSSSelector.h&quot;
+
+namespace WebCore {
+
+CSSSelector::PseudoType parsePseudoTypeString(const StringImpl&amp; pseudoTypeString);
+
+} // namespace WebCore
+
+#endif // SelectorPseudoTypeMap_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssSelectorPseudoTypeMapin"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/SelectorPseudoTypeMap.in (0 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorPseudoTypeMap.in                                (rev 0)
+++ trunk/Source/WebCore/css/SelectorPseudoTypeMap.in        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+-khtml-drag
+-webkit-any(
+-webkit-any-link
+-webkit-autofill
+-webkit-drag
+-webkit-full-page-media
+-webkit-resizer
+-webkit-scrollbar
+-webkit-scrollbar-button
+-webkit-scrollbar-corner
+-webkit-scrollbar-thumb
+-webkit-scrollbar-track
+-webkit-scrollbar-track-piece
+active
+after
+before
+checked
+corner-present
+decrement
+default
+disabled
+double-button
+empty
+enabled
+end
+first-child
+first-letter
+first-line
+first-of-type
+focus
+horizontal
+hover
+in-range
+increment
+indeterminate
+invalid
+lang(
+last-child
+last-of-type
+link
+no-button
+not(
+nth-child(
+nth-last-child(
+nth-last-of-type(
+nth-of-type(
+only-child
+only-of-type
+optional
+out-of-range
+read-only
+read-write
+required
+root
+scope
+selection
+single-button
+start
+target
+valid
+vertical
+visited
+window-inactive
+
+#if ENABLE(FULLSCREEN_API)
+-webkit-animating-full-screen-transition
+-webkit-full-screen
+-webkit-full-screen-ancestor
+-webkit-full-screen-document
+#endif
+
+#if ENABLE(VIDEO_TRACK)
+cue(
+future
+past
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorecssmakeSelectorPseudoTypeMappy"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/makeSelectorPseudoTypeMap.py (0 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeSelectorPseudoTypeMap.py                                (rev 0)
+++ trunk/Source/WebCore/css/makeSelectorPseudoTypeMap.py        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -0,0 +1,205 @@
</span><ins>+#!/usr/bin/env python
+#
+# Copyright (C) 2014 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:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# 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 APPLE INC. OR ITS 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.
+
+import os
+import sys
+
+
+def enumerablePseudoType(stringPseudoType):
+    output = ['CSSSelector::Pseudo']
+
+    if stringPseudoType.endswith('('):
+        stringPseudoType = stringPseudoType[:-1]
+
+    webkitPrefix = '-webkit-'
+    if (stringPseudoType.startswith(webkitPrefix)):
+        stringPseudoType = stringPseudoType[len(webkitPrefix):]
+
+    khtmlPrefix = '-khtml-'
+    if (stringPseudoType.startswith(khtmlPrefix)):
+        stringPseudoType = stringPseudoType[len(khtmlPrefix):]
+
+    substring_start = 0
+    next_dash_position = stringPseudoType.find('-')
+    while (next_dash_position != -1):
+        output.append(stringPseudoType[substring_start].upper())
+        output.append(stringPseudoType[substring_start + 1:next_dash_position])
+        substring_start = next_dash_position + 1
+        next_dash_position = stringPseudoType.find('-', substring_start)
+
+    output.append(stringPseudoType[substring_start].upper())
+    output.append(stringPseudoType[substring_start + 1:])
+    return ''.join(output)
+
+
+def expand_ifdef_condition(condition):
+    return condition.replace('(', '_').replace(')', '')
+
+output_file = open('SelectorPseudoTypeMap.gperf', 'w')
+
+output_file.write(&quot;&quot;&quot;
+%{
+/*
+ * Copyright (C) 2014 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * 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 APPLE INC. OR ITS 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.
+ */
+
+// This file is automatically generated from SelectorPseudoTypeMap.in by makeprop, do not edit by hand.
+
+#include &quot;config.h&quot;
+#include &quot;SelectorPseudoTypeMap.h&quot;
+
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored &quot;-Wunknown-pragmas&quot;
+#pragma clang diagnostic ignored &quot;-Wdeprecated-register&quot;
+#pragma clang diagnostic ignored &quot;-Wimplicit-fallthrough&quot;
+#endif
+
+namespace WebCore {
+
+struct SelectorPseudoTypeEntry {
+    const char* name;
+    CSSSelector::PseudoType type;
+};
+
+%}
+%struct-type
+%define initializer-suffix ,CSSSelector::PseudoUnknown
+%define class-name SelectorPseudoTypeMapHash
+%omit-struct-type
+%language=C++
+%readonly-tables
+%global-table
+%ignore-case
+%compare-strncmp
+%enum
+
+struct SelectorPseudoTypeEntry;
+
+%%
+&quot;&quot;&quot;)
+
+webcore_defines = [i.strip() for i in sys.argv[-1].split(' ')]
+
+longest_keyword = 0
+
+ignore_until_endif = False
+input_file = open(sys.argv[1], 'r')
+for line in input_file:
+    keyword = line.strip()
+    if not keyword:
+        continue
+
+    if keyword.startswith('#if '):
+        condition = keyword[4:].strip()
+        if expand_ifdef_condition(condition) not in webcore_defines:
+            ignore_until_endif = True
+        continue
+
+    if keyword.startswith('#endif'):
+        ignore_until_endif = False
+        continue
+
+    if ignore_until_endif:
+        continue
+
+    output_file.write('&quot;%s&quot;, %s\n' % (keyword, enumerablePseudoType(keyword)))
+    longest_keyword = max(longest_keyword, len(keyword))
+
+output_file.write(&quot;&quot;&quot;%%
+
+static inline CSSSelector::PseudoType parsePseudoTypeString(const LChar* characters, unsigned length)
+{
+    if (const SelectorPseudoTypeEntry* entry = SelectorPseudoTypeMapHash::in_word_set(reinterpret_cast&lt;const char*&gt;(characters), length))
+        return entry-&gt;type;
+    return CSSSelector::PseudoUnknown;
+}&quot;&quot;&quot;)
+
+output_file.write(&quot;&quot;&quot;
+
+static inline CSSSelector::PseudoType parsePseudoTypeString(const UChar* characters, unsigned length)
+{
+    const unsigned maxKeywordLength = %s;
+    LChar buffer[maxKeywordLength];
+    if (length &gt; maxKeywordLength)
+        return CSSSelector::PseudoUnknown;
+
+    for (unsigned i = 0; i &lt; length; ++i) {
+        UChar character = characters[i];
+        if (character &amp; ~0xff)
+            return CSSSelector::PseudoUnknown;
+
+        buffer[i] = static_cast&lt;LChar&gt;(character);
+    }
+    return parsePseudoTypeString(buffer, length);
+}
+&quot;&quot;&quot; % longest_keyword)
+
+output_file.write(&quot;&quot;&quot;
+CSSSelector::PseudoType parsePseudoTypeString(const StringImpl&amp; pseudoTypeString)
+{
+    if (pseudoTypeString.is8Bit())
+        return parsePseudoTypeString(pseudoTypeString.characters8(), pseudoTypeString.length());
+    return parsePseudoTypeString(pseudoTypeString.characters16(), pseudoTypeString.length());
+}
+
+} // namespace WebCore
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
+&quot;&quot;&quot;)
+output_file.close()
+
+gperf_command = 'gperf'
+if 'GPERF' in os.environ:
+    gperf_command = os.environ['GPERF']
+
+gperf_return = os.system(&quot;%s --key-positions='*' -m 10 -s 2 SelectorPseudoTypeMap.gperf --output-file=SelectorPseudoTypeMap.cpp&quot; % gperf_command)
+if gperf_return != 0:
+    print(&quot;Error when generating SelectorPseudoTypeMap.cpp from SelectorPseudoTypeMap.gperf :(&quot;)
+    sys.exit(gperf_return)
</ins></span></pre></div>
<a id="trunkSourceWebCorecssjitSelectorCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (165401 => 165402)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-03-10 20:58:29 UTC (rev 165401)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-03-10 21:00:26 UTC (rev 165402)
</span><span class="lines">@@ -287,10 +287,10 @@
</span><span class="cx">         return FunctionType::SimpleSelectorChecker;
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-    case CSSSelector::PseudoFutureCue:
</del><ins>+    case CSSSelector::PseudoFuture:
</ins><span class="cx">         pseudoClasses.unoptimizedPseudoClasses.append(JSC::FunctionPtr(matchesFutureCuePseudoClass));
</span><span class="cx">         return FunctionType::SimpleSelectorChecker;
</span><del>-    case CSSSelector::PseudoPastCue:
</del><ins>+    case CSSSelector::PseudoPast:
</ins><span class="cx">         pseudoClasses.unoptimizedPseudoClasses.append(JSC::FunctionPtr(matchesPastCuePseudoClass));
</span><span class="cx">         return FunctionType::SimpleSelectorChecker;
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>