Bug 227191

Summary: HitTestLocation should not use a fixed (1px, 1px) area for point based hittest
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED INVALID    
Severity: Normal CC: aboxhall, apinheiro, bfulgham, cdumez, cfleizach, changseok, dino, dmazzoni, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, jcraig, jdiggs, jer.noble, kangil.han, kondapallykalyan, mifenton, pdr, philipj, sabouhallawa, samuel_white, sam, schenney, sergio, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 227185    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description zalan 2021-06-19 21:21:00 PDT
at least it should be based on the device scale factor
Comment 1 zalan 2021-06-19 21:34:31 PDT
Created attachment 431812 [details]
Patch
Comment 2 Sam Weinig 2021-06-20 13:16:05 PDT
Comment on attachment 431812 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=431812&action=review

> Source/WebCore/ChangeLog:16
> +        Eventually the input to HitTestLocation::intersect should be a device pixel snapped rect similar to painting.

What makes doing this now difficult?
Comment 3 Sam Weinig 2021-06-20 13:16:46 PDT
Comment on attachment 431812 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=431812&action=review

> Source/WebCore/ChangeLog:12
> +        This is an intermediate solution to support hit-test content on subpixel position.
> +        It fixes cases when we incorrectly find renderers on subpixel positions due to the integral inflate of the hit coverage area.
> +        e.g
> +          hit testing location is at [10, 10]
> +          renderer is at [10.6, 10] -> device pixel snapped to [11p, 10] on a 2x display

Seems like we should have some tests for this.
Comment 4 zalan 2021-06-21 14:14:26 PDT
Created attachment 431907 [details]
Patch
Comment 5 zalan 2021-06-22 12:57:50 PDT
Created attachment 431986 [details]
Patch
Comment 6 Radar WebKit Bug Importer 2021-06-26 21:21:19 PDT
<rdar://problem/79824597>
Comment 7 Brent Fulgham 2022-06-29 14:23:22 PDT
Alan ended up landing a more targeted fix. This change is no longer needed.