RESOLVED FIXED 52680
[chromium] Notify WebViewClient when spellcheck state changes
https://bugs.webkit.org/show_bug.cgi?id=52680
Summary [chromium] Notify WebViewClient when spellcheck state changes
Sailesh Agrawal
Reported 2011-01-18 16:14:44 PST
[chromium] Event for spellcheck menu
Attachments
Patch (2.10 KB, patch)
2011-01-18 16:16 PST, Sailesh Agrawal
no flags
Patch (2.12 KB, patch)
2011-01-18 16:40 PST, Sailesh Agrawal
no flags
Patch (2.12 KB, patch)
2011-01-19 07:39 PST, Sailesh Agrawal
no flags
Patch (3.18 KB, patch)
2011-01-19 10:56 PST, Sailesh Agrawal
no flags
Sailesh Agrawal
Comment 1 2011-01-18 16:16:07 PST
Sailesh Agrawal
Comment 2 2011-01-18 16:19:29 PST
This is a part of the Chromium change to enable the "Check Spelling While Typing" menu item. It adds a event to allow clients to know when the continuous spell checking state has changed. See: http://codereview.chromium.org/6020017/
Nico Weber
Comment 3 2011-01-18 16:20:56 PST
Looks good to me, but I'm not a reviewer.
Ryosuke Niwa
Comment 4 2011-01-18 16:28:02 PST
Comment on attachment 79352 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79352&action=review > Source/WebKit/chromium/public/WebViewClient.h:192 > + // This method is called when continuous spelling is enabled or disabled. > + virtual void continuousSpellCheckingEnabledStateChanged() { } > + I don't think this should be a public member function. It should at least be private.
Ryosuke Niwa
Comment 5 2011-01-18 16:31:17 PST
(In reply to comment #4) > (From update of attachment 79352 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=79352&action=review > > > Source/WebKit/chromium/public/WebViewClient.h:192 > > + // This method is called when continuous spelling is enabled or disabled. > > + virtual void continuousSpellCheckingEnabledStateChanged() { } > > + > > I don't think this should be a public member function. It should at least be private. I take it back. I thought this was added to WebEditorClient.h
Ryosuke Niwa
Comment 6 2011-01-18 16:34:33 PST
Comment on attachment 79352 [details] Patch r=me now that I understand why this change is needed.
Ryosuke Niwa
Comment 7 2011-01-18 16:35:05 PST
Comment on attachment 79352 [details] Patch Oops, please update ChangeLog.
Sailesh Agrawal
Comment 8 2011-01-18 16:40:21 PST
WebKit Commit Bot
Comment 9 2011-01-19 04:32:21 PST
The commit-queue encountered the following flaky tests while processing attachment 79353 [details]: http/tests/appcache/fallback.html bug 52710 (authors: ap@webkit.org and michaeln@google.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 10 2011-01-19 04:32:49 PST
Comment on attachment 79353 [details] Patch Rejecting attachment 79353 [details] from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=eseidel-cq-sl', 'la..." exit_code: 1 Last 500 characters of output: n/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ... Currently at 76109 = 060014058f4dca178941270f8f25cad11e3c5110 r76110 = cfbc645577b3375c8578ec30aeacdbee54eb4fca r76111 = 74f79aced1389d503321aa45d3fd024f20010694 r76112 = da68231a03735b50fd0711d1aa0d4939131b9a02 Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Full output: http://queues.webkit.org/results/7584193
Sailesh Agrawal
Comment 11 2011-01-19 07:39:37 PST
WebKit Review Bot
Comment 12 2011-01-19 07:41:44 PST
Attachment 79425 [details] did not pass style-queue: Failed to run "['Tools/Scripts/update-webkit']" exit_code: 2 perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.US-ASCII" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). Updating OpenSource perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.US-ASCII" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). RA layer request failed: OPTIONS of 'http://svn.webkit.org/repository/webkit': could not connect to server (http://svn.webkit.org) at /usr/lib/git-core/git-svn line 2295 Died at Tools/Scripts/update-webkit line 132. If any of these errors are false positives, please file a bug against check-webkit-style.
Nico Weber
Comment 13 2011-01-19 07:53:15 PST
Comment on attachment 79425 [details] Patch Usually, the commit queue fills in the reviewer automatically. I wonder why it didn't this time.
Nico Weber
Comment 14 2011-01-19 07:58:54 PST
kling on IRC tells me that the tools didn't work in this case because patch set 1 had "r+ with comments", and the follow-up patch only had cq+. The tools only work if the final patch has the r+ bit set; i.e. if you get an "r+ with comments" and a non-reviewer sets cq+, you need to "manually" fill in the reviewer when you address the comments. (There's a script that can do this for you iirc.)
Darin Fisher (:fishd, Google)
Comment 15 2011-01-19 08:41:27 PST
Comment on attachment 79425 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79425&action=review > Source/WebKit/chromium/public/WebViewClient.h:191 > + virtual void continuousSpellCheckingEnabledStateChanged() { } This function name is a real mouthful. We also have a naming convention for methods like this, where they start with "didChange" instead. So, didChangeContinuousSpellCheckingEnabledState would be more consistent. I still find this method name to be overly verbose. Also, this method is on WebViewClient.h, and yet the corresponding methods to query the "spellchecking" state lives on WebFrame. shouldn't this notification method live on WebFrameClient, then?
Darin Fisher (:fishd, Google)
Comment 16 2011-01-19 08:43:13 PST
How about didToggleContinuousSpellChecking as a name? That is nice because "toggle" isn't precise about whether the feature was enabled or disabled. You have to query WebFrame::isContinuousSpellCheckingEnabled. Also, "toggle" is used by the corresponding EditorClient method.
Darin Fisher (:fishd, Google)
Comment 17 2011-01-19 08:44:39 PST
One more comment: Should WebFrameClient::didToggleContinuousSpellChecking be called in response to WebFrame::enableContinousSpellChecking? I'm assuming that you don't need it to be, but just from studying the interfaces it is not obvious that it behaves this way. You should add a comment explaining this subtle behavior.
Sailesh Agrawal
Comment 18 2011-01-19 10:56:50 PST
Sailesh Agrawal
Comment 19 2011-01-19 11:38:14 PST
(In reply to comment #17) > One more comment: > > Should WebFrameClient::didToggleContinuousSpellChecking be called in response to WebFrame::enableContinousSpellChecking? I'm assuming that you don't need it to be, but just from studying the interfaces it is not obvious that it behaves this way. You should add a comment explaining this subtle behavior. I added a comment to WebFrameImpl::enableContinuousSpellChecking() noting that didToggleContinuousSpellChecking is called in EditorClientImpl.
WebKit Commit Bot
Comment 20 2011-01-21 12:13:30 PST
Comment on attachment 79452 [details] Patch Clearing flags on attachment: 79452 Committed r76377: <http://trac.webkit.org/changeset/76377>
WebKit Commit Bot
Comment 21 2011-01-21 12:13:38 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.