Title: [125609] trunk/Source/WebKit/blackberry
Revision
125609
Author
mifen...@rim.com
Date
2012-08-14 14:35:06 -0700 (Tue, 14 Aug 2012)

Log Message

[BlackBerry] Remove unnecessary \n's from InputHandler log messages.
https://bugs.webkit.org/show_bug.cgi?id=94015

Reviewed by Rob Buis.

Remove many unnecessary \n's from the end of log messages.

Reviewed Internally by Nima Ghanavatian.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::convertStringToWcharVector):
(BlackBerry::WebKit::convertSpannableStringToString):
(BlackBerry::WebKit::InputHandler::spannableTextInRange):
(BlackBerry::WebKit::InputHandler::setText):
(BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (125608 => 125609)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-08-14 21:33:56 UTC (rev 125608)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-08-14 21:35:06 UTC (rev 125609)
@@ -1,3 +1,21 @@
+2012-08-14  Mike Fenton  <mifen...@rim.com>
+
+        [BlackBerry] Remove unnecessary \n's from InputHandler log messages.
+        https://bugs.webkit.org/show_bug.cgi?id=94015
+
+        Reviewed by Rob Buis.
+
+        Remove many unnecessary \n's from the end of log messages.
+
+        Reviewed Internally by Nima Ghanavatian.
+
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::convertStringToWcharVector):
+        (BlackBerry::WebKit::convertSpannableStringToString):
+        (BlackBerry::WebKit::InputHandler::spannableTextInRange):
+        (BlackBerry::WebKit::InputHandler::setText):
+        (BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):
+
 2012-08-14  Nima Ghanavatian  <nghanavat...@rim.com>
 
         [BlackBerry] Queue spellcheck requests with char-count limitations

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (125608 => 125609)


--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2012-08-14 21:33:56 UTC (rev 125608)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp	2012-08-14 21:35:06 UTC (rev 125609)
@@ -460,7 +460,7 @@
         return true;
 
     if (!wcharString.tryReserveCapacity(length + 1)) {
-        logAlways(LogLevelCritical, "InputHandler::convertStringToWcharVector Cannot allocate memory for string.\n");
+        logAlways(LogLevelCritical, "InputHandler::convertStringToWcharVector Cannot allocate memory for string.");
         return false;
     }
 
@@ -480,7 +480,7 @@
     WTF::Vector<UChar> dest;
     int destCapacity = (src->length * 2) + 1;
     if (!dest.tryReserveCapacity(destCapacity)) {
-        logAlways(LogLevelCritical, "InputHandler::convertSpannableStringToString Cannot allocate memory for string.\n");
+        logAlways(LogLevelCritical, "InputHandler::convertSpannableStringToString Cannot allocate memory for string.");
         return String();
     }
 
@@ -1783,14 +1783,14 @@
     // crash immediately on failure.
     pst->str = (wchar_t*)malloc(sizeof(wchar_t) * (length + 1));
     if (!pst->str) {
-        logAlways(LogLevelCritical, "InputHandler::spannableTextInRange Cannot allocate memory for string.\n");
+        logAlways(LogLevelCritical, "InputHandler::spannableTextInRange Cannot allocate memory for string.");
         free(pst);
         return 0;
     }
 
     int stringLength = 0;
     if (!convertStringToWchar(textString, pst->str, length + 1, &stringLength)) {
-        logAlways(LogLevelCritical, "InputHandler::spannableTextInRange failed to convert string.\n");
+        logAlways(LogLevelCritical, "InputHandler::spannableTextInRange failed to convert string.");
         free(pst->str);
         free(pst);
         return 0;
@@ -1999,7 +1999,7 @@
     String textToInsert = convertSpannableStringToString(spannableString);
     int textLength = textToInsert.length();
 
-    InputLog(LogLevelInfo, "InputHandler::setText spannableString is '%s', of length %d \n", textToInsert.latin1().data(), textLength);
+    InputLog(LogLevelInfo, "InputHandler::setText spannableString is '%s', of length %d", textToInsert.latin1().data(), textLength);
 
     span_t* changedSpan = firstSpanInString(spannableString, CHANGED_ATTRIB);
     int composingTextStart = m_composingTextStart;
@@ -2010,10 +2010,10 @@
     if (isTrailingSingleCharacter(changedSpan, textLength, composingTextLength)) {
         // Handle the case where text is being composed.
         if (firstSpanInString(spannableString, COMPOSED_TEXT_ATTRIB)) {
-            InputLog(LogLevelInfo, "InputHandler::setText Single trailing character detected.  Text is being composed. \n");
+            InputLog(LogLevelInfo, "InputHandler::setText Single trailing character detected.  Text is being composed.");
             return editor->command("InsertText").execute(textToInsert.right(1));
         }
-        InputLog(LogLevelInfo, "InputHandler::setText Single trailing character detected. Text is not being composed. \n");
+        InputLog(LogLevelInfo, "InputHandler::setText Single trailing character detected. Text is not being composed.");
         return handleKeyboardInput(Platform::KeyboardEvent(textToInsert[textLength - 1], Platform::KeyboardEvent::KeyChar, 0), false /* changeIsPartOfComposition */);
     }
 
@@ -2021,12 +2021,12 @@
     if (!changedSpan) {
         // If the composition length is the same as our string length, then we don't need to do anything.
         if (composingTextLength == textLength) {
-            InputLog(LogLevelInfo, "InputHandler::setText No spans have changed. New text is the same length as the old. Nothing to do. \n");
+            InputLog(LogLevelInfo, "InputHandler::setText No spans have changed. New text is the same length as the old. Nothing to do.");
             return true;
         }
 
         if (composingTextLength - textLength == 1) {
-            InputLog(LogLevelInfo, "InputHandler::setText No spans have changed. New text is one character shorter than the old. Treating as 'delete'. \n");
+            InputLog(LogLevelInfo, "InputHandler::setText No spans have changed. New text is one character shorter than the old. Treating as 'delete'.");
             return editor->command("DeleteBackward").execute();
         }
     }
@@ -2059,7 +2059,7 @@
     if (textLength == 1 && !spannableString->spans_count) {
         // Handle single key non-attributed entry as key press rather than insert to allow
         // triggering of _javascript_ events.
-        InputLog(LogLevelInfo, "InputHandler::setText Single character entry treated as key-press in the absense of spans. \n");
+        InputLog(LogLevelInfo, "InputHandler::setText Single character entry treated as key-press in the absense of spans.");
         return handleKeyboardInput(Platform::KeyboardEvent(textToInsert[0], Platform::KeyboardEvent::KeyChar, 0), true /* changeIsPartOfComposition */);
     }
 
@@ -2141,7 +2141,7 @@
 
 bool InputHandler::setSpannableTextAndRelativeCursor(spannable_string_t* spannableString, int relativeCursorPosition, bool markTextAsComposing)
 {
-    InputLog(LogLevelInfo, "InputHandler::setSpannableTextAndRelativeCursor(%d, %d, %d)\n", spannableString->length, relativeCursorPosition, markTextAsComposing);
+    InputLog(LogLevelInfo, "InputHandler::setSpannableTextAndRelativeCursor(%d, %d, %d)", spannableString->length, relativeCursorPosition, markTextAsComposing);
     int insertionPoint = compositionActive() ? m_composingTextStart : selectionStart();
 
     ProcessingChangeGuard guard(this);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to