mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Always relayout document on element style change
Let's get this right before trying to make it fast. This patch removes the code that tried to do less work when an element's style changes, and instead simply invalidates the entire document. Note that invalidations are still coalesced, and will not be synchronized until update_style() and/or update_layout() is used.
This commit is contained in:
parent
bca3c2a443
commit
6499cf4d28
3 changed files with 9 additions and 64 deletions
|
@ -546,10 +546,9 @@ void Document::force_layout()
|
|||
update_layout();
|
||||
}
|
||||
|
||||
void Document::ensure_layout()
|
||||
void Document::invalidate_layout()
|
||||
{
|
||||
if (m_needs_layout || !m_layout_root)
|
||||
update_layout();
|
||||
tear_down_layout_tree();
|
||||
}
|
||||
|
||||
void Document::update_layout()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue