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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 PagePseudoClass | 73 PagePseudoClass |
74 }; | 74 }; |
75 | 75 |
76 enum Relation { | 76 enum Relation { |
77 Descendant = 0, | 77 Descendant = 0, |
78 Child, | 78 Child, |
79 DirectAdjacent, | 79 DirectAdjacent, |
80 IndirectAdjacent, | 80 IndirectAdjacent, |
81 SubSelector, | 81 SubSelector, |
82 ShadowPseudo, | 82 ShadowPseudo, |
83 ShadowDistributed | 83 ShadowVirtualDescendant, |
84 ShadowVirtualChild | |
dglazkov
2013/05/22 17:43:43
Introducing "virtual" here is bugging me. What doe
| |
84 }; | 85 }; |
85 | 86 |
86 enum PseudoType { | 87 enum PseudoType { |
87 PseudoNotParsed = 0, | 88 PseudoNotParsed = 0, |
88 PseudoUnknown, | 89 PseudoUnknown, |
89 PseudoEmpty, | 90 PseudoEmpty, |
90 PseudoFirstChild, | 91 PseudoFirstChild, |
91 PseudoFirstOfType, | 92 PseudoFirstOfType, |
92 PseudoLastChild, | 93 PseudoLastChild, |
93 PseudoLastOfType, | 94 PseudoLastOfType, |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 || m_match == CSSSelector::End; | 334 || m_match == CSSSelector::End; |
334 } | 335 } |
335 | 336 |
336 inline bool CSSSelector::isDistributedPseudoElement() const | 337 inline bool CSSSelector::isDistributedPseudoElement() const |
337 { | 338 { |
338 return m_match == PseudoElement && pseudoType() == PseudoDistributed; | 339 return m_match == PseudoElement && pseudoType() == PseudoDistributed; |
339 } | 340 } |
340 | 341 |
341 inline bool CSSSelector::isShadowDistributed() const | 342 inline bool CSSSelector::isShadowDistributed() const |
342 { | 343 { |
343 return m_relation == CSSSelector::ShadowDistributed; | 344 return m_relation == CSSSelector::ShadowVirtualDescendant || m_relation == C SSSelector::ShadowVirtualChild; |
344 } | 345 } |
345 | 346 |
346 inline void CSSSelector::setValue(const AtomicString& value) | 347 inline void CSSSelector::setValue(const AtomicString& value) |
347 { | 348 { |
348 ASSERT(m_match != Tag); | 349 ASSERT(m_match != Tag); |
349 ASSERT(m_pseudoType == PseudoNotParsed); | 350 ASSERT(m_pseudoType == PseudoNotParsed); |
350 // Need to do ref counting manually for the union. | 351 // Need to do ref counting manually for the union. |
351 if (m_hasRareData) { | 352 if (m_hasRareData) { |
352 if (m_data.m_rareData->m_value) | 353 if (m_data.m_rareData->m_value) |
353 m_data.m_rareData->m_value->deref(); | 354 m_data.m_rareData->m_value->deref(); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
433 ASSERT(m_match != Tag); | 434 ASSERT(m_match != Tag); |
434 // AtomicString is really just an AtomicStringImpl* so the cast below is saf e. | 435 // AtomicString is really just an AtomicStringImpl* so the cast below is saf e. |
435 // FIXME: Perhaps call sites could be changed to accept AtomicStringImpl? | 436 // FIXME: Perhaps call sites could be changed to accept AtomicStringImpl? |
436 return *reinterpret_cast<const AtomicString*>(m_hasRareData ? &m_data.m_rare Data->m_value : &m_data.m_value); | 437 return *reinterpret_cast<const AtomicString*>(m_hasRareData ? &m_data.m_rare Data->m_value : &m_data.m_value); |
437 } | 438 } |
438 | 439 |
439 | 440 |
440 } // namespace WebCore | 441 } // namespace WebCore |
441 | 442 |
442 #endif // CSSSelector_h | 443 #endif // CSSSelector_h |
OLD | NEW |