Changeset 79839 in webkit


Ignore:
Timestamp:
Feb 27, 2011 8:35:21 PM (13 years ago)
Author:
weinig@apple.com
Message:

Force dictionary popup to use overlay type
<rdar://problem/9052483>
https://bugs.webkit.org/show_bug.cgi?id=55337

Reviewed by Dan Bernstein.

  • UIProcess/API/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
used for the hot key version of the dictionary popup, force the overlay
style.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r79832 r79839  
     12011-02-27  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Force dictionary popup to use overlay type
     6        <rdar://problem/9052483>
     7        https://bugs.webkit.org/show_bug.cgi?id=55337
     8
     9        * UIProcess/API/mac/PageClientImpl.mm:
     10        (WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
     11        used for the hot key version of the dictionary popup, force the overlay
     12        style.
     13
    1142011-02-27  Benjamin Poulain  <benjamin.poulain@nokia.com>
    215
  • trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm

    r79806 r79839  
    422422    [attributedString.get() addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, [attributedString.get() length])];
    423423
    424     [m_wkView showDefinitionForAttributedString:attributedString.get() atPoint:textInfo.baselineOrigin];
     424    NSPoint textBaselineOrigin = textInfo.baselineOrigin;
     425
     426    NSDictionary *options = [NSDictionary dictionaryWithObject:NSDefinitionPresentationTypeOverlay forKey:NSDefinitionPresentationTypeKey];
     427    [m_wkView showDefinitionForAttributedString:attributedString.get() range:NSMakeRange(0, [attributedString.get() length]) options:options baselineOriginProvider:^(NSRange adjustedRange) { return (NSPoint)textBaselineOrigin; }];
    425428}
    426429
Note: See TracChangeset for help on using the changeset viewer.