Index: Source/core/css/SelectorChecker.cpp |
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp |
index aa0a7f07436cc63b52f95a02a41a3823b0ba2d82..b44c9fde41da1a34b110f9c53b6dfdd1e77c4e75 100644 |
--- a/Source/core/css/SelectorChecker.cpp |
+++ b/Source/core/css/SelectorChecker.cpp |
@@ -498,7 +498,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib |
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); |
@@ -532,7 +532,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib |
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; |
} |