[wpt-sync] Sync PR 64666 - Preserve autofill state on no-op option.selected assignments
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
|
104.90 KB,
text/plain
|
Details |
Sync web-platform-tests PR 64666 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64666
Details from upstream follow.
Joey Arhar <jarhar@chromium.org> wrote:
Preserve autofill state on no-op option.selected assignments
In crrev.com/c/8300572, HTMLOptionElement::setSelectedForBinding was
changed to call SetSelectedState and OptionSelectionStateChanged
directly when SelectedcontentSpec2 is enabled instead of calling
SetSelected. Because SetSelected returns early when the option's
selectedness does not change, bypassing it caused no-op assignments
(such as re-assigning option.selected = true on an already-selected
option or option.selected = false on an unselected option) to call
SelectOption with WebAutofillState::kNotFilled, clearing the \<select>
element's autofilled state and notifying AutofillAgent of a user edit.
Fix this by restoring the SetSelected call in setSelectedForBinding.This change aligns with https://github.com/whatwg/html/pull/13005, where
setting the selected IDL attribute on an \<option> element only updates
\<selectedcontent> elements when selectedness changes. There is another
patch coming soon to implement the changes from that spec pr.Fixed: 580550670
Change-Id: I9b6208cfceb4593c3c4ec21336d227685d4614ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8700606
Reviewed-by: Joey Arhar \<jarhar@chromium.org>
Commit-Queue: Joey Arhar \<jarhar@chromium.org>
Reviewed-by: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1734083}
| Assignee | ||
Updated•20 days ago
|
| Assignee | ||
Comment 1•20 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=120031
| Assignee | ||
Comment 2•20 days ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 182 tests
Status Summary
Firefox
OK : 1[GitHub] 88[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 11[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 213[Gecko-windows11-32-25h2-opt] 214[Gecko-windows11-32-25h2-debug] 220[Gecko-android-em-14-x86_64-opt-geckoview] 221[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview] 244[Gecko-windows11-64-25h2-opt] 245[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug]
FAIL: 11[GitHub] 105[Gecko-windows11-32-25h2-debug] 106[Gecko-windows11-32-25h2-opt] 131[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview] 132[Gecko-android-em-14-x86_64-opt-geckoview] 157[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug] 158[Gecko-windows11-64-25h2-opt]
Chrome
OK : 1
PASS: 10
FAIL: 1
Safari
OK : 1
PASS: 10
FAIL: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
(See attachment for full changes)
Comment 4•16 days ago
|
||
| bugherder | ||
Description
•