LibWeb: Only propagate overflow from document element when it exists
This commit is contained in:
parent
e9a718ff88
commit
4bb907aa22
Notes:
sideshowbarker
2024-07-17 00:59:43 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4bb907aa22 Pull-request: https://github.com/SerenityOS/serenity/pull/20622
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue