[webkit-qt] Adding inline spell checking to webkit-qt

Dawit A adawit at kde.org
Tue Aug 23 19:23:32 PDT 2011


On Wed, Jul 20, 2011 at 5:32 AM, Lindsay Mathieson
<lindsay.mathieson at gmail.com> wrote:
> On 20 July 2011 17:14, Dawit A <adawit at kde.org> wrote:
>>
>> Right, but the problem I have is exactly at this point. How is the
>> host, say kdewebkit, supposed to know whether or not the word upon
>> which the user just clicked in a misspelled word ?
>
>
> I would imagine the host would do a spell check lookup on the clicked
> word and also get the suggested words at the same time. I realise that
> involves a double lookup of the word - at least once by QtWebKit, then
> again by the host, but it seems simpler and less error prone then
> trying to track all mispelled words in QtWebKit and somehow
> communicating the right info to the host when the host clicks on a
> word.

Actually I found out that there code in webkit that will add the
suggested words into the context menu on demand. That code is located
under ContextMenuController::populate in
Source/WebCore/page/ContextMenuController.cpp. For some reason though,
it does not seem to work in QtWebKit with the platform plugin I am
creating for kdewebkit. I am still trying to determine what will be
required to get that to work. If you have sometime perhaps you can
also look into that.

We also will need to add few QWebAction to handle the ability to add
words to the spell checker's dictionary and allow manual/interactive
spell checking through a context menu item. BTW, I have submitted code
that enhances your spell checker API that was recently accepted. See
https://bugs.webkit.org/show_bug.cgi?id=66812.


More information about the webkit-qt mailing list