summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h
AgeCommit message (Collapse)Author
2022-10-24LibWeb: Add policy container to {Window,Worker}EnvironmentSettingsObjectLinus Groh
2022-10-01LibWeb: Move Web prototypes and constructors to new Intrinsics objectAndrew Kaster
This Intrinsics object hangs off of a new HostDefined struct that takes the place of EnvironmentSettingsObject as the true [[HostDefined]] slot on JS::Realm objects created by LibWeb. This gets the intrinsics off of the GlobalObject, Window, similar to the previous refactor of LibJS to move the intrinsics into the Realm's [[Intrinics]] internal slot. A side effect of this change is that we cannot fully initialize a Window object until the [[HostDefined]] slot has been installed into the realm, which happens with the creation of the WindowEnvironmentSettingsObject. As such, any Window usage that has not been funned through a WindowESO will not have any cached Web prototyped or constructors, and will not have Window APIs available to javascript code. Currently this seems limited to usage of Window in the CSS parser, but a subsequent commit will clean those up to take Realm as well. However, this commit compiles so let's cut it off here :^).
2022-09-06LibWeb+LibJS: Let JS::Realm::HostDefined objects mark things during GCAndreas Kling
This allows us to mark the HTML::Window from our window environment settings object.
2022-09-06LibWeb: Don't have Handle<Realm> in WindowEnvironmentSettingsObjectAndreas Kling
This was preventing window realms from ever being garbage collected.
2022-09-06LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocatedAndreas Kling
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
2022-08-05LibWeb: Start implementing "create and initialize a Document" from HTMLAndreas Kling
The way we've been creating DOM::Document has been pretty far from what the spec tells us to do, and this is a first big step towards getting us closer to spec. The new Document::create_and_initialize() is called by FrameLoader after loading a "text/html" resource. We create the JS Realm and the Window object when creating the Document (previously, we'd do it on first access to Document::interpreter().) The realm execution context is owned by the Environment Settings Object.
2022-03-08LibWeb: Move Window from DOM directory & namespace to HTMLLinus Groh
The Window object is part of the HTML spec. :^) https://html.spec.whatwg.org/multipage/window-object.html
2022-02-08LibWeb: Introduce the Environment Settings ObjectLuke Wilde
The environment settings object is effectively the context a piece of script is running under, for example, it contains the origin, responsible document, realm, global object and event loop for the current context. This effectively replaces ScriptExecutionContext, but it cannot be removed in this commit as EventTarget still depends on it. https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object