| 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
reserved. | 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 void setArgument(const AtomicString&); | 253 void setArgument(const AtomicString&); |
| 254 void setSelectorList(std::unique_ptr<CSSSelectorList>); | 254 void setSelectorList(std::unique_ptr<CSSSelectorList>); |
| 255 | 255 |
| 256 void setNth(int a, int b); | 256 void setNth(int a, int b); |
| 257 bool matchNth(int count) const; | 257 bool matchNth(int count) const; |
| 258 | 258 |
| 259 bool isAdjacentSelector() const { return m_relation == DirectAdjacent || m_r
elation == IndirectAdjacent; } | 259 bool isAdjacentSelector() const { return m_relation == DirectAdjacent || m_r
elation == IndirectAdjacent; } |
| 260 bool isShadowSelector() const { return m_relation == ShadowPseudo || m_relat
ion == ShadowDeep; } | 260 bool isShadowSelector() const { return m_relation == ShadowPseudo || m_relat
ion == ShadowDeep; } |
| 261 bool isAttributeSelector() const { return m_match >= FirstAttributeSelectorM
atch; } | 261 bool isAttributeSelector() const { return m_match >= FirstAttributeSelectorM
atch; } |
| 262 bool isHostPseudoClass() const { return m_pseudoType == PseudoHost || m_pseu
doType == PseudoHostContext; } | 262 bool isHostPseudoClass() const { return m_pseudoType == PseudoHost || m_pseu
doType == PseudoHostContext; } |
| 263 bool isUserActionPseudoClass() const; |
| 263 bool isInsertionPointCrossing() const { return m_pseudoType == PseudoHostCon
text || m_pseudoType == PseudoContent; } | 264 bool isInsertionPointCrossing() const { return m_pseudoType == PseudoHostCon
text || m_pseudoType == PseudoContent; } |
| 264 | 265 |
| 265 RelationType relation() const { return static_cast<RelationType>(m_relation)
; } | 266 RelationType relation() const { return static_cast<RelationType>(m_relation)
; } |
| 266 void setRelation(RelationType relation) | 267 void setRelation(RelationType relation) |
| 267 { | 268 { |
| 268 m_relation = relation; | 269 m_relation = relation; |
| 269 ASSERT(static_cast<RelationType>(m_relation) == relation); // using a bi
tfield. | 270 ASSERT(static_cast<RelationType>(m_relation) == relation); // using a bi
tfield. |
| 270 } | 271 } |
| 271 | 272 |
| 272 MatchType match() const { return static_cast<MatchType>(m_match); } | 273 MatchType match() const { return static_cast<MatchType>(m_match); } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 inline const AtomicString& CSSSelector::serializingValue() const | 477 inline const AtomicString& CSSSelector::serializingValue() const |
| 477 { | 478 { |
| 478 ASSERT(m_match != Tag); | 479 ASSERT(m_match != Tag); |
| 479 if (m_hasRareData) | 480 if (m_hasRareData) |
| 480 return m_data.m_rareData->m_serializingValue; | 481 return m_data.m_rareData->m_serializingValue; |
| 481 // AtomicString is really just a StringImpl* so the cast below is safe. | 482 // AtomicString is really just a StringImpl* so the cast below is safe. |
| 482 // FIXME: Perhaps call sites could be changed to accept StringImpl? | 483 // FIXME: Perhaps call sites could be changed to accept StringImpl? |
| 483 return *reinterpret_cast<const AtomicString*>(&m_data.m_value); | 484 return *reinterpret_cast<const AtomicString*>(&m_data.m_value); |
| 484 } | 485 } |
| 485 | 486 |
| 487 inline bool CSSSelector::isUserActionPseudoClass() const |
| 488 { |
| 489 return m_pseudoType == PseudoHover |
| 490 || m_pseudoType == PseudoActive |
| 491 || m_pseudoType == PseudoFocus |
| 492 || m_pseudoType == PseudoDrag; |
| 493 } |
| 494 |
| 486 } // namespace blink | 495 } // namespace blink |
| 487 | 496 |
| 488 #endif // CSSSelector_h | 497 #endif // CSSSelector_h |
| OLD | NEW |