Bug 139661 - Make lookup an immediate action instead of an action menu item
Summary: Make lookup an immediate action instead of an action menu item
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-15 16:28 PST by Beth Dakin
Modified: 2014-12-15 16:51 PST (History)
8 users (show)

See Also:


Attachments
Patch (34.68 KB, patch)
2014-12-15 16:37 PST, Beth Dakin
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2014-12-15 16:28:52 PST
Make lookup an immediate action instead of an action menu item

rdar://problem/19198414
Comment 1 Beth Dakin 2014-12-15 16:37:53 PST
Created attachment 243329 [details]
Patch
Comment 2 WebKit Commit Bot 2014-12-15 16:39:27 PST
Attachment 243329 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebView/WebImmediateActionController.mm:317:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.h:998:  The parameter name "frame" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.h:998:  The parameter name "range" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.h:998:  The parameter name "presentationTransition" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm:519:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm:519:  Missing space inside { }.  [whitespace/braces] [5]
Total errors found: 6 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2014-12-15 16:42:49 PST
Comment on attachment 243329 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=243329&action=review

> Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm:518
> +        // Run the animations serially because attaching another subwindow breaks the bounce animation.
> +        // We could consider making the bounce NSAnimationNonblockingThreaded instead, which seems
> +        // to work, but need to consider all of the implications.

Please remove this comment.

> Source/WebKit/mac/WebView/WebImmediateActionController.mm:350
> +    DictionaryPopupInfo dictionaryPopupInfo = dictionaryPopupInfoForRange(frame, *dictionaryRange, options, TextIndicatorPresentationTransition::BounceAndCrossfade);

Plz just bounce.

> Source/WebKit/mac/WebView/WebView.mm:8662
> +- (id)_animationControllerForDictionaryLookupPopupInfo:(const DictionaryPopupInfo&)dictionaryPopupInfo

It would be nice if someday this could share more code with the function above.
Comment 4 Beth Dakin 2014-12-15 16:51:09 PST
Thanks Tim! http://trac.webkit.org/changeset/177323