1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:57:45 +00:00

LibWeb: Only propagate overflow from document element when it exists

This commit is contained in:
Andreas Kling 2023-08-17 18:34:27 +02:00
parent e9a718ff88
commit 4bb907aa22

View file

@ -974,7 +974,9 @@ void Document::update_layout()
m_layout_root = verify_cast<Layout::Viewport>(*tree_builder.build(*this));
}
propagate_overflow_to_viewport(*document_element(), *m_layout_root);
if (auto* document_element = this->document_element()) {
propagate_overflow_to_viewport(*document_element, *m_layout_root);
}
Layout::LayoutState layout_state;