Max build fix.
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 01:50:35 +0000 (01:50 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 01:50:35 +0000 (01:50 +0000)
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::checkSpellingOfString):
Do not risk an overflow.
(WebKit::WebEditorClient::checkGrammarOfString):
Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83238 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp

index 17ec00d..10b210b 100644 (file)
@@ -1,5 +1,15 @@
 2011-04-07  Jessie Berlin  <jberlin@apple.com>
 
+        Max build fix.
+
+        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
+        (WebKit::WebEditorClient::checkSpellingOfString):
+        Do not risk an overflow.
+        (WebKit::WebEditorClient::checkGrammarOfString):
+        Ditto.
+
+2011-04-07  Jessie Berlin  <jberlin@apple.com>
+
         Reviewed by Brian Weinstein.
 
         WebKit2: Implement TextChecker on Windows
index ce122c8..fcab6c3 100644 (file)
@@ -405,7 +405,7 @@ void WebEditorClient::learnWord(const String& word)
 
 void WebEditorClient::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength)
 {
-    int32_t resultLocation = WTF::notFound;
+    int32_t resultLocation = -1;
     int32_t resultLength = 0;
     // FIXME: It would be nice if we wouldn't have to copy the text here.
     m_page->sendSync(Messages::WebPageProxy::CheckSpellingOfString(String(text, length)),
@@ -422,7 +422,7 @@ String WebEditorClient::getAutoCorrectSuggestionForMisspelledWord(const String&)
 
 void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector<WebCore::GrammarDetail>& grammarDetails, int* badGrammarLocation, int* badGrammarLength)
 {
-    int32_t resultLocation = WTF::notFound;
+    int32_t resultLocation = -1;
     int32_t resultLength = 0;
     // FIXME: It would be nice if we wouldn't have to copy the text here.
     m_page->sendSync(Messages::WebPageProxy::CheckGrammarOfString(String(text, length)),