Bug 159184

Summary: REGRESSION (r189052): Clipping occurs when using context menu to Look Up words within the Dictionary app
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch bdakin: review+

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