Skip to content

script: Remove duplicated incorrect version of FormControl::is_listed() - #46094

Merged
jdm merged 1 commit into
servo:mainfrom
mrobinson:form-is-listed
Jun 29, 2026
Merged

script: Remove duplicated incorrect version of FormControl::is_listed()#46094
jdm merged 1 commit into
servo:mainfrom
mrobinson:form-is-listed

Conversation

@mrobinson

Copy link
Copy Markdown
Member

There were two versions of this check: FormControl::is_listed() and
HTMLElement::is_element_listed(). The latter was incomplete and
incorrect. Both were used inconsistently. This led to non-specification
aligned behavior when moving form-associated elements in the page,
ultimately leading to a panic. This change fixes that issue by making
FormControl::is_listed() rely on HTMLElement::is_element_listed(),
matching the specification more closely.

Testing: This change adds a WPT crash test, though the crash only reproduces inconsistently.
Fixes: #45947.

…d()`

There were two versions of this check: `FormControl::is_listed()` and
`HTMLElement::is_element_listed()`. The latter was incomplete and
incorrect. Both were used inconsistently. This led to non-specification
aligned behavior when moving form-associated elements in the page,
ultimately leading to a panic. This change fixes that issue by making
`FormControl::is_listed()` rely on `HTMLElement::is_element_listed()`,
matching the specification more closely.

Signed-off-by: Martin Robinson <martin@abandonedwig.info>
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#60971) with upstreamable changes.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jun 29, 2026
@jdm
jdm added this pull request to the merge queue Jun 29, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 29, 2026
Merged via the queue into servo:main with commit dc739b8 Jun 29, 2026
34 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants