| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 void Show(int indent) const; | 277 void Show(int indent) const; |
| 278 #endif | 278 #endif |
| 279 | 279 |
| 280 bool IsASCIILower(const AtomicString& value); | 280 bool IsASCIILower(const AtomicString& value); |
| 281 void SetValue(const AtomicString&, bool match_lower_case); | 281 void SetValue(const AtomicString&, bool match_lower_case); |
| 282 void SetAttribute(const QualifiedName&, AttributeMatchType); | 282 void SetAttribute(const QualifiedName&, AttributeMatchType); |
| 283 void SetArgument(const AtomicString&); | 283 void SetArgument(const AtomicString&); |
| 284 void SetSelectorList(std::unique_ptr<CSSSelectorList>); | 284 void SetSelectorList(std::unique_ptr<CSSSelectorList>); |
| 285 | 285 |
| 286 void SetNth(int a, int b); | 286 void SetNth(int a, int b); |
| 287 bool MatchNth(int count) const; | 287 bool MatchNth(unsigned count) const; |
| 288 | 288 |
| 289 bool IsAdjacentSelector() const { | 289 bool IsAdjacentSelector() const { |
| 290 return relation_ == kDirectAdjacent || relation_ == kIndirectAdjacent; | 290 return relation_ == kDirectAdjacent || relation_ == kIndirectAdjacent; |
| 291 } | 291 } |
| 292 bool IsShadowSelector() const { | 292 bool IsShadowSelector() const { |
| 293 return relation_ == kShadowPseudo || relation_ == kShadowDeep; | 293 return relation_ == kShadowPseudo || relation_ == kShadowDeep; |
| 294 } | 294 } |
| 295 bool IsAttributeSelector() const { | 295 bool IsAttributeSelector() const { |
| 296 return match_ >= kFirstAttributeSelectorMatch; | 296 return match_ >= kFirstAttributeSelectorMatch; |
| 297 } | 297 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 371 |
| 372 // Hide. | 372 // Hide. |
| 373 CSSSelector& operator=(const CSSSelector&); | 373 CSSSelector& operator=(const CSSSelector&); |
| 374 | 374 |
| 375 struct RareData : public RefCounted<RareData> { | 375 struct RareData : public RefCounted<RareData> { |
| 376 static PassRefPtr<RareData> Create(const AtomicString& value) { | 376 static PassRefPtr<RareData> Create(const AtomicString& value) { |
| 377 return AdoptRef(new RareData(value)); | 377 return AdoptRef(new RareData(value)); |
| 378 } | 378 } |
| 379 ~RareData(); | 379 ~RareData(); |
| 380 | 380 |
| 381 bool MatchNth(int count); | 381 bool MatchNth(unsigned count); |
| 382 int NthAValue() const { return bits_.nth_.a_; } | 382 int NthAValue() const { return bits_.nth_.a_; } |
| 383 int NthBValue() const { return bits_.nth_.b_; } | 383 int NthBValue() const { return bits_.nth_.b_; } |
| 384 | 384 |
| 385 AtomicString matching_value_; | 385 AtomicString matching_value_; |
| 386 AtomicString serializing_value_; | 386 AtomicString serializing_value_; |
| 387 union { | 387 union { |
| 388 struct { | 388 struct { |
| 389 int a_; // Used for :nth-* | 389 int a_; // Used for :nth-* |
| 390 int b_; // Used for :nth-* | 390 int b_; // Used for :nth-* |
| 391 } nth_; | 391 } nth_; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 } | 537 } |
| 538 | 538 |
| 539 inline bool CSSSelector::IsIdClassOrAttributeSelector() const { | 539 inline bool CSSSelector::IsIdClassOrAttributeSelector() const { |
| 540 return IsAttributeSelector() || Match() == CSSSelector::kId || | 540 return IsAttributeSelector() || Match() == CSSSelector::kId || |
| 541 Match() == CSSSelector::kClass; | 541 Match() == CSSSelector::kClass; |
| 542 } | 542 } |
| 543 | 543 |
| 544 } // namespace blink | 544 } // namespace blink |
| 545 | 545 |
| 546 #endif // CSSSelector_h | 546 #endif // CSSSelector_h |
| OLD | NEW |