[Webkit-unassigned] [Bug 66681] Need API for getting surrounding text from webkit in chromium

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 28 09:50:26 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=66681





--- Comment #13 from Ryosuke Niwa <rniwa at webkit.org>  2011-08-28 09:50:26 PST ---
(From update of attachment 104692)
View in context: https://bugs.webkit.org/attachment.cgi?id=104692&action=review

>>> Source/WebKit/chromium/src/WebViewImpl.cpp:1539
>>> +    cursor = TextIterator::rangeLength(testRange.get());
>> 
>> You should call TextIterator::locationAndLengthFromRange instead.
> 
> In this case, cursor and anchor is not a range object, and the order of cursor and anchor is not same (depends on the direction of the selection). So I think using TextIterator::rangeLength() directly is simpler and efficient. What do you think?

That sounds like an anti-pattern to me. Why do we need this API? What is it used for?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list