| Summary: | [iOS] Dictation text that contains emojis is inserted twice upon finalization | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||
| Component: | HTML Editing | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | akeerthi, cdumez, hi, katherine_cheney, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | 239467 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
|
Description
Wenson Hsieh
2022-04-19 10:38:46 PDT
Created attachment 457924 [details]
Patch
Comment on attachment 457924 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=457924&action=review > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2406 > + for (size_t i = 0; i < numGraphemeClusters(oldText); ++i) Shouldn't we cache numGraphemeClusters(oldText) before the loop? Or is oldText changing as we iterate? (In reply to Chris Dumez from comment #2) > Comment on attachment 457924 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=457924&action=review > > > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:2406 > > + for (size_t i = 0; i < numGraphemeClusters(oldText); ++i) > > Shouldn't we cache numGraphemeClusters(oldText) before the loop? Or is > oldText changing as we iterate? Good catch! `oldText` isn't changing, so we should pull this out into a local variable. I'll fix this before landing. Created attachment 457938 [details]
Address comment
Committed r293051 (249786@main): <https://commits.webkit.org/249786@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 457938 [details]. |