Bug 6246

Summary: TextIterator::rangeFromLocationAndLength() returns nil range for an empty document
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: HTML EditingAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: evan
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
proposed patch mjs: review+

Alexey Proskuryakov
Reported 2005-12-26 13:45:54 PST
If a document is such that TextIterator(rangeOfContents(doc).get()).atEnd() is true, TextIterator::rangeFromLocationAndLength() returns a nil range, which makes all functions that use it (e.g. firstRectForCharacterRange) very unhappy.
Attachments
proposed patch (5.29 KB, patch)
2005-12-26 13:53 PST, Alexey Proskuryakov
mjs: review+
Alexey Proskuryakov
Comment 1 2005-12-26 13:53:07 PST
Created attachment 5291 [details] proposed patch
Maciej Stachowiak
Comment 2 2005-12-27 01:38:28 PST
Comment on attachment 5291 [details] proposed patch r=me
Note You need to log in before you can comment on or make changes to this bug.