[Webkit-unassigned] [Bug 149676] Implement keyboard event sending for iOS in WebKitTestRunner
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 30 16:28:01 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=149676
Simon Fraser (smfr) <simon.fraser at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #262196|review? |review-
Flags| |
--- Comment #5 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 262196
--> https://bugs.webkit.org/attachment.cgi?id=262196
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=262196&action=review
> Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl:38
> + void typeCharacter(DOMString character, object callback);
This should be named to make it clear whether it's a hardware keyboard event, or a software keyboard event.
> Tools/WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl:39
> +
It may make sense to add callback properties for keyboard hide/show.
> Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp:88
> +#if PLATFORM(IOS)
> +void UIScriptController::setDidShowKeyboardCallback(JSValueRef callback)
> +{
> + m_didShowKeyboardCallback = m_context.registerCallback(callback);
> + platformSetDidShowKeyboardCallback();
> +}
> +
> +JSValueRef UIScriptController::didShowKeyboardCallback() const
> +{
> + return m_context.callbackWithID(m_didShowKeyboardCallback);
> +}
> +#endif
This should go in UIScriptControllerIOS.mm
> Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp:103
> +void typeCharacter(JSStringRef, JSValueRef)
UIScriptController::
> Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h:62
> +#if PLATFORM(IOS)
> + void setDidShowKeyboardCallback(JSValueRef);
> + JSValueRef didShowKeyboardCallback() const;
> +#endif
I've avoided #idfefs here, and just stubbed the functions out for non-iOS.
> Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h:79
> +#if PLATFORM(IOS)
> + void platformSetDidShowKeyboardCallback();
> +#endif
Ditto.
> Tools/WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:66
> + _keyboardMayAcceptKeyInput = NO;
The name of this property is confusing. Is it really _keyboardIsVisible?
> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:139
> + [self _sendHIDEvent:IOHIDEventCreateKeyboardEvent(kCFAllocatorDefault,
> + timestamp,
> + kHIDPage_KeyboardOrKeypad,
> + usage,
> + isKeyDown,
> + kIOHIDEventOptionNone)];
You're leaking the event.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150930/158f2cdd/attachment.html>
More information about the webkit-unassigned
mailing list