summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/Document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Document.cpp')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp
index e575c64128..1e20c5b3e2 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Document.cpp
@@ -1156,6 +1156,11 @@ void Document::evaluate_media_queries_and_report_changes()
media_query_list->dispatch_event(event);
}
}
+
+ // Also not in the spec, but this is as good a place as any to evaluate @media rules!
+ for (auto& style_sheet : style_sheets().sheets()) {
+ style_sheet.evaluate_media_queries(window());
+ }
}
}