<!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>[166447] 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/166447">166447</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-28 20:08:59 -0700 (Fri, 28 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update the code related to SelectorPseudoTypeMap to reflect its new purpose
https://bugs.webkit.org/show_bug.cgi?id=130620

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2014-03-28
Reviewed by Andreas Kling.

Since <a href="http://trac.webkit.org/projects/webkit/changeset/166094">r166094</a>, SelectorPseudoTypeMap only contains PseudoClass instances and the 4 compatibility PseudoElement.

This patch rename SelectorPseudoTypeMap to SelectorPseudoClassAndCompatibilityElementMap and update the parsing
to split PseudoClass and PseudoElement.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
(WebCore::CSSParserSelector::setPseudoClassValue):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/SelectorPseudoClassAndCompatibilityElementMap.in: Renamed from Source/WebCore/css/SelectorPseudoTypeMap.in.
* css/SelectorPseudoTypeMap.h:
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Renamed from Source/WebCore/css/makeSelectorPseudoTypeMap.py.
(enumerablePseudoType):
(expand_ifdef_condition):</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="#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="#trunkSourceWebCorecssSelectorPseudoTypeMaph">trunk/Source/WebCore/css/SelectorPseudoTypeMap.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssSelectorPseudoClassAndCompatibilityElementMapin">trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in</a></li>
<li><a href="#trunkSourceWebCorecssmakeSelectorPseudoClassAndCompatibilityElementMappy">trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<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 (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -3131,12 +3131,12 @@
</span><span class="cx"> 
</span><span class="cx"> # Generate CSS Selector pseudo type name to value maps.
</span><span class="cx"> add_custom_command(
</span><del>-    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.gperf ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.cpp
-    MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeSelectorPseudoTypeMap.py
</del><ins>+    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoClassAndCompatibilityElementMap.gperf ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoClassAndCompatibilityElementMap.cpp
+    MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeSelectorPseudoClassAndCompatibilityElementMap.py
</ins><span class="cx">     WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
</span><del>-    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoTypeMap.py ${WEBCORE_DIR}/css/SelectorPseudoTypeMap.in &quot;${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}&quot;
</del><ins>+    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoClassAndCompatibilityElementMap.py ${WEBCORE_DIR}/css/SelectorPseudoClassAndCompatibilityElementMap.in &quot;${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}&quot;
</ins><span class="cx">     VERBATIM)
</span><del>-list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.cpp)
</del><ins>+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoClassAndCompatibilityElementMap.cpp)
</ins><span class="cx"> add_custom_command(
</span><span class="cx">     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoElementTypeMap.gperf ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoElementTypeMap.cpp
</span><span class="cx">     MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeSelectorPseudoElementsMap.py
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/ChangeLog        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-03-28  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        Update the code related to SelectorPseudoTypeMap to reflect its new purpose
+        https://bugs.webkit.org/show_bug.cgi?id=130620
+
+        Reviewed by Andreas Kling.
+
+        Since r166094, SelectorPseudoTypeMap only contains PseudoClass instances and the 4 compatibility PseudoElement.
+
+        This patch rename SelectorPseudoTypeMap to SelectorPseudoClassAndCompatibilityElementMap and update the parsing
+        to split PseudoClass and PseudoElement.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSGrammar.y.in:
+        * css/CSSParserValues.cpp:
+        (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
+        (WebCore::CSSParserSelector::setPseudoClassValue):
+        * css/CSSParserValues.h:
+        * css/CSSSelector.cpp:
+        (WebCore::appendPseudoClassFunctionTail):
+        (WebCore::CSSSelector::selectorText):
+        * css/SelectorPseudoClassAndCompatibilityElementMap.in: Renamed from Source/WebCore/css/SelectorPseudoTypeMap.in.
+        * css/SelectorPseudoTypeMap.h:
+        * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Renamed from Source/WebCore/css/makeSelectorPseudoTypeMap.py.
+        (enumerablePseudoType):
+        (expand_ifdef_condition):
+
</ins><span class="cx"> 2014-03-28  Stephanie Lewis  &lt;slewis@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed build fix.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/DerivedSources.make        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -751,8 +751,8 @@
</span><span class="cx">     PlugInsResources.h \
</span><span class="cx">     SVGElementFactory.cpp \
</span><span class="cx">     SVGNames.cpp \
</span><ins>+    SelectorPseudoClassAndCompatibilityElementMap.cpp \
</ins><span class="cx">     SelectorPseudoElementTypeMap.cpp \
</span><del>-    SelectorPseudoTypeMap.cpp \
</del><span class="cx">     UserAgentStyleSheets.h \
</span><span class="cx">     WebKitFontFamilyNames.cpp \
</span><span class="cx">     WebKitFontFamilyNames.h \
</span><span class="lines">@@ -797,9 +797,9 @@
</span><span class="cx"> 
</span><span class="cx"> # CSS Selector pseudo type name to value map.
</span><span class="cx"> 
</span><del>-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;
</del><ins>+WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS := $(WebCore)/css/SelectorPseudoClassAndCompatibilityElementMap.in
+SelectorPseudoClassAndCompatibilityElementMap.cpp : $(WebCore)/css/makeSelectorPseudoClassAndCompatibilityElementMap.py $(WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS)
+        python &quot;$(WebCore)/css/makeSelectorPseudoClassAndCompatibilityElementMap.py&quot; $(WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS) &quot;$(FEATURE_DEFINES)&quot;
</ins><span class="cx"> 
</span><span class="cx"> WEBCORE_CSS_SELECTOR_PSEUDO_ELEMENTS_TYPE_MAP_KEYWORDS := $(WebCore)/css/SelectorPseudoElementTypeMap.in
</span><span class="cx"> SelectorPseudoElementTypeMap.cpp : $(WebCore)/css/makeSelectorPseudoElementsMap.py $(WEBCORE_CSS_SELECTOR_PSEUDO_ELEMENTS_TYPE_MAP_KEYWORDS)
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -290,8 +290,8 @@
</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\SelectorPseudoClassAndCompatibilityElementMap.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoElementTypeMap.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoTypeMap.cpp&quot; /&gt;
</del><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 (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -5155,10 +5155,10 @@
</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><del>-    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoElementTypeMap.cpp&quot;&gt;
</del><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoClassAndCompatibilityElementMap.cpp&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoTypeMap.cpp&quot;&gt;
</del><ins>+    &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoElementTypeMap.cpp&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\EventFactory.cpp&quot;&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -1477,7 +1477,7 @@
</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><del>-                43B85ED418CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43B85ED218CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp */; };
</del><ins>+                43B85ED418CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43B85ED218CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.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">@@ -8419,10 +8419,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><del>-                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;; };
</del><ins>+                43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoClassAndCompatibilityElementMap.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = makeSelectorPseudoClassAndCompatibilityElementMap.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                43B85ED218CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorPseudoClassAndCompatibilityElementMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                43B85ED318CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.gperf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; path = SelectorPseudoClassAndCompatibilityElementMap.gperf; sourceTree = &quot;&lt;group&gt;&quot;; };
+                43B85ED618CBEC9700E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SelectorPseudoClassAndCompatibilityElementMap.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">@@ -15943,10 +15943,10 @@
</span><span class="cx">                                 44A28AAE12DFB8BF00AE923B /* MathMLNames.h */,
</span><span class="cx">                                 71E2183817359FB8006E6E4D /* PlugInsResources.h */,
</span><span class="cx">                                 71E2183917359FB8006E6E4D /* PlugInsResourcesData.cpp */,
</span><ins>+                                43B85ED218CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.cpp */,
+                                43B85ED318CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.gperf */,
</ins><span class="cx">                                 26AA0F9D18D2A18B00419381 /* SelectorPseudoElementTypeMap.cpp */,
</span><span class="cx">                                 26AA0F9F18D2A1C100419381 /* SelectorPseudoElementTypeMap.gperf */,
</span><del>-                                43B85ED218CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp */,
-                                43B85ED318CBEC5200E31AF4 /* SelectorPseudoTypeMap.gperf */,
</del><span class="cx">                                 53EF766A16530A61004CBE49 /* SettingsMacros.h */,
</span><span class="cx">                                 656581E609D1508D000E61D7 /* SVGElementFactory.cpp */,
</span><span class="cx">                                 656581E709D1508D000E61D7 /* SVGElementFactory.h */,
</span><span class="lines">@@ -21702,7 +21702,7 @@
</span><span class="cx">                                 E55F4979151B888000BB67DB /* LengthFunctions.cpp */,
</span><span class="cx">                                 E5BA7D62151437CA00FE1E3F /* LengthFunctions.h */,
</span><span class="cx">                                 26AA0F9918D2973D00419381 /* makeSelectorPseudoElementsMap.py */,
</span><del>-                                43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoTypeMap.py */,
</del><ins>+                                43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoClassAndCompatibilityElementMap.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">@@ -21750,7 +21750,7 @@
</span><span class="cx">                                 415071551685067300C3C7B3 /* SelectorFilter.cpp */,
</span><span class="cx">                                 415071561685067300C3C7B3 /* SelectorFilter.h */,
</span><span class="cx">                                 26AA0F9A18D2973D00419381 /* SelectorPseudoElementTypeMap.in */,
</span><del>-                                43B85ED618CBEC9700E31AF4 /* SelectorPseudoTypeMap.in */,
</del><ins>+                                43B85ED618CBEC9700E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.in */,
</ins><span class="cx">                                 43107BE118CC19DE00CC18E8 /* SelectorPseudoTypeMap.h */,
</span><span class="cx">                                 E47A97CE163059FC005DCD99 /* StyleInvalidationAnalysis.cpp */,
</span><span class="cx">                                 E47A97CF163059FC005DCD99 /* StyleInvalidationAnalysis.h */,
</span><span class="lines">@@ -27216,7 +27216,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><del>-                                43B85ED418CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp in Sources */,
</del><ins>+                                43B85ED418CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.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 (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGrammar.y.in        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -1196,13 +1196,7 @@
</span><span class="cx"> 
</span><span class="cx"> pseudo:
</span><span class="cx">     ':' IDENT {
</span><del>-        $$ = nullptr;
-        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
-        selector-&gt;setMatch(CSSSelector::PseudoClass);
-        $2.lower();
-        selector-&gt;setPseudoTypeValue($2);
-        if (selector-&gt;pseudoType() != CSSSelector::PseudoUnknown)
-            $$ = selector.release();
</del><ins>+        $$ = CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector($2);
</ins><span class="cx">     }
</span><span class="cx">     | ':' ':' IDENT {
</span><span class="cx">         $$ = CSSParserSelector::parsePseudoElementSelector($3);
</span><span class="lines">@@ -1224,8 +1218,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;($4));
</span><del>-            $2.lower();
-            selector-&gt;setPseudoTypeValue($2);
</del><ins>+            selector-&gt;setPseudoClassValue($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">@@ -1236,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;setPseudoTypeValue($2);
</del><ins>+        selector-&gt;setPseudoClassValue($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">@@ -1246,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;setPseudoTypeValue($2);
</del><ins>+        selector-&gt;setPseudoClassValue($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,8 +1248,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>-        $2.lower();
-        selector-&gt;setPseudoTypeValue($2);
</del><ins>+        selector-&gt;setPseudoClassValue($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">@@ -1280,9 +1272,7 @@
</span><span class="cx">             Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt; selectorVector;
</span><span class="cx">             selectorVector.append(std::move(selector));
</span><span class="cx">             $$-&gt;adoptSelectorVector(selectorVector);
</span><del>-
-            $2.lower();
-            $$-&gt;setPseudoTypeValue($2);
</del><ins>+            $$-&gt;setPseudoClassValue($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 (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.cpp        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/css/CSSParserValues.cpp        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -203,6 +203,26 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+CSSParserSelector* CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector(CSSParserString&amp; pseudoTypeString)
+{
+    PseudoClassOrCompatibilityPseudoElement pseudoType = parsePseudoClassAndCompatibilityElementString(pseudoTypeString);
+    if (pseudoType.pseudoClass != CSSSelector::PseudoUnknown) {
+        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
+        selector-&gt;m_selector-&gt;m_match = CSSSelector::PseudoClass;
+        selector-&gt;m_selector-&gt;m_pseudoType = pseudoType.pseudoClass;
+        return selector.release();
+    }
+    if (pseudoType.compatibilityPseudoElement != CSSSelector::PseudoUnknown) {
+        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
+        selector-&gt;m_selector-&gt;m_match = CSSSelector::PseudoElement;
+        selector-&gt;m_selector-&gt;m_pseudoType = pseudoType.compatibilityPseudoElement;
+        AtomicString name = pseudoTypeString;
+        selector-&gt;m_selector-&gt;setValue(name);
+        return selector.release();
+    }
+    return nullptr;
+}
+
</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">@@ -235,112 +255,12 @@
</span><span class="cx">     m_selector-&gt;setSelectorList(std::move(selectorList));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSParserSelector::setPseudoTypeValue(const CSSParserString&amp; pseudoTypeString)
</del><ins>+void CSSParserSelector::setPseudoClassValue(const CSSParserString&amp; pseudoClassString)
</ins><span class="cx"> {
</span><del>-    AtomicString name = pseudoTypeString;
-    m_selector-&gt;setValue(name);
</del><ins>+    ASSERT(m_selector-&gt;m_match == CSSSelector::PseudoClass);
</ins><span class="cx"> 
</span><del>-    CSSSelector::PseudoType pseudoType = parsePseudoTypeString(*name.impl());
-    bool isCompatibilityElementType = false; // single colon compatbility mode
-
-    switch (pseudoType) {
-    case CSSSelector::PseudoAfter:
-    case CSSSelector::PseudoBefore:
-    case CSSSelector::PseudoFirstLetter:
-    case CSSSelector::PseudoFirstLine:
-        isCompatibilityElementType = 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;
-#if ENABLE(VIDEO_TRACK)
-    case CSSSelector::PseudoCue:
-#endif
-    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:
-
-    case CSSSelector::PseudoFirst:
-    case CSSSelector::PseudoLeft:
-    case CSSSelector::PseudoRight:
-        ASSERT_NOT_REACHED();
-        break;
-    }
-
-    unsigned matchType = m_selector-&gt;m_match;
-    if (isCompatibilityElementType)
-        matchType = CSSSelector::PseudoElement;
-
-    m_selector-&gt;m_match = matchType;
-    m_selector-&gt;m_pseudoType = pseudoType;
</del><ins>+    PseudoClassOrCompatibilityPseudoElement pseudoType = parsePseudoClassAndCompatibilityElementString(pseudoClassString);
+    m_selector-&gt;m_pseudoType = pseudoType.pseudoClass;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSParserSelector::isSimple() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.h (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.h        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/css/CSSParserValues.h        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -178,6 +178,7 @@
</span><span class="cx">     static CSSParserSelector* parsePagePseudoSelector(const CSSParserString&amp; pseudoTypeString);
</span><span class="cx">     static CSSParserSelector* parsePseudoElementSelector(CSSParserString&amp; pseudoTypeString);
</span><span class="cx">     static CSSParserSelector* parsePseudoCueFunctionSelector(const CSSParserString&amp; functionIdentifier, Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;* selectorVector);
</span><ins>+    static CSSParserSelector* parsePseudoClassAndCompatibilityElementSelector(CSSParserString&amp; pseudoTypeString);
</ins><span class="cx"> 
</span><span class="cx">     CSSParserSelector();
</span><span class="cx">     explicit CSSParserSelector(const QualifiedName&amp;);
</span><span class="lines">@@ -195,7 +196,7 @@
</span><span class="cx"> 
</span><span class="cx">     void adoptSelectorVector(Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&amp; selectorVector);
</span><span class="cx"> 
</span><del>-    void setPseudoTypeValue(const CSSParserString&amp; pseudoTypeString);
</del><ins>+    void setPseudoClassValue(const CSSParserString&amp; pseudoClassString);
</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 (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.cpp        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/css/CSSSelector.cpp        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -294,14 +294,9 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void appendPseudoTypeTailIfNecessary(StringBuilder&amp; str, const CSSSelector* selector)
</del><ins>+static void appendPseudoClassFunctionTail(StringBuilder&amp; str, const CSSSelector* selector)
</ins><span class="cx"> {
</span><span class="cx">     switch (selector-&gt;pseudoType()) {
</span><del>-    case CSSSelector::PseudoNot:
-        if (const CSSSelectorList* selectorList = selector-&gt;selectorList())
-            str.append(selectorList-&gt;first()-&gt;selectorText());
-        str.append(')');
-        break;
</del><span class="cx">     case CSSSelector::PseudoLang:
</span><span class="cx">     case CSSSelector::PseudoNthChild:
</span><span class="cx">     case CSSSelector::PseudoNthLastChild:
</span><span class="lines">@@ -310,19 +305,10 @@
</span><span class="cx">         str.append(selector-&gt;argument());
</span><span class="cx">         str.append(')');
</span><span class="cx">         break;
</span><del>-    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;
-    }
</del><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span><ins>+
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String CSSSelector::selectorText(const String&amp; rightSide) const
</span><span class="lines">@@ -347,22 +333,202 @@
</span><span class="cx">         } else if (cs-&gt;m_match == CSSSelector::Class) {
</span><span class="cx">             str.append('.');
</span><span class="cx">             serializeIdentifier(cs-&gt;value(), str);
</span><del>-        } else if (cs-&gt;m_match == CSSSelector::PseudoClass || cs-&gt;m_match == CSSSelector::PagePseudoClass) {
</del><ins>+        } else if (cs-&gt;m_match == CSSSelector::PseudoClass) {
</ins><span class="cx">             switch (cs-&gt;pseudoType()) {
</span><del>-            case PseudoFirst:
-                str.appendLiteral(&quot;:first&quot;);
</del><ins>+#if ENABLE(FULLSCREEN_API)
+            case CSSSelector::PseudoAnimatingFullScreenTransition:
+                str.appendLiteral(&quot;:-webkit-animating-full-screen-transition&quot;);
</ins><span class="cx">                 break;
</span><del>-            case PseudoLeft:
-                str.appendLiteral(&quot;:left&quot;);
</del><ins>+#endif
+            case CSSSelector::PseudoAny: {
+                str.appendLiteral(&quot;:-webkit-any(&quot;);
+                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(')');
</ins><span class="cx">                 break;
</span><del>-            case PseudoRight:
-                str.appendLiteral(&quot;:right&quot;);
</del><ins>+            }
+            case CSSSelector::PseudoAnyLink:
+                str.appendLiteral(&quot;:-webkit-any-link&quot;);
</ins><span class="cx">                 break;
</span><ins>+            case CSSSelector::PseudoAutofill:
+                str.appendLiteral(&quot;:-webkit-autofill&quot;);
+                break;
+            case CSSSelector::PseudoDrag:
+                str.appendLiteral(&quot;:-webkit-drag&quot;);
+                break;
+            case CSSSelector::PseudoFullPageMedia:
+                str.appendLiteral(&quot;:-webkit-full-page-media&quot;);
+                break;
+#if ENABLE(FULLSCREEN_API)
+            case CSSSelector::PseudoFullScreen:
+                str.appendLiteral(&quot;:-webkit-full-screen&quot;);
+                break;
+            case CSSSelector::PseudoFullScreenAncestor:
+                str.appendLiteral(&quot;:-webkit-full-screen-ancestor&quot;);
+                break;
+            case CSSSelector::PseudoFullScreenDocument:
+                str.appendLiteral(&quot;:-webkit-full-screen-document&quot;);
+                break;
+#endif
+            case CSSSelector::PseudoActive:
+                str.appendLiteral(&quot;:active&quot;);
+                break;
+            case CSSSelector::PseudoChecked:
+                str.appendLiteral(&quot;:checked&quot;);
+                break;
+            case CSSSelector::PseudoCornerPresent:
+                str.appendLiteral(&quot;:corner-present&quot;);
+                break;
+            case CSSSelector::PseudoDecrement:
+                str.appendLiteral(&quot;:decrement&quot;);
+                break;
+            case CSSSelector::PseudoDefault:
+                str.appendLiteral(&quot;:default&quot;);
+                break;
+            case CSSSelector::PseudoDisabled:
+                str.appendLiteral(&quot;:disabled&quot;);
+                break;
+            case CSSSelector::PseudoDoubleButton:
+                str.appendLiteral(&quot;:double-button&quot;);
+                break;
+            case CSSSelector::PseudoEmpty:
+                str.appendLiteral(&quot;:empty&quot;);
+                break;
+            case CSSSelector::PseudoEnabled:
+                str.appendLiteral(&quot;:enabled&quot;);
+                break;
+            case CSSSelector::PseudoEnd:
+                str.appendLiteral(&quot;:end&quot;);
+                break;
+            case CSSSelector::PseudoFirstChild:
+                str.appendLiteral(&quot;:first-child&quot;);
+                break;
+            case CSSSelector::PseudoFirstOfType:
+                str.appendLiteral(&quot;:first-of-type&quot;);
+                break;
+            case CSSSelector::PseudoFocus:
+                str.appendLiteral(&quot;:focus&quot;);
+                break;
+#if ENABLE(VIDEO_TRACK)
+            case CSSSelector::PseudoFuture:
+                str.appendLiteral(&quot;:future&quot;);
+                break;
+#endif
+            case CSSSelector::PseudoHorizontal:
+                str.appendLiteral(&quot;:horizontal&quot;);
+                break;
+            case CSSSelector::PseudoHover:
+                str.appendLiteral(&quot;:hover&quot;);
+                break;
+            case CSSSelector::PseudoInRange:
+                str.appendLiteral(&quot;:in-range&quot;);
+                break;
+            case CSSSelector::PseudoIncrement:
+                str.appendLiteral(&quot;:increment&quot;);
+                break;
+            case CSSSelector::PseudoIndeterminate:
+                str.appendLiteral(&quot;:indeterminate&quot;);
+                break;
+            case CSSSelector::PseudoInvalid:
+                str.appendLiteral(&quot;:invalid&quot;);
+                break;
+            case CSSSelector::PseudoLang:
+                str.appendLiteral(&quot;:lang(&quot;);
+                appendPseudoClassFunctionTail(str, cs);
+                break;
+            case CSSSelector::PseudoLastChild:
+                str.appendLiteral(&quot;:last-child&quot;);
+                break;
+            case CSSSelector::PseudoLastOfType:
+                str.appendLiteral(&quot;:last-of-type&quot;);
+                break;
+            case CSSSelector::PseudoLink:
+                str.appendLiteral(&quot;:link&quot;);
+                break;
+            case CSSSelector::PseudoNoButton:
+                str.appendLiteral(&quot;:no-button&quot;);
+                break;
+            case CSSSelector::PseudoNot:
+                str.appendLiteral(&quot;:not(&quot;);
+                if (const CSSSelectorList* selectorList = cs-&gt;selectorList())
+                    str.append(selectorList-&gt;first()-&gt;selectorText());
+                str.append(')');
+                break;
+            case CSSSelector::PseudoNthChild:
+                str.appendLiteral(&quot;:nth-child(&quot;);
+                appendPseudoClassFunctionTail(str, cs);
+                break;
+            case CSSSelector::PseudoNthLastChild:
+                str.appendLiteral(&quot;:nth-last-child(&quot;);
+                appendPseudoClassFunctionTail(str, cs);
+                break;
+            case CSSSelector::PseudoNthLastOfType:
+                str.appendLiteral(&quot;:nth-last-of-type(&quot;);
+                appendPseudoClassFunctionTail(str, cs);
+                break;
+            case CSSSelector::PseudoNthOfType:
+                str.appendLiteral(&quot;:nth-of-type(&quot;);
+                appendPseudoClassFunctionTail(str, cs);
+                break;
+            case CSSSelector::PseudoOnlyChild:
+                str.appendLiteral(&quot;:only-child&quot;);
+                break;
+            case CSSSelector::PseudoOnlyOfType:
+                str.appendLiteral(&quot;:only-of-type&quot;);
+                break;
+            case CSSSelector::PseudoOptional:
+                str.appendLiteral(&quot;:optional&quot;);
+                break;
+            case CSSSelector::PseudoOutOfRange:
+                str.appendLiteral(&quot;:out-of-range&quot;);
+                break;
+#if ENABLE(VIDEO_TRACK)
+            case CSSSelector::PseudoPast:
+                str.appendLiteral(&quot;:past&quot;);
+                break;
+#endif
+            case CSSSelector::PseudoReadOnly:
+                str.appendLiteral(&quot;:read-only&quot;);
+                break;
+            case CSSSelector::PseudoReadWrite:
+                str.appendLiteral(&quot;:read-write&quot;);
+                break;
+            case CSSSelector::PseudoRequired:
+                str.appendLiteral(&quot;:required&quot;);
+                break;
+            case CSSSelector::PseudoRoot:
+                str.appendLiteral(&quot;:root&quot;);
+                break;
+            case CSSSelector::PseudoScope:
+                str.appendLiteral(&quot;:scope&quot;);
+                break;
+            case CSSSelector::PseudoSingleButton:
+                str.appendLiteral(&quot;:single-button&quot;);
+                break;
+            case CSSSelector::PseudoStart:
+                str.appendLiteral(&quot;:start&quot;);
+                break;
+            case CSSSelector::PseudoTarget:
+                str.appendLiteral(&quot;:target&quot;);
+                break;
+            case CSSSelector::PseudoValid:
+                str.appendLiteral(&quot;:valid&quot;);
+                break;
+            case CSSSelector::PseudoVertical:
+                str.appendLiteral(&quot;:vertical&quot;);
+                break;
+            case CSSSelector::PseudoVisited:
+                str.appendLiteral(&quot;:visited&quot;);
+                break;
+            case CSSSelector::PseudoWindowInactive:
+                str.appendLiteral(&quot;:window-inactive&quot;);
+                break;
</ins><span class="cx">             default:
</span><del>-                str.append(':');
-                str.append(cs-&gt;value());
-                appendPseudoTypeTailIfNecessary(str, cs);
-                break;
</del><ins>+                ASSERT_NOT_REACHED();
</ins><span class="cx">             }
</span><span class="cx">         } else if (cs-&gt;m_match == CSSSelector::PseudoElement) {
</span><span class="cx">             str.appendLiteral(&quot;::&quot;);
</span><span class="lines">@@ -405,7 +571,22 @@
</span><span class="cx">                 serializeString(cs-&gt;value(), str);
</span><span class="cx">                 str.append(']');
</span><span class="cx">             }
</span><ins>+        } else if (cs-&gt;m_match == CSSSelector::PagePseudoClass) {
+            switch (cs-&gt;pseudoType()) {
+            case PseudoFirst:
+                str.appendLiteral(&quot;:first&quot;);
+                break;
+            case PseudoLeft:
+                str.appendLiteral(&quot;:left&quot;);
+                break;
+            case PseudoRight:
+                str.appendLiteral(&quot;:right&quot;);
+                break;
+            default:
+                ASSERT_NOT_REACHED();
+            }
</ins><span class="cx">         }
</span><ins>+
</ins><span class="cx">         if (cs-&gt;relation() != CSSSelector::SubSelector || !cs-&gt;tagHistory())
</span><span class="cx">             break;
</span><span class="cx">         cs = cs-&gt;tagHistory();
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorPseudoClassAndCompatibilityElementMapin"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in (0 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in                                (rev 0)
+++ trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+-khtml-drag
+-webkit-any(
+-webkit-any-link
+-webkit-autofill
+-webkit-drag
+-webkit-full-page-media
+active
+after, PseudoUnknown, PseudoAfter
+before, PseudoUnknown, PseudoBefore
+checked
+corner-present
+decrement
+default
+disabled
+double-button
+empty
+enabled
+end
+first-child
+first-letter, PseudoUnknown, PseudoFirstLetter
+first-line, PseudoUnknown, PseudoFirstLine
+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
+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)
+future
+past
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCorecssSelectorPseudoTypeMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorPseudoTypeMap.h (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorPseudoTypeMap.h        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/css/SelectorPseudoTypeMap.h        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -31,7 +31,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-CSSSelector::PseudoType parsePseudoTypeString(const StringImpl&amp; pseudoTypeString);
</del><ins>+struct PseudoClassOrCompatibilityPseudoElement {
+    CSSSelector::PseudoType pseudoClass;
+    CSSSelector::PseudoType compatibilityPseudoElement;
+};
+
+PseudoClassOrCompatibilityPseudoElement parsePseudoClassAndCompatibilityElementString(const CSSParserString&amp; pseudoTypeString);
</ins><span class="cx"> CSSSelector::PseudoType parsePseudoElementString(const StringImpl&amp; pseudoTypeString);
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorPseudoTypeMapin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/css/SelectorPseudoTypeMap.in (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorPseudoTypeMap.in        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/css/SelectorPseudoTypeMap.in        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -1,67 +0,0 @@
</span><del>--khtml-drag
--webkit-any(
--webkit-any-link
--webkit-autofill
--webkit-drag
--webkit-full-page-media
-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
-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)
-future
-past
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorecssmakeSelectorPseudoClassAndCompatibilityElementMappy"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py (0 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py                                (rev 0)
+++ trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -0,0 +1,215 @@
</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('SelectorPseudoClassAndCompatibilityElementMap.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 SelectorPseudoClassOrCompatibilityPseudoElementEntry {
+    const char* name;
+    PseudoClassOrCompatibilityPseudoElement pseudoTypes;
+};
+
+%}
+%struct-type
+%define initializer-suffix ,{CSSSelector::PseudoUnknown,CSSSelector::PseudoUnknown}
+%define class-name SelectorPseudoClassAndCompatibilityElementMapHash
+%omit-struct-type
+%language=C++
+%readonly-tables
+%global-table
+%ignore-case
+%compare-strncmp
+%enum
+
+struct SelectorPseudoClassOrCompatibilityPseudoElementEntry;
+
+%%
+&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:
+    line = line.strip()
+    if not line:
+        continue
+
+    if line.startswith('#if '):
+        condition = line[4:].strip()
+        if expand_ifdef_condition(condition) not in webcore_defines:
+            ignore_until_endif = True
+        continue
+
+    if line.startswith('#endif'):
+        ignore_until_endif = False
+        continue
+
+    if ignore_until_endif:
+        continue
+
+    keyword_definition = line.split(',')
+    if len(keyword_definition) == 1:
+        keyword = keyword_definition[0].strip()
+        output_file.write('&quot;%s&quot;, {%s, CSSSelector::PseudoUnknown}\n' % (keyword, enumerablePseudoType(keyword)))
+    else:
+        output_file.write('&quot;%s&quot;, {CSSSelector::%s, CSSSelector::%s}\n' % (keyword_definition[0].strip(), keyword_definition[1].strip(), keyword_definition[2].strip()))
+
+    longest_keyword = max(longest_keyword, len(keyword))
+
+output_file.write(&quot;&quot;&quot;%%
+
+static inline const SelectorPseudoClassOrCompatibilityPseudoElementEntry* parsePseudoClassAndCompatibilityElementString(const LChar* characters, unsigned length)
+{
+    return SelectorPseudoClassAndCompatibilityElementMapHash::in_word_set(reinterpret_cast&lt;const char*&gt;(characters), length);
+}&quot;&quot;&quot;)
+
+output_file.write(&quot;&quot;&quot;
+
+static inline const SelectorPseudoClassOrCompatibilityPseudoElementEntry* parsePseudoClassAndCompatibilityElementString(const UChar* characters, unsigned length)
+{
+    const unsigned maxKeywordLength = %s;
+    LChar buffer[maxKeywordLength];
+    if (length &gt; maxKeywordLength)
+        return nullptr;
+
+    for (unsigned i = 0; i &lt; length; ++i) {
+        UChar character = characters[i];
+        if (character &amp; ~0xff)
+            return nullptr;
+
+        buffer[i] = static_cast&lt;LChar&gt;(character);
+    }
+    return parsePseudoClassAndCompatibilityElementString(buffer, length);
+}
+&quot;&quot;&quot; % longest_keyword)
+
+output_file.write(&quot;&quot;&quot;
+PseudoClassOrCompatibilityPseudoElement parsePseudoClassAndCompatibilityElementString(const CSSParserString&amp; pseudoTypeString)
+{
+    const SelectorPseudoClassOrCompatibilityPseudoElementEntry* entry;
+    if (pseudoTypeString.is8Bit())
+        entry = parsePseudoClassAndCompatibilityElementString(pseudoTypeString.characters8(), pseudoTypeString.length());
+    else
+        entry = parsePseudoClassAndCompatibilityElementString(pseudoTypeString.characters16(), pseudoTypeString.length());
+
+    if (entry)
+        return entry-&gt;pseudoTypes;
+    return { CSSSelector::PseudoUnknown, CSSSelector::PseudoUnknown };
+}
+
+} // 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 SelectorPseudoClassAndCompatibilityElementMap.gperf --output-file=SelectorPseudoClassAndCompatibilityElementMap.cpp&quot; % gperf_command)
+if gperf_return != 0:
+    print(&quot;Error when generating SelectorPseudoClassAndCompatibilityElementMap.cpp from SelectorPseudoClassAndCompatibilityElementMap.gperf :(&quot;)
+    sys.exit(gperf_return)
</ins></span></pre></div>
<a id="trunkSourceWebCorecssmakeSelectorPseudoTypeMappy"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/css/makeSelectorPseudoTypeMap.py (166446 => 166447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeSelectorPseudoTypeMap.py        2014-03-29 02:46:45 UTC (rev 166446)
+++ trunk/Source/WebCore/css/makeSelectorPseudoTypeMap.py        2014-03-29 03:08:59 UTC (rev 166447)
</span><span class="lines">@@ -1,205 +0,0 @@
</span><del>-#!/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)
</del></span></pre>
</div>
</div>

</body>
</html>