1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:37:35 +00:00

LibWeb: Remove an unnecessary (and unsafe) cast from Node to Element

Fixes #22170
This commit is contained in:
Andreas Kling 2023-12-05 09:41:22 +01:00
parent 0cb0d60ac5
commit 20da5b6153

View file

@ -1528,7 +1528,7 @@ static ErrorOr<void> scroll_an_element_into_view(DOM::Element& target, Bindings:
Vector<DOM::Node&> scrollable_nodes;
while (ancestor) {
if (ancestor->paintable_box() && ancestor->paintable_box()->has_scrollable_overflow())
scrollable_nodes.append(*static_cast<DOM::Element*>(ancestor));
scrollable_nodes.append(*ancestor);
ancestor = ancestor->parent();
}