TelephoneNumberOverlayController should use a modern loop for text quad bounding
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 May 2014 00:24:55 +0000 (00:24 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 May 2014 00:24:55 +0000 (00:24 +0000)
boxes
https://bugs.webkit.org/show_bug.cgi?id=133096

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::textQuadsToBoundingRectForRange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm

index 123a480dc7ed30286f049f9f9ccd59bfe590f0fb..d456ac19dde99a54a15b44180092505842111edf 100644 (file)
@@ -1,3 +1,14 @@
+2014-05-19  Beth Dakin  <bdakin@apple.com>
+
+        TelephoneNumberOverlayController should use a modern loop for text quad bounding 
+        boxes
+        https://bugs.webkit.org/show_bug.cgi?id=133096
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
+        (WebKit::textQuadsToBoundingRectForRange):
+
 2014-05-19  Jeremy Jones  <jeremyj@apple.com>
 
         PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
index 86497bb82d6843d4f21297363c256198926245c6..7cac6d5fe6c87f890637a6f1fb74b7d0c004ceea 100644 (file)
@@ -61,9 +61,8 @@ static IntRect textQuadsToBoundingRectForRange(Range& range)
     Vector<FloatQuad> textQuads;
     range.textQuads(textQuads);
     FloatRect boundingRect;
-    size_t size = textQuads.size();
-    for (size_t i = 0; i < size; ++i)
-        boundingRect.unite(textQuads[i].boundingBox());
+    for (auto& quad : textQuads)
+        boundingRect.unite(quad.boundingBox());
     return enclosingIntRect(boundingRect);
 }