Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserSelector.h

Issue 1576553002: Pseudo element selectors in compound selector lists are invalid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review issues Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void setRelationIsAffectedByPseudoContent() { m_selector->setRelationIsAffec tedByPseudoContent(); } 50 void setRelationIsAffectedByPseudoContent() { m_selector->setRelationIsAffec tedByPseudoContent(); }
51 bool relationIsAffectedByPseudoContent() const { return m_selector->relation IsAffectedByPseudoContent(); } 51 bool relationIsAffectedByPseudoContent() const { return m_selector->relation IsAffectedByPseudoContent(); }
52 52
53 void updatePseudoType(const AtomicString& value, bool hasArguments = false) const { m_selector->updatePseudoType(value, hasArguments); } 53 void updatePseudoType(const AtomicString& value, bool hasArguments = false) const { m_selector->updatePseudoType(value, hasArguments); }
54 54
55 void adoptSelectorVector(Vector<OwnPtr<CSSParserSelector>>& selectorVector); 55 void adoptSelectorVector(Vector<OwnPtr<CSSParserSelector>>& selectorVector);
56 void setSelectorList(PassOwnPtr<CSSSelectorList>); 56 void setSelectorList(PassOwnPtr<CSSSelectorList>);
57 57
58 bool hasHostPseudoSelector() const; 58 bool hasHostPseudoSelector() const;
59 59
60 CSSSelector::Match match() const { return m_selector->match(); }
60 CSSSelector::PseudoType pseudoType() const { return m_selector->pseudoType() ; } 61 CSSSelector::PseudoType pseudoType() const { return m_selector->pseudoType() ; }
61 62
62 // TODO(esprehn): This set of cases doesn't make sense, why PseudoShadow but not a check for ::content or /deep/ ? 63 // TODO(esprehn): This set of cases doesn't make sense, why PseudoShadow but not a check for ::content or /deep/ ?
63 bool crossesTreeScopes() const { return pseudoType() == CSSSelector::PseudoW ebKitCustomElement || pseudoType() == CSSSelector::PseudoCue || pseudoType() == CSSSelector::PseudoShadow; } 64 bool crossesTreeScopes() const { return pseudoType() == CSSSelector::PseudoW ebKitCustomElement || pseudoType() == CSSSelector::PseudoCue || pseudoType() == CSSSelector::PseudoShadow; }
64 65
65 bool isSimple() const; 66 bool isSimple() const;
66 bool hasShadowPseudo() const; 67 bool hasShadowPseudo() const;
67 68
68 CSSParserSelector* tagHistory() const { return m_tagHistory.get(); } 69 CSSParserSelector* tagHistory() const { return m_tagHistory.get(); }
69 void setTagHistory(PassOwnPtr<CSSParserSelector> selector) { m_tagHistory = selector; } 70 void setTagHistory(PassOwnPtr<CSSParserSelector> selector) { m_tagHistory = selector; }
70 void clearTagHistory() { m_tagHistory.clear(); } 71 void clearTagHistory() { m_tagHistory.clear(); }
71 void insertTagHistory(CSSSelector::Relation before, PassOwnPtr<CSSParserSele ctor>, CSSSelector::Relation after); 72 void insertTagHistory(CSSSelector::Relation before, PassOwnPtr<CSSParserSele ctor>, CSSSelector::Relation after);
72 void appendTagHistory(CSSSelector::Relation, PassOwnPtr<CSSParserSelector>); 73 void appendTagHistory(CSSSelector::Relation, PassOwnPtr<CSSParserSelector>);
73 void prependTagSelector(const QualifiedName&, bool tagIsImplicit = false); 74 void prependTagSelector(const QualifiedName&, bool tagIsImplicit = false);
74 75
75 private: 76 private:
76 OwnPtr<CSSSelector> m_selector; 77 OwnPtr<CSSSelector> m_selector;
77 OwnPtr<CSSParserSelector> m_tagHistory; 78 OwnPtr<CSSParserSelector> m_tagHistory;
78 }; 79 };
79 80
80 inline bool CSSParserSelector::hasShadowPseudo() const 81 inline bool CSSParserSelector::hasShadowPseudo() const
81 { 82 {
82 return m_selector->relation() == CSSSelector::ShadowPseudo; 83 return m_selector->relation() == CSSSelector::ShadowPseudo;
83 } 84 }
84 85
85 } // namespace blink 86 } // namespace blink
86 87
87 #endif 88 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698