<!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>[163853] 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/163853">163853</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-10 18:46:04 -0800 (Mon, 10 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add a few pseudo type to the selector compiler through function calls
https://bugs.webkit.org/show_bug.cgi?id=128514

Reviewed by Dean Jackson.

Certain pseudo type checkers rely on virtual function calls. Since those types
are uncommon, and this code generator cannot currently make virtual function calls,
the checker are added by generating a function call to a wrapper function.

To avoid code duplication between SelectorChecker and the compiler, all the relevant checking
code has been moved to a common header, SelectorCheckerTestFunctions.h.
SelectorChecker still inline the functions, while the SelectorCompiler generate local static functions
and generate calls to them as needed.

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h: Added.
(WebCore::isAutofilled):
(WebCore::isDefaultButtonForForm):
(WebCore::isDisabled):
(WebCore::isEnabled):
(WebCore::isChecked):
(WebCore::isInvalid):
(WebCore::isOptionalFormControl):
(WebCore::isRequiredFormControl):
(WebCore::isValid):
(WebCore::matchesReadOnlyPseudoClass):
(WebCore::matchesReadWritePseudoClass):
(WebCore::shouldAppearIndeterminate):
(WebCore::matchesFullScreenPseudoClass):
(WebCore::matchesFutureCuePseudoClass):
(WebCore::matchesPastCuePseudoClass):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoType):
(WebCore::SelectorCompiler::nonConstTestFunctionWrapper):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
* dom/Element.h:
(WebCore::Element::isValidFormControlElement):
* dom/Node.h:
(WebCore::Node::toInputElement):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isValidFormControlElement):
* html/HTMLFormControlElement.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#trunkSourceWebCorecssSelectorCheckercpp">trunk/Source/WebCore/css/SelectorChecker.cpp</a></li>
<li><a href="#trunkSourceWebCorecssjitSelectorCompilercpp">trunk/Source/WebCore/cssjit/SelectorCompiler.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementcpp">trunk/Source/WebCore/html/HTMLFormControlElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementh">trunk/Source/WebCore/html/HTMLFormControlElement.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorecssSelectorCheckerTestFunctionsh">trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/ChangeLog        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -1,5 +1,56 @@
</span><span class="cx"> 2014-02-10  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        Add a few pseudo type to the selector compiler through function calls
+        https://bugs.webkit.org/show_bug.cgi?id=128514
+
+        Reviewed by Dean Jackson.
+
+        Certain pseudo type checkers rely on virtual function calls. Since those types
+        are uncommon, and this code generator cannot currently make virtual function calls,
+        the checker are added by generating a function call to a wrapper function.
+
+        To avoid code duplication between SelectorChecker and the compiler, all the relevant checking
+        code has been moved to a common header, SelectorCheckerTestFunctions.h.
+        SelectorChecker still inline the functions, while the SelectorCompiler generate local static functions
+        and generate calls to them as needed.
+
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::checkOne):
+        * css/SelectorCheckerTestFunctions.h: Added.
+        (WebCore::isAutofilled):
+        (WebCore::isDefaultButtonForForm):
+        (WebCore::isDisabled):
+        (WebCore::isEnabled):
+        (WebCore::isChecked):
+        (WebCore::isInvalid):
+        (WebCore::isOptionalFormControl):
+        (WebCore::isRequiredFormControl):
+        (WebCore::isValid):
+        (WebCore::matchesReadOnlyPseudoClass):
+        (WebCore::matchesReadWritePseudoClass):
+        (WebCore::shouldAppearIndeterminate):
+        (WebCore::matchesFullScreenPseudoClass):
+        (WebCore::matchesFutureCuePseudoClass):
+        (WebCore::matchesPastCuePseudoClass):
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::addPseudoType):
+        (WebCore::SelectorCompiler::nonConstTestFunctionWrapper):
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
+        * dom/Element.h:
+        (WebCore::Element::isValidFormControlElement):
+        * dom/Node.h:
+        (WebCore::Node::toInputElement):
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::isValidFormControlElement):
+        * html/HTMLFormControlElement.h:
+
+2014-02-10  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
</ins><span class="cx">         Add the basic infrastructure to compile attributes matching in selectors
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=128484
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -2674,6 +2674,7 @@
</span><span class="cx">         Source/WebCore/css/SelectorChecker.h \
</span><span class="cx">         Source/WebCore/css/SelectorCheckerFastPath.cpp \
</span><span class="cx">         Source/WebCore/css/SelectorCheckerFastPath.h \
</span><ins>+        Source/WebCore/css/SelectorCheckerTestFunctions.h \
</ins><span class="cx">         Source/WebCore/css/SelectorFilter.cpp \
</span><span class="cx">         Source/WebCore/css/SelectorFilter.h \
</span><span class="cx">         Source/WebCore/css/StyleInvalidationAnalysis.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -19662,6 +19662,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\css\Rect.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\css\RGBColor.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\css\SelectorChecker.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\css\SelectorCheckerTestFunctions.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\css\StyleInvalidationAnalysis.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\css\StyleMedia.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\css\StyleProperties.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -9083,6 +9083,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\css\SelectorChecker.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;css&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\css\SelectorCheckerTestFunctions.h&quot;&gt;
+      &lt;Filter&gt;css&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\css\StyleInvalidationAnalysis.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;css&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -1395,6 +1395,7 @@
</span><span class="cx">                 431A2FD713B7707A007791E4 /* SVGAnimatedLengthList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 431A2FD613B7707A007791E4 /* SVGAnimatedLengthList.cpp */; };
</span><span class="cx">                 431A302113B89DCC007791E4 /* SVGAnimatedPreserveAspectRatio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 431A302013B89DCC007791E4 /* SVGAnimatedPreserveAspectRatio.cpp */; };
</span><span class="cx">                 431A308813B8F978007791E4 /* SVGAnimatedBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 431A308713B8F978007791E4 /* SVGAnimatedBoolean.cpp */; };
</span><ins>+                432D3FE818A8658400D7DC03 /* SelectorCheckerTestFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 432D3FE718A8658400D7DC03 /* SelectorCheckerTestFunctions.h */; };
</ins><span class="cx">                 4331AC7813B6870000A9E5AE /* SVGAnimatedNumberList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4331AC7713B6870000A9E5AE /* SVGAnimatedNumberList.cpp */; };
</span><span class="cx">                 4358E87C1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4358E87A1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp */; };
</span><span class="cx">                 4358E87D1360A2EE00E4748C /* JSSVGFEDropShadowElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4358E87B1360A2EE00E4748C /* JSSVGFEDropShadowElement.h */; };
</span><span class="lines">@@ -8224,6 +8225,7 @@
</span><span class="cx">                 431A2FD613B7707A007791E4 /* SVGAnimatedLengthList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedLengthList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 431A302013B89DCC007791E4 /* SVGAnimatedPreserveAspectRatio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedPreserveAspectRatio.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 431A308713B8F978007791E4 /* SVGAnimatedBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedBoolean.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                432D3FE718A8658400D7DC03 /* SelectorCheckerTestFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorCheckerTestFunctions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 4331AC7713B6870000A9E5AE /* SVGAnimatedNumberList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedNumberList.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4358E87A1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGFEDropShadowElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4358E87B1360A2EE00E4748C /* JSSVGFEDropShadowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGFEDropShadowElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -21539,6 +21541,7 @@
</span><span class="cx">                                 3FFFF9A6159D9A550020BBD5 /* WebKitCSSViewportRule.cpp */,
</span><span class="cx">                                 3FFFF9A7159D9A550020BBD5 /* WebKitCSSViewportRule.h */,
</span><span class="cx">                                 3F2B33E3165ABD3500E3987C /* WebKitCSSViewportRule.idl */,
</span><ins>+                                432D3FE718A8658400D7DC03 /* SelectorCheckerTestFunctions.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = css;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -25928,6 +25931,7 @@
</span><span class="cx">                                 83C1D434178D5AB500141E68 /* SVGPathSegLinetoVerticalRel.h in Headers */,
</span><span class="cx">                                 83C1D435178D5AB500141E68 /* SVGPathSegMovetoAbs.h in Headers */,
</span><span class="cx">                                 A5416FE618810EF80009FC5F /* YouTubeEmbedShadowElement.h in Headers */,
</span><ins>+                                432D3FE818A8658400D7DC03 /* SelectorCheckerTestFunctions.h in Headers */,
</ins><span class="cx">                                 83C1D436178D5AB500141E68 /* SVGPathSegMovetoRel.h in Headers */,
</span><span class="cx">                                 FD1762E0176686D900D836A8 /* UpSampler.h in Headers */,
</span><span class="cx">                                 FD1762E4176686EA00D836A8 /* DownSampler.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorChecker.cpp        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -53,14 +53,11 @@
</span><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><span class="cx"> #include &quot;ScrollableArea.h&quot;
</span><span class="cx"> #include &quot;ScrollbarTheme.h&quot;
</span><ins>+#include &quot;SelectorCheckerTestFunctions.h&quot;
</ins><span class="cx"> #include &quot;ShadowRoot.h&quot;
</span><span class="cx"> #include &quot;StyledElement.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><span class="cx"> 
</span><del>-#if ENABLE(VIDEO_TRACK)
-#include &quot;WebVTTElement.h&quot;
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="lines">@@ -587,11 +584,7 @@
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="cx">         case CSSSelector::PseudoAutofill:
</span><del>-            if (!element-&gt;isFormControlElement())
-                break;
-            if (HTMLInputElement* inputElement = element-&gt;toInputElement())
-                return inputElement-&gt;isAutofilled();
-            break;
</del><ins>+            return isAutofilled(element);
</ins><span class="cx">         case CSSSelector::PseudoAnyLink:
</span><span class="cx">         case CSSSelector::PseudoLink:
</span><span class="cx">             // :visited and :link matches are separated later when applying the style. Here both classes match all links...
</span><span class="lines">@@ -640,46 +633,30 @@
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="cx">         case CSSSelector::PseudoEnabled:
</span><del>-            if (element-&gt;isFormControlElement() || isHTMLOptionElement(element) || isHTMLOptGroupElement(element))
-                return !element-&gt;isDisabledFormControl();
-            break;
</del><ins>+            return isEnabled(element);
</ins><span class="cx">         case CSSSelector::PseudoFullPageMedia:
</span><span class="cx">             return element-&gt;document().isMediaDocument();
</span><span class="cx">             break;
</span><span class="cx">         case CSSSelector::PseudoDefault:
</span><del>-            return element-&gt;isDefaultButtonForForm();
</del><ins>+            return isDefaultButtonForForm(element);
</ins><span class="cx">         case CSSSelector::PseudoDisabled:
</span><del>-            if (element-&gt;isFormControlElement() || isHTMLOptionElement(element) || isHTMLOptGroupElement(element))
-                return element-&gt;isDisabledFormControl();
-            break;
</del><ins>+            return isDisabled(element);
</ins><span class="cx">         case CSSSelector::PseudoReadOnly:
</span><del>-            return element-&gt;matchesReadOnlyPseudoClass();
</del><ins>+            return matchesReadOnlyPseudoClass(element);
</ins><span class="cx">         case CSSSelector::PseudoReadWrite:
</span><del>-            return element-&gt;matchesReadWritePseudoClass();
</del><ins>+            return matchesReadWritePseudoClass(element);
</ins><span class="cx">         case CSSSelector::PseudoOptional:
</span><del>-            return element-&gt;isOptionalFormControl();
</del><ins>+            return isOptionalFormControl(element);
</ins><span class="cx">         case CSSSelector::PseudoRequired:
</span><del>-            return element-&gt;isRequiredFormControl();
</del><ins>+            return isRequiredFormControl(element);
</ins><span class="cx">         case CSSSelector::PseudoValid:
</span><del>-            element-&gt;document().setContainsValidityStyleRules();
-            return element-&gt;willValidate() &amp;&amp; element-&gt;isValidFormControlElement();
</del><ins>+            return isValid(element);
</ins><span class="cx">         case CSSSelector::PseudoInvalid:
</span><del>-            element-&gt;document().setContainsValidityStyleRules();
-            return element-&gt;willValidate() &amp;&amp; !element-&gt;isValidFormControlElement();
</del><ins>+            return isInvalid(element);
</ins><span class="cx">         case CSSSelector::PseudoChecked:
</span><del>-            {
-                // Even though WinIE allows checked and indeterminate to co-exist, the CSS selector spec says that
-                // you can't be both checked and indeterminate. We will behave like WinIE behind the scenes and just
-                // obey the CSS spec here in the test for matching the pseudo.
-                HTMLInputElement* inputElement = element-&gt;toInputElement();
-                if (inputElement &amp;&amp; inputElement-&gt;shouldAppearChecked() &amp;&amp; !inputElement-&gt;shouldAppearIndeterminate())
-                    return true;
-                if (isHTMLOptionElement(element) &amp;&amp; toHTMLOptionElement(element)-&gt;selected())
-                    return true;
-                break;
-            }
</del><ins>+            return isChecked(element);
</ins><span class="cx">         case CSSSelector::PseudoIndeterminate:
</span><del>-            return element-&gt;shouldAppearIndeterminate();
</del><ins>+            return shouldAppearIndeterminate(element);
</ins><span class="cx">         case CSSSelector::PseudoRoot:
</span><span class="cx">             if (element == element-&gt;document().documentElement())
</span><span class="cx">                 return true;
</span><span class="lines">@@ -702,15 +679,7 @@
</span><span class="cx">             }
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx">         case CSSSelector::PseudoFullScreen:
</span><del>-            // While a Document is in the fullscreen state, and the document's current fullscreen
-            // element is an element in the document, the 'full-screen' pseudoclass applies to
-            // that element. Also, an &lt;iframe&gt;, &lt;object&gt; or &lt;embed&gt; element whose child browsing
-            // context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied.
-            if (element-&gt;isFrameElementBase() &amp;&amp; element-&gt;containsFullScreenElement())
-                return true;
-            if (!element-&gt;document().webkitIsFullScreen())
-                return false;
-            return element == element-&gt;document().webkitCurrentFullScreenElement();
</del><ins>+            return matchesFullScreenPseudoClass(element);
</ins><span class="cx">         case CSSSelector::PseudoAnimatingFullScreenTransition:
</span><span class="cx">             if (element != element-&gt;document().webkitCurrentFullScreenElement())
</span><span class="cx">                 return false;
</span><span class="lines">@@ -732,9 +701,9 @@
</span><span class="cx">             return element-&gt;isOutOfRange();
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">         case CSSSelector::PseudoFutureCue:
</span><del>-            return (element-&gt;isWebVTTElement() &amp;&amp; !toWebVTTElement(element)-&gt;isPastNode());
</del><ins>+            return matchesFutureCuePseudoClass(element);
</ins><span class="cx">         case CSSSelector::PseudoPastCue:
</span><del>-            return (element-&gt;isWebVTTElement() &amp;&amp; toWebVTTElement(element)-&gt;isPastNode());
</del><ins>+            return matchesPastCuePseudoClass(element);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">         case CSSSelector::PseudoScope:
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckerTestFunctionsh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h (0 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h                                (rev 0)
+++ trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -0,0 +1,146 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SelectorCheckerTestFunctions_h
+#define SelectorCheckerTestFunctions_h
+
+#include &quot;HTMLInputElement.h&quot;
+#include &quot;HTMLOptionElement.h&quot;
+#include &lt;wtf/Compiler.h&gt;
+
+#if ENABLE(VIDEO_TRACK)
+#include &quot;WebVTTElement.h&quot;
+#endif
+
+namespace WebCore {
+
+ALWAYS_INLINE bool isAutofilled(const Element* element)
+{
+    if (element-&gt;isFormControlElement()) {
+        if (const HTMLInputElement* inputElement = element-&gt;toInputElement())
+            return inputElement-&gt;isAutofilled();
+    }
+    return false;
+}
+
+ALWAYS_INLINE bool isDefaultButtonForForm(const Element* element)
+{
+    return element-&gt;isDefaultButtonForForm();
+}
+
+ALWAYS_INLINE bool isDisabled(const Element* element)
+{
+    if (element-&gt;isFormControlElement() || isHTMLOptionElement(element) || isHTMLOptGroupElement(element))
+        return element-&gt;isDisabledFormControl();
+    return false;
+}
+
+ALWAYS_INLINE bool isEnabled(const Element* element)
+{
+    if (element-&gt;isFormControlElement() || isHTMLOptionElement(element) || isHTMLOptGroupElement(element))
+        return !element-&gt;isDisabledFormControl();
+    return false;
+}
+
+ALWAYS_INLINE bool isChecked(Element* element)
+{
+    // Even though WinIE allows checked and indeterminate to co-exist, the CSS selector spec says that
+    // you can't be both checked and indeterminate. We will behave like WinIE behind the scenes and just
+    // obey the CSS spec here in the test for matching the pseudo.
+    const HTMLInputElement* inputElement = element-&gt;toInputElement();
+    if (inputElement &amp;&amp; inputElement-&gt;shouldAppearChecked() &amp;&amp; !inputElement-&gt;shouldAppearIndeterminate())
+        return true;
+    if (isHTMLOptionElement(element) &amp;&amp; toHTMLOptionElement(element)-&gt;selected())
+        return true;
+    return false;
+}
+
+ALWAYS_INLINE bool isInvalid(const Element* element)
+{
+    element-&gt;document().setContainsValidityStyleRules();
+    return element-&gt;willValidate() &amp;&amp; !element-&gt;isValidFormControlElement();
+}
+
+ALWAYS_INLINE bool isOptionalFormControl(const Element* element)
+{
+    return element-&gt;isOptionalFormControl();
+}
+
+ALWAYS_INLINE bool isRequiredFormControl(const Element* element)
+{
+    return element-&gt;isRequiredFormControl();
+}
+
+ALWAYS_INLINE bool isValid(const Element* element)
+{
+    element-&gt;document().setContainsValidityStyleRules();
+    return element-&gt;willValidate() &amp;&amp; element-&gt;isValidFormControlElement();
+}
+
+ALWAYS_INLINE bool matchesReadOnlyPseudoClass(const Element* element)
+{
+    return element-&gt;matchesReadOnlyPseudoClass();
+}
+
+ALWAYS_INLINE bool matchesReadWritePseudoClass(const Element* element)
+{
+    return element-&gt;matchesReadWritePseudoClass();
+}
+
+ALWAYS_INLINE bool shouldAppearIndeterminate(const Element* element)
+{
+    return element-&gt;shouldAppearIndeterminate();
+}
+
+#if ENABLE(FULLSCREEN_API)
+ALWAYS_INLINE bool matchesFullScreenPseudoClass(const Element* element)
+{
+    // While a Document is in the fullscreen state, and the document's current fullscreen
+    // element is an element in the document, the 'full-screen' pseudoclass applies to
+    // that element. Also, an &lt;iframe&gt;, &lt;object&gt; or &lt;embed&gt; element whose child browsing
+    // context's Document is in the fullscreen state has the 'full-screen' pseudoclass applied.
+    if (element-&gt;isFrameElementBase() &amp;&amp; element-&gt;containsFullScreenElement())
+        return true;
+    if (!element-&gt;document().webkitIsFullScreen())
+        return false;
+    return element == element-&gt;document().webkitCurrentFullScreenElement();
+}
+#endif
+
+#if ENABLE(VIDEO_TRACK)
+ALWAYS_INLINE bool matchesFutureCuePseudoClass(const Element* element)
+{
+    return (element-&gt;isWebVTTElement() &amp;&amp; !toWebVTTElement(element)-&gt;isPastNode());
+}
+
+ALWAYS_INLINE bool matchesPastCuePseudoClass(const Element* element)
+{
+    return (element-&gt;isWebVTTElement() &amp;&amp; toWebVTTElement(element)-&gt;isPastNode());
+}
+#endif
+
+} // namespace WebCore
+
+#endif // SelectorCheckerTestFunctions_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssjitSelectorCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include &quot;RenderElement.h&quot;
</span><span class="cx"> #include &quot;RenderStyle.h&quot;
</span><span class="cx"> #include &quot;SVGElement.h&quot;
</span><ins>+#include &quot;SelectorCheckerTestFunctions.h&quot;
</ins><span class="cx"> #include &quot;StackAllocator.h&quot;
</span><span class="cx"> #include &quot;StyledElement.h&quot;
</span><span class="cx"> #include &lt;JavaScriptCore/LinkBuffer.h&gt;
</span><span class="lines">@@ -146,6 +147,7 @@
</span><span class="cx">     // Element properties matchers.
</span><span class="cx">     void generateElementMatching(Assembler::JumpList&amp; failureCases, const SelectorFragment&amp;);
</span><span class="cx">     void generateElementDataMatching(Assembler::JumpList&amp; failureCases, const SelectorFragment&amp;);
</span><ins>+    void generateElementFunctionCallTest(Assembler::JumpList&amp; failureCases, JSC::FunctionPtr);
</ins><span class="cx">     void generateSynchronizeStyleAttribute(Assembler::RegisterID elementDataArraySizeAndFlags);
</span><span class="cx">     void generateSynchronizeAllAnimatedSVGAttribute(Assembler::RegisterID elementDataArraySizeAndFlags);
</span><span class="cx">     void generateElementAttributesMatching(Assembler::JumpList&amp; failureCases, const LocalRegister&amp; elementDataAddress, const SelectorFragment&amp;);
</span><span class="lines">@@ -153,7 +155,6 @@
</span><span class="cx">     void generateElementHasTagName(Assembler::JumpList&amp; failureCases, const QualifiedName&amp; nameToMatch);
</span><span class="cx">     void generateElementHasId(Assembler::JumpList&amp; failureCases, const LocalRegister&amp; elementDataAddress, const AtomicString&amp; idToMatch);
</span><span class="cx">     void generateElementHasClasses(Assembler::JumpList&amp; failureCases, const LocalRegister&amp; elementDataAddress, const Vector&lt;const AtomicStringImpl*&gt;&amp; classNames);
</span><del>-    void generateElementIsFocused(Assembler::JumpList&amp; failureCases);
</del><span class="cx">     void generateElementIsLink(Assembler::JumpList&amp; failureCases);
</span><span class="cx"> 
</span><span class="cx">     Assembler m_assembler;
</span><span class="lines">@@ -217,12 +218,32 @@
</span><span class="cx"> {
</span><span class="cx">     switch (type) {
</span><span class="cx">     case CSSSelector::PseudoAnyLink:
</span><del>-    case CSSSelector::PseudoLink:
</del><span class="cx">         pseudoClasses.add(CSSSelector::PseudoLink);
</span><span class="cx">         return FunctionType::SimpleSelectorChecker;
</span><ins>+    case CSSSelector::PseudoAutofill:
+    case CSSSelector::PseudoChecked:
+    case CSSSelector::PseudoDefault:
+    case CSSSelector::PseudoDisabled:
+    case CSSSelector::PseudoEnabled:
</ins><span class="cx">     case CSSSelector::PseudoFocus:
</span><del>-        pseudoClasses.add(CSSSelector::PseudoFocus);
</del><ins>+    case CSSSelector::PseudoIndeterminate:
+    case CSSSelector::PseudoInvalid:
+    case CSSSelector::PseudoLink:
+    case CSSSelector::PseudoOptional:
+    case CSSSelector::PseudoReadOnly:
+    case CSSSelector::PseudoReadWrite:
+    case CSSSelector::PseudoRequired:
+    case CSSSelector::PseudoValid:
+#if ENABLE(FULLSCREEN_API)
+    case CSSSelector::PseudoFullScreen:
+#endif
+#if ENABLE(VIDEO_TRACK)
+    case CSSSelector::PseudoFutureCue:
+    case CSSSelector::PseudoPastCue:
+#endif
+        pseudoClasses.add(type);
</ins><span class="cx">         return FunctionType::SimpleSelectorChecker;
</span><ins>+
</ins><span class="cx">     default:
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="lines">@@ -839,6 +860,40 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+struct UnoptimizedPseudoChecker {
+    CSSSelector::PseudoType pseudoId;
+    bool (*testFunction)(const Element*);
+};
+
+template&lt;bool (*testFunction)(Element*)&gt;
+inline bool nonConstTestFunctionWrapper(const Element* element)
+{
+    return testFunction(const_cast&lt;Element*&gt;(element));
+}
+
+static const UnoptimizedPseudoChecker unoptimizedPseudoCheckers[] = {
+    { CSSSelector::PseudoAutofill, isAutofilled },
+    { CSSSelector::PseudoChecked, nonConstTestFunctionWrapper&lt;isChecked&gt; },
+    { CSSSelector::PseudoDefault, isDefaultButtonForForm },
+    { CSSSelector::PseudoDisabled, isDisabled },
+    { CSSSelector::PseudoEnabled, isEnabled },
+    { CSSSelector::PseudoIndeterminate, shouldAppearIndeterminate },
+    { CSSSelector::PseudoInvalid, isInvalid },
+    { CSSSelector::PseudoFocus, SelectorChecker::matchesFocusPseudoClass },
+    { CSSSelector::PseudoOptional, isOptionalFormControl },
+    { CSSSelector::PseudoReadOnly, matchesReadOnlyPseudoClass },
+    { CSSSelector::PseudoReadWrite, matchesReadWritePseudoClass },
+    { CSSSelector::PseudoRequired, isRequiredFormControl },
+    { CSSSelector::PseudoValid, isValid },
+#if ENABLE(FULLSCREEN_API)
+    { CSSSelector::PseudoFullScreen, matchesFullScreenPseudoClass },
+#endif
+#if ENABLE(VIDEO_TRACK)
+    { CSSSelector::PseudoFutureCue, matchesFutureCuePseudoClass },
+    { CSSSelector::PseudoPastCue, matchesPastCuePseudoClass },
+#endif
+};
+
</ins><span class="cx"> void SelectorCodeGenerator::generateElementMatching(Assembler::JumpList&amp; failureCases, const SelectorFragment&amp; fragment)
</span><span class="cx"> {
</span><span class="cx">     if (fragment.pseudoClasses.contains(CSSSelector::PseudoLink))
</span><span class="lines">@@ -847,8 +902,12 @@
</span><span class="cx">     if (fragment.tagName)
</span><span class="cx">         generateElementHasTagName(failureCases, *(fragment.tagName));
</span><span class="cx"> 
</span><del>-    if (fragment.pseudoClasses.contains(CSSSelector::PseudoFocus))
-        generateElementIsFocused(failureCases);
</del><ins>+    if (!fragment.pseudoClasses.isEmpty()) {
+        for (unsigned i = 0; i &lt; WTF_ARRAY_LENGTH(unoptimizedPseudoCheckers); ++i) {
+            if (fragment.pseudoClasses.contains(unoptimizedPseudoCheckers[i].pseudoId))
+                generateElementFunctionCallTest(failureCases, unoptimizedPseudoCheckers[i].testFunction);
+        }
+    }
</ins><span class="cx"> 
</span><span class="cx">     generateElementDataMatching(failureCases, fragment);
</span><span class="cx"> }
</span><span class="lines">@@ -1032,6 +1091,15 @@
</span><span class="cx">     successCases.link(&amp;m_assembler);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void SelectorCodeGenerator::generateElementFunctionCallTest(Assembler::JumpList&amp; failureCases, JSC::FunctionPtr testFunction)
+{
+    Assembler::RegisterID elementAddress = elementAddressRegister;
+    FunctionCall functionCall(m_assembler, m_registerAllocator, m_stackAllocator, m_functionCalls);
+    functionCall.setFunctionAddress(testFunction);
+    functionCall.setFirstArgument(elementAddress);
+    failureCases.append(functionCall.callAndBranchOnCondition(Assembler::Zero));
+}
+
</ins><span class="cx"> inline void SelectorCodeGenerator::generateElementHasTagName(Assembler::JumpList&amp; failureCases, const QualifiedName&amp; nameToMatch)
</span><span class="cx"> {
</span><span class="cx">     if (nameToMatch == anyQName())
</span><span class="lines">@@ -1101,15 +1169,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SelectorCodeGenerator::generateElementIsFocused(Assembler::JumpList&amp; failureCases)
-{
-    Assembler::RegisterID elementAddress = elementAddressRegister;
-    FunctionCall functionCall(m_assembler, m_registerAllocator, m_stackAllocator, m_functionCalls);
-    functionCall.setFunctionAddress(SelectorChecker::matchesFocusPseudoClass);
-    functionCall.setFirstArgument(elementAddress);
-    failureCases.append(functionCall.callAndBranchOnCondition(Assembler::Zero));
-}
-
</del><span class="cx"> void SelectorCodeGenerator::generateElementIsLink(Assembler::JumpList&amp; failureCases)
</span><span class="cx"> {
</span><span class="cx">     failureCases.append(m_assembler.branchTest32(Assembler::Zero, Assembler::Address(elementAddressRegister, Node::nodeFlagsMemoryOffset()), Assembler::TrustedImm32(Node::flagIsLink())));
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/dom/Element.h        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -482,7 +482,7 @@
</span><span class="cx">     virtual bool isRequiredFormControl() const { return false; }
</span><span class="cx">     virtual bool isDefaultButtonForForm() const { return false; }
</span><span class="cx">     virtual bool willValidate() const { return false; }
</span><del>-    virtual bool isValidFormControlElement() { return false; }
</del><ins>+    virtual bool isValidFormControlElement() const { return false; }
</ins><span class="cx">     virtual bool isInRange() const { return false; }
</span><span class="cx">     virtual bool isOutOfRange() const { return false; }
</span><span class="cx">     virtual bool isFrameElementBase() const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/dom/Node.h        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -504,6 +504,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual Node* toNode() override;
</span><span class="cx">     virtual HTMLInputElement* toInputElement();
</span><ins>+    const HTMLInputElement* toInputElement() const { return const_cast&lt;Node*&gt;(this)-&gt;toInputElement(); }
</ins><span class="cx"> 
</span><span class="cx">     virtual EventTargetInterface eventTargetInterface() const override;
</span><span class="cx">     virtual ScriptExecutionContext* scriptExecutionContext() const override final; // Implemented in Document.h
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool HTMLFormControlElement::isValidFormControlElement()
</del><ins>+bool HTMLFormControlElement::isValidFormControlElement() const
</ins><span class="cx"> {
</span><span class="cx">     // If the following assertion fails, setNeedsValidityCheck() is not called
</span><span class="cx">     // correctly when something which changes validity is updated.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.h (163852 => 163853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.h        2014-02-11 02:45:46 UTC (rev 163852)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.h        2014-02-11 02:46:04 UTC (rev 163853)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual HTMLFormElement* virtualForm() const override;
</span><span class="cx">     virtual bool isDefaultButtonForForm() const override;
</span><del>-    virtual bool isValidFormControlElement() override;
</del><ins>+    virtual bool isValidFormControlElement() const override;
</ins><span class="cx">     void updateAncestorDisabledState() const;
</span><span class="cx"> 
</span><span class="cx">     virtual HTMLElement&amp; asHTMLElement() override final { return *this; }
</span></span></pre>
</div>
</div>

</body>
</html>