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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 return m_match == PseudoElement && m_pseudoType == PseudoUnknown; | 379 return m_match == PseudoElement && m_pseudoType == PseudoUnknown; |
380 } | 380 } |
381 | 381 |
382 inline bool CSSSelector::isCustomPseudoElement() const | 382 inline bool CSSSelector::isCustomPseudoElement() const |
383 { | 383 { |
384 return m_match == PseudoElement && (m_pseudoType == PseudoUserAgentCustomEle
ment || m_pseudoType == PseudoWebKitCustomElement); | 384 return m_match == PseudoElement && (m_pseudoType == PseudoUserAgentCustomEle
ment || m_pseudoType == PseudoWebKitCustomElement); |
385 } | 385 } |
386 | 386 |
387 inline bool CSSSelector::isHostPseudoClass() const | 387 inline bool CSSSelector::isHostPseudoClass() const |
388 { | 388 { |
389 return m_match == PseudoClass && m_pseudoType == PseudoHost; | 389 return m_match == PseudoClass && (m_pseudoType == PseudoHost || m_pseudoType
== PseudoAncestor); |
390 } | 390 } |
391 | 391 |
392 inline bool CSSSelector::isSiblingSelector() const | 392 inline bool CSSSelector::isSiblingSelector() const |
393 { | 393 { |
394 PseudoType type = pseudoType(); | 394 PseudoType type = pseudoType(); |
395 return m_relation == DirectAdjacent | 395 return m_relation == DirectAdjacent |
396 || m_relation == IndirectAdjacent | 396 || m_relation == IndirectAdjacent |
397 || type == PseudoEmpty | 397 || type == PseudoEmpty |
398 || type == PseudoFirstChild | 398 || type == PseudoFirstChild |
399 || type == PseudoFirstOfType | 399 || type == PseudoFirstOfType |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 if (m_hasRareData) | 514 if (m_hasRareData) |
515 return m_data.m_rareData->m_value; | 515 return m_data.m_rareData->m_value; |
516 // AtomicString is really just a StringImpl* so the cast below is safe. | 516 // AtomicString is really just a StringImpl* so the cast below is safe. |
517 // FIXME: Perhaps call sites could be changed to accept StringImpl? | 517 // FIXME: Perhaps call sites could be changed to accept StringImpl? |
518 return *reinterpret_cast<const AtomicString*>(&m_data.m_value); | 518 return *reinterpret_cast<const AtomicString*>(&m_data.m_value); |
519 } | 519 } |
520 | 520 |
521 } // namespace WebCore | 521 } // namespace WebCore |
522 | 522 |
523 #endif // CSSSelector_h | 523 #endif // CSSSelector_h |
OLD | NEW |