Title: [273803] branches/safari-612.1.5-branch/Source/WebCore
Revision
273803
Author
[email protected]
Date
2021-03-02 19:09:23 -0800 (Tue, 02 Mar 2021)

Log 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 <[email protected]> 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

Modified Paths

Diff

Modified: branches/safari-612.1.5-branch/Source/WebCore/ChangeLog (273802 => 273803)


--- branches/safari-612.1.5-branch/Source/WebCore/ChangeLog	2021-03-03 03:09:20 UTC (rev 273802)
+++ branches/safari-612.1.5-branch/Source/WebCore/ChangeLog	2021-03-03 03:09:23 UTC (rev 273803)
@@ -1,5 +1,38 @@
 2021-03-02  Alan Coon  <[email protected]>
 
+        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 <[email protected]> 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
+
+    2021-03-01  Alex Christensen  <[email protected]>
+
+            Make DictionaryLookup::rangeAtHitTestResult more robust
+            https://bugs.webkit.org/show_bug.cgi?id=222301
+            <rdar://problem/74529831>
+
+            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):
+
+2021-03-02  Alan Coon  <[email protected]>
+
         Cherry-pick r273656. rdar://problem/74952887
 
     REGRESSION(r272004): transform transition with delay doesn't behave correctly

Modified: branches/safari-612.1.5-branch/Source/WebCore/editing/cocoa/DictionaryLookup.mm (273802 => 273803)


--- branches/safari-612.1.5-branch/Source/WebCore/editing/cocoa/DictionaryLookup.mm	2021-03-03 03:09:20 UTC (rev 273802)
+++ branches/safari-612.1.5-branch/Source/WebCore/editing/cocoa/DictionaryLookup.mm	2021-03-03 03:09:23 UTC (rev 273803)
@@ -342,6 +342,8 @@
 
         // As context, we are going to use 250 characters of text before and after the point.
         fullCharacterRange = rangeExpandedAroundPositionByCharacters(position, 250);
+        if (!fullCharacterRange)
+            return WTF::nullopt;
 
         selectionRange = NSMakeRange(NSNotFound, 0);
         hitIndex = characterCount(*makeSimpleRange(fullCharacterRange->start, position));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to