HTMLTextFormControlElement::valueWithHardLineBreaks shouldn't upconvert 8-bit string
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Jul 2013 14:49:38 +0000 (14:49 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Jul 2013 14:49:38 +0000 (14:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=118631

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/2c7c70a7bd3d61bfbf97de95c459ec9f40b46e31.

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):

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

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLTextFormControlElement.cpp

index c9d514791b822720d438062e66c89cfaebcab73b..0ca4ab858c2990580d955a13c76f4d936b1a270b 100644 (file)
@@ -1,3 +1,15 @@
+2013-07-14  Ryosuke Niwa  <rniwa@webkit.org>
+
+        HTMLTextFormControlElement::valueWithHardLineBreaks shouldn't upconvert 8-bit string
+        https://bugs.webkit.org/show_bug.cgi?id=118631
+
+        Reviewed by Andreas Kling.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/2c7c70a7bd3d61bfbf97de95c459ec9f40b46e31.
+
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
+
 2013-07-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Add toSVGFilterElement() and use it.
index 8cd12cfe006e370940dc27fbe9dfa5bc58df7337..32bbb1e98ba5cbdb064f718b43d740929e63f408 100644 (file)
@@ -616,13 +616,13 @@ String HTMLTextFormControlElement::valueWithHardLineBreaks() const
             unsigned position = 0;
             while (breakNode == node && breakOffset <= length) {
                 if (breakOffset > position) {
-                    result.append(data.characters() + position, breakOffset - position);
+                    result.append(data, position, breakOffset - position);
                     position = breakOffset;
                     result.append(newlineCharacter);
                 }
                 getNextSoftBreak(line, breakNode, breakOffset);
             }
-            result.append(data.characters() + position, length - position);
+            result.append(data, position, length - position);
         }
         while (breakNode == node)
             getNextSoftBreak(line, breakNode, breakOffset);