1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

LibWeb: Invalidate style after CSSStyleSheet.{insert,remove}Rule()

When rules are inserted or removed via the CSSOM API, we now invalidate
document style to ensure that any changes made are reflected.

1% progression on ACID3. :^)
This commit is contained in:
Andreas Kling 2022-03-09 19:57:15 +01:00
parent 0e758b4da8
commit a13079f757
5 changed files with 36 additions and 2 deletions

View file

@ -50,12 +50,16 @@ public:
// Returns whether the match state of any media queries changed after evaluation.
bool evaluate_media_queries(HTML::Window const&);
void set_style_sheet_list(Badge<StyleSheetList>, StyleSheetList*);
private:
explicit CSSStyleSheet(NonnullRefPtrVector<CSSRule>);
NonnullRefPtr<CSSRuleList> m_rules;
WeakPtr<CSSRule> m_owner_css_rule;
WeakPtr<StyleSheetList> m_style_sheet_list;
};
}