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

Side by Side Diff: Source/core/css/SelectorChecker.cpp

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 if ((context.elementStyle || m_mode == CollectingRules || m_mode == Quer yingRules) && dynamicPseudo != NOPSEUDO 256 if ((context.elementStyle || m_mode == CollectingRules || m_mode == Quer yingRules) && dynamicPseudo != NOPSEUDO
257 && !nextContext.hasSelectionPseudo 257 && !nextContext.hasSelectionPseudo
258 && !(nextContext.hasScrollbarPseudo && nextContext.selector->m_match == CSSSelector::PseudoClass)) 258 && !(nextContext.hasScrollbarPseudo && nextContext.selector->m_match == CSSSelector::PseudoClass))
259 return SelectorFailsCompletely; 259 return SelectorFailsCompletely;
260 nextContext.isSubSelector = true; 260 nextContext.isSubSelector = true;
261 return match(nextContext, dynamicPseudo, siblingTraversalStrategy); 261 return match(nextContext, dynamicPseudo, siblingTraversalStrategy);
262 262
263 case CSSSelector::ShadowPseudo: 263 case CSSSelector::ShadowPseudo:
264 { 264 {
265 // 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. 265 // 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.
266 if (context.scope && &context.scope->treeScope() == &context.element ->treeScope() && (context.behaviorAtBoundary & BoundaryBehaviorMask) != StaysWit hinTreeScope) 266 if (context.scope && context.scope->treeScope() == context.element-> treeScope() && (context.behaviorAtBoundary & BoundaryBehaviorMask) != StaysWithi nTreeScope)
267 return SelectorFailsCompletely; 267 return SelectorFailsCompletely;
268 Element* shadowHostNode = context.element->shadowHost(); 268 Element* shadowHostNode = context.element->shadowHost();
269 if (!shadowHostNode) 269 if (!shadowHostNode)
270 return SelectorFailsCompletely; 270 return SelectorFailsCompletely;
271 nextContext.element = shadowHostNode; 271 nextContext.element = shadowHostNode;
272 nextContext.isSubSelector = false; 272 nextContext.isSubSelector = false;
273 nextContext.elementStyle = 0; 273 nextContext.elementStyle = 0;
274 return match(nextContext, ignoreDynamicPseudo, siblingTraversalStrat egy); 274 return match(nextContext, ignoreDynamicPseudo, siblingTraversalStrat egy);
275 } 275 }
276 } 276 }
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 return element->focused() && isFrameFocused(element); 992 return element->focused() && isFrameFocused(element);
993 } 993 }
994 994
995 template 995 template
996 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps eudoId&, const DOMSiblingTraversalStrategy&) const; 996 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps eudoId&, const DOMSiblingTraversalStrategy&) const;
997 997
998 template 998 template
999 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps eudoId&, const ShadowDOMSiblingTraversalStrategy&) const; 999 SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext&, Ps eudoId&, const ShadowDOMSiblingTraversalStrategy&) const;
1000 1000
1001 } 1001 }
OLDNEW
« no previous file with comments | « Source/core/css/ElementRuleCollector.cpp ('k') | Source/core/css/resolver/ScopedStyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698