[webkit-reviews] review requested: [Bug 90269] [GTK] Add a new and reusable enchant-based spellchecker in WebCore : [Attachment 156071] Patch proposal

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 2 06:52:43 PDT 2012


Mario Sanchez Prada <msanchez at igalia.com> has asked  for review:
Bug 90269: [GTK] Add a new and reusable enchant-based spellchecker in WebCore
https://bugs.webkit.org/show_bug.cgi?id=90269

Attachment 156071: Patch proposal
https://bugs.webkit.org/attachment.cgi?id=156071&action=review

------- Additional Comments from Mario Sanchez Prada <msanchez at igalia.com>
Strike 3.

So it seems the problem happened due to wrong usage of CString::length(). I was
assuming it was returning the actual number of utf8 characters and it was
actually returning the number of elements in CString's internal vector holding
the data:

    size_t length = string.utf8().length();

...and this was causing trouble when special characters were present in the
layout test (as it was the case for those failing tests)

The right version of this code (in TextEnchantChecker::checkSpellingOfString())
would be like this:

    size_t length = string.length();

This new patch fixed that.


More information about the webkit-reviews mailing list