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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 nextContext.isSubSelector = false; | 285 nextContext.isSubSelector = false; |
286 nextContext.elementStyle = 0; | 286 nextContext.elementStyle = 0; |
287 for (; nextContext.element; nextContext.element = ElementTraversal::prev
iousSibling(*nextContext.element)) { | 287 for (; nextContext.element; nextContext.element = ElementTraversal::prev
iousSibling(*nextContext.element)) { |
288 Match match = this->match(nextContext, siblingTraversalStrategy, res
ult); | 288 Match match = this->match(nextContext, siblingTraversalStrategy, res
ult); |
289 if (match == SelectorMatches || match == SelectorFailsAllSiblings ||
match == SelectorFailsCompletely) | 289 if (match == SelectorMatches || match == SelectorFailsAllSiblings ||
match == SelectorFailsCompletely) |
290 return match; | 290 return match; |
291 }; | 291 }; |
292 return SelectorFailsAllSiblings; | 292 return SelectorFailsAllSiblings; |
293 | 293 |
294 case CSSSelector::ShadowPseudo: | 294 case CSSSelector::ShadowPseudo: |
295 case CSSSelector::ShadowAll: | 295 case CSSSelector::Shadow: |
296 { | 296 { |
297 // 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. | 297 // 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. |
298 if (context.scope && context.scope->treeScope() == context.element->
treeScope() && (context.behaviorAtBoundary & BoundaryBehaviorMask) != StaysWithi
nTreeScope) | 298 if (context.scope && context.scope->treeScope() == context.element->
treeScope() && (context.behaviorAtBoundary & BoundaryBehaviorMask) != StaysWithi
nTreeScope) |
299 return SelectorFailsCompletely; | 299 return SelectorFailsCompletely; |
300 | 300 |
301 Element* shadowHost = context.element->shadowHost(); | 301 Element* shadowHost = context.element->shadowHost(); |
302 if (!shadowHost) | 302 if (!shadowHost) |
303 return SelectorFailsCompletely; | 303 return SelectorFailsCompletely; |
304 nextContext.element = shadowHost; | 304 nextContext.element = shadowHost; |
305 nextContext.isSubSelector = false; | 305 nextContext.isSubSelector = false; |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 return element.focused() && isFrameFocused(element); | 1084 return element.focused() && isFrameFocused(element); |
1085 } | 1085 } |
1086 | 1086 |
1087 template | 1087 template |
1088 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst DOMSiblingTraversalStrategy&, MatchResult*) const; | 1088 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst DOMSiblingTraversalStrategy&, MatchResult*) const; |
1089 | 1089 |
1090 template | 1090 template |
1091 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; | 1091 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, co
nst ShadowDOMSiblingTraversalStrategy&, MatchResult*) const; |
1092 | 1092 |
1093 } | 1093 } |
OLD | NEW |