[webkit-dev] A Range question

2010-04-09 Thread Finnur Thorarinsson
Hi all, I need a WebKit Ranger for this question: Imagine I have the word Foo inside an edit field (input type=text value=Foo) and the word bar outside of it, like so: [Foo]bar If I try to create a Range of the text Foobar, the range will get collapsed. It collapses because Range::setEnd has a

Re: [webkit-dev] A Range question

2010-04-09 Thread Darin Adler
On Apr 9, 2010, at 10:52 AM, Finnur Thorarinsson wrote: I need a WebKit Ranger for this question: Imagine I have the word Foo inside an edit field (input type=text value=Foo) and the word bar outside of it, like so: [Foo]bar If I try to create a Range of the text Foobar, the range will

Re: [webkit-dev] A Range question

2010-04-09 Thread Finnur Thorarinsson
Thanks for a super quick response Darin. One followup question: The find code in markAllMatchesForText needs to not consider matches that cross the boundary between the inside of an edit field and the rest of the document. Fair enough. I can see why it should ignore those matches, but if you

Re: [webkit-dev] A Range question

2010-04-09 Thread Darin Adler
On Apr 9, 2010, at 11:06 AM, Finnur Thorarinsson wrote: Fair enough. I can see why it should ignore those matches, but if you look at the details for the bug (https://bugs.webkit.org/show_bug.cgi?id=25868) it states that the markAllMatchesForText function not only ignores the match but it

Re: [webkit-dev] A Range question

2010-04-09 Thread Finnur Thorarinsson
Excellent. If anyone has good ideas on how to improve it, I'm willing to come up with a patch, test it in my tree and submit it for review... On Fri, Apr 9, 2010 at 11:07, Darin Adler da...@apple.com wrote: On Apr 9, 2010, at 11:06 AM, Finnur Thorarinsson wrote: Fair enough. I can see why