diff options
author | Andreas Kling <kling@serenityos.org> | 2021-10-05 22:30:53 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-06 17:14:22 +0200 |
commit | 0264ae23bc3e2a03ce82cf2a5c4b80142862ba82 (patch) | |
tree | 32726e9be0f3caaee86cce80f4b17398a0eb1563 /Userland/DevTools/HackStudio/Debugger | |
parent | 228a32effcb214a0baed56d3d007587a495fa96e (diff) | |
download | serenity-0264ae23bc3e2a03ce82cf2a5c4b80142862ba82.zip |
LibWeb: Make CSS layout lazier
Instead of doing layout synchronously whenever something changes,
we now use a basic event loop timer to defer and coalesce relayouts.
If you did something that requires a relayout of the page, make sure
to call Document::set_needs_layout() and it will get coalesced with all
the other layout updates.
There's lots of room for improvement here, but this already makes many
web pages significantly snappier. :^)
Also, note that this exposes a number of layout bugs where we have been
relying on multiple relayouts to calculate the correct dimensions for
things. Now that we only do a single layout in many cases, these kind of
problems are much more noticeable. That should also make them easier to
figure out and fix. :^)
Diffstat (limited to 'Userland/DevTools/HackStudio/Debugger')
-rw-r--r-- | Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp b/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp index 9750129519..23a923880a 100644 --- a/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp +++ b/Userland/DevTools/HackStudio/Debugger/EvaluateExpressionDialog.cpp @@ -144,8 +144,6 @@ void EvaluateExpressionDialog::set_output(const StringView& html) paragraph->set_inner_html(html); m_output_container->append_child(paragraph); - m_output_container->document().invalidate_layout(); - m_output_container->document().update_layout(); } } |