1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:27: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:
Andreas Kling 2022-03-09 17:57:45 +01:00
parent bca3c2a443
commit 6499cf4d28
3 changed files with 9 additions and 64 deletions

View file

@ -141,13 +141,14 @@ public:
void set_visited_link_color(Color);
void force_layout();
void ensure_layout();
void update_style();
void update_layout();
void set_needs_layout();
void invalidate_layout();
virtual bool is_child_allowed(const Node&) const override;
const Layout::InitialContainingBlock* layout_node() const;