Bug 135582

Summary: Selection services menu dropdown is in the wrong place when selecting some text on Yelp
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebCore Misc.Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, enrica, hyatt, sam, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
simon.fraser: review+
crash fix enrica: review+

Description Tim Horton 2014-08-04 17:10:47 PDT
<rdar://problem/17837636>
Comment 1 Tim Horton 2014-08-04 17:11:59 PDT
Created attachment 235993 [details]
patch
Comment 2 Simon Fraser (smfr) 2014-08-04 17:26:49 PDT
Comment on attachment 235993 [details]
patch

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

> Source/WebCore/editing/SelectionRectGatherer.cpp:56
> +    absoluteGapRects.uniteLeft(LayoutRect(repaintContainer->localToAbsoluteQuad(FloatQuad(rects.left())).boundingBox()));
> +    absoluteGapRects.uniteCenter(LayoutRect(repaintContainer->localToAbsoluteQuad(FloatQuad(rects.center())).boundingBox()));
> +    absoluteGapRects.uniteRight(LayoutRect(repaintContainer->localToAbsoluteQuad(FloatQuad(rects.right())).boundingBox()));

This is all gross and horrible and services should not be so tied to selection code.
Comment 3 Tim Horton 2014-08-04 17:28:53 PDT
(In reply to comment #2)
> (From update of attachment 235993 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=235993&action=review
> 
> > Source/WebCore/editing/SelectionRectGatherer.cpp:56
> > +    absoluteGapRects.uniteLeft(LayoutRect(repaintContainer->localToAbsoluteQuad(FloatQuad(rects.left())).boundingBox()));
> > +    absoluteGapRects.uniteCenter(LayoutRect(repaintContainer->localToAbsoluteQuad(FloatQuad(rects.center())).boundingBox()));
> > +    absoluteGapRects.uniteRight(LayoutRect(repaintContainer->localToAbsoluteQuad(FloatQuad(rects.right())).boundingBox()));
> 
> This is all gross and horrible and services should not be so tied to selection code.

+1

Thank you.

http://trac.webkit.org/changeset/172013
Comment 4 Tim Horton 2014-08-04 18:36:13 PDT
Created attachment 235997 [details]
crash fix
Comment 5 Enrica Casucci 2014-08-04 18:38:19 PDT
Comment on attachment 235997 [details]
crash fix

Good boy!
Comment 6 Tim Horton 2014-08-04 18:41:10 PDT
Stop the crashes: http://trac.webkit.org/changeset/172018