Changeset 244718 in webkit


Ignore:
Timestamp:
Apr 27, 2019 7:41:24 AM (5 years ago)
Author:
Megan Gardner
Message:

Lookup only looking up the first word in selection
https://bugs.webkit.org/show_bug.cgi?id=197341
<rdar://problem/48221414>

Reviewed by Wenson Hsieh.

Lookup is not testable.

Reveal needs the full range in order to correctly create the item for the popover.

  • editing/cocoa/DictionaryLookup.mm:

(WebCore::showPopupOrCreateAnimationController):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244716 r244718  
     12019-04-27  Megan Gardner  <megan_gardner@apple.com>
     2
     3        Lookup only looking up the first word in selection
     4        https://bugs.webkit.org/show_bug.cgi?id=197341
     5        <rdar://problem/48221414>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        Lookup is not testable.
     10
     11        Reveal needs the full range in order to correctly create the item for the popover.
     12
     13        * editing/cocoa/DictionaryLookup.mm:
     14        (WebCore::showPopupOrCreateAnimationController):
     15
    1162019-04-26  Jer Noble  <jer.noble@apple.com>
    217
  • trunk/Source/WebCore/editing/cocoa/DictionaryLookup.mm

    r244169 r244718  
    483483    RetainPtr<RVPresentingContext> context = adoptNS([allocRVPresentingContextInstance() initWithPointerLocationInView:pointerLocation inView:view highlightDelegate:(id<RVPresenterHighlightDelegate>) webHighlight.get()]);
    484484   
    485     RetainPtr<RVItem> item = adoptNS([allocRVItemInstance() initWithText:dictionaryPopupInfo.attributedString.get().string selectedRange:NSMakeRange(0, 0)]);
     485    RetainPtr<RVItem> item = adoptNS([allocRVItemInstance() initWithText:dictionaryPopupInfo.attributedString.get().string selectedRange:NSMakeRange(0, dictionaryPopupInfo.attributedString.get().string.length)]);
    486486   
    487487    [webHighlight setClearTextIndicator:[webHighlight = WTFMove(webHighlight), clearTextIndicator = WTFMove(clearTextIndicator)] {
     
    505505   
    506506    RetainPtr<WebRevealHighlight> webHighlight = adoptNS([[WebRevealHighlight alloc] initWithHighlightRect:[view convertRect:textIndicator->selectionRectInRootViewCoordinates() toView:nil] view:view image:textIndicator->contentImage()]);
    507    
    508     RetainPtr<RVItem> item = adoptNS([allocRVItemInstance() initWithText:dictionaryPopupInfo.attributedString.get().string selectedRange:NSMakeRange(0, 0)]);
     507
     508    RetainPtr<RVItem> item = adoptNS([allocRVItemInstance() initWithText:dictionaryPopupInfo.attributedString.get().string selectedRange:NSMakeRange(0, dictionaryPopupInfo.attributedString.get().string.length)]);
    509509   
    510510    [UINSSharedRevealController() revealItem:item.get() locationInWindow:dictionaryPopupInfo.origin window:view.window highlighter:(id<UIRVPresenterHighlightDelegate>) webHighlight.get()];
Note: See TracChangeset for help on using the changeset viewer.