mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb: Use invalidation sets to reduce style recalculation
Implements idea described in https://docs.google.com/document/d/1vEW86DaeVs4uQzNFI5R-_xS9TcS1Cs_EUsHRSgCHGu8 Invalidation sets are used to reduce the number of elements marked for style recalculation by collecting metadata from style rules about the dependencies between properties that could affect an element’s style. Currently, this optimization is only applied to style invalidation triggered by class list mutations on an element.
This commit is contained in:
committed by
Andreas Kling
parent
58c78cb003
commit
c5f2a88f69
@@ -14,6 +14,7 @@
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/TypeCasts.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibWeb/CSS/InvalidationSet.h>
|
||||
#include <LibWeb/DOM/AccessibilityTreeNode.h>
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
#include <LibWeb/DOM/Slottable.h>
|
||||
@@ -297,6 +298,7 @@ public:
|
||||
void set_child_needs_style_update(bool b) { m_child_needs_style_update = b; }
|
||||
|
||||
void invalidate_style(StyleInvalidationReason);
|
||||
void invalidate_style(StyleInvalidationReason, Vector<CSS::InvalidationSet::Property> const&);
|
||||
|
||||
void set_document(Badge<Document>, Document&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user