Bug 194373

Summary: [iOS] [WK2] Modernize autocorrection context code
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: HTML EditingAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, dbates, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 194397    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Actually fix non-iOS builds
thorton: review+
Patch for EWS none

Wenson Hsieh
Reported 2019-02-06 20:17:40 PST
- Use Delayed instead of LegacySync. - Package all the autocorrection context info into a single struct, and encode/decode the struct over IPC.
Attachments
Patch (25.19 KB, patch)
2019-02-06 20:29 PST, Wenson Hsieh
no flags
Patch (27.05 KB, patch)
2019-02-06 20:39 PST, Wenson Hsieh
no flags
Patch (27.05 KB, patch)
2019-02-07 07:52 PST, Wenson Hsieh
no flags
Actually fix non-iOS builds (27.17 KB, patch)
2019-02-07 09:28 PST, Wenson Hsieh
thorton: review+
Patch for EWS (27.37 KB, patch)
2019-02-07 13:40 PST, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2019-02-06 20:29:02 PST
Wenson Hsieh
Comment 2 2019-02-06 20:39:53 PST
Wenson Hsieh
Comment 3 2019-02-07 07:52:20 PST
Wenson Hsieh
Comment 4 2019-02-07 09:28:07 PST
Created attachment 361405 [details] Actually fix non-iOS builds
Tim Horton
Comment 5 2019-02-07 12:17:16 PST
Comment on attachment 361405 [details] Actually fix non-iOS builds View in context: https://bugs.webkit.org/attachment.cgi?id=361405&action=review > Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:581 > +WebAutocorrectionContext WebPageProxy::getAutocorrectionContext() Why "get"?
Wenson Hsieh
Comment 6 2019-02-07 13:02:53 PST
Comment on attachment 361405 [details] Actually fix non-iOS builds View in context: https://bugs.webkit.org/attachment.cgi?id=361405&action=review >> Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:581 >> +WebAutocorrectionContext WebPageProxy::getAutocorrectionContext() > > Why "get"? Only because it was already "get" before! (not a good reason :P) I'll rename it to autocorrectionContextSync().
Wenson Hsieh
Comment 7 2019-02-07 13:40:51 PST
Created attachment 361439 [details] Patch for EWS
WebKit Commit Bot
Comment 8 2019-02-07 14:57:04 PST
Comment on attachment 361439 [details] Patch for EWS Clearing flags on attachment: 361439 Committed r241146: <https://trac.webkit.org/changeset/241146>
Daniel Bates
Comment 9 2019-02-08 20:17:06 PST
Comment on attachment 361439 [details] Patch for EWS View in context: https://bugs.webkit.org/attachment.cgi?id=361439&action=review > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3398 > + if (!completionHandler) > + return; Why?!
Daniel Bates
Comment 10 2019-02-08 20:19:40 PST
Comment on attachment 361439 [details] Patch for EWS View in context: https://bugs.webkit.org/attachment.cgi?id=361439&action=review > Source/WebKit/Shared/ios/WebAutocorrectionContext.h:85 > + return {{ WTFMove(*contextBefore), WTFMove(*markedText), WTFMove(*selectedText), WTFMove(*contextAfter), WTFMove(*location), WTFMove(*length) }}; I really do not like this style....were just playing games. Just decode into the struct.
Daniel Bates
Comment 11 2019-02-08 20:21:01 PST
Comment on attachment 361439 [details] Patch for EWS View in context: https://bugs.webkit.org/attachment.cgi?id=361439&action=review >> Source/WebKit/Shared/ios/WebAutocorrectionContext.h:85 >> + return {{ WTFMove(*contextBefore), WTFMove(*markedText), WTFMove(*selectedText), WTFMove(*contextAfter), WTFMove(*location), WTFMove(*length) }}; > > I really do not like this style....were just playing games. Just decode into the struct. #WTFMoveEverything <- why?
Daniel Bates
Comment 12 2019-02-08 20:33:41 PST
Into radar because it trampled over my work.
Radar WebKit Bug Importer
Comment 13 2019-02-08 20:34:00 PST
Daniel Bates
Comment 14 2019-02-08 22:44:07 PST
Comment on attachment 361439 [details] Patch for EWS View in context: https://bugs.webkit.org/attachment.cgi?id=361439&action=review >> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:3398 >> + return; > > Why?! This seems to me to be illogical. Like hell freezes over logical. See bug 194397, comment 8 for more details.
Note You need to log in before you can comment on or make changes to this bug.