⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176296 in webkit


Ignore:
Timestamp:
Nov 18, 2014, 4:49:33 PM (12 years ago)
Author:
Beth Dakin
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r176295 r176296  
     12014-11-18  Beth Dakin  <bdakin@apple.com>
     2
     3        REGRESSION: Invoking dictionary lookup on text in some search fields searches for
     4        incorrect item
     5        https://bugs.webkit.org/show_bug.cgi?id=138853
     6        -and corresponding-
     7        rdar://problem/18912505
     8
     9        Reviewed by Tim Horton.
     10
     11        Get the visible position based on the frame, not just the renderer.
     12        * editing/mac/DictionaryLookup.mm:
     13        (WebCore::rangeForDictionaryLookupAtHitTestResult):
     14
    1152014-11-18  David Hyatt  <hyatt@apple.com>
    216
  • trunk/Source/WebCore/editing/mac/DictionaryLookup.mm

    r176164 r176296  
    138138
    139139    // Don't do anything if there is no character at the point.
    140     if (!frame->rangeForPoint(hitTestResult.roundedPointInInnerNodeFrame()))
     140    IntPoint framePoint = hitTestResult.roundedPointInInnerNodeFrame();
     141    if (!frame->rangeForPoint(framePoint))
    141142        return nullptr;
    142143
    143     VisiblePosition position = renderer->positionForPoint(hitTestResult.localPoint(), nullptr);
     144    VisiblePosition position = frame->visiblePositionForPoint(framePoint);
    144145    if (position.isNull())
    145146        position = firstPositionInOrBeforeNode(node);
Note: See TracChangeset for help on using the changeset viewer.