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

Unified Diff: Source/core/css/CSSSelector.h

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
« no previous file with comments | « Source/core/css/CSSParserValues.cpp ('k') | Source/core/css/CSSSelector.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSSelector.h
diff --git a/Source/core/css/CSSSelector.h b/Source/core/css/CSSSelector.h
index df2083566484bffa352c30a120c46fd3d5152467..da24b51feaf8dc22c402752991b4d71254c48439 100644
--- a/Source/core/css/CSSSelector.h
+++ b/Source/core/css/CSSSelector.h
@@ -292,6 +292,18 @@ namespace WebCore {
// FIXME: selectors with no tagHistory() get a relation() of Descendant (and sometimes even SubSelector). It should instead be
// None.
Relation relation() const { return static_cast<Relation>(m_relation); }
+ void setRelation(Relation relation)
+ {
+ m_relation = relation;
+ ASSERT(static_cast<Relation>(m_relation) == relation); // using a bitfield.
esprehn 2014/06/12 00:52:19 <3, I've been bitten by this before.
+ }
+
+ Match match() const { return static_cast<Match>(m_match); }
+ void setMatch(Match match)
+ {
+ m_match = match;
+ ASSERT(static_cast<Match>(m_match) == match); // using a bitfield.
+ }
bool isLastInSelectorList() const { return m_isLastInSelectorList; }
void setLastInSelectorList() { m_isLastInSelectorList = true; }
@@ -307,11 +319,10 @@ namespace WebCore {
bool relationIsAffectedByPseudoContent() const { return m_relationIsAffectedByPseudoContent; }
void setRelationIsAffectedByPseudoContent() { m_relationIsAffectedByPseudoContent = true; }
+ private:
unsigned m_relation : 3; // enum Relation
mutable unsigned m_match : 4; // enum Match
mutable unsigned m_pseudoType : 8; // PseudoType
-
- private:
mutable unsigned m_parsedNth : 1; // Used for :nth-*
unsigned m_isLastInSelectorList : 1;
unsigned m_isLastInTagHistory : 1;
« no previous file with comments | « Source/core/css/CSSParserValues.cpp ('k') | Source/core/css/CSSSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698