[Webkit-unassigned] [Bug 51013] [Chromium] Should implement EditorClientImpl::requestCheckingOfString()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 15 12:43:51 PST 2010


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





--- Comment #8 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2010-12-15 12:43:51 PST ---
(From update of attachment 76627)
View in context: https://bugs.webkit.org/attachment.cgi?id=76627&action=review

> WebKit/chromium/public/WebViewClient.h:178
> +    // Requests asynchronous spell and grammar checking. The result should be returned by 
> +    // WebView::respondCheckingOfString()
> +    virtual void requestTextCheck(int sequence, const WebString&) { }

nit: find-in-page APIs are somewhat similar in that there are methods on WebFrame
and WebFrameClient that work asynchronously in unison.  in that API, we use the
term "identifier" instead of "sequence", so for consistency it would be better to
do the same thing here.

another idea though is to follow the model used by WebViewClient::runFileChooser.
it defines a WebFileChooserCompletion interface that gets invoked by the embedder
when the embedder wishes to push results back into WebKit.  this model allows you
to avoid the concept of "identifier" altogether.  (it actually ends up pushing it
up to the Chromium layer where we generate IPCs, but that isn't a bad thing.)

so, going with that model, you'd end up with an API that might look like:

  WebViewClient::requestTextCheck(const WebString&, WebTextCheckCompletion*)

then,

  class WebTextCheckCompletion {
  public:
      virtual void didCheckText(const WebVector<WebTextCheckResult>&) = 0;
  protected:
      virtual ~WebTextCheckCompletion() {}
  };

the WebTextCheckCompletion object would be deleted by the didCheckText method.

one more comment:  i find the term "text check" to be quite awkward.  i think we
can do better.  maybe "languageCheck"?

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