Consider merging https://chromium.googlesource.com/chromium/blink/+/1b5e6d8d09e59fb25df0319e48af4fb05493856a In TreeScope::elementFromPoint, - nodeFromPoint can return a Text node which is a child of a ShadowRoot. We should search ancestors of the ShadowRoot in this case. - ancestorInThisScope returns this ShadowRoot if |this| is passed. We should handle such case.
I don't think the problem happens in WebKit because of no Shadow DOM API.
We should check if this is still broken or not.
<rdar://problem/26153844>
Fixed in https://bugs.webkit.org/show_bug.cgi?id=162882 instead.