DescriptionMerge 108668 - REGRESSION(r99076): WebKit pastes the trailing newline into a single-line text field
https://bugs.webkit.org/show_bug.cgi?id=79305
Reviewed by Tony Chang.
Source/WebCore:
The bug was caused by ReplacementFragment::m_hasInterchangeNewlineAtEnd not reset even when
text field's beforeTextInserted event handler removed interchange new lines at the end.
Because the event handler is responsible for trimming new lines, we need to recompute the values
for m_hasInterchangeNewlineAt* after the event dispatch.
Test: editing/input/paste-text-ending-with-interchange-newline.html
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
LayoutTests:
Add a regression test. Also make Markup.dump() dump the shadow DOM of the specififed node.
* editing/input/paste-text-ending-with-interchange-newline-expected.txt: Added.
* editing/input/paste-text-ending-with-interchange-newline.html: Added.
* resources/dump-as-markup.js:
(Markup._get):
(Markup._getShadowHostIfPossible):
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=109272
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|