| 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 |
| 32 class CORE_EXPORT CSSParserSelector { | 34 class CORE_EXPORT CSSParserSelector { |
| 33 WTF_MAKE_NONCOPYABLE(CSSParserSelector); | 35 WTF_MAKE_NONCOPYABLE(CSSParserSelector); |
| 34 USING_FAST_MALLOC(CSSParserSelector); | 36 USING_FAST_MALLOC(CSSParserSelector); |
| 35 | 37 |
| 36 public: | 38 public: |
| 37 CSSParserSelector(); | 39 CSSParserSelector(); |
| 38 explicit CSSParserSelector(const QualifiedName&, bool is_implicit = false); | 40 explicit CSSParserSelector(const QualifiedName&, bool is_implicit = false); |
| 39 | 41 |
| 40 static std::unique_ptr<CSSParserSelector> Create() { | 42 static std::unique_ptr<CSSParserSelector> Create() { |
| 41 return WTF::WrapUnique(new CSSParserSelector); | 43 return WTF::WrapUnique(new CSSParserSelector); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 67 } | 69 } |
| 68 void SetForPage() { selector_->SetForPage(); } | 70 void SetForPage() { selector_->SetForPage(); } |
| 69 void SetRelationIsAffectedByPseudoContent() { | 71 void SetRelationIsAffectedByPseudoContent() { |
| 70 selector_->SetRelationIsAffectedByPseudoContent(); | 72 selector_->SetRelationIsAffectedByPseudoContent(); |
| 71 } | 73 } |
| 72 bool RelationIsAffectedByPseudoContent() const { | 74 bool RelationIsAffectedByPseudoContent() const { |
| 73 return selector_->RelationIsAffectedByPseudoContent(); | 75 return selector_->RelationIsAffectedByPseudoContent(); |
| 74 } | 76 } |
| 75 | 77 |
| 76 void UpdatePseudoType(const AtomicString& value, | 78 void UpdatePseudoType(const AtomicString& value, |
| 79 const CSSParserContext& context, |
| 77 bool has_arguments = false) const { | 80 bool has_arguments = false) const { |
| 78 selector_->UpdatePseudoType(value, has_arguments); | 81 selector_->UpdatePseudoType(value, context, has_arguments); |
| 79 } | 82 } |
| 80 | 83 |
| 81 void AdoptSelectorVector( | 84 void AdoptSelectorVector( |
| 82 Vector<std::unique_ptr<CSSParserSelector>>& selector_vector); | 85 Vector<std::unique_ptr<CSSParserSelector>>& selector_vector); |
| 83 void SetSelectorList(std::unique_ptr<CSSSelectorList>); | 86 void SetSelectorList(std::unique_ptr<CSSSelectorList>); |
| 84 | 87 |
| 85 bool IsHostPseudoSelector() const; | 88 bool IsHostPseudoSelector() const; |
| 86 | 89 |
| 87 CSSSelector::MatchType Match() const { return selector_->Match(); } | 90 CSSSelector::MatchType Match() const { return selector_->Match(); } |
| 88 CSSSelector::PseudoType GetPseudoType() const { | 91 CSSSelector::PseudoType GetPseudoType() const { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 114 void PrependTagSelector(const QualifiedName&, bool tag_is_implicit = false); | 117 void PrependTagSelector(const QualifiedName&, bool tag_is_implicit = false); |
| 115 | 118 |
| 116 private: | 119 private: |
| 117 std::unique_ptr<CSSSelector> selector_; | 120 std::unique_ptr<CSSSelector> selector_; |
| 118 std::unique_ptr<CSSParserSelector> tag_history_; | 121 std::unique_ptr<CSSParserSelector> tag_history_; |
| 119 }; | 122 }; |
| 120 | 123 |
| 121 } // namespace blink | 124 } // namespace blink |
| 122 | 125 |
| 123 #endif | 126 #endif |
| OLD | NEW |