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).
Created attachment 350304 [details]
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.