[Webkit-unassigned] [Bug 93255] [GTK] Webkit 1.8.2 fails to build with MinGW with spellchecking enabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 24 09:15:14 PDT 2012


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





--- Comment #10 from Martin Robinson <mrobinson at webkit.org>  2012-09-24 09:15:41 PST ---
(From update of attachment 156956)
View in context: https://bugs.webkit.org/attachment.cgi?id=156956&action=review

>> Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp:64
>> +    GOwnPtr<gchar> utf8Text(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(text), length, 0, 0, 0));
> 
> I mentioned this to pfor via IRC, but I'll leave it here for posterity: I think it might be necessary here to use  g_ucs4_to_utf8 instead of simply casting 32-bit characters to 16-bit.

I think it's possible to simply avoid the casts altogether by using the WTFString API:

String textAsString(text, length);
webkit_spell_checker_check_spelling_of_string(m_spellChecker.get(), textAsString.utf8().data(), misspellingLocation, misspellingLength);

If that's possible let's do that. That's both a little cleaner and uses less casting, which can be potentially dangerous.

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