<!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>[173569] 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/173569">173569</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-09-12 12:24:12 -0700 (Fri, 12 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make all CSSSelector data members private
https://bugs.webkit.org/show_bug.cgi?id=136784

Reviewed by Benjamin Poulain.

Make all CSSSelector data members private. Previously, some of the data
members such as m_relation / m_match / m_pseudoType were public and
accessed directly from outside the class. The new approach is better
because:
- Those members are bit fields so by using getters, we can hide the
  casts inside the getters. The setters can now also check that the
  bitfield is big enough to actually store the enum value.
- When using those in switch() statements, the compiler now complains
  if we fail to test some of the enum values as the value is now an
  enum, and not merely an unsigned integer.
- Some of these members already has getters (e.g. relation()).
- Better encapsulation.

No new tests, no behavior change.

* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePagePseudoSelector):
(WebCore::CSSParserSelector::parsePseudoElementSelector):
(WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
(WebCore::CSSParserSelector::setPseudoClassValue):
(WebCore::CSSParserSelector::isSimple):
(WebCore::CSSParserSelector::prependTagSelector):
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::setMatch):
(WebCore::CSSParserSelector::setRelation):
(WebCore::CSSParserSelector::isPseudoElementCueFunction):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::createRareData):
(WebCore::CSSSelector::specificityForOneSelector):
(WebCore::CSSSelector::specificityForPage):
(WebCore::CSSSelector::operator==):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
(WebCore::CSSSelector::setPseudoElementType):
(WebCore::CSSSelector::setPagePseudoType):
(WebCore::CSSSelector::pseudoClassType):
(WebCore::CSSSelector::setPseudoClassType):
(WebCore::CSSSelector::pseudoElementType):
(WebCore::CSSSelector::pagePseudoClassType):
(WebCore::CSSSelector::setRelation):
(WebCore::CSSSelector::match):
(WebCore::CSSSelector::setMatch):
(WebCore::CSSSelector::matchesPseudoElement):
(WebCore::CSSSelector::isUnknownPseudoElement):
(WebCore::CSSSelector::isCustomPseudoElement):
(WebCore::CSSSelector::isSiblingSelector):
(WebCore::CSSSelector::isAttributeSelector):
(WebCore::CSSSelector::setValue):
(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::~CSSSelector):
(WebCore::CSSSelector::tagQName):
(WebCore::CSSSelector::value):
* css/CSSSelectorList.cpp:
(WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
* css/PageRuleCollector.cpp:
(WebCore::checkPageSelectorComponents):
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::collectFeaturesFromSelector):
* css/RuleSet.cpp:
(WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
(WebCore::determinePropertyWhitelistType):
(WebCore::RuleSet::addRule):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
(WebCore::anyAttributeMatches):
(WebCore::canMatchHoverOrActiveInQuirksMode):
(WebCore::SelectorChecker::checkOne):
(WebCore::SelectorChecker::checkScrollbarPseudoClass):
(WebCore::SelectorChecker::determineLinkMatchType):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::isCommonPseudoClassSelector):
* css/SelectorFilter.cpp:
(WebCore::collectDescendantSelectorIdentifierHashes):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
* dom/SelectorQuery.cpp:
(WebCore::isSingleTagNameSelector):
(WebCore::isSingleClassNameSelector):
(WebCore::findIdMatchingType):
(WebCore::SelectorDataList::SelectorDataList):
(WebCore::selectorForIdLookup):
(WebCore::filterRootById):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#trunkSourceWebCorecssCSSSelectorListcpp">trunk/Source/WebCore/css/CSSSelectorList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssPageRuleCollectorcpp">trunk/Source/WebCore/css/PageRuleCollector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssRuleFeaturecpp">trunk/Source/WebCore/css/RuleFeature.cpp</a></li>
<li><a href="#trunkSourceWebCorecssRuleSetcpp">trunk/Source/WebCore/css/RuleSet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSelectorCheckercpp">trunk/Source/WebCore/css/SelectorChecker.cpp</a></li>
<li><a href="#trunkSourceWebCorecssSelectorCheckerh">trunk/Source/WebCore/css/SelectorChecker.h</a></li>
<li><a href="#trunkSourceWebCorecssSelectorFiltercpp">trunk/Source/WebCore/css/SelectorFilter.cpp</a></li>
<li><a href="#trunkSourceWebCorecssjitSelectorCompilercpp">trunk/Source/WebCore/cssjit/SelectorCompiler.cpp</a></li>
<li><a href="#trunkSourceWebCoredomSelectorQuerycpp">trunk/Source/WebCore/dom/SelectorQuery.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/ChangeLog        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -1,3 +1,96 @@
</span><ins>+2014-09-12  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Make all CSSSelector data members private
+        https://bugs.webkit.org/show_bug.cgi?id=136784
+
+        Reviewed by Benjamin Poulain.
+
+        Make all CSSSelector data members private. Previously, some of the data
+        members such as m_relation / m_match / m_pseudoType were public and
+        accessed directly from outside the class. The new approach is better
+        because:
+        - Those members are bit fields so by using getters, we can hide the
+          casts inside the getters. The setters can now also check that the
+          bitfield is big enough to actually store the enum value.
+        - When using those in switch() statements, the compiler now complains
+          if we fail to test some of the enum values as the value is now an
+          enum, and not merely an unsigned integer.
+        - Some of these members already has getters (e.g. relation()).
+        - Better encapsulation.
+
+        No new tests, no behavior change.
+
+        * css/CSSParserValues.cpp:
+        (WebCore::CSSParserSelector::parsePagePseudoSelector):
+        (WebCore::CSSParserSelector::parsePseudoElementSelector):
+        (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
+        (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
+        (WebCore::CSSParserSelector::setPseudoClassValue):
+        (WebCore::CSSParserSelector::isSimple):
+        (WebCore::CSSParserSelector::prependTagSelector):
+        * css/CSSParserValues.h:
+        (WebCore::CSSParserSelector::setMatch):
+        (WebCore::CSSParserSelector::setRelation):
+        (WebCore::CSSParserSelector::isPseudoElementCueFunction):
+        * css/CSSSelector.cpp:
+        (WebCore::CSSSelector::createRareData):
+        (WebCore::CSSSelector::specificityForOneSelector):
+        (WebCore::CSSSelector::specificityForPage):
+        (WebCore::CSSSelector::operator==):
+        (WebCore::CSSSelector::selectorText):
+        * css/CSSSelector.h:
+        (WebCore::CSSSelector::setPseudoElementType):
+        (WebCore::CSSSelector::setPagePseudoType):
+        (WebCore::CSSSelector::pseudoClassType):
+        (WebCore::CSSSelector::setPseudoClassType):
+        (WebCore::CSSSelector::pseudoElementType):
+        (WebCore::CSSSelector::pagePseudoClassType):
+        (WebCore::CSSSelector::setRelation):
+        (WebCore::CSSSelector::match):
+        (WebCore::CSSSelector::setMatch):
+        (WebCore::CSSSelector::matchesPseudoElement):
+        (WebCore::CSSSelector::isUnknownPseudoElement):
+        (WebCore::CSSSelector::isCustomPseudoElement):
+        (WebCore::CSSSelector::isSiblingSelector):
+        (WebCore::CSSSelector::isAttributeSelector):
+        (WebCore::CSSSelector::setValue):
+        (WebCore::CSSSelector::CSSSelector):
+        (WebCore::CSSSelector::~CSSSelector):
+        (WebCore::CSSSelector::tagQName):
+        (WebCore::CSSSelector::value):
+        * css/CSSSelectorList.cpp:
+        (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
+        * css/PageRuleCollector.cpp:
+        (WebCore::checkPageSelectorComponents):
+        * css/RuleFeature.cpp:
+        (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
+        * css/RuleSet.cpp:
+        (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
+        (WebCore::determinePropertyWhitelistType):
+        (WebCore::RuleSet::addRule):
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::matchRecursively):
+        (WebCore::anyAttributeMatches):
+        (WebCore::canMatchHoverOrActiveInQuirksMode):
+        (WebCore::SelectorChecker::checkOne):
+        (WebCore::SelectorChecker::checkScrollbarPseudoClass):
+        (WebCore::SelectorChecker::determineLinkMatchType):
+        * css/SelectorChecker.h:
+        (WebCore::SelectorChecker::isCommonPseudoClassSelector):
+        * css/SelectorFilter.cpp:
+        (WebCore::collectDescendantSelectorIdentifierHashes):
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::constructFragments):
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
+        * dom/SelectorQuery.cpp:
+        (WebCore::isSingleTagNameSelector):
+        (WebCore::isSingleClassNameSelector):
+        (WebCore::findIdMatchingType):
+        (WebCore::SelectorDataList::SelectorDataList):
+        (WebCore::selectorForIdLookup):
+        (WebCore::filterRootById):
+
</ins><span class="cx"> 2014-09-12  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r173441): [GTK] All buttons appear insensitive
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/CSSParserValues.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><del>-    selector-&gt;m_selector-&gt;m_match = CSSSelector::PagePseudoClass;
</del><ins>+    selector-&gt;m_selector-&gt;setMatch(CSSSelector::PagePseudoClass);
</ins><span class="cx">     selector-&gt;m_selector-&gt;setPagePseudoType(pseudoType);
</span><span class="cx">     return selector.release();
</span><span class="cx"> }
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><del>-    selector-&gt;m_selector-&gt;m_match = CSSSelector::PseudoElement;
</del><ins>+    selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoElement);
</ins><span class="cx">     selector-&gt;m_selector-&gt;setPseudoElementType(pseudoType);
</span><span class="cx">     selector-&gt;m_selector-&gt;setValue(name);
</span><span class="cx">     return selector.release();
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><del>-    selector-&gt;m_selector-&gt;m_match = CSSSelector::PseudoElement;
</del><ins>+    selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoElement);
</ins><span class="cx">     selector-&gt;m_selector-&gt;setPseudoElementType(CSSSelector::PseudoElementCue);
</span><span class="cx">     selector-&gt;adoptSelectorVector(*selectorVector);
</span><span class="cx">     return selector.release();
</span><span class="lines">@@ -211,13 +211,13 @@
</span><span class="cx">     PseudoClassOrCompatibilityPseudoElement pseudoType = parsePseudoClassAndCompatibilityElementString(pseudoTypeString);
</span><span class="cx">     if (pseudoType.pseudoClass != CSSSelector::PseudoClassUnknown) {
</span><span class="cx">         auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><del>-        selector-&gt;m_selector-&gt;m_match = CSSSelector::PseudoClass;
-        selector-&gt;m_selector-&gt;m_pseudoType = pseudoType.pseudoClass;
</del><ins>+        selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoClass);
+        selector-&gt;m_selector-&gt;setPseudoClassType(pseudoType.pseudoClass);
</ins><span class="cx">         return selector.release();
</span><span class="cx">     }
</span><span class="cx">     if (pseudoType.compatibilityPseudoElement != CSSSelector::PseudoElementUnknown) {
</span><span class="cx">         auto selector = std::make_unique&lt;CSSParserSelector&gt;();
</span><del>-        selector-&gt;m_selector-&gt;m_match = CSSSelector::PseudoElement;
</del><ins>+        selector-&gt;m_selector-&gt;setMatch(CSSSelector::PseudoElement);
</ins><span class="cx">         selector-&gt;m_selector-&gt;setPseudoElementType(pseudoType.compatibilityPseudoElement);
</span><span class="cx">         AtomicString name = pseudoTypeString;
</span><span class="cx">         selector-&gt;m_selector-&gt;setValue(name);
</span><span class="lines">@@ -260,10 +260,10 @@
</span><span class="cx"> 
</span><span class="cx"> void CSSParserSelector::setPseudoClassValue(const CSSParserString&amp; pseudoClassString)
</span><span class="cx"> {
</span><del>-    ASSERT(m_selector-&gt;m_match == CSSSelector::PseudoClass);
</del><ins>+    ASSERT(m_selector-&gt;match() == CSSSelector::PseudoClass);
</ins><span class="cx"> 
</span><span class="cx">     PseudoClassOrCompatibilityPseudoElement pseudoType = parsePseudoClassAndCompatibilityElementString(pseudoClassString);
</span><del>-    m_selector-&gt;m_pseudoType = pseudoType.pseudoClass;
</del><ins>+    m_selector-&gt;setPseudoClassType(pseudoType.pseudoClass);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool CSSParserSelector::isSimple() const
</span><span class="lines">@@ -274,7 +274,7 @@
</span><span class="cx">     if (!m_tagHistory)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    if (m_selector-&gt;m_match == CSSSelector::Tag) {
</del><ins>+    if (m_selector-&gt;match() == CSSSelector::Tag) {
</ins><span class="cx">         // We can't check against anyQName() here because namespace may not be nullAtom.
</span><span class="cx">         // Example:
</span><span class="cx">         //     @namespace &quot;http://www.w3.org/2000/svg&quot;;
</span><span class="lines">@@ -312,7 +312,7 @@
</span><span class="cx">     m_tagHistory = WTF::move(second);
</span><span class="cx"> 
</span><span class="cx">     m_selector = std::make_unique&lt;CSSSelector&gt;(tagQName, tagIsForNamespaceRule);
</span><del>-    m_selector-&gt;m_relation = CSSSelector::SubSelector;
</del><ins>+    m_selector-&gt;setRelation(CSSSelector::SubSelector);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.h (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.h        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/CSSParserValues.h        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -195,8 +195,8 @@
</span><span class="cx">     void setValue(const AtomicString&amp; value) { m_selector-&gt;setValue(value); }
</span><span class="cx">     void setAttribute(const QualifiedName&amp; value, bool isCaseInsensitive) { m_selector-&gt;setAttribute(value, isCaseInsensitive); }
</span><span class="cx">     void setArgument(const AtomicString&amp; value) { m_selector-&gt;setArgument(value); }
</span><del>-    void setMatch(CSSSelector::Match value) { m_selector-&gt;m_match = value; }
-    void setRelation(CSSSelector::Relation value) { m_selector-&gt;m_relation = value; }
</del><ins>+    void setMatch(CSSSelector::Match value) { m_selector-&gt;setMatch(value); }
+    void setRelation(CSSSelector::Relation value) { m_selector-&gt;setRelation(value); }
</ins><span class="cx">     void setForPage() { m_selector-&gt;setForPage(); }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -209,7 +209,7 @@
</span><span class="cx">     bool isPseudoElementCueFunction() const
</span><span class="cx">     {
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-        return m_selector-&gt;m_match == CSSSelector::PseudoElement &amp;&amp; m_selector-&gt;pseudoElementType() == CSSSelector::PseudoElementCue;
</del><ins>+        return m_selector-&gt;match() == CSSSelector::PseudoElement &amp;&amp; m_selector-&gt;pseudoElementType() == CSSSelector::PseudoElementCue;
</ins><span class="cx"> #else
</span><span class="cx">         return false;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelector.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/CSSSelector.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CSSSelector::createRareData()
</span><span class="cx"> {
</span><del>-    ASSERT(m_match != Tag);
</del><ins>+    ASSERT(match() != Tag);
</ins><span class="cx">     if (m_hasRareData)
</span><span class="cx">         return;
</span><span class="cx">     // Move the value to the rare data stucture.
</span><span class="lines">@@ -85,10 +85,12 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Pseudo-elements and pseudo-classes do not have the same specificity. This function
</span><span class="cx">     // isn't quite correct.
</span><del>-    switch (m_match) {
</del><ins>+    switch (match()) {
</ins><span class="cx">     case Id:
</span><span class="cx">         return 0x10000;
</span><span class="cx"> 
</span><ins>+    case PagePseudoClass:
+        break;
</ins><span class="cx">     case PseudoClass:
</span><span class="cx">         // FIXME: PsuedoAny should base the specificity on the sub-selectors.
</span><span class="cx">         // See http://lists.w3.org/Archives/Public/www-style/2010Sep/0530.html
</span><span class="lines">@@ -105,7 +107,6 @@
</span><span class="cx">     case Begin:
</span><span class="cx">     case End:
</span><span class="cx">         return 0x100;
</span><del>-
</del><span class="cx">     case Tag:
</span><span class="cx">         return (tagQName().localName() != starAtom) ? 1 : 0;
</span><span class="cx">     case Unknown:
</span><span class="lines">@@ -121,7 +122,7 @@
</span><span class="cx">     unsigned s = 0;
</span><span class="cx"> 
</span><span class="cx">     for (const CSSSelector* component = this; component; component = component-&gt;tagHistory()) {
</span><del>-        switch (component-&gt;m_match) {
</del><ins>+        switch (component-&gt;match()) {
</ins><span class="cx">         case Tag:
</span><span class="cx">             s += tagQName().localName() == starAtom ? 0 : 4;
</span><span class="cx">             break;
</span><span class="lines">@@ -208,13 +209,13 @@
</span><span class="cx">     while (sel1 &amp;&amp; sel2) {
</span><span class="cx">         if (sel1-&gt;attribute() != sel2-&gt;attribute()
</span><span class="cx">             || sel1-&gt;relation() != sel2-&gt;relation()
</span><del>-            || sel1-&gt;m_match != sel2-&gt;m_match
</del><ins>+            || sel1-&gt;match() != sel2-&gt;match()
</ins><span class="cx">             || sel1-&gt;value() != sel2-&gt;value()
</span><span class="cx">             || sel1-&gt;m_pseudoType != sel2-&gt;m_pseudoType
</span><span class="cx">             || sel1-&gt;argument() != sel2-&gt;argument()) {
</span><span class="cx">             return false;
</span><span class="cx">         }
</span><del>-        if (sel1-&gt;m_match == Tag) {
</del><ins>+        if (sel1-&gt;match() == Tag) {
</ins><span class="cx">             if (sel1-&gt;tagQName() != sel2-&gt;tagQName())
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="lines">@@ -249,7 +250,7 @@
</span><span class="cx"> {
</span><span class="cx">     StringBuilder str;
</span><span class="cx"> 
</span><del>-    if (m_match == CSSSelector::Tag &amp;&amp; !m_tagIsForNamespaceRule) {
</del><ins>+    if (match() == CSSSelector::Tag &amp;&amp; !m_tagIsForNamespaceRule) {
</ins><span class="cx">         if (tagQName().prefix().isNull())
</span><span class="cx">             str.append(tagQName().localName());
</span><span class="cx">         else {
</span><span class="lines">@@ -261,13 +262,13 @@
</span><span class="cx"> 
</span><span class="cx">     const CSSSelector* cs = this;
</span><span class="cx">     while (true) {
</span><del>-        if (cs-&gt;m_match == CSSSelector::Id) {
</del><ins>+        if (cs-&gt;match() == CSSSelector::Id) {
</ins><span class="cx">             str.append('#');
</span><span class="cx">             serializeIdentifier(cs-&gt;value(), str);
</span><del>-        } else if (cs-&gt;m_match == CSSSelector::Class) {
</del><ins>+        } else if (cs-&gt;match() == CSSSelector::Class) {
</ins><span class="cx">             str.append('.');
</span><span class="cx">             serializeIdentifier(cs-&gt;value(), str);
</span><del>-        } else if (cs-&gt;m_match == CSSSelector::PseudoClass) {
</del><ins>+        } else if (cs-&gt;match() == CSSSelector::PseudoClass) {
</ins><span class="cx">             switch (cs-&gt;pseudoClassType()) {
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx">             case CSSSelector::PseudoClassAnimatingFullScreenTransition:
</span><span class="lines">@@ -469,7 +470,7 @@
</span><span class="cx">             case CSSSelector::PseudoClassUnknown:
</span><span class="cx">                 ASSERT_NOT_REACHED();
</span><span class="cx">             }
</span><del>-        } else if (cs-&gt;m_match == CSSSelector::PseudoElement) {
</del><ins>+        } else if (cs-&gt;match() == CSSSelector::PseudoElement) {
</ins><span class="cx">             str.appendLiteral(&quot;::&quot;);
</span><span class="cx">             str.append(cs-&gt;value());
</span><span class="cx">         } else if (cs-&gt;isAttributeSelector()) {
</span><span class="lines">@@ -480,7 +481,7 @@
</span><span class="cx">                 str.append('|');
</span><span class="cx">             }
</span><span class="cx">             str.append(cs-&gt;attribute().localName());
</span><del>-            switch (cs-&gt;m_match) {
</del><ins>+            switch (cs-&gt;match()) {
</ins><span class="cx">                 case CSSSelector::Exact:
</span><span class="cx">                     str.append('=');
</span><span class="cx">                     break;
</span><span class="lines">@@ -506,11 +507,11 @@
</span><span class="cx">                 default:
</span><span class="cx">                     break;
</span><span class="cx">             }
</span><del>-            if (cs-&gt;m_match != CSSSelector::Set) {
</del><ins>+            if (cs-&gt;match() != CSSSelector::Set) {
</ins><span class="cx">                 serializeString(cs-&gt;value(), str);
</span><span class="cx">                 str.append(']');
</span><span class="cx">             }
</span><del>-        } else if (cs-&gt;m_match == CSSSelector::PagePseudoClass) {
</del><ins>+        } else if (cs-&gt;match() == CSSSelector::PagePseudoClass) {
</ins><span class="cx">             switch (cs-&gt;pagePseudoClassType()) {
</span><span class="cx">             case PagePseudoClassFirst:
</span><span class="cx">                 str.appendLiteral(&quot;:first&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelector.h (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.h        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/CSSSelector.h        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -205,8 +205,6 @@
</span><span class="cx">         const AtomicString&amp; argument() const { return m_hasRareData ? m_data.m_rareData-&gt;m_argument : nullAtom; }
</span><span class="cx">         const CSSSelectorList* selectorList() const { return m_hasRareData ? m_data.m_rareData-&gt;m_selectorList.get() : 0; }
</span><span class="cx"> 
</span><del>-        void setPseudoElementType(PseudoElementType pseudoElementType) { m_pseudoType = pseudoElementType; }
-        void setPagePseudoType(PagePseudoClassType pagePseudoType) { m_pseudoType = pagePseudoType; }
</del><span class="cx">         void setValue(const AtomicString&amp;);
</span><span class="cx">         void setAttribute(const QualifiedName&amp;, bool isCaseInsensitive);
</span><span class="cx">         void setArgument(const AtomicString&amp;);
</span><span class="lines">@@ -219,21 +217,36 @@
</span><span class="cx"> 
</span><span class="cx">         PseudoClassType pseudoClassType() const
</span><span class="cx">         {
</span><del>-            ASSERT(m_match == PseudoClass);
</del><ins>+            ASSERT(match() == PseudoClass);
</ins><span class="cx">             return static_cast&lt;PseudoClassType&gt;(m_pseudoType);
</span><span class="cx">         }
</span><ins>+        void setPseudoClassType(PseudoClassType pseudoType)
+        {
+            m_pseudoType = pseudoType;
+            ASSERT(m_pseudoType == pseudoType);
+        }
</ins><span class="cx"> 
</span><span class="cx">         PseudoElementType pseudoElementType() const
</span><span class="cx">         {
</span><del>-            ASSERT(m_match == PseudoElement);
</del><ins>+            ASSERT(match() == PseudoElement);
</ins><span class="cx">             return static_cast&lt;PseudoElementType&gt;(m_pseudoType);
</span><span class="cx">         }
</span><ins>+        void setPseudoElementType(PseudoElementType pseudoElementType)
+        {
+            m_pseudoType = pseudoElementType;
+            ASSERT(m_pseudoType == pseudoElementType);
+        }
</ins><span class="cx"> 
</span><span class="cx">         PagePseudoClassType pagePseudoClassType() const
</span><span class="cx">         {
</span><del>-            ASSERT(m_match == PagePseudoClass);
</del><ins>+            ASSERT(match() == PagePseudoClass);
</ins><span class="cx">             return static_cast&lt;PagePseudoClassType&gt;(m_pseudoType);
</span><span class="cx">         }
</span><ins>+        void setPagePseudoType(PagePseudoClassType pagePseudoType)
+        {
+            m_pseudoType = pagePseudoType;
+            ASSERT(m_pseudoType == pagePseudoType);
+        }
</ins><span class="cx"> 
</span><span class="cx">         bool matchesPseudoElement() const;
</span><span class="cx">         bool isUnknownPseudoElement() const;
</span><span class="lines">@@ -242,7 +255,19 @@
</span><span class="cx">         bool isAttributeSelector() const;
</span><span class="cx"> 
</span><span class="cx">         Relation relation() const { return static_cast&lt;Relation&gt;(m_relation); }
</span><ins>+        void setRelation(Relation relation)
+        {
+            m_relation = relation;
+            ASSERT(m_relation == relation);
+        }
</ins><span class="cx"> 
</span><ins>+        Match match() const { return static_cast&lt;Match&gt;(m_match); }
+        void setMatch(Match match)
+        {
+            m_match = match;
+            ASSERT(m_match == match);
+        }
+
</ins><span class="cx">         bool isLastInSelectorList() const { return m_isLastInSelectorList; }
</span><span class="cx">         void setLastInSelectorList() { m_isLastInSelectorList = true; }
</span><span class="cx">         bool isLastInTagHistory() const { return m_isLastInTagHistory; }
</span><span class="lines">@@ -253,11 +278,10 @@
</span><span class="cx">         bool isForPage() const { return m_isForPage; }
</span><span class="cx">         void setForPage() { m_isForPage = true; }
</span><span class="cx"> 
</span><ins>+    private:
</ins><span class="cx">         unsigned m_relation           : 3; // enum Relation
</span><span class="cx">         mutable unsigned m_match      : 4; // enum Match
</span><span class="cx">         mutable unsigned m_pseudoType : 8; // PseudoType
</span><del>-
-    private:
</del><span class="cx">         mutable bool m_parsedNth      : 1; // Used for :nth-*
</span><span class="cx">         bool m_isLastInSelectorList   : 1;
</span><span class="cx">         bool m_isLastInTagHistory     : 1;
</span><span class="lines">@@ -315,17 +339,17 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool CSSSelector::matchesPseudoElement() const
</span><span class="cx"> {
</span><del>-    return m_match == PseudoElement;
</del><ins>+    return match() == PseudoElement;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool CSSSelector::isUnknownPseudoElement() const
</span><span class="cx"> {
</span><del>-    return m_match == PseudoElement &amp;&amp; m_pseudoType == PseudoElementUnknown;
</del><ins>+    return match() == PseudoElement &amp;&amp; pseudoElementType() == PseudoElementUnknown;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool CSSSelector::isCustomPseudoElement() const
</span><span class="cx"> {
</span><del>-    return m_match == PseudoElement &amp;&amp; (m_pseudoType == PseudoElementUserAgentCustom || m_pseudoType == PseudoElementWebKitCustom);
</del><ins>+    return match() == PseudoElement &amp;&amp; (pseudoElementType() == PseudoElementUserAgentCustom || pseudoElementType() == PseudoElementWebKitCustom);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline bool pseudoClassIsRelativeToSiblings(CSSSelector::PseudoClassType type)
</span><span class="lines">@@ -345,25 +369,25 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool CSSSelector::isSiblingSelector() const
</span><span class="cx"> {
</span><del>-    return m_relation == DirectAdjacent
-        || m_relation == IndirectAdjacent
-        || (m_match == CSSSelector::PseudoClass &amp;&amp; pseudoClassIsRelativeToSiblings(pseudoClassType()));
</del><ins>+    return relation() == DirectAdjacent
+        || relation() == IndirectAdjacent
+        || (match() == CSSSelector::PseudoClass &amp;&amp; pseudoClassIsRelativeToSiblings(pseudoClassType()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline bool CSSSelector::isAttributeSelector() const
</span><span class="cx"> {
</span><del>-    return m_match == CSSSelector::Exact
-        || m_match ==  CSSSelector::Set
-        || m_match == CSSSelector::List
-        || m_match == CSSSelector::Hyphen
-        || m_match == CSSSelector::Contain
-        || m_match == CSSSelector::Begin
-        || m_match == CSSSelector::End;
</del><ins>+    return match() == CSSSelector::Exact
+        || match() ==  CSSSelector::Set
+        || match() == CSSSelector::List
+        || match() == CSSSelector::Hyphen
+        || match() == CSSSelector::Contain
+        || match() == CSSSelector::Begin
+        || match() == CSSSelector::End;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void CSSSelector::setValue(const AtomicString&amp; value)
</span><span class="cx"> {
</span><del>-    ASSERT(m_match != Tag);
</del><ins>+    ASSERT(match() != Tag);
</ins><span class="cx">     // Need to do ref counting manually for the union.
</span><span class="cx">     if (m_hasRareData) {
</span><span class="cx">         if (m_data.m_rareData-&gt;m_value)
</span><span class="lines">@@ -417,7 +441,7 @@
</span><span class="cx">     , m_isForPage(o.m_isForPage)
</span><span class="cx">     , m_tagIsForNamespaceRule(o.m_tagIsForNamespaceRule)
</span><span class="cx"> {
</span><del>-    if (o.m_match == Tag) {
</del><ins>+    if (o.match() == Tag) {
</ins><span class="cx">         m_data.m_tagQName = o.m_data.m_tagQName;
</span><span class="cx">         m_data.m_tagQName-&gt;ref();
</span><span class="cx">     } else if (o.m_hasRareData) {
</span><span class="lines">@@ -431,7 +455,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline CSSSelector::~CSSSelector()
</span><span class="cx"> {
</span><del>-    if (m_match == Tag)
</del><ins>+    if (match() == Tag)
</ins><span class="cx">         m_data.m_tagQName-&gt;deref();
</span><span class="cx">     else if (m_hasRareData)
</span><span class="cx">         m_data.m_rareData-&gt;deref();
</span><span class="lines">@@ -441,13 +465,13 @@
</span><span class="cx"> 
</span><span class="cx"> inline const QualifiedName&amp; CSSSelector::tagQName() const
</span><span class="cx"> {
</span><del>-    ASSERT(m_match == Tag);
</del><ins>+    ASSERT(match() == Tag);
</ins><span class="cx">     return *reinterpret_cast&lt;const QualifiedName*&gt;(&amp;m_data.m_tagQName);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline const AtomicString&amp; CSSSelector::value() const
</span><span class="cx"> {
</span><del>-    ASSERT(m_match != Tag);
</del><ins>+    ASSERT(match() != Tag);
</ins><span class="cx">     // AtomicString is really just an AtomicStringImpl* so the cast below is safe.
</span><span class="cx">     // FIXME: Perhaps call sites could be changed to accept AtomicStringImpl?
</span><span class="cx">     return *reinterpret_cast&lt;const AtomicString*&gt;(m_hasRareData ? &amp;m_data.m_rareData-&gt;m_value : &amp;m_data.m_value);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelectorList.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelectorList.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/CSSSelectorList.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> public:
</span><span class="cx">     bool operator()(const CSSSelector* selector)
</span><span class="cx">     {
</span><del>-        if (selector-&gt;m_match == CSSSelector::Tag &amp;&amp; selector-&gt;tagQName().prefix() != nullAtom &amp;&amp; selector-&gt;tagQName().prefix() != starAtom)
</del><ins>+        if (selector-&gt;match() == CSSSelector::Tag &amp;&amp; selector-&gt;tagQName().prefix() != nullAtom &amp;&amp; selector-&gt;tagQName().prefix() != starAtom)
</ins><span class="cx">             return true;
</span><span class="cx">         if (selector-&gt;isAttributeSelector() &amp;&amp; selector-&gt;attribute().prefix() != nullAtom &amp;&amp; selector-&gt;attribute().prefix() != starAtom)
</span><span class="cx">             return true;
</span></span></pre></div>
<a id="trunkSourceWebCorecssPageRuleCollectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PageRuleCollector.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PageRuleCollector.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/PageRuleCollector.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -92,11 +92,11 @@
</span><span class="cx"> static bool checkPageSelectorComponents(const CSSSelector* selector, bool isLeftPage, bool isFirstPage, const String&amp; pageName)
</span><span class="cx"> {
</span><span class="cx">     for (const CSSSelector* component = selector; component; component = component-&gt;tagHistory()) {
</span><del>-        if (component-&gt;m_match == CSSSelector::Tag) {
</del><ins>+        if (component-&gt;match() == CSSSelector::Tag) {
</ins><span class="cx">             const AtomicString&amp; localName = component-&gt;tagQName().localName();
</span><span class="cx">             if (localName != starAtom &amp;&amp; localName != pageName)
</span><span class="cx">                 return false;
</span><del>-        } else if (component-&gt;m_match == CSSSelector::PagePseudoClass) {
</del><ins>+        } else if (component-&gt;match() == CSSSelector::PagePseudoClass) {
</ins><span class="cx">             CSSSelector::PagePseudoClassType pseudoType = component-&gt;pagePseudoClassType();
</span><span class="cx">             if ((pseudoType == CSSSelector::PagePseudoClassLeft &amp;&amp; !isLeftPage)
</span><span class="cx">                 || (pseudoType == CSSSelector::PagePseudoClassRight &amp;&amp; isLeftPage)
</span></span></pre></div>
<a id="trunkSourceWebCorecssRuleFeaturecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/RuleFeature.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/RuleFeature.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/RuleFeature.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -35,14 +35,14 @@
</span><span class="cx"> 
</span><span class="cx"> void RuleFeatureSet::collectFeaturesFromSelector(const CSSSelector* selector)
</span><span class="cx"> {
</span><del>-    if (selector-&gt;m_match == CSSSelector::Id)
</del><ins>+    if (selector-&gt;match() == CSSSelector::Id)
</ins><span class="cx">         idsInRules.add(selector-&gt;value().impl());
</span><del>-    else if (selector-&gt;m_match == CSSSelector::Class)
</del><ins>+    else if (selector-&gt;match() == CSSSelector::Class)
</ins><span class="cx">         classesInRules.add(selector-&gt;value().impl());
</span><span class="cx">     else if (selector-&gt;isAttributeSelector()) {
</span><span class="cx">         attributeCanonicalLocalNamesInRules.add(selector-&gt;attributeCanonicalLocalName().impl());
</span><span class="cx">         attributeLocalNamesInRules.add(selector-&gt;attribute().localName().impl());
</span><del>-    } else if (selector-&gt;m_match == CSSSelector::PseudoElement) {
</del><ins>+    } else if (selector-&gt;match() == CSSSelector::PseudoElement) {
</ins><span class="cx">         switch (selector-&gt;pseudoElementType()) {
</span><span class="cx">         case CSSSelector::PseudoElementFirstLine:
</span><span class="cx">             usesFirstLineRules = true;
</span></span></pre></div>
<a id="trunkSourceWebCorecssRuleSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/RuleSet.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/RuleSet.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/RuleSet.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -58,13 +58,13 @@
</span><span class="cx">     if (selector.tagHistory())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (selector.m_match == CSSSelector::Tag) {
</del><ins>+    if (selector.match() == CSSSelector::Tag) {
</ins><span class="cx">         const AtomicString&amp; selectorNamespace = selector.tagQName().namespaceURI();
</span><span class="cx">         return selectorNamespace == starAtom || selectorNamespace == xhtmlNamespaceURI;
</span><span class="cx">     }
</span><span class="cx">     if (SelectorChecker::isCommonPseudoClassSelector(&amp;selector))
</span><span class="cx">         return true;
</span><del>-    return selector.m_match == CSSSelector::Id || selector.m_match == CSSSelector::Class;
</del><ins>+    return selector.match() == CSSSelector::Id || selector.match() == CSSSelector::Class;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool selectorCanMatchPseudoElement(const CSSSelector&amp; rootSelector)
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx">         return PropertyWhitelistRegion;
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><span class="cx">     for (const CSSSelector* component = selector; component; component = component-&gt;tagHistory()) {
</span><del>-        if (component-&gt;m_match == CSSSelector::PseudoElement &amp;&amp; (component-&gt;pseudoElementType() == CSSSelector::PseudoElementCue || component-&gt;value() == TextTrackCue::cueShadowPseudoId()))
</del><ins>+        if (component-&gt;match() == CSSSelector::PseudoElement &amp;&amp; (component-&gt;pseudoElementType() == CSSSelector::PseudoElementCue || component-&gt;value() == TextTrackCue::cueShadowPseudoId()))
</ins><span class="cx">             return PropertyWhitelistCue;
</span><span class="cx">     }
</span><span class="cx"> #else
</span><span class="lines">@@ -214,13 +214,13 @@
</span><span class="cx">     const CSSSelector* focusSelector = nullptr;
</span><span class="cx">     const CSSSelector* selector = ruleData.selector();
</span><span class="cx">     do {
</span><del>-        if (selector-&gt;m_match == CSSSelector::Id) {
</del><ins>+        if (selector-&gt;match() == CSSSelector::Id) {
</ins><span class="cx">             addToRuleSet(selector-&gt;value().impl(), m_idRules, ruleData);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-        if (selector-&gt;m_match == CSSSelector::PseudoElement &amp;&amp; selector-&gt;pseudoElementType() == CSSSelector::PseudoElementCue) {
</del><ins>+        if (selector-&gt;match() == CSSSelector::PseudoElement &amp;&amp; selector-&gt;pseudoElementType() == CSSSelector::PseudoElementCue) {
</ins><span class="cx">             m_cuePseudoRules.append(ruleData);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="lines">@@ -231,7 +231,7 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (selector-&gt;m_match == CSSSelector::Class) {
</del><ins>+        if (selector-&gt;match() == CSSSelector::Class) {
</ins><span class="cx">             AtomicStringImpl* className = selector-&gt;value().impl();
</span><span class="cx">             if (!classSelector) {
</span><span class="cx">                 classSelector = selector;
</span><span class="lines">@@ -245,7 +245,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (selector-&gt;m_match == CSSSelector::Tag &amp;&amp; selector-&gt;tagQName().localName() != starAtom)
</del><ins>+        if (selector-&gt;match() == CSSSelector::Tag &amp;&amp; selector-&gt;tagQName().localName() != starAtom)
</ins><span class="cx">             tagSelector = selector;
</span><span class="cx"> 
</span><span class="cx">         if (SelectorChecker::isCommonPseudoClassSelector(selector)) {
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorChecker.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx">     if (!checkOne(context))
</span><span class="cx">         return SelectorFailsLocally;
</span><span class="cx"> 
</span><del>-    if (context.selector-&gt;m_match == CSSSelector::PseudoElement) {
</del><ins>+    if (context.selector-&gt;match() == CSSSelector::PseudoElement) {
</ins><span class="cx">         // In Selectors Level 4, a pseudo element inside a functional pseudo class is undefined (issue 7).
</span><span class="cx">         // Make it as matching failure until the spec clarifies this case.
</span><span class="cx">         if (context.inFunctionalPseudoClass)
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx">         nextContext.hasSelectionPseudo = dynamicPseudo == SELECTION;
</span><span class="cx">         if ((context.elementStyle || context.resolvingMode == Mode::CollectingRules) &amp;&amp; dynamicPseudo != NOPSEUDO
</span><span class="cx">             &amp;&amp; !nextContext.hasSelectionPseudo
</span><del>-            &amp;&amp; !(nextContext.hasScrollbarPseudo &amp;&amp; nextContext.selector-&gt;m_match == CSSSelector::PseudoClass))
</del><ins>+            &amp;&amp; !(nextContext.hasScrollbarPseudo &amp;&amp; nextContext.selector-&gt;match() == CSSSelector::PseudoClass))
</ins><span class="cx">             return SelectorFailsCompletely;
</span><span class="cx">         return matchRecursively(nextContext, dynamicPseudo);
</span><span class="cx"> 
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">         if (!attribute.matches(selectorAttr.prefix(), element-&gt;isHTMLElement() ? selector-&gt;attributeCanonicalLocalName() : selectorAttr.localName(), selectorAttr.namespaceURI()))
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        if (attributeValueMatches(attribute, static_cast&lt;CSSSelector::Match&gt;(selector-&gt;m_match), selector-&gt;value(), caseSensitive))
</del><ins>+        if (attributeValueMatches(attribute, selector-&gt;match(), selector-&gt;value(), caseSensitive))
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -451,7 +451,7 @@
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     for (const CSSSelector* selector = context.firstSelectorOfTheFragment; selector; selector = selector-&gt;tagHistory()) {
</span><del>-        switch (selector-&gt;m_match) {
</del><ins>+        switch (selector-&gt;match()) {
</ins><span class="cx">         case CSSSelector::Tag:
</span><span class="cx">             if (selector-&gt;tagQName() != anyQName())
</span><span class="cx">                 return true;
</span><span class="lines">@@ -496,13 +496,13 @@
</span><span class="cx">     ASSERT(element);
</span><span class="cx">     ASSERT(selector);
</span><span class="cx"> 
</span><del>-    if (selector-&gt;m_match == CSSSelector::Tag)
</del><ins>+    if (selector-&gt;match() == CSSSelector::Tag)
</ins><span class="cx">         return SelectorChecker::tagMatches(element, selector-&gt;tagQName());
</span><span class="cx"> 
</span><del>-    if (selector-&gt;m_match == CSSSelector::Class)
</del><ins>+    if (selector-&gt;match() == CSSSelector::Class)
</ins><span class="cx">         return element-&gt;hasClass() &amp;&amp; element-&gt;classNames().contains(selector-&gt;value());
</span><span class="cx"> 
</span><del>-    if (selector-&gt;m_match == CSSSelector::Id)
</del><ins>+    if (selector-&gt;match() == CSSSelector::Id)
</ins><span class="cx">         return element-&gt;hasID() &amp;&amp; element-&gt;idForStyleResolution() == selector-&gt;value();
</span><span class="cx"> 
</span><span class="cx">     if (selector-&gt;isAttributeSelector()) {
</span><span class="lines">@@ -516,7 +516,7 @@
</span><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (selector-&gt;m_match == CSSSelector::PseudoClass) {
</del><ins>+    if (selector-&gt;match() == CSSSelector::PseudoClass) {
</ins><span class="cx">         // Handle :not up front.
</span><span class="cx">         if (selector-&gt;pseudoClassType() == CSSSelector::PseudoClassNot) {
</span><span class="cx">             const CSSSelectorList* selectorList = selector-&gt;selectorList();
</span><span class="lines">@@ -529,7 +529,7 @@
</span><span class="cx">             subContext.inFunctionalPseudoClass = true;
</span><span class="cx">             subContext.firstSelectorOfTheFragment = selectorList-&gt;first();
</span><span class="cx">             for (subContext.selector = selectorList-&gt;first(); subContext.selector; subContext.selector = subContext.selector-&gt;tagHistory()) {
</span><del>-                if (subContext.selector-&gt;m_match == CSSSelector::PseudoClass) {
</del><ins>+                if (subContext.selector-&gt;match() == CSSSelector::PseudoClass) {
</ins><span class="cx">                     // :not cannot nest. I don't really know why this is a
</span><span class="cx">                     // restriction in CSS3, but it is, so let's honor it.
</span><span class="cx">                     // the parser enforces that this never occurs
</span><span class="lines">@@ -868,7 +868,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-    else if (selector-&gt;m_match == CSSSelector::PseudoElement &amp;&amp; selector-&gt;pseudoElementType() == CSSSelector::PseudoElementCue) {
</del><ins>+    if (selector-&gt;match() == CSSSelector::PseudoElement &amp;&amp; selector-&gt;pseudoElementType() == CSSSelector::PseudoElementCue) {
</ins><span class="cx">         CheckingContextWithStatus subContext(context);
</span><span class="cx"> 
</span><span class="cx">         PseudoId ignoreDynamicPseudo = NOPSEUDO;
</span><span class="lines">@@ -888,7 +888,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool SelectorChecker::checkScrollbarPseudoClass(const CheckingContextWithStatus&amp; context, const CSSSelector* selector) const
</span><span class="cx"> {
</span><del>-    ASSERT(selector-&gt;m_match == CSSSelector::PseudoClass);
</del><ins>+    ASSERT(selector-&gt;match() == CSSSelector::PseudoClass);
</ins><span class="cx"> 
</span><span class="cx">     switch (selector-&gt;pseudoClassType()) {
</span><span class="cx">     case CSSSelector::PseudoClassWindowInactive:
</span><span class="lines">@@ -933,7 +933,7 @@
</span><span class="cx">     // Statically determine if this selector will match a link in visited, unvisited or any state, or never.
</span><span class="cx">     // :visited never matches other elements than the innermost link element.
</span><span class="cx">     for (; selector; selector = selector-&gt;tagHistory()) {
</span><del>-        if (selector-&gt;m_match == CSSSelector::PseudoClass) {
</del><ins>+        if (selector-&gt;match() == CSSSelector::PseudoClass) {
</ins><span class="cx">             switch (selector-&gt;pseudoClassType()) {
</span><span class="cx">             case CSSSelector::PseudoClassNot:
</span><span class="cx">                 {
</span><span class="lines">@@ -943,7 +943,7 @@
</span><span class="cx">                         break;
</span><span class="cx"> 
</span><span class="cx">                     for (const CSSSelector* subSelector = selectorList-&gt;first(); subSelector; subSelector = subSelector-&gt;tagHistory()) {
</span><del>-                        if (subSelector-&gt;m_match == CSSSelector::PseudoClass) {
</del><ins>+                        if (subSelector-&gt;match() == CSSSelector::PseudoClass) {
</ins><span class="cx">                             CSSSelector::PseudoClassType subType = subSelector-&gt;pseudoClassType();
</span><span class="cx">                             if (subType == CSSSelector::PseudoClassVisited)
</span><span class="cx">                                 linkMatchType &amp;= ~SelectorChecker::MatchVisited;
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorChecker.h (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorChecker.h        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/SelectorChecker.h        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool SelectorChecker::isCommonPseudoClassSelector(const CSSSelector* selector)
</span><span class="cx"> {
</span><del>-    if (selector-&gt;m_match != CSSSelector::PseudoClass)
</del><ins>+    if (selector-&gt;match() != CSSSelector::PseudoClass)
</ins><span class="cx">         return false;
</span><span class="cx">     CSSSelector::PseudoClassType pseudoType = selector-&gt;pseudoClassType();
</span><span class="cx">     return pseudoType == CSSSelector::PseudoClassLink
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorFiltercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorFilter.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorFilter.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/css/SelectorFilter.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> 
</span><span class="cx"> static inline void collectDescendantSelectorIdentifierHashes(const CSSSelector* selector, unsigned*&amp; hash)
</span><span class="cx"> {
</span><del>-    switch (selector-&gt;m_match) {
</del><ins>+    switch (selector-&gt;match()) {
</ins><span class="cx">     case CSSSelector::Id:
</span><span class="cx">         if (!selector-&gt;value().isEmpty())
</span><span class="cx">             (*hash++) = selector-&gt;value().impl()-&gt;existingHash() * IdAttributeSalt;
</span></span></pre></div>
<a id="trunkSourceWebCorecssjitSelectorCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -705,7 +705,7 @@
</span><span class="cx">             return FunctionType::CannotMatchAnything;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        switch (selector-&gt;m_match) {
</del><ins>+        switch (selector-&gt;match()) {
</ins><span class="cx">         case CSSSelector::Tag:
</span><span class="cx">             ASSERT(!fragment.tagName);
</span><span class="cx">             fragment.tagName = &amp;(selector-&gt;tagQName());
</span><span class="lines">@@ -2177,7 +2177,7 @@
</span><span class="cx"> 
</span><span class="cx">     successCases.link(&amp;m_assembler);
</span><span class="cx"> 
</span><del>-    if (attributeSelector.m_match != CSSSelector::Set) {
</del><ins>+    if (attributeSelector.match() != CSSSelector::Set) {
</ins><span class="cx">         // We make the assumption that name matching fails in most cases and we keep value matching outside
</span><span class="cx">         // of the loop. We re-enter the loop if needed.
</span><span class="cx">         // FIXME: exact case sensitive value matching is so simple that it should be done in the loop.
</span><span class="lines">@@ -2269,7 +2269,7 @@
</span><span class="cx">     ASSERT(!expectedValue.isNull());
</span><span class="cx">     bool defaultToCaseSensitiveValueMatch = attributeInfo.canDefaultToCaseSensitiveValueMatch();
</span><span class="cx"> 
</span><del>-    switch (attributeSelector.m_match) {
</del><ins>+    switch (attributeSelector.match()) {
</ins><span class="cx">     case CSSSelector::Begin:
</span><span class="cx">         generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, defaultToCaseSensitiveValueMatch, attributeValueBeginsWith&lt;CaseSensitive&gt;, attributeValueBeginsWith&lt;CaseInsensitive&gt;);
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceWebCoredomSelectorQuerycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SelectorQuery.cpp (173568 => 173569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SelectorQuery.cpp        2014-09-12 19:08:45 UTC (rev 173568)
+++ trunk/Source/WebCore/dom/SelectorQuery.cpp        2014-09-12 19:24:12 UTC (rev 173569)
</span><span class="lines">@@ -37,12 +37,12 @@
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="cx"> static bool isSingleTagNameSelector(const CSSSelector&amp; selector)
</span><span class="cx"> {
</span><del>-    return selector.isLastInTagHistory() &amp;&amp; selector.m_match == CSSSelector::Tag;
</del><ins>+    return selector.isLastInTagHistory() &amp;&amp; selector.match() == CSSSelector::Tag;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool isSingleClassNameSelector(const CSSSelector&amp; selector)
</span><span class="cx"> {
</span><del>-    return selector.isLastInTagHistory() &amp;&amp; selector.m_match == CSSSelector::Class;
</del><ins>+    return selector.isLastInTagHistory() &amp;&amp; selector.match() == CSSSelector::Class;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> {
</span><span class="cx">     bool inRightmost = true;
</span><span class="cx">     for (const CSSSelector* selector = &amp;firstSelector; selector; selector = selector-&gt;tagHistory()) {
</span><del>-        if (selector-&gt;m_match == CSSSelector::Id) {
</del><ins>+        if (selector-&gt;match() == CSSSelector::Id) {
</ins><span class="cx">             if (inRightmost)
</span><span class="cx">                 return IdMatchingType::Rightmost;
</span><span class="cx">             return IdMatchingType::Filter;
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">     if (selectorCount == 1) {
</span><span class="cx">         const CSSSelector&amp; selector = *m_selectors.first().selector;
</span><span class="cx">         if (selector.isLastInTagHistory()) {
</span><del>-            switch (selector.m_match) {
</del><ins>+            switch (selector.match()) {
</ins><span class="cx">             case CSSSelector::Tag:
</span><span class="cx">                 m_matchType = TagNameMatch;
</span><span class="cx">                 break;
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     for (const CSSSelector* selector = &amp;firstSelector; selector; selector = selector-&gt;tagHistory()) {
</span><del>-        if (selector-&gt;m_match == CSSSelector::Id)
</del><ins>+        if (selector-&gt;match() == CSSSelector::Id)
</ins><span class="cx">             return selector;
</span><span class="cx">         if (selector-&gt;relation() != CSSSelector::SubSelector)
</span><span class="cx">             break;
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx">     // Thus we can skip the rightmost match.
</span><span class="cx">     const CSSSelector* selector = &amp;firstSelector;
</span><span class="cx">     do {
</span><del>-        ASSERT(selector-&gt;m_match != CSSSelector::Id);
</del><ins>+        ASSERT(selector-&gt;match() != CSSSelector::Id);
</ins><span class="cx">         if (selector-&gt;relation() != CSSSelector::SubSelector)
</span><span class="cx">             break;
</span><span class="cx">         selector = selector-&gt;tagHistory();
</span><span class="lines">@@ -232,7 +232,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool inAdjacentChain = false;
</span><span class="cx">     for (; selector; selector = selector-&gt;tagHistory()) {
</span><del>-        if (selector-&gt;m_match == CSSSelector::Id) {
</del><ins>+        if (selector-&gt;match() == CSSSelector::Id) {
</ins><span class="cx">             const AtomicString&amp; idToMatch = selector-&gt;value();
</span><span class="cx">             if (ContainerNode* searchRoot = rootNode.treeScope().getElementById(idToMatch)) {
</span><span class="cx">                 if (LIKELY(!rootNode.treeScope().containsMultipleElementsWithId(idToMatch))) {
</span></span></pre>
</div>
</div>

</body>
</html>