Bug 93262 - [WK2][GTK] Improvements for the new spell-checking API
Summary: [WK2][GTK] Improvements for the new spell-checking API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 90268
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-06 05:57 PDT by Mario Sanchez Prada
Modified: 2012-08-06 06:43 PDT (History)
4 users (show)

See Also:


Attachments
Patch proposal (18.68 KB, patch)
2012-08-06 06:23 PDT, Mario Sanchez Prada
cgarcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Sanchez Prada 2012-08-06 05:57:13 PDT
As you can see from Carlos's last comment on bug 90268 [1], it seems like I was too fast pushing that patch and that some improvements could still have happened over the last iteration of the patch.

So, this bug is just for tracking down those improvements, now that bug 90268 has already been resolved.

[1] https://bugs.webkit.org/show_bug.cgi?id=90268#c25
Comment 1 Mario Sanchez Prada 2012-08-06 06:23:07 PDT
Created attachment 156680 [details]
Patch proposal

Patch addressing the issues pointed out by Carlos in https://bugs.webkit.org/show_bug.cgi?id=90268#c25
Comment 2 WebKit Review Bot 2012-08-06 06:27:18 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Carlos Garcia Campos 2012-08-06 06:33:49 PDT
Comment on attachment 156680 [details]
Patch proposal

View in context: https://bugs.webkit.org/attachment.cgi?id=156680&action=review

Please, check the comments I made here before landing, thanks!

> Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:485
> +    if (!spellCheckingLanguages.length())

Use spellCheckingLanguages.isNull() instead.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:517
> +    context->priv->textChecker->setSpellCheckingLanguages(CString(languages));

A char* can be assigned to a CString, so I'm not sure, but I think you can pass the languages directly here:

context->priv->textChecker->setSpellCheckingLanguages(languages);
Comment 4 Mario Sanchez Prada 2012-08-06 06:43:27 PDT
Committed r124763: <http://trac.webkit.org/changeset/124763>