Bug 135776 - [Services with UI] Action menu arrow hit testing is sometimes wrong
Summary: [Services with UI] Action menu arrow hit testing is sometimes wrong
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-08-08 16:16 PDT by Enrica Casucci
Modified: 2014-08-11 10:52 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.05 KB, patch)
2014-08-08 16:26 PDT, Enrica Casucci
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-08-08 16:16:28 PDT
* STEPS TO REPRODUCE
0. Install and enable a text viewer extension.
1. Load the Yelp page for Nihon Whiskey Loung in San Francisco - http://www.yelp.com/biz/nihon-whisky-lounge-san-francisco#query:nihon%20whiskey%20lounge
2. Select text from the second review, then hover over the first line of the selection.
3. Nothing happens - no arrow.
4. Hover a bit lower, over the whitespace under the first line.
5. Arrow appears.

<rdar://problem/17837670>
Comment 1 Enrica Casucci 2014-08-08 16:26:08 PDT
Created attachment 236322 [details]
Patch
Comment 2 Brady Eidson 2014-08-08 16:34:34 PDT
Comment on attachment 236322 [details]
Patch

I stared at the rect math for like 5 minutes.  Seems fine!
Comment 3 Tim Horton 2014-08-08 16:38:22 PDT
Comment on attachment 236322 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:152
> +    if (rects.isEmpty() || rects.size() == 1)

should this just be rects.size() <= 1?

> Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:171
> +    // Next stich together all the rects on the last line of the selection.

s/stich/stitch/

> Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:186
> +    // indexFromEnd is the index of the last rectangle on the sendon the last line.

"on the sendon"?
Comment 4 Enrica Casucci 2014-08-11 10:29:01 PDT
(In reply to comment #3)
> (From update of attachment 236322 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=236322&action=review
> 
> > Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:152
> > +    if (rects.isEmpty() || rects.size() == 1)
> 
> should this just be rects.size() <= 1?
Yes, it is better.
> 
> > Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:171
> > +    // Next stich together all the rects on the last line of the selection.
> 
> s/stich/stitch/
> 
> > Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm:186
> > +    // indexFromEnd is the index of the last rectangle on the sendon the last line.
> 
> "on the sendon"?

Thanks for catching the typos.
Comment 5 Enrica Casucci 2014-08-11 10:52:46 PDT
Committed revision 172395.