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

Side by Side Diff: third_party/WebKit/Source/core/dom/SelectorQuery.cpp

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 222
223 inline bool SelectorDataList::canUseFastQuery(const ContainerNode& rootNode) con st 223 inline bool SelectorDataList::canUseFastQuery(const ContainerNode& rootNode) con st
224 { 224 {
225 if (m_usesDeepCombinatorOrShadowPseudo) 225 if (m_usesDeepCombinatorOrShadowPseudo)
226 return false; 226 return false;
227 if (m_needsUpdatedDistribution) 227 if (m_needsUpdatedDistribution)
228 return false; 228 return false;
229 if (rootNode.document().inQuirksMode()) 229 if (rootNode.document().inQuirksMode())
230 return false; 230 return false;
231 if (!rootNode.inShadowIncludingDocument()) 231 if (!rootNode.isConnected())
232 return false; 232 return false;
233 return m_selectors.size() == 1; 233 return m_selectors.size() == 1;
234 } 234 }
235 235
236 inline bool ancestorHasClassName(ContainerNode& rootNode, const AtomicString& cl assName) 236 inline bool ancestorHasClassName(ContainerNode& rootNode, const AtomicString& cl assName)
237 { 237 {
238 if (!rootNode.isElementNode()) 238 if (!rootNode.isElementNode())
239 return false; 239 return false;
240 240
241 for (Element* element = &toElement(rootNode); element; element = element->pa rentElement()) { 241 for (Element* element = &toElement(rootNode); element; element = element->pa rentElement()) {
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 587
588 return m_entries.add(selectors, SelectorQuery::adopt(std::move(selectorList) )).storedValue->value.get(); 588 return m_entries.add(selectors, SelectorQuery::adopt(std::move(selectorList) )).storedValue->value.get();
589 } 589 }
590 590
591 void SelectorQueryCache::invalidate() 591 void SelectorQueryCache::invalidate()
592 { 592 {
593 m_entries.clear(); 593 m_entries.clear();
594 } 594 }
595 595
596 } // namespace blink 596 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.cpp ('k') | third_party/WebKit/Source/core/dom/StyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698