1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:08:13 +00:00
serenity/Userland/Libraries/LibWeb/DOM
Luke Wilde 631bbcd00a LibJS: Refactor interpreter to use Script and Source Text Modules
This also refactors interpreter creation to follow
InitializeHostDefinedRealm, but I couldn't fit it in the title :^)

This allows us to follow the spec much more closely rather than being
completely ad-hoc with just the parse node instead of having all the
surrounding data such as the realm of the parse node.

The interpreter creation refactor creates the global execution context
once and doesn't take it off the stack. This allows LibWeb to take the
global execution context and manually handle it, following the HTML
spec. The HTML spec calls this the "realm execution context" of the
environment settings object.

It also allows us to specify the globalThis type, as it can be
different from the global object type. For example, on the web, Window
global objects use a WindowProxy global this value to enforce the same
origin policy on operations like [[GetOwnProperty]].

Finally, it allows us to directly call Program::execute in perform_eval
and perform_shadow_realm_eval as this moves
global_declaration_instantiation into Interpreter::run
(ScriptEvaluation) as per the spec.

Note that this doesn't evalulate Source Text Modules yet or refactor
the bytecode interpreter, that's work for future us :^)

This patch was originally build by Luke for the environment settings
object change but was also needed for modules. So I (davidot) have
modified it with the new completion changes and setup for that.

