RESOLVED FIXED Bug 139568
WK1: Need new SPI for Webkit clients to override default immediate action
https://bugs.webkit.org/show_bug.cgi?id=139568
Summary WK1: Need new SPI for Webkit clients to override default immediate action
Beth Dakin
Reported 2014-12-11 16:46:01 PST
WK1: Need new SPI for Webkit clients to override default immediate action rdar://problem/19225448
Attachments
Patch (4.48 KB, patch)
2014-12-11 17:22 PST, Beth Dakin
mitz: review+
Follow-up: fix a leak (1.62 KB, patch)
2014-12-11 17:59 PST, mitz
mitz: review+
Beth Dakin
Comment 1 2014-12-11 17:22:42 PST
WebKit Commit Bot
Comment 2 2014-12-11 17:25:23 PST
Attachment 243166 [details] did not pass style-queue: ERROR: Source/WebKit/mac/WebView/WebImmediateActionController.mm:146: The parameter name "]" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 3 2014-12-11 17:32:17 PST
Comment on attachment 243166 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243166&action=review > Source/WebKit/mac/WebView/WebImmediateActionController.mm:140 > + defaultAnimationController = (id<NSImmediateActionAnimationController>)qlPreviewLinkItem.get(); Missing space between id and < > Source/WebKit/mac/WebView/WebImmediateActionController.mm:145 > + WebElementDictionary *webHitTestResult = [[[WebElementDictionary alloc] initWithHitTestResult:_hitTestResult] autorelease]; We should only make this object if we need it (i.e. if the delegate responds to the selector).
mitz
Comment 4 2014-12-11 17:33:28 PST
Comment on attachment 243166 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243166&action=review >> Source/WebKit/mac/WebView/WebImmediateActionController.mm:145 >> + WebElementDictionary *webHitTestResult = [[[WebElementDictionary alloc] initWithHitTestResult:_hitTestResult] autorelease]; > > We should only make this object if we need it (i.e. if the delegate responds to the selector). Oh, and instead of autorelease we should RetainPtr it!
Beth Dakin
Comment 5 2014-12-11 17:48:47 PST
Thank you!! I addressed all of the comments. http://trac.webkit.org/changeset/177199
mitz
Comment 6 2014-12-11 17:59:13 PST
Created attachment 243169 [details] Follow-up: fix a leak
mitz
Comment 7 2014-12-11 18:00:32 PST
(In reply to comment #5) > Thank you!! I addressed all of the comments. > > http://trac.webkit.org/changeset/177199 My RetainPtr advice led to a leak. Please review the fix in attachment 243169 [details].
mitz
Comment 8 2014-12-11 18:14:57 PST
Comment on attachment 243169 [details] Follow-up: fix a leak Anders reviewed this.
mitz
Comment 9 2014-12-11 18:16:01 PST
Note You need to log in before you can comment on or make changes to this bug.