Commit Graph

40958 Commits

Author SHA1 Message Date
Andreas Kling
369dd42d67 LibWeb: Make ImageData GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
4452b5ca09 LibWeb: Make 2D and 3D canvas rendering contexts GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
b8d485e6f0 LibWeb: Make AbortController GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
18ca15b2cc Fuzzers: Fix FuzzCSSParser build 2022-09-06 00:27:09 +02:00
Andreas Kling
3905d54a9c LibWeb: Make SVGLength and SVGAnimatedLength GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
16fbb91aa1 LibWeb: Make History GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
abfb73f2e7 LibWeb+LibJS: Let JS::Realm::HostDefined objects mark things during GC
This allows us to mark the HTML::Window from our window environment
settings object.
2022-09-06 00:27:09 +02:00
Andreas Kling
2ff7e37048 LibWeb: Make MessageChannel GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
2bba97964b LibWeb: Make HTMLCollection and subclasses GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
4c887bf6c3 LibWeb: Remove Document::interpreter()
Nobody needs this anymore, so we can finally remove it. :^)
2022-09-06 00:27:09 +02:00
Andreas Kling
2d72abc3d4 LibWeb+WebContent: Store Realm instead of Interpreter in ConsoleClient 2022-09-06 00:27:09 +02:00
Andreas Kling
905eb8cb4d LibWeb: Make MutationObserver GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
43ec0f734f LibWeb: Make MutationRecord GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
48e0066371 LibWeb: Make NodeList GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
8f4ea4e308 LibWeb: Don't use a JS::Handle for XHR response object 2022-09-06 00:27:09 +02:00
Andreas Kling
c7ac82ec33 LibWeb: Make HTML::Timer GC-allocated
These are the timers used internally by setTimeout() and setInterval().
2022-09-06 00:27:09 +02:00
Andreas Kling
c569c88e63 LibWeb: Don't have Handle<Realm> in WindowEnvironmentSettingsObject
This was preventing window realms from ever being garbage collected.
2022-09-06 00:27:09 +02:00
Andreas Kling
5f4d4ffe39 LibWeb: Make PerformanceTiming GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
8c90e08e0b LibWeb: Make CSS::Screen GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
d5e831988e LibWeb: Make DOMParser GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
8341f142ea LibWeb: Add HTML::Window::cached_web_prototype()
This is a simpler version of ensure_web_prototype<T>(). This new version
assumes that we already have a cached instance of the prototype.
2022-09-06 00:27:09 +02:00
Andreas Kling
6f433c8656 LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated
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-09-06 00:27:09 +02:00
Andreas Kling
bb547ce1c4 LibWeb: Make AbstractRange and subclasses GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
7c3db526b0 LibWeb: Make DOM::Event and all its subclasses GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
a4ddb0ef87 LibWeb: Make TreeWalker GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
bd629c45b5 LibWeb: Make NodeIterator GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
8cda70c892 LibWeb: Move event listeners, handlers and callbacks to the GC heap
This patch moves the following things to being GC-allocated:
- Bindings::CallbackType
- HTML::EventHandler
- DOM::IDLEventListener
- DOM::DOMEventListener
- DOM::NodeFilter

Note that we only use PlatformObject for things that might be exposed
to web content. Anything that is only used internally inherits directly
from JS::Cell instead, making them a bit more lightweight.
2022-09-06 00:27:09 +02:00
Andreas Kling
967a3e5a45 LibWeb: Make DOMImplementation GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
cfdb8f2a8e LibWeb: Make MediaList GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
0176d42f49 LibWeb: Make DOMTokenList GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
a56b3f9862 LibWeb: Make NamedNodeMap GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
ae11d70b0c LibWeb: Make DOMStringMap GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
72bacba97b LibWeb: Make CSSStyleDeclaration GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
12042f0757 LibWeb: Make CSSRule and all its subclasses GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
5d6cb9cbdb LibWeb: Make CSSRuleList GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
5366924f11 LibWeb: Make StyleSheetList GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
5d60212076 LibWeb: Make StyleSheet and CSSStyleSheet GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
0fe923e355 LibWeb: Add an "internal" JS realm & window object
These will be used to host JS objects that don't belong in one of the
web-facing global objects.
2022-09-06 00:27:09 +02:00
Andreas Kling
4ae2390554 LibWeb: Support NoInstanceWrapper extended attribute on interfaces
This tells the wrapper generator that there is no separate wrapper class
for this interface, and it should refer directly to the C++ "Foo" object
instead of "FooWrapper".
2022-09-06 00:27:09 +02:00
Andreas Kling
b33b426b2e LibWeb: Add a mechanism to opt out of generating instance wrappers
To enable incremental movement towards the removal of DOM object
instance wrappers, this patch adds a NO_INSTANCE argument that can be
passed to libweb_js_wrapper().
2022-09-06 00:27:09 +02:00
Andreas Kling
91ed6125fd LibWeb: Add Bindings::LegacyPlatformObject base class
This will be inherited by "legacy platform objects", i.e objects that
need to hijack indexed and/or named property access as described in the
IDL spec: https://webidl.spec.whatwg.org/#dfn-legacy-platform-object

Instead of overriding JS::Object virtuals, subclasses only need to
implement a very simple interface for property queries.

Note that this code is taken verbatim from code generator output.
I didn't write any of this now, so it's effectively "moved" code.
2022-09-06 00:27:09 +02:00
Andreas Kling
f6c61940f6 LibWeb: Add PlatformObject class
This represents the "platform object" concept from the IDL spec, which
refers to an object that implements an IDL interface.
2022-09-06 00:27:09 +02:00
Jelle Raaijmakers
71c7ac3510 Ports: Remove invalid copy action from PrBoom+ build
This was a test that should have been removed in the previous PR.
2022-09-05 23:26:18 +02:00
electrikmilk
98fb0727a4 Base: Make open folder icons consistent
This changes the open parent directory, open recent, and open folder
16x16 icons to be more consistent with the other folder icons. This
also improves the other elements on these icons by adding tinting
and shading.
2022-09-05 21:40:16 +01:00
electrikmilk
67eee46319 Base: Add shell script file type icon
This adds a file type icon for shell scripts.
2022-09-05 20:34:42 +01:00
Timothy Flynn
9e860d973e LibLocale: Move locale source files to the LibLocale library
Everything is now setup to create the LibLocale library and link it
where needed.
2022-09-05 14:37:16 -04:00
Timothy Flynn
f082b6ae48 LibUnicode: Generate a separate Locale enumeration for special casing
The UCD only cares about a few locales for special casing rules (az, lt,
and tr). Unfortunately, LibUnicode cannot use LibLocale once the
libraries are separate because LibLocale will need to use LibUnicode for
many more things; thus there would be a circular dependency. Instead,
just generate the small enum needed for this one use case.
2022-09-05 14:37:16 -04:00
Timothy Flynn
b2d2bb43ce LibLocale: Move locale test files to the LibLocale folder 2022-09-05 14:37:16 -04:00
Timothy Flynn
43a3471298 LibLocale: Move locale source files to the LibLocale folder
These are still included in LibUnicode, but this updates their location
and the include paths of other files which include them.
2022-09-05 14:37:16 -04:00
Timothy Flynn
ff48220dca Userland: Move files destined for LibLocale to the Locale namespace 2022-09-05 14:37:16 -04:00