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

Changeset 273721 in webkit


Ignore:
Timestamp:
Mar 1, 2021, 8:17:16 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Make DictionaryLookup::rangeAtHitTestResult more robust
​https://bugs.webkit.org/show_bug.cgi?id=222301
<rdar://problem/74529831>

Patch by Alex Christensen <​achristensen@webkit.org> on 2021-03-01
Reviewed by Brent Fulgham.

This may be related to r265084 but something is crashing and I'm not sure what.
Adding some Optional checks might fix something, but this is still puzzling to me.

  • editing/cocoa/DictionaryLookup.mm:

(WebCore::DictionaryLookup::rangeAtHitTestResult):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r273719 r273721  
     12021-03-01  Alex Christensen  <achristensen@webkit.org>
     2
     3        Make DictionaryLookup::rangeAtHitTestResult more robust
     4        https://bugs.webkit.org/show_bug.cgi?id=222301
     5        <rdar://problem/74529831>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        This may be related to r265084 but something is crashing and I'm not sure what.
     10        Adding some Optional checks might fix something, but this is still puzzling to me.
     11
     12        * editing/cocoa/DictionaryLookup.mm:
     13        (WebCore::DictionaryLookup::rangeAtHitTestResult):
     14
    1152021-03-01  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/Source/WebCore/editing/cocoa/DictionaryLookup.mm

    r269648 r273721  
    343343        // As context, we are going to use 250 characters of text before and after the point.
    344344        fullCharacterRange = rangeExpandedAroundPositionByCharacters(position, 250);
     345        if (!fullCharacterRange)
     346            return WTF::nullopt;
    345347
    346348        selectionRange = NSMakeRange(NSNotFound, 0);
Note: See TracChangeset for help on using the changeset viewer.