Co-authored-by: davidot <davidot@serenityos.org>
2022-01-22 01:21:18 +00:00
..
AbortController.cpp LibWeb: Add support for AbortSignal.reason 2021-12-10 23:05:36 +02:00
AbortController.h LibWeb: Add support for AbortSignal.reason 2021-12-10 23:05:36 +02:00
AbortController.idl LibWeb: Add support for AbortSignal.reason 2021-12-10 23:05:36 +02:00
AbortSignal.cpp LibWeb: Implement AbortSignal.throwIfAborted 2021-12-10 23:05:36 +02:00
AbortSignal.h LibWeb: Implement AbortSignal.throwIfAborted 2021-12-10 23:05:36 +02:00
AbortSignal.idl LibWeb: Implement AbortSignal.throwIfAborted 2021-12-10 23:05:36 +02:00
Attribute.cpp LibWeb: Weakly store NamedNodeMap's & Attribute's associated Element 2021-10-18 09:58:52 +02:00
Attribute.h LibWeb: Weakly store NamedNodeMap's & Attribute's associated Element 2021-10-18 09:58:52 +02:00
Attribute.idl LibWeb: Implement Attribute closer to the spec and with an IDL file 2021-10-17 13:51:10 +01:00
CharacterData.cpp LibWeb: Make CSS layout lazier 2021-10-06 17:14:22 +02:00
CharacterData.h LibWeb: Implement ChildNode.remove 2021-09-29 17:56:13 +02:00
CharacterData.idl LibWeb: Implement ChildNode.remove 2021-09-29 17:56:13 +02:00
ChildNode.h LibWeb: Implement ChildNode.remove 2021-09-29 17:56:13 +02:00
Comment.cpp LibWeb: Rename DOM::Window::document() => associated_document() 2021-09-09 21:25:10 +02:00
Comment.h LibWeb: Add constructors for Text, DocumentFragment and Comment 2021-09-06 02:18:41 +02:00
Comment.idl LibWeb: Add constructors for Text, DocumentFragment and Comment 2021-09-06 02:18:41 +02:00
CustomEvent.cpp LibWeb: Add the missing CustomEvent IDL constructor 2021-09-29 19:38:41 +02:00
CustomEvent.h LibWeb: Add the missing CustomEvent IDL constructor 2021-09-29 19:38:41 +02:00
CustomEvent.idl LibWeb: Use the LibWeb source directory as the IDL #import base path 2021-10-01 20:14:45 +02:00
Document.cpp LibJS: Refactor interpreter to use Script and Source Text Modules 2022-01-22 01:21:18 +00:00
Document.h Everywhere: Fix spelling mistakes 2022-01-07 15:44:42 +01:00
Document.idl LibWeb: Convert ParentNode.querySelectorAll to NodeList 2021-10-03 00:18:52 +02:00
DocumentFragment.cpp LibWeb: Rename DOM::Window::document() => associated_document() 2021-09-09 21:25:10 +02:00
DocumentFragment.h LibWeb: Add constructors for Text, DocumentFragment and Comment 2021-09-06 02:18:41 +02:00
DocumentFragment.idl LibWeb: Convert ParentNode.querySelectorAll to NodeList 2021-10-03 00:18:52 +02:00
DocumentLoadEventDelayer.cpp LibWeb: Allow HTML parser to delay delivery of the document "load" event 2021-09-26 02:00:00 +02:00
DocumentLoadEventDelayer.h LibWeb: Allow HTML parser to delay delivery of the document "load" event 2021-09-26 02:00:00 +02:00
DocumentType.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DocumentType.h LibWeb: Implement ChildNode.remove 2021-09-29 17:56:13 +02:00
DocumentType.idl LibWeb: Implement ChildNode.remove 2021-09-29 17:56:13 +02:00
DOMException.h LibWeb: Replace heycam.github.io/webidl URLs with webidl.spec.whatwg.org 2021-10-11 13:15:16 +01:00
DOMException.idl LibWeb: Add support for optional default values and optional bools in IDL 2021-04-11 18:27:52 +02:00
DOMImplementation.cpp LibWeb: Make DOMImplementation forward its ref count to DOM::Document 2021-12-09 21:28:52 +01:00
DOMImplementation.h LibWeb: Make DOMImplementation forward its ref count to DOM::Document 2021-12-09 21:28:52 +01:00
DOMImplementation.idl LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
DOMTokenList.cpp LibWeb: Implement DOMTokenList for managing space-separated tokens lists 2021-10-18 23:33:56 +02:00
DOMTokenList.h LibWeb: Implement DOMTokenList for managing space-separated tokens lists 2021-10-18 23:33:56 +02:00
DOMTokenList.idl LibWeb: Implement DOMTokenList for managing space-separated tokens lists 2021-10-18 23:33:56 +02:00
Element.cpp LibWeb: Implement Element.getAttributeNames 2021-12-30 14:30:35 +01:00
Element.h LibWeb: Implement Element.getAttributeNames 2021-12-30 14:30:35 +01:00
Element.idl LibWeb: Implement Element.getAttributeNames 2021-12-30 14:30:35 +01:00
ElementFactory.cpp LibWeb: Add a bare-bones SVG <g> element 2021-09-18 01:39:59 +02:00
ElementFactory.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Event.cpp LibWeb: Implement Event.composedPath 2021-10-17 01:34:02 +03:00
Event.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Event.idl LibWeb: Add Event.eventPhase constants 2021-10-19 10:00:26 +02:00
EventDispatcher.cpp LibWeb: Rename DOM::Window::document() => associated_document() 2021-09-09 21:25:10 +02:00
EventDispatcher.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EventListener.cpp LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
EventListener.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
EventTarget.cpp LibJS: Pass source text to ECMAScriptFunctionObject::create() 2022-01-19 20:33:08 +00:00
EventTarget.h LibWeb: Provide a default DOM::EventTarget::dispatch_event() 2021-09-25 23:36:43 +02:00
EventTarget.idl LibWeb: Implement EventTarget.dispatchEvent 2021-05-04 23:41:44 +01:00
ExceptionOr.h LibWeb: Convert throw_dom_exception_if_needed() to ThrowCompletionOr 2021-10-31 18:51:07 +01:00
HTMLCollection.cpp LibWeb: Convert HTMLCollection to use IDL special operations 2021-09-26 18:59:56 +02:00
HTMLCollection.h LibWeb: Convert HTMLCollection to use IDL special operations 2021-09-26 18:59:56 +02:00
HTMLCollection.idl LibWeb: Convert HTMLCollection to use IDL special operations 2021-09-26 18:59:56 +02:00
LiveNodeList.cpp LibWeb: Add support for NodeList 2021-10-03 00:18:52 +02:00
LiveNodeList.h LibWeb: Add support for NodeList 2021-10-03 00:18:52 +02:00
NamedNodeMap.cpp LibWeb: Make DOM::NamedNodeMap forward its ref count to DOM::Element 2021-12-09 21:28:52 +01:00
NamedNodeMap.h LibWeb: Make DOM::NamedNodeMap forward its ref count to DOM::Element 2021-12-09 21:28:52 +01:00
NamedNodeMap.idl LibWeb: Implement (most of) NamedNodeMap to store attributes 2021-10-17 13:51:10 +01:00
Node.cpp LibWeb: Add JSON serialization for nested browsing contexts 2021-11-24 19:07:48 +01:00
Node.h LibWeb: Add JSON serialization for nested browsing contexts 2021-11-24 19:07:48 +01:00
Node.idl LibWeb: Implement Node.getRootNode 2021-10-16 10:51:23 +02:00
NodeList.h LibWeb: Add support for NodeList 2021-10-03 00:18:52 +02:00
NodeList.idl LibWeb: Add support for NodeList 2021-10-03 00:18:52 +02:00
NonDocumentTypeChildNode.h LibWeb: Use default instead of an empty constructor/destructor 2021-09-16 17:17:13 +02:00
NonElementParentNode.h LibWeb: Use default instead of an empty constructor/destructor 2021-09-16 17:17:13 +02:00
ParentNode.cpp LibWeb: Don't match the node querySelector(All) was called on 2022-01-20 22:18:07 +00:00
ParentNode.h LibWeb: Convert ParentNode.querySelectorAll to NodeList 2021-10-03 00:18:52 +02:00
Position.cpp LibWeb: Remove unnecessary DOM::Position destructor 2021-09-08 11:14:29 +02:00
Position.h AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
ProcessingInstruction.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProcessingInstruction.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProcessingInstruction.idl LibWeb: Add ProcessingInstruction node 2021-04-06 21:42:00 +02:00
Range.cpp LibWeb: Rename DOM::Window::document() => associated_document() 2021-09-09 21:25:10 +02:00
Range.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Range.idl LibWeb: Add constructor to Range IDL interface 2021-02-17 23:45:07 +01:00
ShadowRoot.cpp LibWeb: Clean up static function in header 2021-10-06 23:52:40 +01:00
ShadowRoot.h LibWeb: Make the innerHTML setter spec compliant 2021-09-14 02:09:18 +02:00
ShadowRoot.idl LibWeb: Make the innerHTML setter spec compliant 2021-09-14 02:09:18 +02:00
StaticNodeList.cpp LibWeb: Add support for NodeList 2021-10-03 00:18:52 +02:00
StaticNodeList.h LibWeb: Add support for NodeList 2021-10-03 00:18:52 +02:00
Text.cpp LibWeb: Rename DOM::Window::document() => associated_document() 2021-09-09 21:25:10 +02:00
Text.h LibWeb: Add constructors for Text, DocumentFragment and Comment 2021-09-06 02:18:41 +02:00
Text.idl LibWeb: Add constructors for Text, DocumentFragment and Comment 2021-09-06 02:18:41 +02:00
Timer.cpp LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
Timer.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
Window.cpp LibWeb: Introduce MediaFeatureValue type for use in media queries 2022-01-02 15:43:51 +01:00
Window.h LibWeb: Introduce MediaFeatureValue type for use in media queries 2022-01-02 15:43:51 +01:00