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

Side by Side Diff: Source/core/html/HTMLContentElement.cpp

Issue 277213004: Oilpan: add transition types to shadow DOM supporting objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use Member<const Node> Created 6 years, 7 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
« no previous file with comments | « Source/core/html/HTMLContentElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (!disallowPseudoClasses) 101 if (!disallowPseudoClasses)
102 continue; 102 continue;
103 for (const CSSSelector* subSelector = selector; subSelector; subSelector = subSelector->tagHistory()) { 103 for (const CSSSelector* subSelector = selector; subSelector; subSelector = subSelector->tagHistory()) {
104 if (subSelector->m_match == CSSSelector::PseudoClass) 104 if (subSelector->m_match == CSSSelector::PseudoClass)
105 return false; 105 return false;
106 } 106 }
107 } 107 }
108 return true; 108 return true;
109 } 109 }
110 110
111 static inline bool checkOneSelector(const CSSSelector& selector, const Vector<No de*, 32>& siblings, int nth) 111 static inline bool checkOneSelector(const CSSSelector& selector, const WillBeHea pVector<RawPtrWillBeMember<Node>, 32>& siblings, int nth)
112 { 112 {
113 Element* element = toElement(siblings[nth]); 113 Element* element = toElement(siblings[nth]);
114 SelectorChecker selectorChecker(element->document(), SelectorChecker::Collec tingCSSRules); 114 SelectorChecker selectorChecker(element->document(), SelectorChecker::Collec tingCSSRules);
115 SelectorChecker::SelectorCheckingContext context(selector, element, Selector Checker::VisitedMatchEnabled); 115 SelectorChecker::SelectorCheckingContext context(selector, element, Selector Checker::VisitedMatchEnabled);
116 ShadowDOMSiblingTraversalStrategy strategy(siblings, nth); 116 ShadowDOMSiblingTraversalStrategy strategy(siblings, nth);
117 return selectorChecker.match(context, strategy) == SelectorChecker::Selector Matches; 117 return selectorChecker.match(context, strategy) == SelectorChecker::Selector Matches;
118 } 118 }
119 119
120 bool HTMLContentElement::matchSelector(const Vector<Node*, 32>& siblings, int nt h) const 120 bool HTMLContentElement::matchSelector(const WillBeHeapVector<RawPtrWillBeMember <Node>, 32>& siblings, int nth) const
121 { 121 {
122 for (const CSSSelector* selector = selectorList().first(); selector; selecto r = CSSSelectorList::next(*selector)) { 122 for (const CSSSelector* selector = selectorList().first(); selector; selecto r = CSSSelectorList::next(*selector)) {
123 if (checkOneSelector(*selector, siblings, nth)) 123 if (checkOneSelector(*selector, siblings, nth))
124 return true; 124 return true;
125 } 125 }
126 return false; 126 return false;
127 } 127 }
128 128
129 } 129 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLContentElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698