Bug 228905

Summary: ComplexTextController should add runs' initial advances to the previous glyph, not the current glyph
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED WONTFIX    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 228180    
Attachments:
Description Flags
WIP
none
Patch ews-feeder: commit-queue-

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.