| Index: third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| index b7b72b8f4f9f5b7eefbd57ba33144125439dc7a5..64707e75a5b5a26443738d5c541f20682e1d6e10 100644
|
| --- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
|
| @@ -429,6 +429,14 @@ Element* TreeScope::adjustedFocusedElement() const
|
| if (!element)
|
| return nullptr;
|
|
|
| + if (rootNode().isInV1ShadowTree()) {
|
| + if (Node* retargeted = rootNode().retarget(*element)) {
|
| + DCHECK(retargeted->isElementNode());
|
| + return this == &retargeted->treeScope() ? toElement(retargeted) : nullptr;
|
| + }
|
| + return nullptr;
|
| + }
|
| +
|
| RawPtr<EventPath> eventPath = new EventPath(*element);
|
| for (size_t i = 0; i < eventPath->size(); ++i) {
|
| if (eventPath->at(i).node() == rootNode()) {
|
|
|