[wpt-sync] Sync PR 37516 - Fix delete character in password field with trailing white spaces
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox110 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 37516 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/37516
Details from upstream follow.
Xiaocheng Hu <xiaochengh@chromium.org> wrote:
Fix delete character in password field with trailing white spaces
When deleting a character, DeleteSelectionCommand uses
DeleteInsignificantText for white space fixup, which in turn uses
TextIterator to obtain the white-space-collapsed text of the text node.However, when working in a password field, TextIterator by default gets
the rendered text, where all characters are replaced by bullets. Then
the fixup code replaces a trailing white space by a bullet.Since in this case we need the original text, this patch sets
EmitsOriginalText behavior, and also implements it in TextIterator to
fix the bug.Note: TextIterator had a legacy code path that implements
EmitsOriginalText, but we didn't implement it for NG because we couldn't
find any case where this behavior makes a difference before this bug
report. That's why we left a TODO there without implementing it.Fixed: 1400844
Change-Id: I7fa5a1372516894c3831e38deb97ed6e3c567ea0
Reviewed-on: https://chromium-review.googlesource.com/4109573
WPT-Export-Revision: a2ada584a860dad50e530d8fed044f616a973bca
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Comment 4•2 years ago
|
||
bugherder |
Description
•