I dealt with this in bug 214179, but it turns out my implementation was flawed. It's possible for a descendent layer to contain a point that its ancestor doesn't, and this occurs very commonly with iframes (but not at all commonly with overflow scrolling). The Mac backend deals with this by just not doing any bounds checking, so we should do the same with nicosia.
Created attachment 415542 [details] Patch
Created attachment 415544 [details] Patch
Committed r270501: <https://trac.webkit.org/changeset/270501> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415544 [details].
<rdar://problem/72042253>