Editor class has two difference code paths for spell-checking: (1) checkTextOfParagraph() for Snow Leopard or later (2) checkSpellingOfString() and checkGrammarOfString() for other platforms. These paths should be unified so that improving spell-checking code is easy. To achieve the goal, checkTextOfParagraph() interface should be available even if its implementation cannot be used. In such a case, checkTextOfParagraph() should be implemented using checkSpellingOfString() and checkGrammarOfString().
Created attachment 111389 [details] Patch
Comment on attachment 111389 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=111389&action=review > Source/WebCore/page/Settings.cpp:199 > +#if USE(UNIFIED_TEXT_CHECKING) || PLATFORM(CHROMIUM) Let's do this at a separate change to allow revert easily because this can cause some unexpected, hard-to-fix regression. (I hope not though.) At this point, I recommend - to add WebCore::Internals API to flip the flag, and - to add some tests for our emulating code, especially with enabling this flag. The test would have -- a test case for some non-whitespace segmentation -- a test case containing multiple bad words -- a test case containing a bad word which located at the beginning, middle, end of the paragraph. -- a test case containing a valid word which contains a bad word as a substring.
Created attachment 111601 [details] Patch
Comment on attachment 111601 [details] Patch Attachment 111601 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/10145415
Created attachment 111722 [details] Patch
Comment on attachment 111722 [details] Patch Trying to build fix win & gtk.
Created attachment 111724 [details] Patch
(In reply to comment #7) > Created an attachment (id=111724) [details] > Patch morrita-san, Could you review this?
Comment on attachment 111724 [details] Patch The code look good in general. in test, could you use unit testing framework if possible ? It makes the test expectation readable. You can see an example in existing tests like: http://trac.webkit.org/browser/trunk/LayoutTests/editing/spelling/spelling-insert-html.html for example.
Created attachment 112444 [details] Patch
(In reply to comment #10) > Created an attachment (id=112444) [details] > Patch Hi, I've change the test. Could you review it again?
Created attachment 112445 [details] Patch
Comment on attachment 112445 [details] Patch Thanks for the update.
Comment on attachment 112445 [details] Patch Clearing flags on attachment: 112445 Committed r98556: <http://trac.webkit.org/changeset/98556>
All reviewed patches have been landed. Closing bug.
This patch appears to have broken editing/spelling/spelling-unified-emulation.html on SL: http://build.webkit.org/results/SnowLeopard%20Intel%20Release%20(Tests)/r98564%20(34231)/results.html Blame list: http://trac.webkit.org/log/?action=stop_on_copy&mode=stop_on_copy&rev=98563&stop_rev=98534&limit=100&verbose=on
Oops, I didn't realize but the failing test was added by this patch!
I'm going to rollout the patch for now because it's failing at least on Mac and GTK.
Reopen the bug since the patch was rolled out.
Created attachment 114600 [details] Patch
Comment on attachment 114600 [details] Patch Basically OK. But Source/WebKit2/ChangeLog is broken. Please check the character encoding setting of your editor.
Created attachment 114610 [details] Patch
morrita-san, sorry for bothering you...
Comment on attachment 114610 [details] Patch Clearing flags on attachment: 114610 Committed r100050: <http://trac.webkit.org/changeset/100050>
Hi, the new test what is added by the patch (editing/spelling/spelling-unified-emulation.html) is failng on GTK and Qt. Please look at this bug: https://bugs.webkit.org/show_bug.cgi?id=72251