| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool match(const SelectorCheckingContext& context) const { | 124 bool match(const SelectorCheckingContext& context) const { |
| 125 MatchResult ignoreResult; | 125 MatchResult ignoreResult; |
| 126 return match(context, ignoreResult); | 126 return match(context, ignoreResult); |
| 127 } | 127 } |
| 128 | 128 |
| 129 static bool matchesFocusPseudoClass(const Element&); | 129 static bool matchesFocusPseudoClass(const Element&); |
| 130 | 130 |
| 131 private: | 131 private: |
| 132 bool checkOne(const SelectorCheckingContext&, MatchResult&) const; | 132 bool checkOne(const SelectorCheckingContext&, MatchResult&) const; |
| 133 | 133 |
| 134 enum Match { | 134 enum MatchStatus { |
| 135 SelectorMatches, | 135 SelectorMatches, |
| 136 SelectorFailsLocally, | 136 SelectorFailsLocally, |
| 137 SelectorFailsAllSiblings, | 137 SelectorFailsAllSiblings, |
| 138 SelectorFailsCompletely | 138 SelectorFailsCompletely |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 Match matchSelector(const SelectorCheckingContext&, MatchResult&) const; | 141 MatchStatus matchSelector(const SelectorCheckingContext&, MatchResult&) const; |
| 142 Match matchForSubSelector(const SelectorCheckingContext&, MatchResult&) const; | 142 MatchStatus matchForSubSelector(const SelectorCheckingContext&, |
| 143 Match matchForRelation(const SelectorCheckingContext&, MatchResult&) const; | 143 MatchResult&) const; |
| 144 Match matchForPseudoContent(const SelectorCheckingContext&, | 144 MatchStatus matchForRelation(const SelectorCheckingContext&, |
| 145 const Element&, | 145 MatchResult&) const; |
| 146 MatchResult&) const; | 146 MatchStatus matchForPseudoContent(const SelectorCheckingContext&, |
| 147 Match matchForPseudoShadow(const SelectorCheckingContext&, | 147 const Element&, |
| 148 const ContainerNode*, | 148 MatchResult&) const; |
| 149 MatchResult&) const; | 149 MatchStatus matchForPseudoShadow(const SelectorCheckingContext&, |
| 150 const ContainerNode*, |
| 151 MatchResult&) const; |
| 150 bool checkPseudoClass(const SelectorCheckingContext&, MatchResult&) const; | 152 bool checkPseudoClass(const SelectorCheckingContext&, MatchResult&) const; |
| 151 bool checkPseudoElement(const SelectorCheckingContext&, MatchResult&) const; | 153 bool checkPseudoElement(const SelectorCheckingContext&, MatchResult&) const; |
| 152 bool checkScrollbarPseudoClass(const SelectorCheckingContext&, | 154 bool checkScrollbarPseudoClass(const SelectorCheckingContext&, |
| 153 MatchResult&) const; | 155 MatchResult&) const; |
| 154 bool checkPseudoHost(const SelectorCheckingContext&, MatchResult&) const; | 156 bool checkPseudoHost(const SelectorCheckingContext&, MatchResult&) const; |
| 155 bool checkPseudoNot(const SelectorCheckingContext&, MatchResult&) const; | 157 bool checkPseudoNot(const SelectorCheckingContext&, MatchResult&) const; |
| 156 | 158 |
| 157 Mode m_mode; | 159 Mode m_mode; |
| 158 bool m_isUARule; | 160 bool m_isUARule; |
| 159 bool m_isQuerySelector; | 161 bool m_isQuerySelector; |
| 160 ComputedStyle* m_elementStyle; | 162 ComputedStyle* m_elementStyle; |
| 161 Member<LayoutScrollbar> m_scrollbar; | 163 Member<LayoutScrollbar> m_scrollbar; |
| 162 ScrollbarPart m_scrollbarPart; | 164 ScrollbarPart m_scrollbarPart; |
| 163 }; | 165 }; |
| 164 | 166 |
| 165 } // namespace blink | 167 } // namespace blink |
| 166 | 168 |
| 167 #endif | 169 #endif |
| OLD | NEW |