| Index: Source/core/css/SelectorChecker.cpp
|
| diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
|
| index 3d83e5c8664a5af17b3fc1272c7758be917dca02..5b4798a0735825fc8b2e6e7dc388f97706b96daf 100644
|
| --- a/Source/core/css/SelectorChecker.cpp
|
| +++ b/Source/core/css/SelectorChecker.cpp
|
| @@ -494,8 +494,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
|
| if (!selector->parseNth())
|
| break;
|
| if (Element* parentElement = element->parentElement()) {
|
| - // FIXME: We should always have the index passed in to avoid needing countElementsBefore.
|
| - int count = context.childIndex ? context.childIndex : 1 + siblingTraversalStrategy.countElementsBefore(element);
|
| + int count = 1 + siblingTraversalStrategy.countElementsBefore(element);
|
| if (m_mode == ResolvingStyle) {
|
| RenderStyle* childStyle = context.elementStyle ? context.elementStyle : element->renderStyle();
|
| element->setChildIndex(count);
|
| @@ -528,8 +527,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
|
| parentElement->setChildrenAffectedByBackwardPositionalRules();
|
| if (!parentElement->isFinishedParsingChildren())
|
| return false;
|
| - // FIXME: We should always have the index passed in to avoid needing countElementsAfter.
|
| - int count = context.childIndex ? context.childIndex : 1 + siblingTraversalStrategy.countElementsAfter(element);
|
| + int count = 1 + siblingTraversalStrategy.countElementsAfter(element);
|
| if (selector->matchNth(count))
|
| return true;
|
| }
|
|
|