NEW 139564
WK2: Need new SPI for Webkit clients to override default immediate action
https://bugs.webkit.org/show_bug.cgi?id=139564
Summary WK2: Need new SPI for Webkit clients to override default immediate action
Beth Dakin
Reported 2014-12-11 15:07:52 PST
WK2: Need new SPI for Webkit clients to override default immediate action rdar://problem/19225448
Attachments
Patch (8.18 KB, patch)
2014-12-11 15:15 PST, Beth Dakin
no flags
Patch (8.48 KB, patch)
2014-12-11 15:28 PST, Beth Dakin
thorton: review+
Beth Dakin
Comment 1 2014-12-11 15:15:55 PST
Beth Dakin
Comment 2 2014-12-11 15:28:25 PST
WebKit Commit Bot
Comment 3 2014-12-11 15:29:27 PST
Attachment 243156 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm:200: An else if statement should be written as an if statement when the prior "if" concludes with a return, break, continue or goto statement. [readability/control_flow] [4] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 4 2014-12-11 15:30:20 PST
Comment on attachment 243156 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243156&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h:129 > +// do something custom, return an id that conforms to the NSImmediateActionAnimationController protocol. "an object" instead of "an id", maybe. > Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm:201 > + else if (customClientAnimationController && [customClientAnimationController conformsToProtocol:@protocol(NSImmediateActionAnimationController)]) No need for the else if because of the return.
Tim Horton
Comment 5 2014-12-11 15:31:10 PST
Comment on attachment 243156 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243156&action=review > Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm:197 > + id customClientAnimationController = [_wkView _immediateActionAnimationControllerForHitTestResult:toAPI(hitTestResult.get()) withType:_type userData:toAPI(_userData.get())]; I wonder if we should do this (and the early return) earlier so we avoid building a defaultAnimationController if we don't need it.
Beth Dakin
Comment 6 2014-12-11 16:19:13 PST
(In reply to comment #5) > Comment on attachment 243156 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=243156&action=review > > > Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm:197 > > + id customClientAnimationController = [_wkView _immediateActionAnimationControllerForHitTestResult:toAPI(hitTestResult.get()) withType:_type userData:toAPI(_userData.get())]; > > I wonder if we should do this (and the early return) earlier so we avoid > building a defaultAnimationController if we don't need it. Good idea, but then we won't have the _type set yet!
Tim Horton
Comment 7 2014-12-12 00:27:48 PST
Ah, yes. Nevermind!
Note You need to log in before you can comment on or make changes to this bug.