Title: [176296] trunk/Source/WebCore
Revision
176296
Author
[email protected]
Date
2014-11-18 16:49:33 -0800 (Tue, 18 Nov 2014)

Log Message

REGRESSION: Invoking dictionary lookup on text in some search fields searches for 
incorrect item
https://bugs.webkit.org/show_bug.cgi?id=138853
-and corresponding-
rdar://problem/18912505

Reviewed by Tim Horton.

Get the visible position based on the frame, not just the renderer.
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeForDictionaryLookupAtHitTestResult):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (176295 => 176296)


--- trunk/Source/WebCore/ChangeLog	2014-11-19 00:37:35 UTC (rev 176295)
+++ trunk/Source/WebCore/ChangeLog	2014-11-19 00:49:33 UTC (rev 176296)
@@ -1,3 +1,17 @@
+2014-11-18  Beth Dakin  <[email protected]>
+
+        REGRESSION: Invoking dictionary lookup on text in some search fields searches for 
+        incorrect item
+        https://bugs.webkit.org/show_bug.cgi?id=138853
+        -and corresponding-
+        rdar://problem/18912505
+
+        Reviewed by Tim Horton.
+
+        Get the visible position based on the frame, not just the renderer.
+        * editing/mac/DictionaryLookup.mm:
+        (WebCore::rangeForDictionaryLookupAtHitTestResult):
+
 2014-11-18  David Hyatt  <[email protected]>
 
         REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps

Modified: trunk/Source/WebCore/editing/mac/DictionaryLookup.mm (176295 => 176296)


--- trunk/Source/WebCore/editing/mac/DictionaryLookup.mm	2014-11-19 00:37:35 UTC (rev 176295)
+++ trunk/Source/WebCore/editing/mac/DictionaryLookup.mm	2014-11-19 00:49:33 UTC (rev 176296)
@@ -137,10 +137,11 @@
         return nullptr;
 
     // Don't do anything if there is no character at the point.
-    if (!frame->rangeForPoint(hitTestResult.roundedPointInInnerNodeFrame()))
+    IntPoint framePoint = hitTestResult.roundedPointInInnerNodeFrame();
+    if (!frame->rangeForPoint(framePoint))
         return nullptr;
 
-    VisiblePosition position = renderer->positionForPoint(hitTestResult.localPoint(), nullptr);
+    VisiblePosition position = frame->visiblePositionForPoint(framePoint);
     if (position.isNull())
         position = firstPositionInOrBeforeNode(node);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to