[webkit-dev] Hunspell based spellchecker

Kevin Ollivier kevino at theolliviers.com
Tue Nov 16 21:33:50 PST 2010


Hi Hajime,

On Nov 16, 2010, at 8:52 PM, Hajime Morita wrote:

> Hi WebKit folks,
> 
> I'm thinking about porting Hunspell-based spellchecking code
> from Chromium to WebKit/WebCore.
> 
> Although it's unclear whether the porting is feasible, I'd like to
> hear how much interest is there from other ports before starting
> actual work.
> 
> Because the main goal is to make spellcheck available for more ports,
> It would be just a waste if there is no demand.
> 
> For example, I heard that GTK+ has GtkSpell, which is based on
> Enchant.  Because our code is based on Hunspell, GtkSpell based
> integration is out of scope of this proposal... I have no idea about
> Qt, EFL, etc.
> 
> BTW, here is an under-half-baked-rough plan:
> 
> - Extract spellcheck related methods on EditorClient,
>  to interface (or abstract class) named, say, platform/text/TextChecker.
>  - with keeping existing method, for compatibility
> - Add a getter like "TextChecker* textChecker() = 0;"  to EditorClient.
> - Implement TextCheckerHunspell, a subclass of TextCheckerHunspell
>  - TextCheckerHunspellChromium and some other variants will also be
> added, to make Chromium specific hooks.
> - (optional) Move Mac's spellchecker implementation from
> WebCoreSupport/WebEditorClient
>  to platform/text/TextCheckerCocoa, another subclass of TextChecker.
> - (optional) Remove legacy methods on EditorClient
> 
> This approach would make spellchecker pluggable,
> so WebKit can choose preferable spellchecker at runtime with this.
> (For example, Chromium port wants to use both Hunspell and system spellchecker.
> GTK port might want use Enchant and Hunspell.)
> 
> Is this beneficial for your port?
> Are there other design possibilities?
> Any feedback is welcome.

The wx port is very interested. :) I think this design would do everything that our port needs. We'd probably use the native spellchecker on Mac, and Hunspell on other platforms for now.

Thanks,

Kevin

> --
> morrita
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



More information about the webkit-dev mailing list