Title: [109526] trunk/Source/WebKit/blackberry
Revision
109526
Author
[email protected]
Date
2012-03-02 00:55:03 -0800 (Fri, 02 Mar 2012)

Log Message

Fix a warning in InputHandler::learnText()
https://bugs.webkit.org/show_bug.cgi?id=80049

Patch by Jacky Jiang <[email protected]> on 2012-03-02
Reviewed by Antonio Gomes.

Fix a warning of the comparison "textInField.length() <=
MaxLearnTextDataSize" in InputHandler::learnText().

Rubber-stamped internally by Mike Fenton.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::learnText):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (109525 => 109526)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-03-02 08:50:08 UTC (rev 109525)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-03-02 08:55:03 UTC (rev 109526)
@@ -1,3 +1,18 @@
+2012-03-02  Jacky Jiang  <[email protected]>
+
+        Fix a warning in InputHandler::learnText()
+        https://bugs.webkit.org/show_bug.cgi?id=80049
+
+        Reviewed by Antonio Gomes.
+
+        Fix a warning of the comparison "textInField.length() <=
+        MaxLearnTextDataSize" in InputHandler::learnText().
+
+        Rubber-stamped internally by Mike Fenton.
+
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::InputHandler::learnText):
+
 2012-03-01  Andy Chen  <[email protected]>
 
         [BlackBerry] Implement features for find-in-page

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (109525 => 109526)


--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2012-03-02 08:50:08 UTC (rev 109525)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2012-03-02 08:55:03 UTC (rev 109526)
@@ -64,7 +64,7 @@
 #define ENABLE_INPUT_LOG 0
 #define ENABLE_FOCUS_LOG 0
 
-static const int MaxLearnTextDataSize = 500;
+static const unsigned MaxLearnTextDataSize = 500;
 
 using namespace BlackBerry::Platform;
 using namespace WebCore;
@@ -368,7 +368,7 @@
         return;
 
     String textInField(elementText());
-    textInField = textInField.substring(std::max(0, static_cast<int>(textInField.length()) - MaxLearnTextDataSize), textInField.length());
+    textInField = textInField.substring(std::max(0, static_cast<int>(textInField.length() - MaxLearnTextDataSize)), textInField.length());
     textInField.remove(0, textInField.find(" "));
 
     // Build up the 500 character strings in word chunks.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to