Summary: | WK1: Need new SPI for Webkit clients to override default immediate action | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Beth Dakin <bdakin> | ||||||
Component: | WebKit API | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, bdakin, commit-queue, eric.carlson, glenn, jer.noble, mitz, philipj, sergio, thorton | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Beth Dakin
2014-12-11 16:46:01 PST
Created attachment 243166 [details]
Patch
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.
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). 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! Thank you!! I addressed all of the comments. http://trac.webkit.org/changeset/177199 Created attachment 243169 [details]
Follow-up: fix a leak
(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]. Comment on attachment 243169 [details]
Follow-up: fix a leak
Anders reviewed this.
Fixed the leak in http://trac.webkit.org/changeset/177201 |