textarea[maxlength]: A linebreak should be counted as 1. |
|||||
Issue descriptionBehavior of <textarea maxlength=> in major browsers are not compatible. We should resolve it. See a specification issue for the detail: https://github.com/whatwg/html/issues/1467
,
Jun 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/53cf4f2c9884188d7625b2387fdc45c5aec61e5d commit 53cf4f2c9884188d7625b2387fdc45c5aec61e5d Author: tkent <tkent@chromium.org> Date: Wed Jun 29 14:54:17 2016 UseCounter: Count usage of textarea[maxlength] and textarea[minlength]. This is a preparation for a possible specification change. https://github.com/whatwg/html/issues/1467 BUG= 624361 TBR=isherman@chromium.org Review-Url: https://codereview.chromium.org/2104893005 Cr-Commit-Position: refs/heads/master@{#402806} [modify] https://crrev.com/53cf4f2c9884188d7625b2387fdc45c5aec61e5d/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/53cf4f2c9884188d7625b2387fdc45c5aec61e5d/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp [modify] https://crrev.com/53cf4f2c9884188d7625b2387fdc45c5aec61e5d/tools/metrics/histograms/histograms.xml
,
Jul 3 2016
,
Aug 26 2016
The specification has been updated so that a single line break is counted as 1. https://github.com/whatwg/html/commit/163703186794c21daa92cc2718218afa44f26071 We should do 1. Wait until the counters of #2 become stable. That is to say, M53 stable push. 2. Create chromestatu.com entry 3. If the counters are not ignorable, send an intent-to-ship to blink-dev. 4. Change the behavior.
,
Sep 28 2016
,
Sep 28 2016
Intent-to-ship was approved.
,
Sep 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a15474ff7adff41a8956ab436ac63a7d5b7a090f commit a15474ff7adff41a8956ab436ac63a7d5b7a090f Author: tkent <tkent@chromium.org> Date: Wed Sep 28 04:21:15 2016 Change the linebreak behavior of minlength and maxlength attributes of TEXTAREA. Change it in response to a specification change, and to improve compatibility with Firefox and Edge. Old behavior: CRLF, CR, or LF is counted as 2 because we limited the submission value. New behavior: CRLF, CR, or LF is counted as 1 because we limit the API value. We can use HTMLTextAreaElement::value().length() as is because it's the API value, and other string input should be counted by computeLengthForAPIValue(). Approved intent-to-ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/MkSfvCan7kY/PgniO8jwAAAJ BUG= 624361 Review-Url: https://codereview.chromium.org/2380473002 Cr-Commit-Position: refs/heads/master@{#421445} [modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-maxlength-expected.txt [modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-maxlength.html [modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/LayoutTests/fast/forms/validationMessage-expected.txt [modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp [modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/Source/core/html/HTMLTextAreaElementTest.cpp
,
Sep 28 2016
That's all which we can do. WebKit and Edge violate the specification about non-BMP characters, but we can't do anything for them. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by tkent@chromium.org
, Jun 29 2016