Chromium Code Reviews| Index: Source/core/dom/SelectorQuery.cpp |
| diff --git a/Source/core/dom/SelectorQuery.cpp b/Source/core/dom/SelectorQuery.cpp |
| index 82baa86acad77a30e9c487db255558d39a121fc0..9084ea52bacd56641e4fa258be46b445e294fa3f 100644 |
| --- a/Source/core/dom/SelectorQuery.cpp |
| +++ b/Source/core/dom/SelectorQuery.cpp |
| @@ -67,7 +67,7 @@ public: |
| explicit ClassRootNodeList(Node* rootNode, const AtomicString& className) |
|
haraken
2013/10/07 07:08:49
Nit: 'explicit' is not needed.
tasak
2013/10/07 07:34:34
Done.
|
| : m_className(className) |
| , m_rootNode(rootNode) |
| - , m_currentElement(nextInternal(ElementTraversal::firstWithin(rootNode))) { } |
| + , m_currentElement(nextInternal(rootNode && rootNode->isElementNode() ? toElement(rootNode) : ElementTraversal::firstWithin(rootNode))) { } |
| bool isEmpty() const { return !m_currentElement; } |