summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-14 20:44:15 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-15 19:48:19 +0100
commitcf49e93b04a25ef8b62adfbb93f611510413d397 (patch)
treea9ee4a89fec9bf7194fd800d0cdffd1c267775b9 /Userland
parenta033dfc885c8b78d4c6b51eda22ba3888118ae08 (diff)
downloadserenity-cf49e93b04a25ef8b62adfbb93f611510413d397.zip
LibWeb: Invalidate style on media query evaluation change
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp4
1 files changed, 3 insertions, 1 deletions
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<DOMImplementation> Document::implementation() const