Index: third_party/WebKit/Source/core/input/EventHandler.cpp |
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp |
index e3cfaf7cb01c70fbe6631718c17cf2e5526dab3c..3ad850980c8e4edbe0bf03f07a13de13f584d58d 100644 |
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
@@ -394,7 +394,7 @@ WebInputEventResult EventHandler::toWebInputEventResult( |
void EventHandler::nodeWillBeRemoved(Node& nodeToBeRemoved) |
{ |
- if (nodeToBeRemoved.containsIncludingShadowDOM(m_clickNode.get())) { |
+ if (nodeToBeRemoved.isShadowIncludingInclusiveAncestorOf(m_clickNode.get())) { |
// We don't dispatch click events if the mousedown node is removed |
// before a mouseup event. It is compatible with IE and Firefox. |
m_clickNode = nullptr; |
@@ -1783,7 +1783,7 @@ bool EventHandler::slideFocusOnShadowHostIfNecessary(const Element& element) |
{ |
if (element.authorShadowRoot() && element.authorShadowRoot()->delegatesFocus()) { |
Document* doc = m_frame->document(); |
- if (element.containsIncludingShadowDOM(doc->focusedElement())) { |
+ if (element.isShadowIncludingInclusiveAncestorOf(doc->focusedElement())) { |
// If the inner element is already focused, do nothing. |
return true; |
} |
@@ -1792,7 +1792,7 @@ bool EventHandler::slideFocusOnShadowHostIfNecessary(const Element& element) |
Page* page = m_frame->page(); |
ASSERT(page); |
Element* found = page->focusController().findFocusableElementInShadowHost(element); |
- if (found && element.containsIncludingShadowDOM(found)) { |
+ if (found && element.isShadowIncludingInclusiveAncestorOf(found)) { |
// Use WebFocusTypeForward instead of WebFocusTypeMouse here to mean the focus has slided. |
found->focus(FocusParams(SelectionBehaviorOnFocus::Reset, WebFocusTypeForward, nullptr)); |
return true; |