LibWeb: Update CSSRule parent style sheet whenever parent rule changes

This commit is contained in:
Callum Law 2025-06-24 00:42:19 +12:00 committed by Sam Atkins
parent f336667771
commit 89a08cb7cf
Notes: github-actions[bot] 2025-06-23 14:22:43 +00:00
4 changed files with 27 additions and 1 deletions

View file

@ -171,8 +171,8 @@ WebIDL::ExceptionOr<void> CSSRuleList::remove_a_css_rule(u32 index)
m_rules.remove(index);
// 6. Set old rules parent CSS rule and parent CSS style sheet to null.
// NOTE: We set the parent stylesheet to null within set_parent_rule.
old_rule.set_parent_rule(nullptr);
old_rule.set_parent_style_sheet(nullptr);
if (on_change)
on_change();