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

Unified Diff: Source/core/dom/NthIndexCache.cpp

Issue 1108783002: Don't cache nth-indices of pseudo elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Early return for pseudo elements in NthIndexCache. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/NthIndexCache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NthIndexCache.cpp
diff --git a/Source/core/dom/NthIndexCache.cpp b/Source/core/dom/NthIndexCache.cpp
index 01e721902a361ff88abae6757071ce9300d8dd05..498abafe26eae8179c1a6a9ad3ff00c5080761ad 100644
--- a/Source/core/dom/NthIndexCache.cpp
+++ b/Source/core/dom/NthIndexCache.cpp
@@ -37,6 +37,7 @@ NthIndexCache::NthIndexData& NthIndexCache::ensureNthIndexDataFor(Node& parent)
unsigned NthIndexCache::NthIndexData::cacheNthIndices(Element& element)
{
+ ASSERT(!element.isPseudoElement());
unsigned index = 0;
// The frequency at which we cache the nth-index for a set of siblings.
// A spread value of 3 means every third Element will have its nth-index cached.
« no previous file with comments | « Source/core/dom/NthIndexCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698