Closed Bug 2085071 Opened 1 month ago Closed 24 days ago

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

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 63951 into mozilla-central (this bug is closed when the sync is complete).

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

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

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

WebKit export from bug: Update \<<!---->option><!----> when descendants change

<pre>
Update <option> when descendants change

HTMLOptionElement::childrenChanged() only sees changes to the children of an
<option>. When text deeper down changes, as in
<option><span>text</span></option>, the <select> does not update its rendering,
button text, or validity, and the observers of a <datalist> are not notified.

Elements now have an IsInSelectOrDataListSubtree state flag. <select> and
<datalist> elements set it when they are created, and other elements get it
from their parent in their insertion, removing, and moving steps. When the
children of an element with that flag change, ContainerNode::childrenChanged()
calls the new Element::descendantsChanged() on it and on each of its ancestors
with the flag, up to the outermost <select> or <datalist>. Elsewhere this costs
a flag check. As HTMLOptionElement::childrenChanged() did for the <select>,
changes made while cloning are skipped.

HTMLOptionElement::descendantsChanged() replaces
HTMLOptionElement::childrenChanged(). HTMLDataListElement::descendantsChanged()
replaces HTMLDataListElement::childrenChanged(), as well as the walk over all
ancestors that HTMLOptionElement::childrenChanged() did on each change to find
<datalist> elements. A <datalist> now also notifies its observers when the
parser inserts its children, as it already did when the parser inserted text
into its options.

Follow-ups will use this for changes to descendants of the <select>'s <button>,
of <selectedcontent>, and of the <legend> of an <optgroup>, and for changes to
the alt attribute of <img> elements.

This makes dynamic-content-change-rendering.html pass.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=301858">https://bugs.webkit.org/show_bug.cgi?id=301858</a>
</pre>

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 259 tests and 2 subtests

Status Summary

Firefox

OK : 1[GitHub] 139[Gecko-android-em-14-x86_64-debug-geckoview] 140[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: 17[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 296[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 307[Gecko-android-em-14-x86_64-debug-geckoview] 315[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 338[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 339[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 4[GitHub] 143[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 173[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] 202[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 203[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]

Chrome

OK : 1
FAIL: 4

Safari

OK : 1
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Status: NEW → RESOLVED
Closed: 24 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: