Chromium Code Reviews| 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; |