[Webkit-unassigned] [Bug 40092] spellcheck does not check pasted text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 27 18:53:49 PDT 2010


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





--- Comment #43 from MORITA Hajime <morrita at google.com>  2010-10-27 18:53:47 PST ---
Hi Jia, thank you for taking a look! 

> 
> Since we don't do autocorrection for pasted text, this patch doesn't seem interfere with our recent work on autocorrection. But I'd like to apply to apply this patch on 10.7, see if everything work together. I will let you know.

Hmm. on the other hand, we need this for chromium (with separate EditorClient  implementation)...
How about this? :
To land the patch, with the async check settings false.
And doing the experiments before landing it true (at 10.7 release?).
In this way, Chromium port can enable the feature 
with keeping other ports' behavior unchanged at this time.
(I hope every ports to enable the flag at a certain timing. 
But it might need more experiments as you mentioned.)

In my feeling, what really matters here is introducing the async spellcheck API.
Without it, we cannot run spellchecking against larger chunks of text 
like copy-paste, dynamic @spellcheck attribute change, etc.
And for Chromium (sorry for mentioning a specific port again...),
A grammar check could be done by a separate process so async API is unavoidable.

> 
> My other concern is racing condition when multiple threads call  [NSSpellChecker requestCheckingOfString:]. Is it possible?

Since WebKit is single-threaded, [NSSpellChecker requestCheckingOfString:] is 
only called from the main thread.
Although NSSpellChecker looks to run the actual check logic on another (worker) thread,
it is managed by NSSpellChecker. So we wouldn't care about that.

A tricky part is that the passed completionHandler is called at the worker thread.
To void a race, We go back to the main thread using [NSRunLoop performSelector:].
We touch WebCore objects only on the main thread by doing so.

-- 
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