Bug 134512

Summary: AX: [iOS WebKit2] Support for Speak selection
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, gyuyoung.kim, mark.lam, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch darin: review+

chris fleizach
Reported 2014-07-01 14:32:22 PDT
WebKit2 needs support for speak selection <rdar://problem/15212005>
Attachments
patch (1.80 KB, patch)
2014-07-01 14:46 PDT, chris fleizach
darin: review+
chris fleizach
Comment 1 2014-07-01 14:46:44 PDT
Darin Adler
Comment 2 2014-07-01 14:51:14 PDT
Comment on attachment 234199 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=234199&action=review > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1371 > + _page->getSelectionOrContentsAsString([self](const String& string, CallbackBase::Error error) { > + if (error != CallbackBase::Error::None) > + return; > + if ([self respondsToSelector:@selector(accessibilitySpeakSelectionSetContent:)]) > + [self accessibilitySpeakSelectionSetContent:string]; > + }); Is there a guarantee we won’t get the callback after self is deallocated? Do we need to retain/release self? > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1372 > + Stray blank line.
chris fleizach
Comment 3 2014-07-01 15:02:50 PDT
(In reply to comment #2) > (From update of attachment 234199 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=234199&action=review > > > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1371 > > + _page->getSelectionOrContentsAsString([self](const String& string, CallbackBase::Error error) { > > + if (error != CallbackBase::Error::None) > > + return; > > + if ([self respondsToSelector:@selector(accessibilitySpeakSelectionSetContent:)]) > > + [self accessibilitySpeakSelectionSetContent:string]; > > + }); > > Is there a guarantee we won’t get the callback after self is deallocated? Do we need to retain/release self? This is basically what define: does as well, so if that case is safe so will this one. Maybe someone else is able to speak to whether the connection callback blocks are torn down safely when WKContentView goes away... > > > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:1372 > > + > > Stray blank line. Thanks!
chris fleizach
Comment 4 2014-07-01 15:26:00 PDT
Note You need to log in before you can comment on or make changes to this bug.