Skip to content

Add XPCOM listener for MediaQueryList.

Gabriel Ivăncescu requested to merge insn/wine-gecko:mql-listener into master

It appears that when I re-added the nsIDOMMediaQueryList interface I was mistaken; the Gecko version does not support EventTarget on it, and so we still need a way to expose notifications via XPCOM to mshtml to be able to implement addListener and removeListener on it.

This adds a simple method that registers just one listener, since it's all we need on mshtml side (it will deal with the listener list by itself). These listeners and associated callbacks are not normal event handlers on native mshtml; they don't inhert or expose IEventTarget, and don't have an event arg, but instead the original MediaQueryList object is passed as the arg.

I've proper tests and implementation now on mshtml side and confirm that this is enough to make them all pass and work like on native once it is updated.

Merge request reports

Loading