| Index: Source/core/dom/NthIndexCache.h
|
| diff --git a/Source/core/dom/NthIndexCache.h b/Source/core/dom/NthIndexCache.h
|
| index 99c0ef19bc0493165a73bf57533eba10fb49f6e2..19923a06c51693bd33ed9fa45812f0bfe8817466 100644
|
| --- a/Source/core/dom/NthIndexCache.h
|
| +++ b/Source/core/dom/NthIndexCache.h
|
| @@ -56,6 +56,8 @@ private:
|
|
|
| inline unsigned NthIndexCache::NthIndexData::nthIndex(Element& element)
|
| {
|
| + if (element.isPseudoElement())
|
| + return 1;
|
| if (!m_count)
|
| return cacheNthIndices(element);
|
|
|
| @@ -70,6 +72,8 @@ inline unsigned NthIndexCache::NthIndexData::nthIndex(Element& element)
|
|
|
| inline unsigned NthIndexCache::NthIndexData::nthLastIndex(Element& element)
|
| {
|
| + if (element.isPseudoElement())
|
| + return 1;
|
| unsigned index = nthIndex(element);
|
| return m_count - index + 1;
|
| }
|
|
|