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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 PseudoOutOfRange, | 211 PseudoOutOfRange, |
212 PseudoUserAgentCustomElement, | 212 PseudoUserAgentCustomElement, |
213 PseudoWebKitCustomElement, | 213 PseudoWebKitCustomElement, |
214 PseudoCue, | 214 PseudoCue, |
215 PseudoFutureCue, | 215 PseudoFutureCue, |
216 PseudoPastCue, | 216 PseudoPastCue, |
217 PseudoDistributed, | 217 PseudoDistributed, |
218 PseudoUnresolved, | 218 PseudoUnresolved, |
219 PseudoContent, | 219 PseudoContent, |
220 PseudoHost, | 220 PseudoHost, |
221 PseudoAncestor | 221 PseudoHostContext |
222 }; | 222 }; |
223 | 223 |
224 enum OptionalPseudoTypeRequirements { | 224 enum OptionalPseudoTypeRequirements { |
225 // 0 is used to mean "no requirements". | 225 // 0 is used to mean "no requirements". |
226 RequiresShadowDOM = 1 | 226 RequiresShadowDOM = 1 |
227 }; | 227 }; |
228 | 228 |
229 enum MarginBoxType { | 229 enum MarginBoxType { |
230 TopLeftCornerMarginBox, | 230 TopLeftCornerMarginBox, |
231 TopLeftMarginBox, | 231 TopLeftMarginBox, |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 return m_match == PseudoElement && m_pseudoType == PseudoUnknown; | 380 return m_match == PseudoElement && m_pseudoType == PseudoUnknown; |
381 } | 381 } |
382 | 382 |
383 inline bool CSSSelector::isCustomPseudoElement() const | 383 inline bool CSSSelector::isCustomPseudoElement() const |
384 { | 384 { |
385 return m_match == PseudoElement && (m_pseudoType == PseudoUserAgentCustomEle
ment || m_pseudoType == PseudoWebKitCustomElement); | 385 return m_match == PseudoElement && (m_pseudoType == PseudoUserAgentCustomEle
ment || m_pseudoType == PseudoWebKitCustomElement); |
386 } | 386 } |
387 | 387 |
388 inline bool CSSSelector::isHostPseudoClass() const | 388 inline bool CSSSelector::isHostPseudoClass() const |
389 { | 389 { |
390 return m_match == PseudoClass && (m_pseudoType == PseudoHost || m_pseudoType
== PseudoAncestor); | 390 return m_match == PseudoClass && (m_pseudoType == PseudoHost || m_pseudoType
== PseudoHostContext); |
391 } | 391 } |
392 | 392 |
393 inline bool CSSSelector::isSiblingSelector() const | 393 inline bool CSSSelector::isSiblingSelector() const |
394 { | 394 { |
395 PseudoType type = pseudoType(); | 395 PseudoType type = pseudoType(); |
396 return m_relation == DirectAdjacent | 396 return m_relation == DirectAdjacent |
397 || m_relation == IndirectAdjacent | 397 || m_relation == IndirectAdjacent |
398 || type == PseudoEmpty | 398 || type == PseudoEmpty |
399 || type == PseudoFirstChild | 399 || type == PseudoFirstChild |
400 || type == PseudoFirstOfType | 400 || type == PseudoFirstOfType |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 if (m_hasRareData) | 520 if (m_hasRareData) |
521 return m_data.m_rareData->m_value; | 521 return m_data.m_rareData->m_value; |
522 // AtomicString is really just a StringImpl* so the cast below is safe. | 522 // AtomicString is really just a StringImpl* so the cast below is safe. |
523 // FIXME: Perhaps call sites could be changed to accept StringImpl? | 523 // FIXME: Perhaps call sites could be changed to accept StringImpl? |
524 return *reinterpret_cast<const AtomicString*>(&m_data.m_value); | 524 return *reinterpret_cast<const AtomicString*>(&m_data.m_value); |
525 } | 525 } |
526 | 526 |
527 } // namespace WebCore | 527 } // namespace WebCore |
528 | 528 |
529 #endif // CSSSelector_h | 529 #endif // CSSSelector_h |
OLD | NEW |