Created attachment 431751 [details]
Created attachment 431752 [details]
Yay! WPT progressons!
..and some real regressions.
The issue with precise, location based hit testing is that with (un-snapped) sub pixel positioning, we miss content between the snap points e.g.
hit test location [100px, 100px]
renderer's layout location [100.1px, 100px]
renderer's painted location after pixel-spanning [100px, 100px]
^^ hit testing should find this renderer as the hit test location matches the renderer's visual location.
This works with ToT as we enlarge the hit testing area by [1px, 1px] (which is certainly a bug on non-1px displays, and this patch is addressing it), but since the input coords to the hit test intersect (see LegacyInlineTextBox::nodeAtPoint) are not pixel snapped, the non-enlarge, point based hit testing will miss content on sub pixel positions (100 vs 100.1)
Now we either pixelsnap the renderer location and use this snapped position as input to hittest intersecting (this would match our painting approach) or
go back to area based hit testing and enlarge the hit test location by 1/scale factor (1px, 0.5px 0.33px etc) -this lacks directionality and may produce incorrect results for rtl content (which the current 1px enlarging has as well).
Created attachment 432113 [details]
Comment on attachment 432113 [details]
will add a test case
Created attachment 432129 [details]
Committed r279220 (239106@main): <https://commits.webkit.org/239106@main>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 432129 [details].