See http://w3c-test.org/dom/events/relatedTarget.window.html and https://github.com/whatwg/dom/pull/585 for all the algorithm changes (it's a big change).
<rdar://problem/38975037>
Created attachment 350304 [details] WIP I started writing a patch but I'm getting confused about what the intended behavior change is. Perhaps what we're trying to do is to set target/related target to null if the event path stopped inside a shadow tree?
Mass move bugs into the DOM component.
*** This bug has been marked as a duplicate of bug 218638 ***