Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Unified Diff: Source/core/dom/SelectorQuery.cpp

Issue 322803004: Make all CSSSelector data members private (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix win dbg build error Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/SelectorQuery.cpp
diff --git a/Source/core/dom/SelectorQuery.cpp b/Source/core/dom/SelectorQuery.cpp
index b11faebe862f46386a97da698aabbfddc162b0a9..8957245887589c1b908df99adbf105b4aa95cc53 100644
--- a/Source/core/dom/SelectorQuery.cpp
+++ b/Source/core/dom/SelectorQuery.cpp
@@ -209,7 +209,7 @@ void SelectorDataList::findTraverseRootsAndExecute(ContainerNode& rootNode, type
bool startFromParent = false;
for (const CSSSelector* selector = m_selectors[0]; selector; selector = selector->tagHistory()) {
- if (selector->m_match == CSSSelector::Id && !rootNode.document().containsMultipleElementsWithId(selector->value())) {
+ if (selector->match() == CSSSelector::Id && !rootNode.document().containsMultipleElementsWithId(selector->value())) {
Element* element = rootNode.treeScope().getElementById(selector->value());
ContainerNode* adjustedNode = &rootNode;
if (element && (isTreeScopeRoot(rootNode) || element->isDescendantOf(&rootNode)))
@@ -230,7 +230,7 @@ void SelectorDataList::findTraverseRootsAndExecute(ContainerNode& rootNode, type
// If we have both CSSSelector::Id and CSSSelector::Class at the same time, we should use Id
// to find traverse root.
- if (!SelectorQueryTrait::shouldOnlyMatchFirstElement && !startFromParent && selector->m_match == CSSSelector::Class) {
+ if (!SelectorQueryTrait::shouldOnlyMatchFirstElement && !startFromParent && selector->match() == CSSSelector::Class) {
if (isRightmostSelector) {
ClassElementList<AllElements> traverseRoots(rootNode, selector->value());
executeForTraverseRoots<SelectorQueryTrait>(*m_selectors[0], traverseRoots, MatchesTraverseRoots, rootNode, output);
@@ -396,7 +396,7 @@ void SelectorDataList::executeSlowTraversingShadowTree(ContainerNode& rootNode,
const CSSSelector* SelectorDataList::selectorForIdLookup(const CSSSelector& firstSelector) const
{
for (const CSSSelector* selector = &firstSelector; selector; selector = selector->tagHistory()) {
- if (selector->m_match == CSSSelector::Id)
+ if (selector->match() == CSSSelector::Id)
return selector;
if (selector->relation() != CSSSelector::SubSelector)
break;
@@ -450,7 +450,7 @@ void SelectorDataList::execute(ContainerNode& rootNode, typename SelectorQueryTr
if (!firstSelector.tagHistory()) {
// Fast path for querySelector*('.foo'), and querySelector*('div').
- switch (firstSelector.m_match) {
+ switch (firstSelector.match()) {
case CSSSelector::Class:
collectElementsByClassName<SelectorQueryTrait>(rootNode, firstSelector.value(), output);
return;

Powered by Google App Engine
This is Rietveld 408576698