1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

LibWeb: Only invalidate styles if a @media rule changes match status

This commit is contained in:
Sam Atkins 2022-02-17 12:34:36 +00:00 committed by Andreas Kling
parent 144ef3eb9f
commit fd24782d85
5 changed files with 26 additions and 15 deletions

View file

@ -47,7 +47,8 @@ public:
DOM::ExceptionOr<void> delete_rule(unsigned index);
void for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const;
void evaluate_media_queries(DOM::Window const&);
// Returns whether the match state of any media queries changed after evaluation.
bool evaluate_media_queries(DOM::Window const&);
private:
explicit CSSStyleSheet(NonnullRefPtrVector<CSSRule>);