[webkit-qt] Spellchecking support for WebKit2
Jose Dapena Paz
jdapena at igalia.com
Tue Jan 8 03:36:42 PST 2013
Hi,
I've been implementing a patch for adding spellcheck support for Qt
WebKit2. The work for this is in this bug:
https://bugs.webkit.org/show_bug.cgi?id=105034
It exposes the spellcheck functionality on the new Quick components for
WebKit2. Next days I'll go on iterating over the patch, but I'd need
some feedback mainly on the proposed API (though please feel free to
point to anything else you could find relevant).
The main issue with the current implementation is about exposing the
spellchecker in QML. In WebKit2, there's support for one global
spellchecker, so it is not specific to any web view, but shared among
them. The way I exposed this was adding a new property to WebView for
accessing the global variables (only spellchecker now).
So the API for setting a specific spellchecker is something like:
WebView {
...
experimental.shared.textChecker: WebTextCheckerEnchant {
enabled: true
languages: ["en"]
}
But... yes, it is a weird way to access a global. Any hint on the "right
way" to expose global properties like this in QML?
The other big question to discuss is... Ok, we need spell checking
support in WebKit, and it is important to define an API that allows to
plug different spellcheck engines as provided by different platforms.
But seems an API like this would be also interesting at a more global
scope (i.e. at Qt, enabling to add spell check for non WebKit
applications...). My proposal, now, is pushing for this only in WebKit,
as I need this working in the short term. But... What about long term?
Jose Dapena Paz <jdapena at igalia.com>
Igalia
More information about the webkit-qt
mailing list