Closed Bug 1724815 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 29959 - [selectmenu] Fix null crashes in IsValid functions

Categories

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

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Dan Clark <daniec@microsoft.com>' wrote:

[selectmenu] Fix null crashes in IsValid functions

Add null checks in IsValid selectmenu functions to prevent crashes
in cases where the default listbox or button is swapped out without a
replacement.

Also update the console warning for invalid button part to match the
warning for the other parts.

Bug: 1237785
Change-Id: I2000e72286a97bffd3b129dab85d05764fa55b2b
Reviewed-on: https://chromium-review.googlesource.com/3082754
WPT-Export-Revision: 8663ea7c2cbba041785fabdeb25261d7b4de3a8c

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

CI Results

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

Total 1 tests and 6 subtests

Status Summary

Firefox

OK : 1
FAIL: 6

Chrome

OK : 1
PASS: 5
FAIL: 1

Safari

OK : 1
FAIL: 6

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/semantics/forms/the-selectmenu-element/selectmenu-parts-structure.tentative.html
To receive option part controller code, an element labeled as an option must be a descendant of the listbox part in a flat tree traversal: FAIL (Chrome: PASS, Safari: FAIL)
To receive button part controller code, an element labeled as a button must not be a descendant of the listbox part in a flat tree traversal: FAIL (Chrome: PASS, Safari: FAIL)
To receive listbox part controller code, an element labeled as a listbox must not be a descendant of the button part in a flat tree traversal: FAIL (Chrome: PASS, Safari: FAIL)
Button controller code should be applied in flat tree traversal order regardless of dynamic insertion order: FAIL (Chrome: FAIL, Safari: FAIL)
Listbox controller code should be applied in flat tree traversal order regardless of dynamic insertion order: FAIL (Chrome: PASS, Safari: FAIL)
selected-value controller code should be applied in flat tree traversal order regardless of dynamic insertion order: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b6a4b46676ce
[wpt PR 29959] - [selectmenu] Fix null crashes in IsValid functions, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.