mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 15:57:36 +00:00
LibWeb: Move Window from DOM directory & namespace to HTML
The Window object is part of the HTML spec. :^) https://html.spec.whatwg.org/multipage/window-object.html
This commit is contained in:
parent
2dfb617c5b
commit
1422bd45eb
63 changed files with 133 additions and 133 deletions
|
@ -9,7 +9,7 @@
|
|||
#include <LibWeb/Bindings/HTMLAudioElementWrapper.h>
|
||||
#include <LibWeb/Bindings/NodeWrapperFactory.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Namespace.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <LibWeb/Bindings/ImageConstructor.h>
|
||||
#include <LibWeb/Bindings/NodeWrapperFactory.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Namespace.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/DOM/DOMException.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
#include <LibJS/Runtime/VM.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/PromiseRejectionEvent.h>
|
||||
#include <LibWeb/HTML/Scripting/ClassicScript.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
#include <LibWeb/HTML/Scripting/ExceptionReporter.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
||||
|
|
|
@ -38,18 +38,18 @@
|
|||
#include <LibWeb/Crypto/Crypto.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/EventHandler.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
#include <LibWeb/HTML/Storage.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Origin.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/WebAssembly/WebAssemblyObject.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
||||
WindowObject::WindowObject(DOM::Window& impl)
|
||||
WindowObject::WindowObject(HTML::Window& impl)
|
||||
: m_impl(impl)
|
||||
{
|
||||
impl.set_wrapper({}, *this);
|
||||
|
@ -164,7 +164,7 @@ JS::ThrowCompletionOr<bool> WindowObject::internal_set_prototype_of(JS::Object*
|
|||
return set_immutable_prototype(prototype);
|
||||
}
|
||||
|
||||
static JS::ThrowCompletionOr<DOM::Window*> impl_from(JS::VM& vm, JS::GlobalObject& global_object)
|
||||
static JS::ThrowCompletionOr<HTML::Window*> impl_from(JS::VM& vm, JS::GlobalObject& global_object)
|
||||
{
|
||||
// Since this is a non built-in function we must treat it as non-strict mode
|
||||
// this means that a nullish this_value should be converted to the
|
||||
|
|
|
@ -30,12 +30,12 @@ class WindowObject
|
|||
JS_OBJECT(WindowObject, JS::GlobalObject);
|
||||
|
||||
public:
|
||||
explicit WindowObject(DOM::Window&);
|
||||
explicit WindowObject(HTML::Window&);
|
||||
virtual void initialize_global_object() override;
|
||||
virtual ~WindowObject() override;
|
||||
|
||||
DOM::Window& impl() { return *m_impl; }
|
||||
const DOM::Window& impl() const { return *m_impl; }
|
||||
HTML::Window& impl() { return *m_impl; }
|
||||
const HTML::Window& impl() const { return *m_impl; }
|
||||
|
||||
Origin origin() const;
|
||||
|
||||
|
@ -135,7 +135,7 @@ private:
|
|||
ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE);
|
||||
#undef __ENUMERATE
|
||||
|
||||
NonnullRefPtr<DOM::Window> m_impl;
|
||||
NonnullRefPtr<HTML::Window> m_impl;
|
||||
|
||||
LocationObject* m_location_object { nullptr };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue