Bug 137903 - Use synchronous messages for keyEvent on iOS
Summary: Use synchronous messages for keyEvent on iOS
Status: CLOSED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-20 17:38 PDT by Enrica Casucci
Modified: 2014-10-23 10:18 PDT (History)
1 user (show)

See Also:


Attachments
Patch (7.64 KB, patch)
2014-10-20 17:46 PDT, Enrica Casucci
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-10-20 17:38:44 PDT
Given then synchronous nature of the iOS keyboard, we need to have key event messages that are synchronous.
Comment 1 Enrica Casucci 2014-10-20 17:46:15 PDT
Created attachment 240164 [details]
Patch
Comment 2 Alexey Proskuryakov 2014-10-20 22:59:07 PDT
Comment on attachment 240164 [details]
Patch

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

Oh noes :(

> Source/WebKit2/UIProcess/WebPageProxy.cpp:1582
> +void WebPageProxy::handleKeyboardEvent(const NativeWebKeyboardEvent& event, bool useSynchronousMessage)

Can this be made into an entirely separate code path? This code is so complicated that mixing sync and async code paths seems very confusing.

Or at the very least, the argument should be named, not a cryptic "true/false".
Comment 3 Enrica Casucci 2014-10-21 11:26:13 PDT
Comment on attachment 240164 [details]
Patch

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

>> Source/WebKit2/UIProcess/WebPageProxy.cpp:1582
>> +void WebPageProxy::handleKeyboardEvent(const NativeWebKeyboardEvent& event, bool useSynchronousMessage)
> 
> Can this be made into an entirely separate code path? This code is so complicated that mixing sync and async code paths seems very confusing.
> 
> Or at the very least, the argument should be named, not a cryptic "true/false".

I don't think the code is that complicated and I did not want any duplication. The function has a default value of false, so all the other call sites don't even need to know about this parameter.
The only place where this is used is in WKContentViewInteraction where it is passed [self useSynchronousKeyEvent], which is pretty clear.
Comment 4 Alexey Proskuryakov 2014-10-22 20:05:12 PDT
Comment on attachment 240164 [details]
Patch

Having discussed this in person, we'd like to try a different approach.
Comment 5 Enrica Casucci 2014-10-23 10:17:51 PDT
We opted for a different solution to the problem. We are not going to pursue this.