From cf49e93b04a25ef8b62adfbb93f611510413d397 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 14 Mar 2022 20:44:15 +0100 Subject: LibWeb: Invalidate style on media query evaluation change --- Userland/Libraries/LibWeb/DOM/Document.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb/DOM') diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 6a022a0181..0b8f1447e1 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -1354,8 +1354,10 @@ void Document::evaluate_media_queries_and_report_changes() any_media_queries_changed_match_state = true; } - if (any_media_queries_changed_match_state) + if (any_media_queries_changed_match_state) { style_computer().invalidate_rule_cache(); + invalidate_style(); + } } NonnullRefPtr Document::implementation() const -- cgit v1.2.3