mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
LibWeb: Make document-level style invalidation fast
Add a flag to DOM::Document that means the whole document needs a style update. This saves us the trouble of traversing the entire DOM to mark all nodes as needing a style update.
This commit is contained in:
parent
f87edd4c14
commit
0b861e0c9d
3 changed files with 18 additions and 4 deletions
|
@ -334,6 +334,9 @@ public:
|
|||
callback(*node_iterator);
|
||||
}
|
||||
|
||||
bool needs_full_style_update() const { return m_needs_full_style_update; }
|
||||
void set_needs_full_style_update(bool b) { m_needs_full_style_update = b; }
|
||||
|
||||
private:
|
||||
explicit Document(const AK::URL&);
|
||||
|
||||
|
@ -438,6 +441,8 @@ private:
|
|||
|
||||
bool m_needs_layout { false };
|
||||
|
||||
bool m_needs_full_style_update { false };
|
||||
|
||||
HashTable<NodeIterator*> m_node_iterators;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue