mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb/CSS: Clear child CSS rules' caches too
If a rule gets its caches cleared because it's moved in the OM, then its child rules' caches are likely invalid and need clearing too. Assuming that caches only point "upwards", this will correctly clear them all. For the time being that will be true.
This commit is contained in:
parent
e6291c8d0e
commit
0b23dddb4b
Notes:
github-actions[bot]
2024-11-07 14:12:48 +00:00
Author: https://github.com/AtkinsSJ
Commit: 0b23dddb4b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2202
4 changed files with 13 additions and 4 deletions
|
@ -34,6 +34,13 @@ void CSSGroupingRule::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_rules);
|
||||
}
|
||||
|
||||
void CSSGroupingRule::clear_caches()
|
||||
{
|
||||
Base::clear_caches();
|
||||
for (auto& rule : *m_rules)
|
||||
rule->clear_caches();
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<u32> CSSGroupingRule::insert_rule(StringView rule, u32 index)
|
||||
{
|
||||
TRY(m_rules->insert_a_css_rule(rule, index));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue