Bug 159062 - Handle (0, 0) ranges from Lookup
Summary: Handle (0, 0) ranges from Lookup
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 9
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-23 11:01 PDT by Alexey Proskuryakov
Modified: 2016-06-23 12:18 PDT (History)
1 user (show)

See Also:


Attachments
proposed patch (2.82 KB, patch)
2016-06-23 11:08 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff
proposed patch (2.75 KB, patch)
2016-06-23 11:09 PDT, Alexey Proskuryakov
thorton: review+
thorton: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2016-06-23 11:01:47 PDT
When Lookup can't provide a range, it sometimes returns (NSNotFound, 0), and other times, (0, 0).

In the latter case, we somehow build a single character string.

rdar://problem/26960385
Comment 1 Alexey Proskuryakov 2016-06-23 11:08:28 PDT
Created attachment 281916 [details]
proposed patch
Comment 2 Alexey Proskuryakov 2016-06-23 11:09:28 PDT
Created attachment 281917 [details]
proposed patch

Forgot to update a FIXME.
Comment 3 Tim Horton 2016-06-23 11:11:06 PDT
Comment on attachment 281917 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281917&action=review

> Source/WebCore/editing/mac/DictionaryLookup.mm:144
> +    // FIXME (159063): We shouldn't need to check for zero lenght here.

lenght!
Comment 4 Alexey Proskuryakov 2016-06-23 12:18:15 PDT
Committed http://trac.webkit.org/r202390