| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 3 * 1999 Waldo Bastian (bastian@kde.org) | 3 * 1999 Waldo Bastian (bastian@kde.org) |
| 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights | 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 AttributeEnd, // css3: E[foo$="bar"] | 122 AttributeEnd, // css3: E[foo$="bar"] |
| 123 FirstAttributeSelectorMatch = AttributeExact, | 123 FirstAttributeSelectorMatch = AttributeExact, |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 enum RelationType { | 126 enum RelationType { |
| 127 SubSelector, // No combinator | 127 SubSelector, // No combinator |
| 128 Descendant, // "Space" combinator | 128 Descendant, // "Space" combinator |
| 129 Child, // > combinator | 129 Child, // > combinator |
| 130 DirectAdjacent, // + combinator | 130 DirectAdjacent, // + combinator |
| 131 IndirectAdjacent, // ~ combinator | 131 IndirectAdjacent, // ~ combinator |
| 132 // Special case of shadow DOM pseudo elements / shadow pseudo element | 132 // Special cases for shadow DOM related selectors. |
| 133 ShadowPseudo, | 133 ShadowPiercingDescendant, // >>> combinator |
| 134 ShadowDeep, // /deep/ combinator | 134 ShadowDeep, // /deep/ combinator |
| 135 ShadowSlot // slotted to <slot> element | 135 ShadowPseudo, // ::shadow pseudo element |
| 136 ShadowSlot // ::slotted() pseudo element |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 enum PseudoType { | 139 enum PseudoType { |
| 139 PseudoUnknown, | 140 PseudoUnknown, |
| 140 PseudoEmpty, | 141 PseudoEmpty, |
| 141 PseudoFirstChild, | 142 PseudoFirstChild, |
| 142 PseudoFirstOfType, | 143 PseudoFirstOfType, |
| 143 PseudoLastChild, | 144 PseudoLastChild, |
| 144 PseudoLastOfType, | 145 PseudoLastOfType, |
| 145 PseudoOnlyChild, | 146 PseudoOnlyChild, |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 } | 341 } |
| 341 | 342 |
| 342 bool matchesPseudoElement() const; | 343 bool matchesPseudoElement() const; |
| 343 | 344 |
| 344 bool hasContentPseudo() const; | 345 bool hasContentPseudo() const; |
| 345 bool hasSlottedPseudo() const; | 346 bool hasSlottedPseudo() const; |
| 346 bool hasDeepCombinatorOrShadowPseudo() const; | 347 bool hasDeepCombinatorOrShadowPseudo() const; |
| 347 bool needsUpdatedDistribution() const; | 348 bool needsUpdatedDistribution() const; |
| 348 | 349 |
| 349 private: | 350 private: |
| 350 unsigned m_relation : 3; // enum RelationType | 351 unsigned m_relation : 4; // enum RelationType |
| 351 unsigned m_match : 4; // enum MatchType | 352 unsigned m_match : 4; // enum MatchType |
| 352 unsigned m_pseudoType : 8; // enum PseudoType | 353 unsigned m_pseudoType : 8; // enum PseudoType |
| 353 unsigned m_isLastInSelectorList : 1; | 354 unsigned m_isLastInSelectorList : 1; |
| 354 unsigned m_isLastInTagHistory : 1; | 355 unsigned m_isLastInTagHistory : 1; |
| 355 unsigned m_hasRareData : 1; | 356 unsigned m_hasRareData : 1; |
| 356 unsigned m_isForPage : 1; | 357 unsigned m_isForPage : 1; |
| 357 unsigned m_tagIsImplicit : 1; | 358 unsigned m_tagIsImplicit : 1; |
| 358 unsigned m_relationIsAffectedByPseudoContent : 1; | 359 unsigned m_relationIsAffectedByPseudoContent : 1; |
| 359 | 360 |
| 360 void setPseudoType(PseudoType pseudoType) { | 361 void setPseudoType(PseudoType pseudoType) { |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 534 } |
| 534 | 535 |
| 535 inline bool CSSSelector::isIdClassOrAttributeSelector() const { | 536 inline bool CSSSelector::isIdClassOrAttributeSelector() const { |
| 536 return isAttributeSelector() || match() == CSSSelector::Id || | 537 return isAttributeSelector() || match() == CSSSelector::Id || |
| 537 match() == CSSSelector::Class; | 538 match() == CSSSelector::Class; |
| 538 } | 539 } |
| 539 | 540 |
| 540 } // namespace blink | 541 } // namespace blink |
| 541 | 542 |
| 542 #endif // CSSSelector_h | 543 #endif // CSSSelector_h |
| OLD | NEW |