Bug 223563

Summary: [iOS] Composition text is not initially highlighted when typing in text fields using Pinyin keyboard
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, koivisto, mifenton, rniwa, thorton, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
koivisto: review+
Alternate approach koivisto: review+, ews-feeder: commit-queue-

Wenson Hsieh
Reported 2021-03-21 10:23:29 PDT
Attachments
Patch (13.58 KB, patch)
2021-03-21 11:00 PDT, Wenson Hsieh
no flags
Patch (10.44 KB, patch)
2021-03-21 23:49 PDT, Wenson Hsieh
no flags
Patch (13.13 KB, patch)
2021-03-21 23:58 PDT, Wenson Hsieh
koivisto: review+
Alternate approach (6.00 KB, patch)
2021-03-22 09:04 PDT, Wenson Hsieh
koivisto: review+
ews-feeder: commit-queue-
Wenson Hsieh
Comment 1 2021-03-21 11:00:46 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 2 2021-03-21 23:49:17 PDT Comment hidden (obsolete)
Wenson Hsieh
Comment 3 2021-03-21 23:58:26 PDT
zalan
Comment 4 2021-03-22 08:24:22 PDT
The line layout integration part is r+ (don't know enough about editing to give educated review on the other part)
Wenson Hsieh
Comment 5 2021-03-22 09:04:07 PDT
Created attachment 423893 [details] Alternate approach
Wenson Hsieh
Comment 6 2021-03-22 09:12:18 PDT
(In reply to zalan from comment #4) > The line layout integration part is r+ (don't know enough about editing to > give educated review on the other part) The editing part of that patch is the part I'm iffy about too; the problem is that layout code would need to somehow know what text node the typing command is going to create or modify before the first layout pass after inserting that node, which would either intricate plumbing through edit commands, or something like this where we try and figure out where we're inserting the text ahead of time. I uploaded an alternative approach to fixing this that's more similar to how macOS works (i.e. calling into ensureLineBoxes() instead of adding layout integration avoidance). Let's see what people think!
Antti Koivisto
Comment 7 2021-03-22 09:34:54 PDT
I think both approaches are fine. The ensureLineBoxes one is the minimal fix and might be appropriate for the branch.
EWS
Comment 8 2021-03-22 13:26:18 PDT
commit-queue failed to commit attachment 423893 [details] to WebKit repository. To retry, please set cq+ flag again.
Wenson Hsieh
Comment 9 2021-03-22 14:00:49 PDT
Note You need to log in before you can comment on or make changes to this bug.