mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibWeb: Remove unecessary dependence on Window from CSS classes
These classes only needed Window to get at its realm. Pass a realm directly to construct CSS classes.
This commit is contained in:
parent
8de7e49a56
commit
a2ccb00e1d
37 changed files with 159 additions and 146 deletions
|
@ -5,6 +5,8 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/MediaQueryListPrototype.h>
|
||||
#include <LibWeb/CSS/MediaQueryList.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/EventDispatcher.h>
|
||||
|
@ -23,7 +25,7 @@ MediaQueryList::MediaQueryList(DOM::Document& document, NonnullRefPtrVector<Medi
|
|||
, m_document(document)
|
||||
, m_media(move(media))
|
||||
{
|
||||
set_prototype(&document.window().cached_web_prototype("MediaQueryList"));
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaQueryListPrototype>(document.realm(), "MediaQueryList"));
|
||||
evaluate();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue