Closed Bug 1851050 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 41749 - Fix select.add() with optgroups

Categories

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

task

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Joey Arhar <jarhar@chromium.org> wrote:

Fix select.add() with optgroups

The \<select>'s element's add() method allows you to specify an index to
insert the new \<option> element before. However, if that target place is
inside an \<optgroup>, this method throw an exception. This patch fixes
this by calling InsertBefore on the \<optgroup> instead of the \<option>.
Firefox works the same way.

Fixed: 1477785
Change-Id: I0215c82aeee800b1fe7bef2ea0a88f70d0d68b06

Reviewed-on: https://chromium-review.googlesource.com/4833609
WPT-Export-Revision: 356b7e578b6c02c67a0fe1c2a8ed5ebdda76135d

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
FAIL: 1

Safari

OK : 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4f4cd06804e1 [wpt PR 41749] - Fix select.add() with optgroups, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.