Closed Bug 2035988 Opened 18 days ago Closed 9 days ago

[wpt-sync] Sync PR 59528 - Don't update selectedcontent in option insertion/removal steps

Categories

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

task

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

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

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

Joey Arhar <jarhar@chromium.org> wrote:

Don't update selectedcontent in option insertion/removal steps

Modifying the DOM by updating selectedcontent elements during insertion
or removal steps is bad for security reasons. We already removed the
selectedcontent element removal steps which was one way this can happen,
but the option's InsertedInto and RemovedFrom methods may change which
option is selected, which will synchronously update the selectedcontent
element.

This patch fixes this by moving the selectedcontent updating to the
post-insertion steps for insertion, and by using a microtask to update
on removal if needed.

Bug: 458113204
Change-Id: I42bb94c6eace93445cfbc816529e42ca8a561b94

Reviewed-on: https://chromium-review.googlesource.com/7745871
WPT-Export-Revision: 17a5098bfd651b010a8ed5aa18d367d52a04c564

PR 59528 applied with additional changes from upstream: d98d04b89268d8edfef3b1d43911b346c17c6611

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Attached file Notable wpt changes

CI Results

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

Total 137 tests

Status Summary

Firefox

OK : 3[GitHub] 62[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 : 7[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 68[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] 73[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 83[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 84[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL : 17[GitHub] 123[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 150[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] 179[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 180[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
ERROR: 1

Chrome

OK : 4
PASS : 11
FAIL : 6

Safari

OK : 4
PASS : 7
FAIL : 10

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

(See attachment for full changes)

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

Attachment

General

Created:
Updated:
Size: