WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
93979
[WK2] Implement eventSender.scheduleAsynchronousKeyDown
https://bugs.webkit.org/show_bug.cgi?id=93979
Summary
[WK2] Implement eventSender.scheduleAsynchronousKeyDown
Sergio Villar Senin
Reported
2012-08-14 09:32:25 PDT
Needed by: fast/mutation/end-of-task-delivery.html
Attachments
Patch
(10.03 KB, patch)
2013-01-01 05:27 PST
,
Chris Dumez
benjamin
: review-
Details
Formatted Diff
Diff
Patch
(13.09 KB, patch)
2013-01-09 01:04 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2013-01-01 05:27:26 PST
Created
attachment 180989
[details]
Patch
Benjamin Poulain
Comment 2
2013-01-08 17:56:53 PST
Comment on
attachment 180989
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180989&action=review
The patch looks good. Some nitpick:
> Tools/ChangeLog:14 > + (WTR):
You can remove this.
> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:269 > + return EventSenderMessageBody.leakRef();
I think it would be reasonable to return a WKRetainPtr here to avoid accidents if someone forgets to use Adopt.
> Tools/WebKitTestRunner/TestController.cpp:800 > + WKRetainPtr<WKStringRef> keyKey = adoptWK(WKStringCreateWithUTF8CString("Key")); > + WKStringRef key = static_cast<WKStringRef>(WKDictionaryGetItemForKey(messageBodyDictionary, keyKey.get())); > + > + WKRetainPtr<WKStringRef> modifiersKey = adoptWK(WKStringCreateWithUTF8CString("Modifiers")); > + WKEventModifiers modifiers = static_cast<WKEventModifiers>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, modifiersKey.get())))); > + > + WKRetainPtr<WKStringRef> locationKey = adoptWK(WKStringCreateWithUTF8CString("Location")); > + unsigned location = static_cast<unsigned>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, locationKey.get())))); > + > + // Forward to WebProcess > + WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false); > + m_eventSenderProxy->keyDown(key, modifiers, location); > + > + return;
This is duplicated code from the synchronous message handler. Please refactor to make a common path as much as possible.
Chris Dumez
Comment 3
2013-01-09 01:04:55 PST
Created
attachment 181870
[details]
Patch Take Benjamin's feedback into consideration.
Benjamin Poulain
Comment 4
2013-01-09 14:21:29 PST
Comment on
attachment 181870
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=181870&action=review
Looks good. One comment but it is not blocking:
> Tools/WebKitTestRunner/TestController.cpp:815 > + didReceiveKeyDownMessageFromInjectedBundle(messageBodyDictionary, false);
You can avoid this kind of code by using a enum instead of a boolean didReceiveKeyDownMessageFromInjectedBundle(messageBodyDictionary, SendSynchronously); didReceiveKeyDownMessageFromInjectedBundle(messageBodyDictionary, SendAsynchronously);
WebKit Review Bot
Comment 5
2013-01-09 14:38:11 PST
Comment on
attachment 181870
[details]
Patch Clearing flags on attachment: 181870 Committed
r139242
: <
http://trac.webkit.org/changeset/139242
>
WebKit Review Bot
Comment 6
2013-01-09 14:38:16 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug