| Index: third_party/WebKit/Source/core/dom/Element.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
|
| index 63df73dbe813f155d403d0174a7531425355644e..01a385244cef9f89959ddb6147550717ced2ce3a 100644
|
| --- a/third_party/WebKit/Source/core/dom/Element.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
| @@ -2364,12 +2364,12 @@ void Element::focus(const FocusParams& params)
|
| return;
|
|
|
| if (authorShadowRoot() && authorShadowRoot()->delegatesFocus()) {
|
| - if (containsIncludingShadowDOM(document().focusedElement()))
|
| + if (isShadowIncludingInclusiveAncestorOf(document().focusedElement()))
|
| return;
|
|
|
| // Slide the focus to its inner node.
|
| Element* found = document().page()->focusController().findFocusableElementInShadowHost(*this);
|
| - if (found && containsIncludingShadowDOM(found)) {
|
| + if (found && isShadowIncludingInclusiveAncestorOf(found)) {
|
| found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTypeForward, nullptr));
|
| return;
|
| }
|
|
|