mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Factor out a method to update the cached elements
This is useful for any function which is needing to read the from the cache, instead of onl using `collect_matching_elements`.
This commit is contained in:
parent
b6501adef8
commit
cdd0038c9e
Notes:
sideshowbarker
2024-07-16 17:05:37 +09:00
Author: https://github.com/shannonbooth
Commit: cdd0038c9e
Pull-request: https://github.com/SerenityOS/serenity/pull/23792
Reviewed-by: https://github.com/awesomekling
2 changed files with 26 additions and 18 deletions
|
@ -56,6 +56,8 @@ protected:
|
|||
private:
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
void update_cache_if_needed() const;
|
||||
|
||||
mutable u64 m_cached_dom_tree_version { 0 };
|
||||
mutable Vector<JS::NonnullGCPtr<Element>> m_cached_elements;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue