Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 41ea6427c93797b6c7aceb36d05329618ddd87b9
https://github.com/WebKit/WebKit/commit/41ea6427c93797b6c7aceb36d05329618ddd87b9
Author: Ahmad Saleem <[email protected]>
Date: 2022-12-09 (Fri, 09 Dec 2022)
Changed paths:
A LayoutTests/editing/inserting/insert-space-expected.txt
A LayoutTests/editing/inserting/insert-space.html
A LayoutTests/resources/assert-selection.js
M Source/WebCore/editing/CompositeEditCommand.cpp
Log Message:
-----------
Add a nbsp at the the end of the text when the next text has a leading 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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes