Timothy Flynn
70db474cf0
LibJS+LibWeb: Port interned bytecode strings to UTF-16
...
This was almost a no-op, except we intern JS exception messages. So the
bulk of this patch is porting exception messages to UTF-16.
2025-08-14 10:27:08 +02:00
Timothy Flynn
7fad8c333d
LibWeb: Use forward-declarations of structured serialized types
...
This reduces the rebuilt targets when touching StructuredSerialize.h
from ~1200 to ~400. The remaining are due to generated IPC headers.
2025-07-18 10:09:02 -04:00
Shannon Booth
9e3a476890
LibWeb: Abort ongoing navigations when firing certain navigate events
...
Implements specification change:
335d7f4
Which fixes a crash in the imported test.
2025-07-06 21:43:56 +02:00
Shannon Booth
420949b134
LibWeb/HTML: Make Navigation navigate event trusted
...
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Fixes WPT test:
https://wpt.live/navigation-api/navigate-event/signal-abort-intercept.html
2025-04-27 07:54:02 -04:00
Andreas Kling
a6dfc74e93
LibWeb: Only set prototype once for object with IDL interface
...
Before this change, we were going through the chain of base classes for
each IDL interface object and having them set the prototype to their
prototype.
Instead of doing that, reorder things so that we set the right prototype
immediately in Foo::initialize(), and then don't bother in all the base
class overrides.
This knocks off a ~1% profile item on Speedometer 3.
2025-04-20 18:43:11 +02:00
Sam Atkins
5b57856eae
LibWeb/HTML: Check associated document is fully active, not the window
...
This is a spec change, but we already implemented the correct version.
Corresponds to aa39b6b6b0
2025-04-18 10:49:56 +02:00
Timothy Flynn
6dd2a4c945
LibWeb: Do not create a RootVector to invoke IDL callbacks
...
These callbacks are evaluated synchronously via JS::Call. We do not need
to construct an expensive RootVector container just to immediately
invoke the callbacks.
Stylistically, this also helps indicate where the actual arguments start
at the call sites, by wrapping the arguments in braces.
2025-04-16 07:32:02 -04:00
Viktor Szépe
b4b8d85251
LibWeb+LibJS+Tests: Fix typos - act I
2025-04-07 11:22:13 +01:00
Andreas Kling
de424d6879
LibJS: Make Completion.[[Value]] non-optional
...
Instead, just use js_undefined() whenever the [[Value]] field is unused.
This avoids a whole bunch of presence checks.
2025-04-05 11:20:26 +02:00
Sam Atkins
d970748eed
LibWeb/HTML: Assert that a finished promise has a committed-to-entry
...
Corresponds to 12c6ce02d8
2025-03-04 16:44:41 +00:00
Sam Atkins
54d41cfea3
LibWeb/HTML: Update navigation API when a same-document reload occurs
...
Corresponds to 3a2a05ddf8
2025-02-22 14:59:39 +00:00
Sam Atkins
d54753e9c6
LibWeb/HTML: Correct spec numbers in inner_navigate_event_firing_algo
...
I forgot to do this in 26b7946123
, oops!
2025-02-22 14:59:39 +00:00
Shannon Booth
2c8dab36f3
LibWeb: Port EnvironmentSettings URL Parsing to return Optional<URL>
2025-02-19 08:01:35 -05:00
Sam Atkins
26b7946123
LibWeb: Add NavigateEvent.sourceElement
...
Corresponds to:
- https://github.com/whatwg/html/pull/10898
- https://github.com/whatwg/html/pull/10971
I've also updated the imported WPT test as it's been recently changed to
account for 10898 being merged.
2025-02-04 12:24:50 +01:00
Sam Atkins
3775f3399c
LibWeb: Fix various typos
...
Corresponds to:
- https://github.com/whatwg/html/pull/10934
- https://github.com/whatwg/html/pull/10950
2025-01-30 15:00:16 +00:00
Timothy Flynn
85b424464a
AK+Everywhere: Rename verify_cast
to as
...
Follow-up to fc20e61e72
.
2025-01-21 11:34:06 -05:00
Shannon Booth
ac9670fb55
LibWeb/HTML: Fix grammar in spec note for error checking serialization
...
See: 90720ff
2025-01-17 10:08:42 +01:00
Andreas Kling
3bfb0534be
LibGC: Rename MarkedVector => RootVector
...
Let's try to make it a bit more clear that this is a Vector of GC roots.
2024-12-26 19:10:44 +01:00
Shannon Booth
f87041bf3a
LibGC+Everywhere: Factor out a LibGC from LibJS
...
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:
* JS::NonnullGCPtr -> GC::Ref
* JS::GCPtr -> GC::Ptr
* JS::HeapFunction -> GC::Function
* JS::CellImpl -> GC::Cell
* JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Shannon Booth
1e54003cb1
LibJS+LibWeb: Rename Heap::allocate_without_realm to Heap::allocate
...
Now that the heap has no knowledge about a JavaScript realm and is
purely for managing the memory of the heap, it does not make sense
to name this function to say that it is a non-realm variant.
2024-11-13 16:51:44 -05:00
Shannon Booth
9b79a686eb
LibJS+LibWeb: Use realm.create<T> instead of heap.allocate<T>
...
The main motivation behind this is to remove JS specifics of the Realm
from the implementation of the Heap.
As a side effect of this change, this is a bit nicer to read than the
previous approach, and in my opinion, also makes it a little more clear
that this method is specific to a JavaScript Realm.
2024-11-13 16:51:44 -05:00
Timothy Flynn
93712b24bf
Everywhere: Hoist the Libraries folder to the top-level
2024-11-10 12:50:45 +01:00