Chromium Code Reviews| 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..91aed04c30530abb954ca7f2ba82a1cb2c5eced0 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()); |
|
kochi
2016/04/08 01:23:58
nit: unnecessary space
hayato
2016/04/08 04:46:28
Done
|
| + 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()) { |