Files
ladybird/Libraries/LibWeb/HTML/HTMLFormElement.cpp
Tim Ledbetter cbd01b8efc LibWeb: Use fallible FormAssociatedElement cast in form elements filter
The `HTMLFormControlsCollection` filter iterates all descendants of the
form's root, which may include non HTMLElement elements such as SVG
elements. The unchecked `as<FormAssociatedElement>` cast would crash on
these elements. Use `as_if` with a null check instead.

This fixes a regression introduced in 9af3e34875.
2026-03-26 08:31:00 +01:00

58 KiB