mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Add mechanism to invalidate only inherited styles
We can now mark an element as needing an "inherited style update" rather than a full "style update". This effectively means that the next style update will visit the element and pull all of its inherited properties from the relevant ancestor element. This is now used for descendants of elements with animated style.
This commit is contained in:
committed by
Andreas Kling
parent
92ac702c0c
commit
dc8343cc23
@@ -275,6 +275,9 @@ public:
|
||||
bool needs_style_update() const { return m_needs_style_update; }
|
||||
void set_needs_style_update(bool);
|
||||
|
||||
bool needs_inherited_style_update() const { return m_needs_inherited_style_update; }
|
||||
void set_needs_inherited_style_update(bool);
|
||||
|
||||
bool child_needs_style_update() const { return m_child_needs_style_update; }
|
||||
void set_child_needs_style_update(bool b) { m_child_needs_style_update = b; }
|
||||
|
||||
@@ -746,6 +749,7 @@ protected:
|
||||
GC::Ptr<Painting::Paintable> m_paintable;
|
||||
NodeType m_type { NodeType::INVALID };
|
||||
bool m_needs_style_update { false };
|
||||
bool m_needs_inherited_style_update { false };
|
||||
bool m_child_needs_style_update { false };
|
||||
|
||||
UniqueNodeID m_unique_id;
|
||||
|
||||
Reference in New Issue
Block a user