Bug 159062

Summary: Handle (0, 0) ranges from Lookup
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebKit Misc.Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: thorton
Priority: P2 Keywords: InRadar
Version: Safari 9   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=159063
Attachments:
Description Flags
proposed patch
none
proposed patch thorton: review+, thorton: commit-queue-

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