As written in Bug 41832 <https://bugs.webkit.org/show_bug.cgi?id=41832>, I have added textInputController.hasSpellingMarker() so we can write text-based tests for spellcheckers. Unfortunately, this implementation is only for Mac DumpRenderTree and we need to implemented this function for Chromium DumpRenderTree.
OK, I'll take this.
Created attachment 67154 [details]
A draft implementation (just for your information)
Thank you for taking this issue.
I would like to post my quick implementation. I wish it helps.
By the way, Chromium DumpRenderTree checks the spellings of text only on Mac as shown in the following snippet copied from <http://svn.webkit.org/repository/webkit/trunk/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp>.
void WebViewHost::spellCheck(const WebString& text, int& misspelledOffset, int& misspelledLength)
// Check the spelling of the given text.
// FIXME: rebaseline layout-test results of Windows and Linux so we
// can enable this mock spellchecker on them.
m_spellcheck.spellCheckWord(text, &misspelledOffset, &misspelledLength);
Should we add another API to DumpRenderTree so we can enable/disable spell-checking?
Created attachment 67162 [details]
Moving the code into Editor.cpp sounds fine to me, but just to make sure, Eric, is it OK for us to have this method which is currently only used in testing in WebCore (rather than WebKit)?
(In reply to comment #5)
> Moving the code into Editor.cpp sounds fine to me, but just to make sure, Eric, is it OK for us to have this method which is currently only used in testing in WebCore (rather than WebKit)?
Hi, I'll land this soon seeing no objection here.
Looks fine to me. We have a bunch of code in WebCore which is only used by DRT.
Committed r67362: <http://trac.webkit.org/changeset/67362>