mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibWeb: Remove unecessary dependence on Window from HTML classes
These classes only needed Window to get at its realm. Pass a realm directly to construct HTML classes.
This commit is contained in:
parent
a2ccb00e1d
commit
f0c5f77f99
122 changed files with 334 additions and 317 deletions
|
@ -1210,7 +1210,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Event>> Document::create_event(String const
|
|||
} else if (interface_lowercase == "keyboardevent") {
|
||||
event = UIEvents::KeyboardEvent::create(window, "");
|
||||
} else if (interface_lowercase == "messageevent") {
|
||||
event = HTML::MessageEvent::create(window, "");
|
||||
event = HTML::MessageEvent::create(realm, "");
|
||||
} else if (interface_lowercase.is_one_of("mouseevent", "mouseevents")) {
|
||||
event = UIEvents::MouseEvent::create(window, "");
|
||||
} else if (interface_lowercase == "storageevent") {
|
||||
|
@ -1967,7 +1967,7 @@ CSS::StyleSheetList const& Document::style_sheets() const
|
|||
JS::NonnullGCPtr<HTML::History> Document::history()
|
||||
{
|
||||
if (!m_history)
|
||||
m_history = HTML::History::create(window(), *this);
|
||||
m_history = HTML::History::create(realm(), *this);
|
||||
return *m_history;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue