[Webkit-unassigned] [Bug 51587] [GTK] Remove mandatory Enchant dependency

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 16 08:45:51 PST 2011


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


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #82579|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #18 from Martin Robinson <mrobinson at webkit.org>  2011-02-16 08:45:51 PST ---
(From update of attachment 82579)
View in context: https://bugs.webkit.org/attachment.cgi?id=82579&action=review

Great stuff. This is much cleaner than the old approach.

> configure.ac:296
> +AC_MSG_CHECKING([whether to enable enchant support])
> +AC_ARG_ENABLE([enchant],
> +  [AS_HELP_STRING([--enable-enchant],[enable support for enchant])],
> +  [],[enable_enchant="yes"])
> +AC_MSG_RESULT([$enable_enchant])
> +
> +if test "$enable_enchant" = "yes"; then
> +PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED_VERSION, [], [enable_enchant="no"])

Instead of --enable-enchant, I think this should be called --enable-spellcheck since we have no alternative at the moment.

> Source/WebKit/gtk/WebCoreSupport/TextCheckerClientEnchant.cpp:77
> +    PangoLanguage* language = pango_language_get_default();
> +    PangoLogAttr* attrs = g_new(PangoLogAttr, utflen+1);

You could use a GOwnPtr for these.

> Source/WebKit/gtk/webkit/webkitwebsettings.cpp:1054
> +#if ENABLE(ENCHANT)
> +        g_slist_foreach(priv->enchant_dicts, WebKit::TextCheckerClientEnchant::freeSpellCheckingLanguage, 0);
>          g_slist_free(priv->enchant_dicts);
> -        priv->enchant_dicts = spellDictionaries;
> +        priv->enchant_dicts = WebKit::TextCheckerClientEnchant::updateSpellCheckingLanguage(priv->spell_checking_languages);
> +#endif

Instead of having the WebKitWebView continue to hold the enchant_dicts property, it is should be a member of TextCheckerEnchant. Since different WebViews may have different enchant_dicts, the WebView should communicate with the instance of the TextChecker associated with it.

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