Title: [129537] trunk/Source/WebKit/gtk
Revision
129537
Author
[email protected]
Date
2012-09-25 12:11:28 -0700 (Tue, 25 Sep 2012)

Log Message

[GTK] Webkit 1.8.2 fails to build with MinGW with spellchecking enabled
https://bugs.webkit.org/show_bug.cgi?id=93255

Patch by PaweÅ‚ Forysiuk <[email protected]> on 2012-09-25
Reviewed by Martin Robinson.

Build dies because of invalid cast. Additionaly word "interface" is in use with MinGW compiler.

* WebCoreSupport/TextCheckerClientGtk.cpp:
(WebKit::TextCheckerClientGtk::checkSpellingOfString): Use String to avoid unneded casting
* webkit/webkitspellcheckerenchant.cpp:
(webkit_spell_checker_enchant_spell_checker_interface_init): rename interface -> checkerInterface

Modified Paths

Diff

Modified: trunk/Source/WebKit/gtk/ChangeLog (129536 => 129537)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-09-25 19:06:41 UTC (rev 129536)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-09-25 19:11:28 UTC (rev 129537)
@@ -1,3 +1,17 @@
+2012-09-25  PaweÅ‚ Forysiuk  <[email protected]>
+
+        [GTK] Webkit 1.8.2 fails to build with MinGW with spellchecking enabled
+        https://bugs.webkit.org/show_bug.cgi?id=93255
+
+        Reviewed by Martin Robinson.
+
+        Build dies because of invalid cast. Additionaly word "interface" is in use with MinGW compiler.
+
+        * WebCoreSupport/TextCheckerClientGtk.cpp:
+        (WebKit::TextCheckerClientGtk::checkSpellingOfString): Use String to avoid unneded casting
+        * webkit/webkitspellcheckerenchant.cpp:
+        (webkit_spell_checker_enchant_spell_checker_interface_init): rename interface -> checkerInterface
+
 2012-09-24  Benjamin Poulain  <[email protected]>
 
         Fix Geolocation error reporting in the test support

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp (129536 => 129537)


--- trunk/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp	2012-09-25 19:06:41 UTC (rev 129536)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.cpp	2012-09-25 19:11:28 UTC (rev 129537)
@@ -61,8 +61,8 @@
 
 void TextCheckerClientGtk::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength)
 {
-    GOwnPtr<gchar> utf8Text(g_utf16_to_utf8(const_cast<gunichar2*>(text), length, 0, 0, 0));
-    webkit_spell_checker_check_spelling_of_string(m_spellChecker.get(), utf8Text.get(), misspellingLocation, misspellingLength);
+    String textAsString(text, length);
+    webkit_spell_checker_check_spelling_of_string(m_spellChecker.get(), textAsString.utf8().data(), misspellingLocation, misspellingLength);
 }
 
 String TextCheckerClientGtk::getAutoCorrectSuggestionForMisspelledWord(const String& inputWord)

Modified: trunk/Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp (129536 => 129537)


--- trunk/Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp	2012-09-25 19:06:41 UTC (rev 129536)
+++ trunk/Source/WebKit/gtk/webkit/webkitspellcheckerenchant.cpp	2012-09-25 19:11:28 UTC (rev 129537)
@@ -43,7 +43,7 @@
     OwnPtr<TextCheckerEnchant> textCheckerEnchant;
 };
 
-static void webkit_spell_checker_enchant_spell_checker_interface_init(WebKitSpellCheckerInterface* interface);
+static void webkit_spell_checker_enchant_spell_checker_interface_init(WebKitSpellCheckerInterface* checkerInterface);
 
 G_DEFINE_TYPE_WITH_CODE(WebKitSpellCheckerEnchant, webkit_spell_checker_enchant, G_TYPE_OBJECT,
                         G_IMPLEMENT_INTERFACE(WEBKIT_TYPE_SPELL_CHECKER,
@@ -122,14 +122,14 @@
     priv->textCheckerEnchant->ignoreWord(String::fromUTF8(word));
 }
 
-static void webkit_spell_checker_enchant_spell_checker_interface_init(WebKitSpellCheckerInterface* interface)
+static void webkit_spell_checker_enchant_spell_checker_interface_init(WebKitSpellCheckerInterface* checkerInterface)
 {
-    interface->check_spelling_of_string = checkSpellingOfString;
-    interface->get_guesses_for_word = getGuessesForWord;
-    interface->update_spell_checking_languages = updateSpellCheckingLanguages;
-    interface->get_autocorrect_suggestions_for_misspelled_word = getAutocorrectSuggestionsForMisspelledWord;
-    interface->learn_word = learnWord;
-    interface->ignore_word = ignoreWord;
+    checkerInterface->check_spelling_of_string = checkSpellingOfString;
+    checkerInterface->get_guesses_for_word = getGuessesForWord;
+    checkerInterface->update_spell_checking_languages = updateSpellCheckingLanguages;
+    checkerInterface->get_autocorrect_suggestions_for_misspelled_word = getAutocorrectSuggestionsForMisspelledWord;
+    checkerInterface->learn_word = learnWord;
+    checkerInterface->ignore_word = ignoreWord;
 }
 
 #endif /* ENABLE(SPELLCHECK) */
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to