mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
LibWeb: Only propagate CSS overflow to the viewport once per tree build
Before this change, we were doing it after every layout, which meant that already-propagated overflow could be propagated again, which led to incorrect scrolling behavior.
This commit is contained in:
parent
bc6f19da0e
commit
f9cab320e6
5 changed files with 13 additions and 6 deletions
|
@ -984,10 +984,10 @@ void Document::update_layout()
|
|||
if (!m_layout_root) {
|
||||
Layout::TreeBuilder tree_builder;
|
||||
m_layout_root = verify_cast<Layout::Viewport>(*tree_builder.build(*this));
|
||||
}
|
||||
|
||||
if (auto* document_element = this->document_element()) {
|
||||
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
Add a link
Reference in a new issue