| OLD | NEW |
| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 } | 218 } |
| 219 | 219 |
| 220 inline bool SelectorDataList::canUseFastQuery(const ContainerNode& rootNode) con
st | 220 inline bool SelectorDataList::canUseFastQuery(const ContainerNode& rootNode) con
st |
| 221 { | 221 { |
| 222 if (m_usesDeepCombinatorOrShadowPseudo) | 222 if (m_usesDeepCombinatorOrShadowPseudo) |
| 223 return false; | 223 return false; |
| 224 if (m_needsUpdatedDistribution) | 224 if (m_needsUpdatedDistribution) |
| 225 return false; | 225 return false; |
| 226 if (rootNode.document().inQuirksMode()) | 226 if (rootNode.document().inQuirksMode()) |
| 227 return false; | 227 return false; |
| 228 if (!rootNode.inDocument()) | 228 if (!rootNode.inShadowIncludingDocument()) |
| 229 return false; | 229 return false; |
| 230 return m_selectors.size() == 1; | 230 return m_selectors.size() == 1; |
| 231 } | 231 } |
| 232 | 232 |
| 233 inline bool ancestorHasClassName(ContainerNode& rootNode, const AtomicString& cl
assName) | 233 inline bool ancestorHasClassName(ContainerNode& rootNode, const AtomicString& cl
assName) |
| 234 { | 234 { |
| 235 if (!rootNode.isElementNode()) | 235 if (!rootNode.isElementNode()) |
| 236 return false; | 236 return false; |
| 237 | 237 |
| 238 for (Element* element = &toElement(rootNode); element; element = element->pa
rentElement()) { | 238 for (Element* element = &toElement(rootNode); element; element = element->pa
rentElement()) { |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 | 570 |
| 571 return m_entries.add(selectors, SelectorQuery::adopt(std::move(selectorList)
)).storedValue->value.get(); | 571 return m_entries.add(selectors, SelectorQuery::adopt(std::move(selectorList)
)).storedValue->value.get(); |
| 572 } | 572 } |
| 573 | 573 |
| 574 void SelectorQueryCache::invalidate() | 574 void SelectorQueryCache::invalidate() |
| 575 { | 575 { |
| 576 m_entries.clear(); | 576 m_entries.clear(); |
| 577 } | 577 } |
| 578 | 578 |
| 579 } // namespace blink | 579 } // namespace blink |
| OLD | NEW |