Bug 132706

Summary: REGRESSION (r168053): Phone number detection boxes are wrong when scrolled
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, beidson, simon.fraser, thorton
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Description Beth Dakin 2014-05-08 14:31:29 PDT
REGRESSION (r168053): Phone number detection boxes are wrong when scrolled

<rdar://problem/16787957>
Comment 1 Beth Dakin 2014-05-08 14:38:18 PDT
Created attachment 231101 [details]
Patch
Comment 2 Beth Dakin 2014-05-08 15:30:08 PDT
Thanks Tim! http://trac.webkit.org/changeset/168499
Comment 3 Darin Adler 2014-05-09 07:39:45 PDT
Comment on attachment 231101 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:66
> +    size_t size = textQuads.size();
> +    for (size_t i = 0; i < size; ++i)
> +        boundingRect.unite(textQuads[i].boundingBox());

Should use a modern for loop:

    for (auto& quad : textQuads)
        boundingRect.unit(quad.boundingBox());