Issue #1655: Update MediaQueryList to the current draft spec.

This make MediaQueryList inherit from EventTarget and adds MediaQueryListEvent
as an interface as well as the onchange() method.
This should not affect compatibility with other code; the event object is a
MediaQueryListEvent instance, which is recognized as a MediaListQuery instance.
This commit is contained in:
Moonchild 2020-09-23 08:24:14 +00:00 committed by roytam1
commit 78bcb176ea
7 changed files with 209 additions and 117 deletions

View file

@ -1785,7 +1785,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDocument)
l != &tmp->mDOMMediaQueryLists; ) {
PRCList *next = PR_NEXT_LINK(l);
MediaQueryList *mql = static_cast<MediaQueryList*>(l);
mql->RemoveAllListeners();
mql->Disconnect();
l = next;
}