Summary: | [iOS WK2] Web Automation: implement platform methods for simulating keyboard events | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | BJ Burg <bburg> | ||||
Component: | WebKit2 | Assignee: | BJ Burg <bburg> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, joepeck, webkit-bug-importer, wenson_hsieh | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
BJ Burg
2017-03-10 15:27:48 PST
Created attachment 304264 [details]
Patch
Comment on attachment 304264 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304264&action=review > Source/WebKit2/UIProcess/Automation/WebAutomationSession.h:175 > +#if PLATFORM(MAC) || PLATFORM(IOS) This is what PLATFORM(COCOA) is for Comment on attachment 304264 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304264&action=review r=me > Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:936 > +#if !PLATFORM(MAC) && !PLATFORM(IOS) This could be !PLATFORM(COCOA) > Source/WebKit2/UIProcess/Automation/WebAutomationSession.h:226 > + // We don't platform keyboard events on iOS, so we need to track it ourselves. Grammar: "We don't platform keyboard" is missing a word somewhere. > Source/WebKit2/UIProcess/Automation/WebAutomationSession.h:227 > + unsigned m_currentModifiers; Initialize this to { 0 }. > Source/WebKit2/UIProcess/Automation/ios/WebAutomationSessionIOS.mm:111 > + return; This should be break, not return. > Source/WebKit2/UIProcess/Automation/ios/WebAutomationSessionIOS.mm:270 > + [eventsToBeSent addObject:[[::WebEvent alloc] initWithKeyEventType:WebEventKeyDown timeStamp:CFAbsoluteTimeGetCurrent() characters:characters charactersIgnoringModifiers:characters modifiers:m_currentModifiers isRepeating:NO withFlags:inputFlags withInputManagerHint:nil keyCode:keyCode isTabKey:isTabKey]]; I suspect this code is not under ARC (you are using a RetainPtr above). So all of these [::WebEvent alloc] allocated objects in this patch should be autoreleased when put into the eventsToBeSent array. Committed r214070: <http://trac.webkit.org/changeset/214070> |