Bug 159184 - REGRESSION (r189052): Clipping occurs when using context menu to Look Up words within the Dictionary app
Summary: REGRESSION (r189052): Clipping occurs when using context menu to Look Up word...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 17:27 PDT by Tim Horton
Modified: 2016-06-27 17:38 PDT (History)
3 users (show)

See Also:


Attachments
Patch (8.62 KB, patch)
2016-06-27 17:27 PDT, Tim Horton
bdakin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2016-06-27 17:27:13 PDT
REGRESSION (r189052): Clipping occurs when using context menu to Look Up words within the Dictionary app
Comment 1 Tim Horton 2016-06-27 17:27:41 PDT
Created attachment 282192 [details]
Patch
Comment 2 WebKit Commit Bot 2016-06-27 17:30:17 PDT
Attachment 282192 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebView/WebImmediateActionController.mm:530:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Fraser (smfr) 2016-06-27 17:32:26 PDT
Comment on attachment 282192 [details]
Patch

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

Any way to test this?

> Source/WebKit/mac/WebView/WebHTMLView.mm:6369
> +    if (!selectionRange)
> +        return;

OK to continue if the range is empty?
Comment 4 Tim Horton 2016-06-27 17:38:40 PDT
(In reply to comment #3)
> Comment on attachment 282192 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282192&action=review
> 
> Any way to test this?

Even if we had TextIndicator tests, I'm not sure how we could test that this particular caller does the right thing. Maybe we could have a way to get the current indicator and actually call the context menu-y method on WebHTMLView? Anyway, TextIndicator is high on my list of things that desperately needs to be testable but currently isn't (and progress has been made in the past in this direction).

> > Source/WebKit/mac/WebView/WebHTMLView.mm:6369
> > +    if (!selectionRange)
> > +        return;
> 
> OK to continue if the range is empty?

The other function will catch that.
Comment 5 Tim Horton 2016-06-27 17:38:59 PDT
https://trac.webkit.org/changeset/202524