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

Changeset 273803 in webkit


Ignore:
Timestamp:
Mar 2, 2021, 7:09:23 PM (6 years ago)
Author:
Alan Coon
Message:

Cherry-pick r273721. rdar://problem/74952690

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):

git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@273721 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-612.1.5-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612.1.5-branch/Source/WebCore/ChangeLog

    r273802 r273803  
     12021-03-02  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r273721. rdar://problem/74952690
     4
     5    Make DictionaryLookup::rangeAtHitTestResult more robust
     6    https://bugs.webkit.org/show_bug.cgi?id=222301
     7    <rdar://problem/74529831>
     8   
     9    Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-01
     10    Reviewed by Brent Fulgham.
     11   
     12    This may be related to r265084 but something is crashing and I'm not sure what.
     13    Adding some Optional checks might fix something, but this is still puzzling to me.
     14   
     15    * editing/cocoa/DictionaryLookup.mm:
     16    (WebCore::DictionaryLookup::rangeAtHitTestResult):
     17   
     18    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273721 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     19
     20    2021-03-01  Alex Christensen  <achristensen@webkit.org>
     21
     22            Make DictionaryLookup::rangeAtHitTestResult more robust
     23            https://bugs.webkit.org/show_bug.cgi?id=222301
     24            <rdar://problem/74529831>
     25
     26            Reviewed by Brent Fulgham.
     27
     28            This may be related to r265084 but something is crashing and I'm not sure what.
     29            Adding some Optional checks might fix something, but this is still puzzling to me.
     30
     31            * editing/cocoa/DictionaryLookup.mm:
     32            (WebCore::DictionaryLookup::rangeAtHitTestResult):
     33
    1342021-03-02  Alan Coon  <alancoon@apple.com>
    235
  • branches/safari-612.1.5-branch/Source/WebCore/editing/cocoa/DictionaryLookup.mm

    r269648 r273803  
    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.