Summary: | [IFC][Integration] Text selection flashing to end of paragraph | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | bfulgham, changseok, esprehn+autocc, ews-watchlist, glenn, koivisto, kondapallykalyan, pdr, simon.fraser, zalan | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
zalan
2021-06-17 20:42:08 PDT
Created attachment 431752 [details]
Patch
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]
Patch
Comment on attachment 432113 [details]
Patch
will add a test case
Created attachment 432129 [details]
Patch
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]. |