Shannon Booth
4913dac745
LibWeb: Get Page from principal realm during resource loading
...
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
Fixes a crash for module loading for a shadow realm.
2024-11-24 15:29:47 -07:00
Shannon Booth
b677844f8d
LibWeb: Remove underlying realm from SyntheticRealmSettings
...
This was removed from the ShadowRealm HTML spec integration PR after my
suggestion as it is not used anywhere, and I don't believe it would ever
need to be used in the future or by other specs.
2024-11-24 15:29:47 -07:00
Shannon Booth
43f75dcba0
LibWeb: Don't store reference to temporary in resolve_module_specifier
...
An environment settings object will return a copy to the URL. From a
quick glance, we could probably make an environment settings object
return a reference to one, but let's just change this code to make
a copy since its not safe to rely on that.
2024-11-24 15:29:47 -07:00
Andreas Kling
7b678d3e1f
LibWeb: Throw TypeError if WebCrypto algorithm doesn't have "name" field
2024-11-24 23:28:23 +01:00
Andreas Kling
fe98cbcae1
LibWeb: Don't copy HashMaps so dang much in WebCrypto
2024-11-24 23:28:23 +01:00
Andreas Kling
ed7b1caba2
LibWeb: Implement the exportKey algorithm for Ed25519
2024-11-24 23:28:23 +01:00
Andreas Kling
4d25369f29
LibWeb: Implement the importKey algorithm for Ed25519
2024-11-24 23:28:23 +01:00
Andreas Kling
8cb371b2ce
LibWeb: Decode X25519 keys as base64url + throw on bogus key data
...
This makes the X25519 importKey tests from WPT actually run.
2024-11-24 23:28:23 +01:00
Andreas Kling
e0def9d745
Tests: Import WPT importKey tests for Ed25519 and X25519
2024-11-24 23:28:23 +01:00
Ali Mohammad Pur
e5ff572d73
LibTLS: Change connection state to disconnected after server CloseNotify
...
Prior to this commit LibTLS closed the connection but did not consider
it terminated after receiving and acknowledging a CloseNotify from the
server, which led to hangs in DoT (and possibly other users).
2024-11-24 22:33:58 +01:00
Tim Ledbetter
7b389ca221
LibWeb: Avoid unnecessary Vector copy during find in page queries
2024-11-24 19:28:13 +00:00
Tim Ledbetter
63167cfd89
LibWeb: Remove EventLoop::documents_in_this_event_loop()
...
This function is no longer used anywhere.
2024-11-24 19:28:13 +00:00
Tim Ledbetter
c322603c42
LibWeb: Avoid Vector filtering when performing find in page queries
2024-11-24 19:28:13 +00:00
Andreas Kling
26f32b11f9
LibWeb: Avoid expensive Vector filtering in event loop
...
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
Instead of collecting all documents in a big vector and then filtering
the vector (twice!) with remove_all_matching(), we now pass a filter
callback to documents_in_this_event_loop_matching() and avoid all the
extra shuffling work.
Saw this stuff hogging ~20% of CPU time when profiling a WebContent
process in the middle of a WPT run.
2024-11-24 17:17:01 +01:00
Jeremia Dominguez
eafa70331d
LibWeb/Layout: Simplified margin collapsing
...
Rather than accumulating margins into a vector, and then looping through
them when resolving the margin, it's much simpler to just update two
fields, and sum them when resolving.
2024-11-24 14:45:28 +01:00
Psychpsyo
6f52064c4f
LibWeb: Make SVGs respect their CSS transforms
2024-11-24 14:30:32 +01:00
Milo van der Tier
15741350ba
LibWeb: Make replaceData create new surrogate pairs
...
When inserting a new utf-16 surrogate next to an existing surrogate
with replaceData, the surrogates would not get merged correctly into a
single code point. This is because internally the text data is stored
as utf-8, and the two surrogates would be converted seperately. This
has now been fixed by first recreating the whole string in utf-16 and
then converting it back to utf-8.
It's not the most efficient solution, but this fixes at least 6 WPT
subtests.
2024-11-24 13:04:06 +00:00
Andreas Kling
01f4bbbba7
LibWeb: Abandon Node.replaceChild() if removal rejigs the DOM
...
This isn't directly in the spec, but since replaceChild is implemented
in terms of remove + insert, the removal step may cause arbitrary code
to execute, and so we have to verify that the replaceChild inputs still
make sense afterwards, before doing the insertion.
This roughly matches what WebKit does, and makes a bunch of HTML parsing
tests in WPT stop asserting.
2024-11-24 11:45:23 +01:00
Andreas Kling
5c70436cb2
LibWeb: Teach more of HTMLTokenizer to stop at the insertion point
...
In particular, input character lookahead now knows how to stop at the
insertion point marker if needed.
This makes it possible to do amazing things like having document.write()
insert doctypes one character at a time.
2024-11-24 11:45:23 +01:00
Timothy Flynn
82b540e501
LibJS: Implement Temporal.PlainDate.prototype.toPlainDateTime
2024-11-24 11:43:59 +01:00
Timothy Flynn
d22ea4db4c
LibJS: Implement Temporal.PlainDateTime.prototype.valueOf
2024-11-24 11:43:59 +01:00
Timothy Flynn
649328fed2
LibJS: Implement Temporal.PlainDateTime.prototype.toPlainDate/Time
2024-11-24 11:43:59 +01:00
Timothy Flynn
990daaf63a
LibJS: Implement Temporal.PlainDateTime.prototype.with* methods
...
Includes with, withCalendar, and withPlainTime.
2024-11-24 11:43:59 +01:00
Timothy Flynn
e3082b5bed
LibJS: Implement Temporal.PlainDateTime.prototype.round
2024-11-24 11:43:59 +01:00
Timothy Flynn
906d951104
LibJS: Implement Temporal.PlainDateTime.prototype.since/until
2024-11-24 11:43:59 +01:00
Timothy Flynn
85ffacacde
LibJS: Implement Temporal.PlainDateTime.prototype.add/subtract/equals
2024-11-24 11:43:59 +01:00
Timothy Flynn
d314fcce7a
LibJS: Implement stringification Temporal.PlainDateTime prototypes
2024-11-24 11:43:59 +01:00
Timothy Flynn
1a80161011
LibJS: Fix Temporal.PlainMonthDay.prototype.calendarId references
...
Small mistake porting old Temporal tests to the new spec. This getter
was `.calendar` in the old Temporal spec.
2024-11-24 11:43:59 +01:00
Timothy Flynn
029b6ad1a8
LibJS: Implement the Temporal.PlainDateTime constructor
...
And the simple Temporal.PlainDateTime.prototype getters, so that the
constructed Temporal.PlainDateTime may actually be validated.
2024-11-24 11:43:59 +01:00
Kenneth Myhra
a61cdeba24
LibWeb: Switch to using TemporaryExecutionContext
...
TemporaryExecutionContext has support to prepare for callbacks so we can
use it here now instead of setting this up manually.
2024-11-24 11:12:08 +01:00
Kenneth Myhra
968c38e54f
LibWeb: Implement FetchController::abort()
2024-11-24 11:11:44 +01:00
Kenneth Myhra
4c5019f89c
LibWeb: Add serialization and deserilization steps to DOMException
...
This makes DOMException a Serializable object.
2024-11-24 11:11:44 +01:00
Kenneth Myhra
490c05ef29
LibWeb: Make create_serialized_type() in-fallible
...
The ::create() functions have all been converted into in-fallible
versions so there is no longer any point in create_serialized_type()
being fallible.
2024-11-24 11:11:44 +01:00
Kenneth Myhra
53394230ca
LibWeb: Reorganize definitions and includes to avoid circular references
...
This is necessary to avoid a circular reference when including
Serializable.h in DOMException.h.
This moves the definition of SerializationRecord, SerializationMemory,
and DeserializationMemory into LibWeb/Forward.h so that Serializable.h
only needs to include LibWeb/Forward.h.
2024-11-24 11:11:44 +01:00
Kenneth Myhra
4569b997a6
LibWeb: Add missing spec links for pipe_through() and pipe_to()
2024-11-24 11:11:44 +01:00
Psychpsyo
1d44df74f7
LibWeb: Stop zero-area children from causing scrollable overflow
2024-11-24 11:10:47 +01:00
Marc Jessome
efcaf991e6
LibRegex: Ensure nested capture groups have non-conflicting names
...
Take record of the named capture group prior to parsing the group's
body. This requires removal of the recorded minimum length of the named
capture group directly, and now needs to be looked up via the group
minimu lengths table.
2024-11-24 10:26:09 +01:00
Timothy Flynn
e37c9eaeff
LibJS: Implement Temporal.PlainTime.prototype.valueOf
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
2024-11-23 19:35:36 -05:00
Timothy Flynn
d639e9429f
LibJS: Implement Temporal.PlainTime.prototype.round/equals
2024-11-23 19:35:36 -05:00
Timothy Flynn
a0df194528
LibJS: Implement Temporal.PlainTime.prototype.with
2024-11-23 19:35:36 -05:00
Timothy Flynn
85eef698b9
LibJS: Implement Temporal.PlainTime.prototype.since/until
2024-11-23 19:35:36 -05:00
Timothy Flynn
1c22011ed6
LibJS: Implement Temporal.PlainTime.prototype.add/subtract
2024-11-23 19:35:36 -05:00
Timothy Flynn
ab3c825fa8
LibJS: Implement stringification Temporal.PlainTime prototypes
2024-11-23 19:35:36 -05:00
Timothy Flynn
66365fef57
LibJS: Implement the Temporal.PlainTime constructor
...
And the simple Temporal.PlainTime.prototype getters, so that the
constructed Temporal.PlainTime may actually be validated.
2024-11-23 19:35:36 -05:00
Timothy Flynn
971f794127
LibJS: Add and use a BigInt-aware override of BalanceTime
...
With Temporal.PlainTime, we will need precise results for extremely
large values.
2024-11-23 19:35:36 -05:00
Timothy Flynn
7f3de3be9c
LibJS: Capture sub-second nanoseconds as a u64 in FormatTimeString
...
This is not a plain nanosecond value (which has a range of [0, 999]).
Rather, it is all of the sub-second components added together.
2024-11-23 19:35:36 -05:00
Timothy Flynn
0b59971ef9
LibJS: Reject ambiguous annotated time strings
...
This missing rejection will be caught by an upcoming Temporal.PlainTime
test.
2024-11-23 19:35:36 -05:00
Timothy Flynn
c83a3db542
LibJS: Handle Temporal.PlainDate in dynamic calendar operations
2024-11-23 19:35:36 -05:00
Andrew Kaster
5be4825504
LibWeb: Report exceptions from custom element upgrades to global object
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
2024-11-24 00:15:59 +00:00
Milo van der Tier
54b0476d70
LibWeb: Handle second condition in NamedNodeMap's property names
...
This removes the FIXME and fixes a WPT subtest.
2024-11-23 23:21:50 +00:00