Commit Graph

15 Commits

Author SHA1 Message Date
Kenneth Myhra
03d6cb88ff LibWeb: Port KeyboardEvent to new String 2023-04-06 08:41:43 +02:00
Kenneth Myhra
a401cff4e2 LibWeb: Make factory methods of UIEvents::KeyboardEvent fallible 2023-02-22 09:55:33 +01:00
Timothy Flynn
2692db8699 LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors
Note that as of this commit, there aren't any such throwers, and the
call site in Heap::allocate will drop exceptions on the floor. This
commit only serves to change the declaration of the overrides, make sure
they return an empty value, and to propagate OOM errors frm their base
initialize invocations.
2023-01-29 00:02:45 +00:00
Timothy Flynn
834202aeb9 LibWeb: Move setting of Web object prototypes to initialize()
This needs to happen before prototype/constructor intitialization can be
made lazy. Otherwise, GC could run during the C++ constructor and try to
collect the object currently being created.
2023-01-10 16:08:14 +01:00
Timothy Flynn
f3db548a3d AK+Everywhere: Rename FlyString to DeprecatedFlyString
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so
let's rename it to A) match the name of DeprecatedString, B) write a new
FlyString class that is tied to String.
2023-01-09 23:00:24 +00:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
Andrew Kaster
56b381aac0 LibWeb: Cleanup unecessary uses and includes of HTML::Window
The big global refactor left some stragglers behind for atomicity.

Clean up the rest, and remove a ton of includes of LibWeb/HTML/Window.h
2022-10-01 21:05:32 +01:00
Andrew Kaster
6a10352712 LibWeb: Remove unecessary dependence on Window from UIEvents classes
These classes only needed Window to get at its realm. Pass a realm
directly to construct UIEvents classes.
2022-10-01 21:05:32 +01:00
Linus Groh
4270ede7c4 LibWeb: Remove WRAPPER_HACK() macro
We no longer access Bindings::FooWrapper anywhere for a Foo platform
object, so these can be removed :^)
2022-09-21 21:12:24 +01:00
Andreas Kling
45425de849 LibWeb: Use the WRAPPER_HACK() macro instead of hand-coding wrap()
This macro will soon go away, but let's start by replacing all the
hand-coded versions of wrap() with this macro that expands to the same
exact thing.
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
7c3db526b0 LibWeb: Make DOM::Event and all its subclasses GC-allocated 2022-09-06 00:27:09 +02:00
Igor Pissolati
7f45a9e9c1 LibWeb: Add "which" attribute to UIEvent
This is non-standard but is supported by all major browsers.
2022-04-09 18:27:24 +02:00
Idan Horowitz
f74b612aa4 LibWeb: Add the missing KeyboardEvent IDL constructor
This commit also does a bit of general cleanup on the header file.
2021-10-01 20:14:45 +02:00
Andreas Kling
554c344ffe LibWeb: Add a basic KeyboardEvent and fire "keydown" events :^) 2021-09-28 16:56:24 +02:00