Skip to content

Commit 7bd109b

Browse files
josepharharmoz-wptsync-bot
authored andcommitted
Bug 2042924 [wpt PR 60193] - Improve selectedcontent parsing update for select multiple, a=testonly
Automatic update from web-platform-tests Improve selectedcontent parsing update for select multiple When a selected option element is done parsing, it triggers an update to the selectedcontent element of the associated select element. In the case of a select element with the multiple attribute, this could result in many clones if multiple options have the selected attribute. This change improves this by moving the selectedcontent update for select elements with the multiple attribute from option end tag parsing to select end tag parsing. Context: whatwg/html#12430 (comment) Bug: 483769482 Change-Id: I9ee8a2afe66884da26cbf814b80af7bf430414a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7856275 Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1636613} -- wpt-commits: 229f4c8b965b0fa27fee7167494173189163502b wpt-pr: 60193
1 parent 90cea3f commit 7bd109b

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

testing/web-platform/tests/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,8 @@
402402
html:
403403
`<select multiple="" size="1">
404404
<button>
405-
<selectedcontent>
406-
<selectedcontent></selectedcontent>
407-
</selectedcontent>
408-
<selectedcontent>
409-
<selectedcontent></selectedcontent>
410-
</selectedcontent>
405+
<selectedcontent></selectedcontent>
406+
<selectedcontent></selectedcontent>
411407
</button>
412408
<option>option</option>
413409
</select>`,
@@ -431,6 +427,8 @@
431427
"Type: childList | Target: select | Added: [option] | After: #text: \"\"",
432428
"Type: childList | Target: option | Added: [#text: \"option\"]",
433429
"Type: childList | Target: select | Added: [#text: \"\"] | After: option",
430+
"Type: childList | Target: selectedcontent | Removed: [#text: \"\", selectedcontent, #text: \"\"]",
431+
"Type: childList | Target: selectedcontent | Removed: [#text: \"\", selectedcontent, #text: \"\"]",
434432
"Type: childList | Target: div#test6 | Added: [#text: \"\"] | After: select"
435433
]
436434
},

0 commit comments

Comments
 (0)