NEW35330
TextIterator::range tries to return a range based on displayed characters rather than characters from the DOM
https://bugs.webkit.org/show_bug.cgi?id=35330
Summary TextIterator::range tries to return a range based on displayed characters rat...
Tony Chang
Reported 2010-02-23 22:41:10 PST
In the attached example, the displayed text is: GRÖSSTEN The source html has: <span style="text-transform:uppercase;">größten</span> If you call WebCore::findPlainText and try to find the letter "n" we hit an assert. This happens because TextIterator finds the N with an offset of 8 (based on what is displayed). When it tries to convert that to a DOM Range, it tries to set an end offset of 8, which is beyond the end of the actual HTML. This triggers an assert at WebCore/dom/Range.cpp:87. Is there a helper method for converting between offsets in the rendered text and the source text? I didn't see one in RenderText. I see a similar bug when trying to select the word using double click (it doesn't select the last character of the word).
Attachments
Alexey Proskuryakov
Comment 1 2010-02-25 14:23:47 PST
This might be close enough to bug 8854 to be called duplicate. There are a few more tangentially related bugs filed earlier.
Note You need to log in before you can comment on or make changes to this bug.