| Index: third_party/WebKit/Source/core/dom/SelectorQuery.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
|
| index 52d3fdb35f245d0efa6996c191c4f893c12b6914..76151d5b7a6e76c76c574bdb5273c2663968327e 100644
|
| --- a/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/SelectorQuery.cpp
|
| @@ -261,7 +261,7 @@ void SelectorDataList::findTraverseRootsAndExecute(ContainerNode& rootNode, type
|
| bool startFromParent = false;
|
|
|
| for (const CSSSelector* selector = m_selectors[0]; selector; selector = selector->tagHistory()) {
|
| - if (selector->match() == CSSSelector::Id && !rootNode.document().containsMultipleElementsWithId(selector->value())) {
|
| + if (selector->match() == CSSSelector::Id && !rootNode.treeScope().containsMultipleElementsWithId(selector->value())) {
|
| Element* element = rootNode.treeScope().getElementById(selector->value());
|
| ContainerNode* adjustedNode = &rootNode;
|
| if (element && (isTreeScopeRoot(rootNode) || element->isDescendantOf(&rootNode)))
|
|
|