Commit Graph

40897 Commits

Author SHA1 Message Date
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
Timothy Flynn
88504b89e1 LibLocale: Rename a couple CLDR generator structures
When LibLocale is placed in the Locale namespace, this will conflict
with the Locale structure in each CLDR generator. Rename this to
"LocaleData", and rename its parent UnicodeLocaleData to just "CLDR"
to avoid confusion between LocaleData and UnicodeLocaleData.
2022-09-05 14:37:16 -04:00
Timothy Flynn
6c7b05a0ff LibUnicode+LibJS: Move Unicode::get_available_currencies() to Locale.h
This is generated by GenerateLocaleData, which will soon be in the
Locale namespace. Move it out of CurrencyCode.h, as that will continue
to live in the Unicode namespace.
2022-09-05 14:37:16 -04:00
Timothy Flynn
1e0276f541 LibLocale+LibUnicode: Move generated CLDR data files to LibLocale folder
They are still included into LibUnicode, but this moves their generated
location to be under LibLocale.
2022-09-05 14:37:16 -04:00
Timothy Flynn
fc8bf7ac3e LibUnicode+Userland: Migrate generated CLDR data to LibLocaleData
Currently, LibUnicodeData contains the generated UCD and CLDR data. Move
the UCD data to the main LibUnicode library, and rename LibUnicodeData
to LibLocaleData. This is another prepatory change to migrate to
LibLocale.
2022-09-05 14:37:16 -04:00
Timothy Flynn
89d1813b5d LibUnicode: Move CLDR data generators to a LibLocale subfolder
To prepare for placing all CLDR generated data in a new library,
LibLocale, this moves the code generators for the CLDR data to the
LibLocale subfolder.
2022-09-05 14:37:16 -04:00
Timothy Flynn
e3e0602833 LibUnicode: Fully qualify use of AK::Variant in Locale.h
The generated locale data contains an enum also named Variant, as
variants are part of locale strings. This hasn't been an issue, but as
includes are reordered, the order in which the enum and AK::Variant are
included may cause an ambiguity error.
2022-09-05 14:37:16 -04:00
Timothy Flynn
85994d6115 LibJS: Remove unused include from JS::Temporal::Calendar 2022-09-05 14:37:16 -04:00
electrikmilk
ac316d9847 Base: Add 32 new emojis
🦊 - U+1F98A FOX
🦉 - U+1F989 OWL
🥔 - U+1F954 POTATO
🍣 - U+1F363 SUSHI
🎖️ - U+1F396 MILITARY MEDAL
🏆 - U+1F3C6 TROPHY
🏅 - U+1F3C5 SPORTS MEDAL
🎳 - U+1F3B3 BOWLING
📱 - U+1F4F1 MOBILE PHONE
📲 - U+1F4F2 MOBILE PHONE WITH ARROW
📼 - U+1F4FC VIDEOCASSETTE
💰 - U+1F4B0 MONEY BAG
🗄️ - U+1F5C4 FILE CABINET
🚪 - U+1F6AA DOOR
🛒 - U+1F6D2 SHOPPING CART
🚬 - U+1F6AC CIGARETTE
🕎 - U+1F54E MENORAH
🇧🇫 - U+1F1E7 U+1F1EB FLAG: BURKINA FASO
🇧🇭 - U+1F1E7 U+1F1ED FLAG: BAHRAIN
🇧🇾 - U+1F1E7 U+1F1FE FLAG: BELARUS
🇨🇩 - U+1F1E8 U+1F1E9 FLAG: CONGO - KINSHASA
🇨🇫 - U+1F1E8 U+1F1EB FLAG: CENTRAL AFRICAN REPUBLIC
🇨🇴 - U+1F1E8 U+1F1F4 FLAG: COLOMBIA
🇭🇲 - U+1F1ED U+1F1F2 FLAG: HEARD & MCDONALD ISLANDS
🇰🇬 - U+1F1F0 U+1F1EC FLAG: KYRGYZSTAN
🇲🇪 - U+1F1F2 U+1F1EA FLAG: MONTENEGRO
🇵🇷 - U+1F1F5 U+1F1F7 FLAG: PUERTO RICO
🇶🇦 - U+1F1F6 U+1F1E6 FLAG: QATAR
🇸🇬 - U+1F1F8 U+1F1EC FLAG: SINGAPORE
🇹🇴 - U+1F1F9 U+1F1F4 FLAG: TONGA
🇺🇿 - U+1F1FA U+1F1FF FLAG: UZBEKISTAN
🇼🇸 - U+1F1FC U+1F1F8 FLAG: SAMOA
2022-09-05 19:36:05 +01:00
Tim Schumacher
854792c340 Meta: Don't generate emoji.txt into the source tree 2022-09-05 09:50:31 -04:00
Tim Schumacher
e2c55ee0a8 LibC: Move dlfcn_integration.h to the bits directory 2022-09-05 10:12:02 +01:00
Tim Schumacher
be941c13e3 LibC: Reduce reliance on the dlfcn internals for regex functions 2022-09-05 10:12:02 +01:00