Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add a nbsp at the the end of the text when the next text has a leadin…
…g space Add a nbsp at the the end of the text when the next text has a leading space https://bugs.webkit.org/show_bug.cgi?id=248723 Reviewed by Ryosuke Niwa. This patch is to fix three regressions stemming from 257136@main. 1) Breaking chat window or login forms while trying to press 'space' key. 2) Add nbsp instead of plain space between text nodes in case next text node has a leading plain space. 3) Not accounting for all kind of whitespaces including "Enter" These are merge of following Blink commits: > https://chromium.googlesource.com/chromium/src.git/+/4dab74137593abb0888e415294aeb80da27362e3 > https://chromium.googlesource.com/chromium/src.git/+/9ebff223d5d639167c3efb01a5fa912b3aee05a9 > https://chromium.googlesource.com/chromium/src.git/+/5b9a9a6f8c9c646ac542a9e1a2f18c59140849e6 * Source/WebCore/editing/CompositeEditingCommand.cpp: (CompositeEditCommand::rebalanceWhitespaceOnTextSubtring): (1) Add logic to account for leading space (including "Enter" key) (2) accept "Space" Key (3) Refactor code by introducing const bool "nextSiblingIsTextNodeWithoutLeadingSpace" * LayoutTests/resources/assert-selection.js: Added Test Script with Chromium Copyright header * LayoutTests/editing/inserting/insert-space.html: Added Test Case * LayoutTests/editing/inserting/insert-space-expected.txt: Added Test Case Expectation Canonical link: https://commits.webkit.org/257622@main
- Loading branch information