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.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // to follow the pseudo elements. | 192 // to follow the pseudo elements. |
193 nextContext.hasScrollbarPseudo = dynamicPseudo != NOPSEUDO && (context.s
crollbar || dynamicPseudo == SCROLLBAR_CORNER || dynamicPseudo == RESIZER); | 193 nextContext.hasScrollbarPseudo = dynamicPseudo != NOPSEUDO && (context.s
crollbar || dynamicPseudo == SCROLLBAR_CORNER || dynamicPseudo == RESIZER); |
194 nextContext.hasSelectionPseudo = dynamicPseudo == SELECTION; | 194 nextContext.hasSelectionPseudo = dynamicPseudo == SELECTION; |
195 if ((context.elementStyle || m_mode == CollectingRules || m_mode == Quer
yingRules) && dynamicPseudo != NOPSEUDO | 195 if ((context.elementStyle || m_mode == CollectingRules || m_mode == Quer
yingRules) && dynamicPseudo != NOPSEUDO |
196 && !nextContext.hasSelectionPseudo | 196 && !nextContext.hasSelectionPseudo |
197 && !(nextContext.hasScrollbarPseudo && nextContext.selector->m_match
== CSSSelector::PseudoClass)) | 197 && !(nextContext.hasScrollbarPseudo && nextContext.selector->m_match
== CSSSelector::PseudoClass)) |
198 return SelectorFailsCompletely; | 198 return SelectorFailsCompletely; |
199 nextContext.isSubSelector = true; | 199 nextContext.isSubSelector = true; |
200 return match(nextContext, dynamicPseudo, siblingTraversalStrategy); | 200 return match(nextContext, dynamicPseudo, siblingTraversalStrategy); |
201 | 201 |
202 case CSSSelector::ShadowDescendant: | 202 case CSSSelector::ShadowPseudo: |
203 { | 203 { |
204 // If we're in the same tree-scope as the scoping element, then foll
owing a shadow descendant combinator would escape that and thus the scope. | 204 // If we're in the same tree-scope as the scoping element, then foll
owing a shadow descendant combinator would escape that and thus the scope. |
205 if (context.scope && context.scope->treeScope() == context.element->
treeScope() && (context.behaviorAtBoundary & BoundaryBehaviorMask) != StaysWithi
nTreeScope) | 205 if (context.scope && context.scope->treeScope() == context.element->
treeScope() && (context.behaviorAtBoundary & BoundaryBehaviorMask) != StaysWithi
nTreeScope) |
206 return SelectorFailsCompletely; | 206 return SelectorFailsCompletely; |
207 Element* shadowHostNode = context.element->shadowHost(); | 207 Element* shadowHostNode = context.element->shadowHost(); |
208 if (!shadowHostNode) | 208 if (!shadowHostNode) |
209 return SelectorFailsCompletely; | 209 return SelectorFailsCompletely; |
210 nextContext.element = shadowHostNode; | 210 nextContext.element = shadowHostNode; |
211 nextContext.isSubSelector = false; | 211 nextContext.isSubSelector = false; |
212 nextContext.elementStyle = 0; | 212 nextContext.elementStyle = 0; |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 return element->focused() && isFrameFocused(element); | 901 return element->focused() && isFrameFocused(element); |
902 } | 902 } |
903 | 903 |
904 template | 904 template |
905 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps
eudoId&, const DOMSiblingTraversalStrategy&) const; | 905 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps
eudoId&, const DOMSiblingTraversalStrategy&) const; |
906 | 906 |
907 template | 907 template |
908 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps
eudoId&, const ShadowDOMSiblingTraversalStrategy&) const; | 908 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps
eudoId&, const ShadowDOMSiblingTraversalStrategy&) const; |
909 | 909 |
910 } | 910 } |
OLD | NEW |