[wpt-sync] Sync PR 65004 - XML parser: fully construct synchronous custom elements
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 65004 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/65004
Details from upstream follow.
Noam Rosenthal <nrosenthal@chromium.org> wrote:
XML parser: fully construct synchronous custom elements
Since r1711702 the XML parser sets a token's attributes one by one via
setAttribute() when a synchronous custom element constructor has run,
instead of the batched ParserSetAttributes(). But the element was still
created with the CreatedByParser flag, and some elements (notably
HTMLInputElement) only partially construct themselves in that case,
relying on ParserDidSetAttributes() to finish up (e.g. creating
input_type_). That hook is never reached on the setAttribute() path, so
\<input is="..." type="..."> in an XHTML document crashed in
HTMLInputElement::ParseAttribute with a null input_type_.Mirror HTMLConstructionSite::CreateElement and clear the CreatedByParser
flag when creating an element whose synchronous custom element
constructor will run, so that it is fully constructed. Apply the same
change to both the libxml2-based and the Rust-based XML parsers.Adds a WPT covering customized built-in \<input> elements in XHTML,
which crashes without this change.Bug: 583431476
Change-Id: I06690e7c7d1e3b9ae4b8a64092a21b1618d1408e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8776454
Commit-Queue: Noam Rosenthal \<nrosenthal@google.com>
Reviewed-by: Joey Arhar \<jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1740707}
| Assignee | ||
Updated•11 days ago
|
| Assignee | ||
Comment 1•11 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=122254
| Assignee | ||
Comment 2•10 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 2 subtests
Status Summary
Firefox
OK : 1
PASS : 2
Chrome
CRASH: 1
Safari
OK : 1
FAIL : 2
Links
Comment 4•8 days ago
|
||
| bugherder | ||
Description
•