[webkit-dev] Hunspell based spellchecker

Hajime Morita morrita at google.com
Wed Apr 27 09:18:19 PDT 2011


Hi Bono-san,

> Even though this is out of this topic, from the point of a
> web-application developer, it would be great for WebKit to have a
> JavaScript API that encapsulates your spellchecker code so JavaScript
> can use it.
It sounds interesting.
Because we need standardized(or standardizable) proposal for
Web-facing API in general,
public-webapps or whatwg list would be good place to start.
Any suggestions are welcome. And I'll also investigate this further.

Regards.
--
morrita

On Sun, Apr 24, 2011 at 8:26 PM, Hironori Bono (坊野 博典)
<hbono at chromium.org> wrote:
> Greetings Hajime-san,
>
> Even though this is out of this topic, from the point of a
> web-application developer, it would be great for WebKit to have a
> JavaScript API that encapsulates your spellchecker code so JavaScript
> can use it.
>
> Regards,
>
> Hironori Bono
> E-mail: hbono at chromium.org
>
> On Wed, Nov 17, 2010 at 1:52 PM, Hajime Morita <morrita at google.com> 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.
>>
>> --
>> morrita
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>
>



-- 
morrita


More information about the webkit-dev mailing list