summaryrefslogtreecommitdiffstats
path: root/extensions/common
diff options
context:
space:
mode:
authortkent <tkent@chromium.org>2016-03-10 02:53:00 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-10 10:54:04 +0000
commit37f57d892222dc0ed816ae004074d7c80600ad46 (patch)
tree3e51250de5299179b6d7ef1b7c950a7b6e715054 /extensions/common
parent229e744a728a91ab3753882fa4413f10c28678cd (diff)
downloadchromium_src-37f57d892222dc0ed816ae004074d7c80600ad46.zip
chromium_src-37f57d892222dc0ed816ae004074d7c80600ad46.tar.gz
chromium_src-37f57d892222dc0ed816ae004074d7c80600ad46.tar.bz2
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}
Diffstat (limited to 'extensions/common')
0 files changed, 0 insertions, 0 deletions