Closed Bug 2087344 Opened 1 month ago Closed 22 days ago

[wpt-sync] Sync PR 64299 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=328519

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 64299 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64299
Details from upstream follow.

Anne van Kesteren <annevk@annevk.nl> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=328519

WebKit export from bug: A selected \<<!---->option><!----> inserted inside a wrapper element does not get selected

<pre>
A selected <option> inserted inside a wrapper element does not get selected

When a selected <option> is inserted into a <select> without the multiple
attribute, the other options are to be deselected.
HTMLSelectElement::optionToSelectFromChildChangeScope() only did that for
<option> children of the <select> and of inserted <optgroup> children. For
other options, as in <select><div><option selected>, recalcListItems() kept
the last selected option in tree order instead, and a selected <option> child
inserted together with a later wrapped selected option won over it.

The insertion and moving steps of a selected <option> now report it to the new
HTMLSelectElement::selectedOptionAdded(). They run in tree order, so the option
reported last wins. Once the change is complete,
HTMLSelectElement::descendantsChanged() from <a href="https://commits.webkit.org/324413@main">324413@main</a> selects it, as does
HTMLSelectElement::childrenChanged() for changes made while cloning, which skip
descendantsChanged(). That leaves optionToSelectFromChildChangeScope() with only
scrolling to the selection after an insertion, which childrenChanged() now does
itself.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=328519">https://bugs.webkit.org/show_bug.cgi?id=328519</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/324902@main">https://commits.webkit.org/324902@main</a>
</pre>

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Attached file Notable wpt changes —

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Chrome, and Safari on GitHub CI

Total 181 tests and 9 subtests

Status Summary

Firefox

OK : 87
PASS: 11[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 205[Gecko-windows11-32-25h2-opt] 206[Gecko-windows11-32-25h2-debug] 214[Gecko-android-em-14-x86_64-opt-geckoview] 215[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview] 237[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 105[Gecko-windows11-32-25h2-debug] 106[Gecko-windows11-32-25h2-opt] 129[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview] 130[Gecko-android-em-14-x86_64-opt-geckoview] 157[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 31
FAIL: 1

Safari

OK : 1
PASS: 11
FAIL: 21

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Status: NEW → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: