<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement keyboard event sending for iOS in WebKitTestRunner"
href="https://bugs.webkit.org/show_bug.cgi?id=149676#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement keyboard event sending for iOS in WebKitTestRunner"
href="https://bugs.webkit.org/show_bug.cgi?id=149676">bug 149676</a>
from <span class="vcard"><a class="email" href="mailto:wenson_hsieh@apple.com" title="Wenson Hsieh <wenson_hsieh@apple.com>"> <span class="fn">Wenson Hsieh</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=262196&action=diff" name="attach_262196" title="Patch">attachment 262196</a> <a href="attachment.cgi?id=262196&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=262196&action=review">https://bugs.webkit.org/attachment.cgi?id=262196&action=review</a>
Thanks for taking a look! I'll address the comments and get the bots to build (looks like I need to link against the HID usage tables). I'll have a new patch up soon.
<span class="quote">>> Tools/WebKitTestRunner/ios/HIDEventGenerator.h:54
>> +- (void)keyDown:(NSString*)character completionBlock:(void (^)(void))completionBlock;
>
> space before the star.</span >
Got it, I'll change this.
<span class="quote">>> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:443
>> + if ([key length] != 1)
>
> dot?</span >
Got it. I'll use dot for accessing properties from now on.
<span class="quote">>> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:481
>> + if ([key length] == 1) {
>
> dot.</span >
Will fix!
<span class="quote">>> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:495
>> + case '`':
>
> Is there really nothing in the system that can do this for us (even if it's SPI?).</span >
I found nothing that could convert the non-alphanums (!@#$%, etc.) to their respective usage keys :(
<span class="quote">>> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:98
>> + TestRunnerWKWebView* webView = TestController::singleton().mainWebView()->platformView();
>
> star's on the wrong side</span >
Will fix!
<span class="quote">>> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:100
>> + NSString* characterAsNSString = [[NSString stringWithCString:toSTD(toWK(character)).c_str()] autorelease];
>
> I'm sure there's a better way to get a NSString from a WKString. Going through std::string is crazy. At the very least, use WKStringGetUTF8CString instead of std::string::c_str(), no?
>
> Also, star.</span >
I'll look for a cleaner way to do this.
Also, will fix the star.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>