Re: SpellCheck API?

2011-05-11 Thread Adam Shannon
On Tue, May 10, 2011 at 06:49, Olli Pettay olli.pet...@helsinki.fi wrote: On 05/10/2011 01:44 AM, Aryeh Gregor wrote: On Mon, May 9, 2011 at 3:49 PM, Boris Zbarskybzbar...@mit.edu  wrote: This does mean firing tens of thousands of events during load on some pages (e.g. wikipedia article

Re: SpellCheck API?

2011-05-11 Thread Aryeh Gregor
On Tue, May 10, 2011 at 1:42 PM, Olli Pettay olli.pet...@helsinki.fi wrote: Something like that might be better. Do you have the exact API in mind? Well, just the same as I originally proposed, except with arrays instead of scalars. But Hironori Bono's reply has mooted this idea anyway.

Re: SpellCheck API?

2011-05-11 Thread timeless
2011/5/11 Aryeh Gregor simetrical+...@gmail.com: Here's an alternative suggestion that addresses the issues I had above, while (I think) still addressing all your use-cases.  Create a new interface: interface SpellcheckRange {  readonly unsigned long start;  readonly unsigned long length;  

Re: SpellCheck API?

2011-05-11 Thread Aryeh Gregor
2011/5/11 timeless timel...@gmail.com: With this model, i'd want the UA to provide instances for words which are misspelled according to its standard dictionary but which are in its user's custom dictionary. The web page can try to make suggestions, but generally the UA will choose to ignore

Re: SpellCheck API?

2011-05-11 Thread Olli Pettay
On 05/12/2011 01:29 AM, Aryeh Gregor wrote: 2011/5/11 timelesstimel...@gmail.com: With this model, i'd want the UA to provide instances for words which are misspelled according to its standard dictionary but which are in its user's custom dictionary. The web page can try to make suggestions,

Re: SpellCheck API?

2011-05-11 Thread 坊野 博典
Greetings Aryeh, et al, Thank you for your alternative suggestion. In my honest opinion, I do not stick to my interfaces so much if there are better alternatives. My proposal is just based on my prototype, which has been uploaded to http://webkit.org/b/59693, and I wish someone in this ML

Re: SpellCheck API?

2011-05-10 Thread Olli Pettay
On 05/10/2011 01:44 AM, Aryeh Gregor wrote: On Mon, May 9, 2011 at 3:49 PM, Boris Zbarskybzbar...@mit.edu wrote: This does mean firing tens of thousands of events during load on some pages (e.g. wikipedia article edit pages) Maybe that's not a big deal. If that's too many events,

Re: SpellCheck API?

2011-05-10 Thread Olli Pettay
On 05/10/2011 08:33 PM, Aryeh Gregor wrote: On Tue, May 10, 2011 at 7:49 AM, Olli Pettayolli.pet...@helsinki.fi wrote: Just a quick test on Nokia N900 (which is already a bit old mobile phone) using a recent browser: dispatching 1 events to a deep (depth 100) DOM (without listeners for the

Re: SpellCheck API?

2011-05-10 Thread Aryeh Gregor
On Tue, May 10, 2011 at 7:49 AM, Olli Pettay olli.pet...@helsinki.fi wrote: Just a quick test on Nokia N900 (which is already a bit old mobile phone) using a recent browser: dispatching 1 events to a deep (depth 100) DOM (without listeners for the event - for testing purposes) takes about

Re: SpellCheck API?

2011-05-10 Thread Olli Pettay
On 05/10/2011 08:33 PM, Adam Shannon wrote: On Tue, May 10, 2011 at 06:49, Olli Pettayolli.pet...@helsinki.fi wrote: On 05/10/2011 01:44 AM, Aryeh Gregor wrote: On Mon, May 9, 2011 at 3:49 PM, Boris Zbarskybzbar...@mit.eduwrote: This does mean firing tens of thousands of events during

Re: SpellCheck API?

2011-05-10 Thread 坊野 博典
Greetings all, Thank you so much for all of your comments. Even though I cannot answer all of them, I have added my responses to some comments. On Mon, May 9, 2011 at 5:58 PM, Hironori Bono (坊野 博典) hb...@google.com wrote: function CheckText(text) { var result = new Array; var app = new

Re: SpellCheck API?

2011-05-09 Thread Olli Pettay
On 05/09/2011 11:58 AM, Hironori Bono (坊野 博典) wrote: Greetings, I'm Hironori Bono, a software engineer for Google Chrome. We recently received requests from web-application developers (and extension developers) that they would like to use the spellchecker Quite different targets. integrated

Re: SpellCheck API?

2011-05-09 Thread Oliver Hunt
This is the privacy violation, and not acceptable as such. I wonder how to not expose native spellchecker data to web page, yet support this use case. Or do we need yet another permission, which user has to give to the page before the spellchecker API fully working. In general permission

Re: SpellCheck API?

2011-05-09 Thread Aryeh Gregor
2011/5/9 Hironori Bono (坊野 博典) hb...@google.com: function CheckTextOfNode(node) {   // Remove all the previous spellchecking results.   window.spellCheckController.removeMarkers(node);   // Check the text in the specified node.   var result = CheckText(node.innerText ? node.innerText :

Re: SpellCheck API?

2011-05-09 Thread Boris Zbarsky
On 5/9/11 3:39 PM, Aryeh Gregor wrote: * Every time the UA would normally invoke its spellchecker on a word, it fires a spellcheck event at the element in question This does mean firing tens of thousands of events during load on some pages (e.g. wikipedia article edit pages) Maybe that's

Re: SpellCheck API?

2011-05-09 Thread Aryeh Gregor
On Mon, May 9, 2011 at 3:49 PM, Boris Zbarsky bzbar...@mit.edu wrote: This does mean firing tens of thousands of events during load on some pages (e.g. wikipedia article edit pages)  Maybe that's not a big deal. If that's too many events, couldn't the browser optimize by not spellchecking