Title: [118477] trunk/Source/WebCore
Revision
118477
Author
[email protected]
Date
2012-05-24 22:46:54 -0700 (Thu, 24 May 2012)

Log Message

[Forms][TextArea] Too long validation message doesn't count LF as CRLF
https://bugs.webkit.org/show_bug.cgi?id=87458

Reviewed by Kent Tamura.

This patch changes current number of characters in "too long" validation message
parameter to counting newline as 2 characters (CR and LF) as submission data.

No new tests. To have test for this change, we need to change localization
text handling during DRT. We'll try.

* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::validationMessage): Use computeLengthForSubmission instead of numGraphmeClusters.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (118476 => 118477)


--- trunk/Source/WebCore/ChangeLog	2012-05-25 05:41:03 UTC (rev 118476)
+++ trunk/Source/WebCore/ChangeLog	2012-05-25 05:46:54 UTC (rev 118477)
@@ -1,3 +1,19 @@
+2012-05-24  Yoshifumi Inoue  <[email protected]>
+
+        [Forms][TextArea] Too long validation message doesn't count LF as CRLF
+        https://bugs.webkit.org/show_bug.cgi?id=87458
+
+        Reviewed by Kent Tamura.
+
+        This patch changes current number of characters in "too long" validation message
+        parameter to counting newline as 2 characters (CR and LF) as submission data.
+
+        No new tests. To have test for this change, we need to change localization
+        text handling during DRT. We'll try.
+
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::validationMessage): Use computeLengthForSubmission instead of numGraphmeClusters.
+
 2012-05-24  Hayato Ito  <[email protected]>
 
         Fix crashes caused by a DOMCharacterDataModified event on a text node.

Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (118476 => 118477)


--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp	2012-05-25 05:41:03 UTC (rev 118476)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp	2012-05-25 05:46:54 UTC (rev 118477)
@@ -438,7 +438,7 @@
         return validationMessageValueMissingText();
 
     if (tooLong())
-        return validationMessageTooLongText(numGraphemeClusters(value()), maxLength());
+        return validationMessageTooLongText(computeLengthForSubmission(value()), maxLength());
 
     return String();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to