<!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>[166094] 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/166094">166094</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-21 12:56:27 -0700 (Fri, 21 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Pseudo type cleanup part 2: split pseudo elements parsing
https://bugs.webkit.org/show_bug.cgi?id=130370

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

With this patch, pseudo elements are handled separately. The only thing left in
the old path is compatibility pseudo elements and pseudo classes.

The list of special pseudo elements is now separated and is stored in SelectorPseudoElementTypeMap.in.
The script makeSelectorPseudoElementsMap.py takes that list to make the pseudo elements hash table.

The other pseudo elements are the prefixed ones, they are filtered in CSSSelector::parsePseudoElementType().

All the non-compatibility selectors are removed from SelectorPseudoTypeMap.in. CSSParserSelector::setPseudoTypeValue()
is updated accordingly. The next step will be to clean that part.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementSelector):
(WebCore::CSSParserSelector::parsePseudoCueFunctionSelector):
(WebCore::CSSParserSelector::setPseudoTypeValue):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::parsePseudoElementType):
* css/CSSSelector.h:
* css/SelectorPseudoElementTypeMap.in: Added.
* css/SelectorPseudoTypeMap.h:
* css/SelectorPseudoTypeMap.in:
* css/html.css:
(q::before):
(q::after):
* css/makeSelectorPseudoElementsMap.py: Added.
(enumerablePseudoType):
(expand_ifdef_condition):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):</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="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</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="#trunkSourceWebCorecssSelectorPseudoTypeMaph">trunk/Source/WebCore/css/SelectorPseudoTypeMap.h</a></li>
<li><a href="#trunkSourceWebCorecssSelectorPseudoTypeMapin">trunk/Source/WebCore/css/SelectorPseudoTypeMap.in</a></li>
<li><a href="#trunkSourceWebCorecsshtmlcss">trunk/Source/WebCore/css/html.css</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssSelectorPseudoElementTypeMapin">trunk/Source/WebCore/css/SelectorPseudoElementTypeMap.in</a></li>
<li><a href="#trunkSourceWebCorecssmakeSelectorPseudoElementsMappy">trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.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 (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -3125,7 +3125,7 @@
</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><del>-# Generate CSS Selector pseudo type name to value map.
</del><ins>+# Generate CSS Selector pseudo type name to value maps.
</ins><span class="cx"> add_custom_command(
</span><span class="cx">     OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.gperf ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.cpp
</span><span class="cx">     MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeSelectorPseudoTypeMap.py
</span><span class="lines">@@ -3133,6 +3133,13 @@
</span><span class="cx">     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoTypeMap.py ${WEBCORE_DIR}/css/SelectorPseudoTypeMap.in &quot;${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}&quot;
</span><span class="cx">     VERBATIM)
</span><span class="cx"> list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoTypeMap.cpp)
</span><ins>+add_custom_command(
+    OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoElementTypeMap.gperf ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoElementTypeMap.cpp
+    MAIN_DEPENDENCY ${WEBCORE_DIR}/css/makeSelectorPseudoElementsMap.py
+    WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
+    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/css/makeSelectorPseudoElementsMap.py ${WEBCORE_DIR}/css/SelectorPseudoElementTypeMap.in &quot;${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}&quot;
+    VERBATIM)
+list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SelectorPseudoElementTypeMap.cpp)
</ins><span class="cx"> 
</span><span class="cx"> # Generate user agent styles
</span><span class="cx"> add_custom_command(
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/ChangeLog        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2014-03-21  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        Pseudo type cleanup part 2: split pseudo elements parsing
+        https://bugs.webkit.org/show_bug.cgi?id=130370
+
+        Reviewed by Andreas Kling.
+
+        With this patch, pseudo elements are handled separately. The only thing left in
+        the old path is compatibility pseudo elements and pseudo classes.
+
+        The list of special pseudo elements is now separated and is stored in SelectorPseudoElementTypeMap.in.
+        The script makeSelectorPseudoElementsMap.py takes that list to make the pseudo elements hash table.
+
+        The other pseudo elements are the prefixed ones, they are filtered in CSSSelector::parsePseudoElementType().
+
+        All the non-compatibility selectors are removed from SelectorPseudoTypeMap.in. CSSParserSelector::setPseudoTypeValue()
+        is updated accordingly. The next step will be to clean that part.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
+        * css/CSSGrammar.y.in:
+        * css/CSSParserValues.cpp:
+        (WebCore::CSSParserSelector::parsePseudoElementSelector):
+        (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector):
+        (WebCore::CSSParserSelector::setPseudoTypeValue):
+        * css/CSSParserValues.h:
+        * css/CSSSelector.cpp:
+        (WebCore::CSSSelector::parsePseudoElementType):
+        * css/CSSSelector.h:
+        * css/SelectorPseudoElementTypeMap.in: Added.
+        * css/SelectorPseudoTypeMap.h:
+        * css/SelectorPseudoTypeMap.in:
+        * css/html.css:
+        (q::before):
+        (q::after):
+        * css/makeSelectorPseudoElementsMap.py: Added.
+        (enumerablePseudoType):
+        (expand_ifdef_condition):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::getMatchedCSSRules):
+
</ins><span class="cx"> 2014-03-20  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Less inclusion of JSCInlines.h.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/DerivedSources.make        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -751,6 +751,7 @@
</span><span class="cx">     PlugInsResources.h \
</span><span class="cx">     SVGElementFactory.cpp \
</span><span class="cx">     SVGNames.cpp \
</span><ins>+    SelectorPseudoElementTypeMap.cpp \
</ins><span class="cx">     SelectorPseudoTypeMap.cpp \
</span><span class="cx">     UserAgentStyleSheets.h \
</span><span class="cx">     WebKitFontFamilyNames.cpp \
</span><span class="lines">@@ -800,6 +801,10 @@
</span><span class="cx"> SelectorPseudoTypeMap.cpp : $(WebCore)/css/makeSelectorPseudoTypeMap.py $(WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS)
</span><span class="cx">         python &quot;$(WebCore)/css/makeSelectorPseudoTypeMap.py&quot; $(WEBCORE_CSS_SELECTOR_PSEUDO_TYPE_MAP_KEYWORDS) &quot;$(FEATURE_DEFINES)&quot;
</span><span class="cx"> 
</span><ins>+WEBCORE_CSS_SELECTOR_PSEUDO_ELEMENTS_TYPE_MAP_KEYWORDS := $(WebCore)/css/SelectorPseudoElementTypeMap.in
+SelectorPseudoElementTypeMap.cpp : $(WebCore)/css/makeSelectorPseudoElementsMap.py $(WEBCORE_CSS_SELECTOR_PSEUDO_ELEMENTS_TYPE_MAP_KEYWORDS)
+        python &quot;$(WebCore)/css/makeSelectorPseudoElementsMap.py&quot; $(WEBCORE_CSS_SELECTOR_PSEUDO_ELEMENTS_TYPE_MAP_KEYWORDS) &quot;$(FEATURE_DEFINES)&quot;
+
</ins><span class="cx"> # --------
</span><span class="cx"> 
</span><span class="cx"> # XMLViewer CSS
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-03-21 19:56:27 UTC (rev 166094)
</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/SelectorPseudoElementTypeMap.cpp \
</ins><span class="cx">         DerivedSources/WebCore/SelectorPseudoTypeMap.cpp \
</span><span class="cx">         DerivedSources/WebCore/UserAgentScriptsData.cpp \
</span><span class="cx">         DerivedSources/WebCore/UserAgentScripts.h \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-21 19:56:27 UTC (rev 166094)
</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\SelectorPseudoElementTypeMap.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\SelectorPseudoTypeMap.cpp&quot; /&gt;
</span><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="lines">@@ -21058,4 +21059,4 @@
</span><span class="cx">   &lt;ImportGroup Label=&quot;ExtensionTargets&quot;&gt;
</span><span class="cx">     &lt;Import Project=&quot;$(VCTargetsPath)\BuildCustomizations\masm.targets&quot; /&gt;
</span><span class="cx">   &lt;/ImportGroup&gt;
</span><del>-&lt;/Project&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/Project&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -5149,6 +5149,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\SelectorPseudoElementTypeMap.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\SelectorPseudoTypeMap.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;DerivedSources&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -15105,4 +15108,4 @@
</span><span class="cx">       &lt;Filter&gt;platform\win&lt;/Filter&gt;
</span><span class="cx">     &lt;/MASM&gt;
</span><span class="cx">   &lt;/ItemGroup&gt;
</span><del>-&lt;/Project&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+&lt;/Project&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -979,6 +979,7 @@
</span><span class="cx">                 26601EBF14B3B9AD0012C0FE /* PlatformEventFactoryIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 26601EBD14B3B9AD0012C0FE /* PlatformEventFactoryIOS.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 26601EC014B3B9AD0012C0FE /* PlatformEventFactoryIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26601EBE14B3B9AD0012C0FE /* PlatformEventFactoryIOS.mm */; };
</span><span class="cx">                 269239961505E1AA009E57FC /* JSIDBVersionChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 269239921505E1AA009E57FC /* JSIDBVersionChangeEvent.h */; };
</span><ins>+                26AA0F9E18D2A18B00419381 /* SelectorPseudoElementTypeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26AA0F9D18D2A18B00419381 /* SelectorPseudoElementTypeMap.cpp */; };
</ins><span class="cx">                 26B9998F1803AE7200D01121 /* RegisterAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 26B9998E1803AE7200D01121 /* RegisterAllocator.h */; };
</span><span class="cx">                 26B999911803B3C900D01121 /* StackAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 26B999901803B3C900D01121 /* StackAllocator.h */; };
</span><span class="cx">                 26B999931803B9D900D01121 /* FunctionCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 26B999921803B9D900D01121 /* FunctionCall.h */; };
</span><span class="lines">@@ -7824,6 +7825,10 @@
</span><span class="cx">                 26601EBE14B3B9AD0012C0FE /* PlatformEventFactoryIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatformEventFactoryIOS.mm; path = ios/PlatformEventFactoryIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 269239911505E1AA009E57FC /* JSIDBVersionChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBVersionChangeEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 269239921505E1AA009E57FC /* JSIDBVersionChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSIDBVersionChangeEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                26AA0F9918D2973D00419381 /* makeSelectorPseudoElementsMap.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = makeSelectorPseudoElementsMap.py; sourceTree = &quot;&lt;group&gt;&quot;; };
+                26AA0F9A18D2973D00419381 /* SelectorPseudoElementTypeMap.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = SelectorPseudoElementTypeMap.in; sourceTree = &quot;&lt;group&gt;&quot;; };
+                26AA0F9D18D2A18B00419381 /* SelectorPseudoElementTypeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorPseudoElementTypeMap.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                26AA0F9F18D2A1C100419381 /* SelectorPseudoElementTypeMap.gperf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SelectorPseudoElementTypeMap.gperf; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 26B9998E1803AE7200D01121 /* RegisterAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterAllocator.h; path = cssjit/RegisterAllocator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 26B999901803B3C900D01121 /* StackAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackAllocator.h; path = cssjit/StackAllocator.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 26B999921803B9D900D01121 /* FunctionCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionCall.h; path = cssjit/FunctionCall.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -15907,6 +15912,8 @@
</span><span class="cx">                                 44A28AAE12DFB8BF00AE923B /* MathMLNames.h */,
</span><span class="cx">                                 71E2183817359FB8006E6E4D /* PlugInsResources.h */,
</span><span class="cx">                                 71E2183917359FB8006E6E4D /* PlugInsResourcesData.cpp */,
</span><ins>+                                26AA0F9D18D2A18B00419381 /* SelectorPseudoElementTypeMap.cpp */,
+                                26AA0F9F18D2A1C100419381 /* SelectorPseudoElementTypeMap.gperf */,
</ins><span class="cx">                                 43B85ED218CBEC5200E31AF4 /* SelectorPseudoTypeMap.cpp */,
</span><span class="cx">                                 43B85ED318CBEC5200E31AF4 /* SelectorPseudoTypeMap.gperf */,
</span><span class="cx">                                 53EF766A16530A61004CBE49 /* SettingsMacros.h */,
</span><span class="lines">@@ -21641,6 +21648,7 @@
</span><span class="cx">                                 4A9CC81F16BF9BB400EC645A /* InspectorCSSOMWrappers.h */,
</span><span class="cx">                                 E55F4979151B888000BB67DB /* LengthFunctions.cpp */,
</span><span class="cx">                                 E5BA7D62151437CA00FE1E3F /* LengthFunctions.h */,
</span><ins>+                                26AA0F9918D2973D00419381 /* makeSelectorPseudoElementsMap.py */,
</ins><span class="cx">                                 43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoTypeMap.py */,
</span><span class="cx">                                 93CA4C9A09DF93FA00DF8677 /* make-css-file-arrays.pl */,
</span><span class="cx">                                 93CA4C9B09DF93FA00DF8677 /* makeprop.pl */,
</span><span class="lines">@@ -21688,6 +21696,7 @@
</span><span class="cx">                                 432D3FE718A8658400D7DC03 /* SelectorCheckerTestFunctions.h */,
</span><span class="cx">                                 415071551685067300C3C7B3 /* SelectorFilter.cpp */,
</span><span class="cx">                                 415071561685067300C3C7B3 /* SelectorFilter.h */,
</span><ins>+                                26AA0F9A18D2973D00419381 /* SelectorPseudoElementTypeMap.in */,
</ins><span class="cx">                                 43B85ED618CBEC9700E31AF4 /* SelectorPseudoTypeMap.in */,
</span><span class="cx">                                 43107BE118CC19DE00CC18E8 /* SelectorPseudoTypeMap.h */,
</span><span class="cx">                                 E47A97CE163059FC005DCD99 /* StyleInvalidationAnalysis.cpp */,
</span><span class="lines">@@ -27410,6 +27419,7 @@
</span><span class="cx">                                 510194441836F7E400925523 /* IDBCursorBackendOperations.cpp in Sources */,
</span><span class="cx">                                 51D719C3181106E00016DC51 /* IDBCursorWithValue.cpp in Sources */,
</span><span class="cx">                                 51D719C6181106E00016DC51 /* IDBDatabase.cpp in Sources */,
</span><ins>+                                26AA0F9E18D2A18B00419381 /* SelectorPseudoElementTypeMap.cpp in Sources */,
</ins><span class="cx">                                 51771C8E182DB4B7008E781E /* IDBDatabaseBackend.cpp in Sources */,
</span><span class="cx">                                 51D719CB181106E00016DC51 /* IDBDatabaseCallbacksImpl.cpp in Sources */,
</span><span class="cx">                                 51D719CE181106E00016DC51 /* IDBDatabaseException.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -1173,8 +1173,8 @@
</span><span class="cx">     , m_refCount(1)
</span><span class="cx"> {
</span><span class="cx">     unsigned nameWithoutColonsStart = pseudoElementName[0] == ':' ? (pseudoElementName[1] == ':' ? 2 : 1) : 0;
</span><del>-    m_pseudoElementSpecifier = CSSSelector::pseudoId(CSSSelector::parsePseudoType(
-        AtomicString(pseudoElementName.substring(nameWithoutColonsStart))));
</del><ins>+    m_pseudoElementSpecifier = CSSSelector::pseudoId(CSSSelector::parsePseudoElementType(
+    (pseudoElementName.substringSharingImpl(nameWithoutColonsStart))));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CSSComputedStyleDeclaration::~CSSComputedStyleDeclaration()
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGrammaryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGrammar.y.in        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -1184,26 +1184,12 @@
</span><span class="cx">             $$ = selector.release();
</span><span class="cx">     }
</span><span class="cx">     | ':' ':' IDENT {
</span><del>-        $$ = nullptr;
-        auto selector = std::make_unique&lt;CSSParserSelector&gt;();
-        selector-&gt;setMatch(CSSSelector::PseudoElement);
-        $3.lower();
-        selector-&gt;setPseudoTypeValue($3);
-        if (selector-&gt;pseudoType() != CSSSelector::PseudoUnknown)
-            $$ = selector.release();
</del><ins>+        $$ = CSSParserSelector::parsePseudoElementSelector($3);
</ins><span class="cx">     }
</span><span class="cx"> #if ENABLE_VIDEO_TRACK
</span><span class="cx">     // used by ::cue(:past/:future)
</span><span class="cx">     | ':' ':' CUEFUNCTION maybe_space simple_selector_list maybe_space ')' {
</span><del>-        $$ = nullptr;
-        if ($5) {
-            auto selector = std::make_unique&lt;CSSParserSelector&gt;();
-            selector-&gt;setMatch(CSSSelector::PseudoElement);
-            selector-&gt;adoptSelectorVector(*std::unique_ptr&lt;Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&gt;($5));
-            selector-&gt;setPseudoTypeValue($3);
-            ASSERT(selector-&gt;pseudoType() == CSSSelector::PseudoCue);
-            $$ = selector.release();
-        }
</del><ins>+        $$ = CSSParserSelector::parsePseudoCueFunctionSelector($3, $5);
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx">     // use by :-webkit-any.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.cpp (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.cpp        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/CSSParserValues.cpp        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> #include &quot;CSSFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSSelector.h&quot;
</span><span class="cx"> #include &quot;CSSSelectorList.h&quot;
</span><ins>+#include &quot;SelectorPseudoTypeMap.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -164,6 +165,38 @@
</span><span class="cx">     return selector.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CSSParserSelector* CSSParserSelector::parsePseudoElementSelector(CSSParserString&amp; pseudoTypeString)
+{
+    pseudoTypeString.lower();
+    AtomicString name = pseudoTypeString;
+
+    CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoElementType(name);
+    if (pseudoType == CSSSelector::PseudoUnknown)
+        return nullptr;
+
+    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;
+    selector-&gt;m_selector-&gt;setValue(name);
+    return selector.release();
+}
+
+CSSParserSelector* CSSParserSelector::parsePseudoCueFunctionSelector(const CSSParserString&amp; functionIdentifier, Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;* parsedSelectorVector)
+{
+    ASSERT_UNUSED(functionIdentifier, String(functionIdentifier) == &quot;cue(&quot;);
+
+    std::unique_ptr&lt;Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;&gt; selectorVector(parsedSelectorVector);
+
+    if (!selectorVector)
+        return nullptr;
+
+    auto selector = std::make_unique&lt;CSSParserSelector&gt;();
+    selector-&gt;m_selector-&gt;m_match = CSSSelector::PseudoElement;
+    selector-&gt;m_selector-&gt;m_pseudoType = CSSSelector::PseudoCue;
+    selector-&gt;adoptSelectorVector(*selectorVector);
+    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">@@ -201,31 +234,15 @@
</span><span class="cx">     AtomicString name = pseudoTypeString;
</span><span class="cx">     m_selector-&gt;setValue(name);
</span><span class="cx"> 
</span><del>-    CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoType(name);
-    bool element = false; // pseudo-element
-    bool compat = false; // single colon compatbility mode
</del><ins>+    CSSSelector::PseudoType pseudoType = parsePseudoTypeString(*name.impl());
+    bool isCompatibilityElementType = false; // single colon compatbility mode
</ins><span class="cx"> 
</span><span class="cx">     switch (pseudoType) {
</span><span class="cx">     case CSSSelector::PseudoAfter:
</span><span class="cx">     case CSSSelector::PseudoBefore:
</span><span class="cx">     case CSSSelector::PseudoFirstLetter:
</span><span class="cx">     case CSSSelector::PseudoFirstLine:
</span><del>-        compat = true;
-        FALLTHROUGH;
-#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:
-        element = true;
</del><ins>+        isCompatibilityElementType = true;
</ins><span class="cx">         break;
</span><span class="cx">     case CSSSelector::PseudoUnknown:
</span><span class="cx">     case CSSSelector::PseudoEmpty:
</span><span class="lines">@@ -291,6 +308,20 @@
</span><span class="cx">     case CSSSelector::PseudoPast:
</span><span class="cx"> #endif
</span><span class="cx">         break;
</span><ins>+#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:
+
</ins><span class="cx">     case CSSSelector::PseudoFirst:
</span><span class="cx">     case CSSSelector::PseudoLeft:
</span><span class="cx">     case CSSSelector::PseudoRight:
</span><span class="lines">@@ -299,13 +330,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     unsigned matchType = m_selector-&gt;m_match;
</span><del>-    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;
</del><ins>+    if (isCompatibilityElementType)
+        matchType = CSSSelector::PseudoElement;
</ins><span class="cx"> 
</span><span class="cx">     m_selector-&gt;m_match = matchType;
</span><span class="cx">     m_selector-&gt;m_pseudoType = pseudoType;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.h (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.h        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/CSSParserValues.h        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -172,6 +172,8 @@
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx">     static CSSParserSelector* parsePagePseudoSelector(const CSSParserString&amp; pseudoTypeString);
</span><ins>+    static CSSParserSelector* parsePseudoElementSelector(CSSParserString&amp; pseudoTypeString);
+    static CSSParserSelector* parsePseudoCueFunctionSelector(const CSSParserString&amp; functionIdentifier, Vector&lt;std::unique_ptr&lt;CSSParserSelector&gt;&gt;* selectorVector);
</ins><span class="cx"> 
</span><span class="cx">     CSSParserSelector();
</span><span class="cx">     explicit CSSParserSelector(const QualifiedName&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelector.cpp (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.cpp        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/CSSSelector.cpp        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -249,19 +249,16 @@
</span><span class="cx">     return NOPSEUDO;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSSelector::PseudoType CSSSelector::parsePseudoType(const String&amp; name)
</del><ins>+CSSSelector::PseudoType CSSSelector::parsePseudoElementType(const String&amp; name)
</ins><span class="cx"> {
</span><span class="cx">     if (name.isNull())
</span><span class="cx">         return PseudoUnknown;
</span><span class="cx"> 
</span><del>-    PseudoType type = parsePseudoTypeString(*name.impl());
</del><ins>+    PseudoType type = parsePseudoElementString(*name.impl());
</ins><span class="cx">     if (type == PseudoUnknown) {
</span><span class="cx">         if (name.startsWith(&quot;-webkit-&quot;))
</span><span class="cx">             type = PseudoWebKitCustomElement;
</span><span class="cx"> 
</span><del>-        if (name == &quot;cue&quot;)
-            type = PseudoWebKitCustomElement;
-
</del><span class="cx">         if (name.startsWith(&quot;x-&quot;))
</span><span class="cx">             type = PseudoUserAgentCustomElement;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelector.h (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.h        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/CSSSelector.h        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -186,7 +186,7 @@
</span><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 String&amp;);
</del><ins>+        static PseudoType parsePseudoElementType(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></pre></div>
<a id="trunkSourceWebCorecssSelectorPseudoElementTypeMapin"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/SelectorPseudoElementTypeMap.in (0 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorPseudoElementTypeMap.in                                (rev 0)
+++ trunk/Source/WebCore/css/SelectorPseudoElementTypeMap.in        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+after
+before
+#if ENABLE(VIDEO_TRACK)
+cue, PseudoWebKitCustomElement
+#endif
+first-letter
+first-line
+-webkit-resizer
+-webkit-scrollbar
+-webkit-scrollbar-button
+-webkit-scrollbar-corner
+-webkit-scrollbar-thumb
+-webkit-scrollbar-track
+-webkit-scrollbar-track-piece
+selection
</ins></span></pre></div>
<a id="trunkSourceWebCorecssSelectorPseudoTypeMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorPseudoTypeMap.h (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorPseudoTypeMap.h        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/SelectorPseudoTypeMap.h        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> CSSSelector::PseudoType parsePseudoTypeString(const StringImpl&amp; pseudoTypeString);
</span><ins>+CSSSelector::PseudoType parsePseudoElementString(const StringImpl&amp; pseudoTypeString);
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorPseudoTypeMapin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorPseudoTypeMap.in (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorPseudoTypeMap.in        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/SelectorPseudoTypeMap.in        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -4,13 +4,6 @@
</span><span class="cx"> -webkit-autofill
</span><span class="cx"> -webkit-drag
</span><span class="cx"> -webkit-full-page-media
</span><del>--webkit-resizer
--webkit-scrollbar
--webkit-scrollbar-button
--webkit-scrollbar-corner
--webkit-scrollbar-thumb
--webkit-scrollbar-track
--webkit-scrollbar-track-piece
</del><span class="cx"> active
</span><span class="cx"> after
</span><span class="cx"> before
</span><span class="lines">@@ -53,7 +46,6 @@
</span><span class="cx"> required
</span><span class="cx"> root
</span><span class="cx"> scope
</span><del>-selection
</del><span class="cx"> single-button
</span><span class="cx"> start
</span><span class="cx"> target
</span><span class="lines">@@ -70,7 +62,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-cue(
</del><span class="cx"> future
</span><span class="cx"> past
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecsshtmlcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/html.css (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/html.css        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/css/html.css        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -112,11 +112,11 @@
</span><span class="cx">     display: inline
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-q:before {
</del><ins>+q::before {
</ins><span class="cx">     content: open-quote;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-q:after {
</del><ins>+q::after {
</ins><span class="cx">     content: close-quote;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssmakeSelectorPseudoElementsMappy"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.py (0 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.py                                (rev 0)
+++ trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.py        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -0,0 +1,212 @@
</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('SelectorPseudoElementTypeMap.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 SelectorPseudoElementTypeMapHash
+%omit-struct-type
+%language=C++
+%readonly-tables
+%global-table
+%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:
+    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()
+        pseudo_element_enum_value = enumerablePseudoType(keyword)
+    else:
+        keyword = keyword_definition[0].strip()
+        pseudo_element_enum_value = &quot;CSSSelector::&quot; + keyword_definition[1].strip()
+
+    output_file.write('&quot;%s&quot;, %s\n' % (keyword, pseudo_element_enum_value))
+    longest_keyword = max(longest_keyword, len(keyword))
+
+output_file.write(&quot;&quot;&quot;%%
+
+static inline CSSSelector::PseudoType parsePseudoElementString(const LChar* characters, unsigned length)
+{
+    if (const SelectorPseudoTypeEntry* entry = SelectorPseudoElementTypeMapHash::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 parsePseudoElementString(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 parsePseudoElementString(buffer, length);
+}
+&quot;&quot;&quot; % longest_keyword)
+
+output_file.write(&quot;&quot;&quot;
+CSSSelector::PseudoType parsePseudoElementString(const StringImpl&amp; pseudoTypeString)
+{
+    if (pseudoTypeString.is8Bit())
+        return parsePseudoElementString(pseudoTypeString.characters8(), pseudoTypeString.length());
+    return parsePseudoElementString(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 SelectorPseudoElementTypeMap.gperf --output-file=SelectorPseudoElementTypeMap.cpp&quot; % gperf_command)
+if gperf_return != 0:
+    print(&quot;Error when generating SelectorPseudoElementTypeMap.cpp from SelectorPseudoElementTypeMap.gperf :(&quot;)
+    sys.exit(gperf_return)
</ins></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (166093 => 166094)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2014-03-21 19:40:17 UTC (rev 166093)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2014-03-21 19:56:27 UTC (rev 166094)
</span><span class="lines">@@ -1369,7 +1369,7 @@
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     unsigned colonStart = pseudoElement[0] == ':' ? (pseudoElement[1] == ':' ? 2 : 1) : 0;
</span><del>-    CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoType(AtomicString(pseudoElement.substring(colonStart)));
</del><ins>+    CSSSelector::PseudoType pseudoType = CSSSelector::parsePseudoElementType(pseudoElement.substringSharingImpl(colonStart));
</ins><span class="cx">     if (pseudoType == CSSSelector::PseudoUnknown &amp;&amp; !pseudoElement.isEmpty())
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>