DescriptionREGRESSION(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.
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):
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):
Merge 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):
TBR=rniwa@webkit.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=109012
Patch Set 1 #
Created: 8 years, 10 months ago
(Patch set is too large to download)
Messages
Total messages: 1 (0 generated)
|