Bug 227191 - HitTestLocation should not use a fixed (1px, 1px) area for point based hittest
Summary: HitTestLocation should not use a fixed (1px, 1px) area for point based hittest
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on: 227185
Blocks:
  Show dependency treegraph
 
Reported: 2021-06-19 21:21 PDT by zalan
Modified: 2022-06-29 14:23 PDT (History)
31 users (show)

See Also:


Attachments
Patch (36.53 KB, patch)
2021-06-19 21:34 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (41.79 KB, patch)
2021-06-21 14:14 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (43.21 KB, patch)
2021-06-22 12:57 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.