[wpt-sync] Sync PR 63235 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=325152
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Attachments
(1 file)
|
101.69 KB,
text/plain
|
Details |
Sync web-platform-tests PR 63235 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63235
Details from upstream follow.
Anne van Kesteren <annevk@annevk.nl> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=325152
WebKit export from bug: :open stops matching a select whose base appearance picker is still showing
<pre>
:open stops matching a select whose base appearance picker is still showing:open was a flag shared by the native popup menu and the base appearance picker, and
didDetachRenderers() cleared it. That is right for the native popup, which goes away with the
renderers, but not the popover. So a display change, moveBefore(), setting size to 1, or a :open
rule that changes display left the picker showing while :open stopped matching. The flag changed
during a render tree update, where invalidation is dropped, so :has() and sibling rules went stale
as well.:open is now derived. While the picker popover is showing, the select matches :open as long as it
supports a base appearance picker, which only its attributes decide. Otherwise :open follows the
native popup flag. SelectPopoverElement invalidates the select's :open when its visibility state
changes, and setSizeAndMultiple() does so when a size or multiple change makes an open picker stop
or start counting. Accessibility and internals.isSelectPopupVisible() use the same answer.A truthful :open showed where the picker did not actually close:
- didRecalcStyle() compared the select's appearance against its committed style, which is not
updated yet at that point. So changing the select's own appearance, for instance through inline
style, never closed the picker. The select and its picker popover now both check from
didAttachRenderers(), through closePickerIfNoLongerBaseAppearance(), which needs no record of
the previous appearance.- With HTMLEnhancedSelectMultipleAndListBoxEnabled off, setting multiple on a select whose size is
1 left the picker open.- Script run by hiding other popovers while the picker opens can make the select a list box.
showPickerInternal() now checks once more after showing the picker, which also takes over the
:open appearance checks that showPicker() and openPickerForUserInteraction() each made.- The queued close re-checks whether the picker still has to close. A change undone within the
same task now leaves the picker open, and one close logs one warning.- popoverWasHidden() now runs at the end of hidePopoverInternal(), so :open no longer matches
during the focus events it causes. This matches Chrome.A size or multiple change no longer queues an appearance close next to the dropdown box one, so iOS
stops logging a second warning and no longer needs its own baselines for the box type tests. Three
customizable-select tests that iOS expected to fail now pass there as well.This also fixes a crash in showPopup() when a :open rule rebuilds the renderer of a native select.
<a href="https://github.com/whatwg/html/issues/13027">https://github.com/whatwg/html/issues/13027</a> proposes specifying when the picker closes once it can
no longer be shown. switch-picker-appearance.html no longer assumes the close is synchronous, and
switch-picker-appearance-timing.tentative.html tests the proposal.WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=325152">https://bugs.webkit.org/show_bug.cgi?id=325152</a>
</pre>
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=99991
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 163 tests and 9 subtests
Status Summary
Firefox
OK : 6[GitHub] 73[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] 144[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 153[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview] 154[Gecko-android-em-14-x86_64-opt-geckoview] 175[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 22[GitHub] 91[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 110[Gecko-android-em-14-x86_64-opt-geckoview] 111[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview] 139[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 6
PASS: 20
FAIL: 2
Safari
OK : 6
PASS: 10
FAIL: 12
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
Firefox-only Failures
- /html/semantics/forms/the-select-element/customizable-select/switch-picker-appearance-timing.tentative.html [wpt.fyi]
- A picker that stops having base appearance closes when the rendering is updated, not when style is computed.:
FAIL
- A picker that stops having base appearance closes when the rendering is updated, not when style is computed.:
- /html/semantics/forms/the-select-element/customizable-select/switch-picker-appearance.html [wpt.fyi]
- Test of the test harness:
FAIL[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,GitHub],PASS[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] - The select picker is closed if the <select> appearance value is changed via CSS while the picker is open:
FAIL - The select picker is closed if the ::picker() appearance value is changed via CSS while the picker is open:
FAIL - The select picker is closed if the <select> inline appearance value is changed while the picker is open:
FAIL
- Test of the test harness:
(See attachment for full changes)
https://hg.mozilla.org/mozilla-central/rev/11a005550eda
https://hg.mozilla.org/mozilla-central/rev/efcccd05ac89
Description
•