| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights |
| 4 * reserved. | 4 * 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 11 matching lines...) Expand all Loading... |
| 22 #ifndef CSSParserSelector_h | 22 #ifndef CSSParserSelector_h |
| 23 #define CSSParserSelector_h | 23 #define CSSParserSelector_h |
| 24 | 24 |
| 25 #include <memory> | 25 #include <memory> |
| 26 #include "core/CoreExport.h" | 26 #include "core/CoreExport.h" |
| 27 #include "core/css/CSSSelector.h" | 27 #include "core/css/CSSSelector.h" |
| 28 #include "platform/wtf/PtrUtil.h" | 28 #include "platform/wtf/PtrUtil.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 class CSSParserContext; | |
| 33 | |
| 34 class CORE_EXPORT CSSParserSelector { | 32 class CORE_EXPORT CSSParserSelector { |
| 35 WTF_MAKE_NONCOPYABLE(CSSParserSelector); | 33 WTF_MAKE_NONCOPYABLE(CSSParserSelector); |
| 36 USING_FAST_MALLOC(CSSParserSelector); | 34 USING_FAST_MALLOC(CSSParserSelector); |
| 37 | 35 |
| 38 public: | 36 public: |
| 39 CSSParserSelector(); | 37 CSSParserSelector(); |
| 40 explicit CSSParserSelector(const QualifiedName&, bool is_implicit = false); | 38 explicit CSSParserSelector(const QualifiedName&, bool is_implicit = false); |
| 41 | 39 |
| 42 static std::unique_ptr<CSSParserSelector> Create() { | 40 static std::unique_ptr<CSSParserSelector> Create() { |
| 43 return WTF::WrapUnique(new CSSParserSelector); | 41 return WTF::WrapUnique(new CSSParserSelector); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 69 } | 67 } |
| 70 void SetForPage() { selector_->SetForPage(); } | 68 void SetForPage() { selector_->SetForPage(); } |
| 71 void SetRelationIsAffectedByPseudoContent() { | 69 void SetRelationIsAffectedByPseudoContent() { |
| 72 selector_->SetRelationIsAffectedByPseudoContent(); | 70 selector_->SetRelationIsAffectedByPseudoContent(); |
| 73 } | 71 } |
| 74 bool RelationIsAffectedByPseudoContent() const { | 72 bool RelationIsAffectedByPseudoContent() const { |
| 75 return selector_->RelationIsAffectedByPseudoContent(); | 73 return selector_->RelationIsAffectedByPseudoContent(); |
| 76 } | 74 } |
| 77 | 75 |
| 78 void UpdatePseudoType(const AtomicString& value, | 76 void UpdatePseudoType(const AtomicString& value, |
| 79 const CSSParserContext& context, | |
| 80 bool has_arguments = false) const { | 77 bool has_arguments = false) const { |
| 81 selector_->UpdatePseudoType(value, context, has_arguments); | 78 selector_->UpdatePseudoType(value, has_arguments); |
| 82 } | 79 } |
| 83 | 80 |
| 84 void AdoptSelectorVector( | 81 void AdoptSelectorVector( |
| 85 Vector<std::unique_ptr<CSSParserSelector>>& selector_vector); | 82 Vector<std::unique_ptr<CSSParserSelector>>& selector_vector); |
| 86 void SetSelectorList(std::unique_ptr<CSSSelectorList>); | 83 void SetSelectorList(std::unique_ptr<CSSSelectorList>); |
| 87 | 84 |
| 88 bool IsHostPseudoSelector() const; | 85 bool IsHostPseudoSelector() const; |
| 89 | 86 |
| 90 CSSSelector::MatchType Match() const { return selector_->Match(); } | 87 CSSSelector::MatchType Match() const { return selector_->Match(); } |
| 91 CSSSelector::PseudoType GetPseudoType() const { | 88 CSSSelector::PseudoType GetPseudoType() const { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 117 void PrependTagSelector(const QualifiedName&, bool tag_is_implicit = false); | 114 void PrependTagSelector(const QualifiedName&, bool tag_is_implicit = false); |
| 118 | 115 |
| 119 private: | 116 private: |
| 120 std::unique_ptr<CSSSelector> selector_; | 117 std::unique_ptr<CSSSelector> selector_; |
| 121 std::unique_ptr<CSSParserSelector> tag_history_; | 118 std::unique_ptr<CSSParserSelector> tag_history_; |
| 122 }; | 119 }; |
| 123 | 120 |
| 124 } // namespace blink | 121 } // namespace blink |
| 125 | 122 |
| 126 #endif | 123 #endif |
| OLD | NEW |