In order to support various white-space values in TEXTAREA, we should stop using <br> in the shadow editor element.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/25aea97085534bf697de9286ac1b419baed7a4d9 commit 25aea97085534bf697de9286ac1b419baed7a4d9 Author: tkent <tkent@chromium.org> Date: Wed Mar 09 08:57:40 2016 Do not produce BR elements on pasting plain text in TEXTAREA This CL makes already-broken TEXTAREA with white-space:normal/nowrap more broken. We'll fix it soon. This CL has no behavior changes in other cases. BUG= 593184 Review URL: https://codereview.chromium.org/1776913002 Cr-Commit-Position: refs/heads/master@{#380105} [modify] https://crrev.com/25aea97085534bf697de9286ac1b419baed7a4d9/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-nowrap-paste-eol-expected.txt [modify] https://crrev.com/25aea97085534bf697de9286ac1b419baed7a4d9/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b commit 764e6bb1b05458cde3ca0702ceb801d25c3dcc3b Author: Kent Tamura <tkent@chromium.org> Date: Thu Mar 10 02:31:31 2016 Do not use setInnerText in INPUT / TEXTAREA. Use replaceChildrenWithText instead. This means we don't produce <br> in shadow editing elements of TEXTAREA on setting value. This change is basically not user-visible except TEXTAREAs with unusual white-space values. Such TEXTAREAs are already broken and we'll fix them soon. BUG= 268807 , 593184 R=yosin@chromium.org Review URL: https://codereview.chromium.org/1776903003 . Cr-Commit-Position: refs/heads/master@{#380313} [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-preline-eol-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/platform/mac/editing/input/reveal-caret-of-multiline-input-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/basic-textareas-quirks-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-scroll-height-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-scrollbar-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-scrolled-focus-ring-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-scrolled-mask-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-scrolled-type-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-width-expected.txt [modify] https://crrev.com/764e6bb1b05458cde3ca0702ceb801d25c3dcc3b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/37f57d892222dc0ed816ae004074d7c80600ad46 commit 37f57d892222dc0ed816ae004074d7c80600ad46 Author: tkent <tkent@chromium.org> Date: Thu Mar 10 10:53:00 2016 TEXTAREA: Cutting last line without EOL should not remove the remaining EOL in the previous line. Our TEXTAREA element assumes there is an extra trailing <BR> or \n if the last character of the value is \n. So we remove the last \n when we generate value from innerEditor content. However, the assumption was broken if we cut the last line content without EOL. Editing code doesn't add an extra <BR> in such case. We removed the last \n in the value mistakenly. Solution: We should make sure there no <BR> elements in innerEditor except the extra trailing one so that we can ignore it safely on generating TEXTAREA value. Also, we should make sure editing code doesn't add \n for placeholder newline. - HTMLTextAreaElement simply ignore the last <BR> on generating value. - HTMLTextAreaElement makes sure that innerEditor has the last <BR> after every editing operations. - InsertLineBreakCommand always inserts \n for plain text editing field, however it produces <BR> as an extra line break for TEXTAREA. - ReplaceSelectionCommand appends a <BR> for an InterchangeNewline at the end. - InsertTextCommand should not produce TabSpans for plain text editing. BUG= 522144 , 593184 Review URL: https://codereview.chromium.org/1785603002 Cr-Commit-Position: refs/heads/master@{#380385} [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/LayoutTests/editing/pasteboard/copy-image-with-alt-text-expected.txt [delete] https://crrev.com/229e744a728a91ab3753882fa4413f10c28678cd/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-value-last-eol-expected.txt [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-value-last-eol.html [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/LayoutTests/platform/mac/editing/inserting/4960120-1-expected.txt [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp [modify] https://crrev.com/37f57d892222dc0ed816ae004074d7c80600ad46/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/390847b60c7d8a829c9a28c7c2f6d4a707080fd7 commit 390847b60c7d8a829c9a28c7c2f6d4a707080fd7 Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org> Date: Mon Mar 14 17:59:31 2016 Auto-rebaseline for r380313 https://chromium.googlesource.com/chromium/src/+/764e6bb1b BUG= 593184 TBR=tkent@chromium.org Review URL: https://codereview.chromium.org/1804653002 . Cr-Commit-Position: refs/heads/master@{#381002} [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/editing/input/reveal-caret-of-multiline-input-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/basic-textareas-quirks-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/textarea-scroll-height-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/textarea-scrollbar-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/textarea-scrolled-focus-ring-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/textarea-scrolled-mask-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/textarea-scrolled-type-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/forms/textarea/textarea-width-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/parser/open-comment-in-textarea-expected.txt [add] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/android/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/editing/input/reveal-caret-of-multiline-input-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-scroll-height-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-scrollbar-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-scrolled-focus-ring-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-scrolled-mask-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-scrolled-type-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-width-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/fast/parser/open-comment-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/linux/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/editing/input/reveal-caret-of-multiline-input-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/basic-textareas-quirks-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-scroll-height-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-scrollbar-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-scrolled-focus-ring-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-scrolled-mask-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-scrolled-type-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/parser/open-comment-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/editing/input/reveal-caret-of-multiline-input-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/basic-textareas-quirks-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-scroll-height-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-scrollbar-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-scrolled-focus-ring-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-scrolled-mask-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-scrolled-type-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/parser/open-comment-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-scrollbar-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac/fast/parser/open-comment-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/mac/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/editing/input/reveal-caret-of-multiline-input-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/basic-textareas-quirks-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-scroll-height-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-scrollbar-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-scrolled-focus-ring-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-scrolled-mask-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-scrolled-type-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-width-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/parser/open-comment-in-textarea-expected.txt [modify] https://crrev.com/390847b60c7d8a829c9a28c7c2f6d4a707080fd7/third_party/WebKit/LayoutTests/platform/win/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2052a822d87267737a19c85b1e88edb8ec2f7e23 commit 2052a822d87267737a19c85b1e88edb8ec2f7e23 Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org> Date: Mon Mar 14 18:01:54 2016 Auto-rebaseline for r380385 https://chromium.googlesource.com/chromium/src/+/37f57d892 BUG= 593184 TBR=tkent@chromium.org Review URL: https://codereview.chromium.org/1793183003 . Cr-Commit-Position: refs/heads/master@{#381003} [modify] https://crrev.com/2052a822d87267737a19c85b1e88edb8ec2f7e23/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/2052a822d87267737a19c85b1e88edb8ec2f7e23/third_party/WebKit/LayoutTests/platform/android/editing/inserting/4960120-1-expected.txt [modify] https://crrev.com/2052a822d87267737a19c85b1e88edb8ec2f7e23/third_party/WebKit/LayoutTests/platform/linux/editing/inserting/4960120-1-expected.txt [modify] https://crrev.com/2052a822d87267737a19c85b1e88edb8ec2f7e23/third_party/WebKit/LayoutTests/platform/mac-mac10.9/editing/inserting/4960120-1-expected.txt [modify] https://crrev.com/2052a822d87267737a19c85b1e88edb8ec2f7e23/third_party/WebKit/LayoutTests/platform/win/editing/inserting/4960120-1-expected.txt
Comment 1 by tkent@chromium.org
, Mar 9 2016Status: Started (was: Available)