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

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

Issue 1108783002: Don't cache nth-indices of pseudo elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/dom/NthIndexCache.h
diff --git a/Source/core/dom/NthIndexCache.h b/Source/core/dom/NthIndexCache.h
index 99c0ef19bc0493165a73bf57533eba10fb49f6e2..5035b620747bbcae0c9afe894a4f4dd1eac18d01 100644
--- a/Source/core/dom/NthIndexCache.h
+++ b/Source/core/dom/NthIndexCache.h
@@ -56,7 +56,7 @@ private:
inline unsigned NthIndexCache::NthIndexData::nthIndex(Element& element)
{
- if (!m_count)
+ if (!m_count && !element.isPseudoElement())
return cacheNthIndices(element);
unsigned index = 0;
« no previous file with comments | « LayoutTests/fast/css/nth-child-of-pseudo-element-assert-expected.txt ('k') | Source/core/dom/NthIndexCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698