Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Keep
br
while replacing plain texts with content ending with newline
Keep `br` while replacing plain texts with content ending with newline https://bugs.webkit.org/show_bug.cgi?id=90206 Reviewed by Ryosuke Niwa. Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=165565 The <br> after the insert position was removed while inserting a text ending with a newline. This caused the loss of the newline at the end of the inserted text. This fix adds extra condition checking for this scenario and keeps the <br> while replacing plain texts with content ending with newline. * Source/WebCore/editing/ReplaceSelectionCommand.cpp: (ReplaceSelectionCommand::doApply): Update logic to account for 'br' while inserting text with newline * LayoutTests/editing/pasteboard/paste-newline-in-all-selected-textarea.html: Add Test Case * LayoutTests/editing/pasteboard/paste-newline-in-all-selected-textarea-expected.txt: Add Test Case Expectation Canonical link: https://commits.webkit.org/257205@main
- Loading branch information