Title: [175857] branches/safari-600.3-branch/Source/WebKit2
Revision
175857
Author
matthew_han...@apple.com
Date
2014-11-10 23:59:19 -0800 (Mon, 10 Nov 2014)

Log Message

Merged r175711. rdar://problems/18893079

Modified Paths

Diff

Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (175856 => 175857)


--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog	2014-11-11 07:55:09 UTC (rev 175856)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog	2014-11-11 07:59:19 UTC (rev 175857)
@@ -1,5 +1,24 @@
 2014-11-10  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r175711. <rdar://problem/18893079>
+
+    2014-11-06  Tim Horton  <timothy_hor...@apple.com>
+    
+            Data detectors popover points at the first line of the detected item
+            https://bugs.webkit.org/show_bug.cgi?id=138471
+            <rdar://problem/18893079>
+    
+            Reviewed by Sam Weinig.
+    
+            * WebProcess/WebPage/mac/WebPageMac.mm:
+            (WebKit::scanForDataDetectedItems):
+            Determine the bounding box of all quads of the detected item's text.
+            This way, the popover will point at the border of the item, instead of
+            right at the very first line.
+    
+
+2014-11-10  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r175705. <rdar://problem/18892496>
 
     2014-11-06  Tim Horton  <timothy_hor...@apple.com>

Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (175856 => 175857)


--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2014-11-11 07:55:09 UTC (rev 175856)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2014-11-11 07:59:19 UTC (rev 175857)
@@ -1127,8 +1127,10 @@
 
     Vector<FloatQuad> quads;
     mainResultRange->textQuads(quads);
-    if (!quads.isEmpty())
-        detectedDataBoundingBox = mainResultRange->ownerDocument().view()->contentsToWindow(quads[0].enclosingBoundingBox());
+    detectedDataBoundingBox = FloatRect();
+    FrameView* frameView = mainResultRange->ownerDocument().view();
+    for (const auto& quad : quads)
+        detectedDataBoundingBox.unite(frameView->contentsToWindow(quad.enclosingBoundingBox()));
 
     detectedDataRange = mainResultRange;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to