CanGc fixes (#33852)

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
chickenleaf 2024-10-16 08:20:28 +05:30 committed by GitHub
parent 5b8fbb023d
commit a2f81d69c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 92 additions and 63 deletions

View file

@ -2446,7 +2446,7 @@ impl Window {
/// Evaluate media query lists and report changes
/// <https://drafts.csswg.org/cssom-view/#evaluate-media-queries-and-report-changes>
pub fn evaluate_media_queries_and_report_changes(&self) {
pub fn evaluate_media_queries_and_report_changes(&self, can_gc: CanGc) {
rooted_vec!(let mut mql_list);
self.media_query_lists.for_each(|mql| {
if let MediaQueryListMatchState::Changed = mql.evaluate_changes() {
@ -2463,6 +2463,7 @@ impl Window {
false,
mql.Media(),
mql.Matches(),
can_gc,
);
event.upcast::<Event>().fire(mql.upcast::<EventTarget>());
}