Bug 228905 - ComplexTextController should add runs' initial advances to the previous glyph, not the current glyph
Summary: ComplexTextController should add runs' initial advances to the previous glyph...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords:
Depends on:
Blocks: 228180
  Show dependency treegraph
 
Reported: 2021-08-08 16:37 PDT by Myles C. Maxfield
Modified: 2021-08-09 16:35 PDT (History)
0 users

See Also:


Attachments
WIP (10.20 KB, patch)
2021-08-08 16:38 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (15.13 KB, patch)
2021-08-08 19:01 PDT, Myles C. Maxfield
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2021-08-08 16:37:30 PDT
ComplexTextController should add runs' initial advances to the previous glyph, not the current glyph
Comment 1 Myles C. Maxfield 2021-08-08 16:38:07 PDT
Created attachment 435160 [details]
WIP
Comment 2 Myles C. Maxfield 2021-08-08 19:01:27 PDT
Created attachment 435161 [details]
Patch
Comment 3 Myles C. Maxfield 2021-08-08 20:34:09 PDT
Looks like fast/text/initial-advance-selected-text.html is failing. We may actually need https://bugs.webkit.org/show_bug.cgi?id=228180.
Comment 4 Myles C. Maxfield 2021-08-08 20:44:11 PDT
Comment on attachment 435161 [details]
Patch

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

> Source/WebCore/ChangeLog:32
> +                in first run)                                     

Whitespace
Comment 5 Myles C. Maxfield 2021-08-08 20:59:46 PDT
Right, it looks like CTRunGetInitialBaseAdvance() fixes this.
Comment 6 Myles C. Maxfield 2021-08-08 21:18:26 PDT
So it looks like both changes have to be made in tandem:

1. Initial advances get added to the previous glyph's advance, not the current glyph's advance
2. The initial advance points to the first glyph's pen position, not to its paint position
Comment 7 Myles C. Maxfield 2021-08-09 16:35:41 PDT
Let's not do this. Let's instead just delete the complex text codepath.