Shannon Booth
d527c5df5d
LibWeb: Allow using queuing strategies on globals other than Window
...
These interfaces are exposed on *, meaning it should work for workers
and our newly added shadow realm global object by being stored on the
universal global scope mixin.
2024-11-20 18:01:21 -07:00
rmg-x
13f349aea2
LibWeb/Fetch: Implement blob range section of scheme fetch specification
2024-11-21 00:26:58 +00:00
rmg-x
84f673515b
LibWeb/XHR: Use normalized header value when validating contents
...
This was not matching specification and caused valid requests to be
rejected.
2024-11-21 00:26:58 +00:00
rmg-x
4e48298414
LibWeb/Fetch: Implement build_content_range(start, end, full_length)
2024-11-21 00:26:58 +00:00
rmg-x
bf5cf720b5
LibWeb/Fetch: Bring parse_single_range_header_value()
up to spec
...
The previous implementation wasn't using the latest specification steps.
2024-11-21 00:26:58 +00:00
Timothy Flynn
488034477a
Revert "LibWeb: Set doctype node immediately while parsing XML document"
...
This reverts commit cd446e5e9c
.
This broke about 20k WPT subtests, all related to XML parsing. See:
https://wpt.fyi/results/html/the-xhtml-syntax/parsing-xhtml-documents?diff=&filter=ADC&run_id=5154815472828416&run_id=5090731742199808
2024-11-20 19:11:56 -05:00
Timothy Flynn
f57ff63432
LibJS: Implement Temporal.Duration.prototype.valueOf
2024-11-20 19:04:30 -05:00
Timothy Flynn
c715711f88
LibJS: Implement Temporal.Duration.prototype.total
...
Until we have re-implemented Temporal.PlainDate/ZonedDateTime, some of
Temporal.Duration.prototype.total (and its invoked AOs) are left
unimplemented.
2024-11-20 19:04:30 -05:00
Timothy Flynn
5689621c2b
LibJS: Implement Temporal.Duration.prototype.round
...
Until we have re-implemented Temporal.PlainDate/ZonedDateTime, some of
Temporal.Duration.prototype.round (and its invoked AOs) are left
unimplemented.
2024-11-20 19:04:30 -05:00
Timothy Flynn
4742775262
LibJS: Implement stringification Temporal.Duration prototypes
2024-11-20 19:04:30 -05:00
Timothy Flynn
a80523be18
LibJS: Implement mathematical Temporal.Duration prototypes
...
Includes:
Temporal.Duration.prototype.negated
Temporal.Duration.prototype.abs
Temporal.Duration.prototype.add
Temporal.Duration.prototype.subtract
2024-11-20 19:04:30 -05:00
Timothy Flynn
55c81482b0
LibJS: Implement Temporal.Duration.prototype.with
2024-11-20 19:04:30 -05:00
Timothy Flynn
dfaa3bf649
LibJS: Implement Temporal.Duration.prototype.sign/blank
2024-11-20 19:04:30 -05:00
Timothy Flynn
5fe0d3352d
LibJS: Implement the Temporal.Duration constructor
...
This also includes a stubbed Temporal.Duration.prototype.
Until we have re-implemented Temporal.PlainDate/ZonedDateTime, some of
Temporal.Duration.compare (and its invoked AOs) are left unimplemented.
2024-11-20 19:04:30 -05:00
Timothy Flynn
eca378a7a3
LibJS: Restore some Temporal numeric constants
...
And add few ad-hoc constants for convenience.
2024-11-20 19:04:30 -05:00
Timothy Flynn
e4e05837e1
LibJS: Return a GC::Ref from Temporal::get_options_object
...
The Object returned here is always non-null.
2024-11-20 19:04:30 -05:00
Timothy Flynn
c8d2404230
LibJS: Update spec steps for the few remaining Temporal AOs
2024-11-20 19:04:30 -05:00
Timothy Flynn
d368fcadac
LibJS: Update spec link for Temporal [ %Symbol.toStringTag% ]
2024-11-20 19:04:30 -05:00
Timothy Flynn
f7517c5b8d
LibJS: Remove our existing Temporal implementation
...
Our Temporal implementation is woefully out of date. The spec has been
so vastly rewritten that it is unfortunately not practical to update our
implementation in-place. Even just removing Temporal objects that were
removed from the spec, or updating any of the simpler remaining objects,
has proven to be a mess in previous attempts.
So, this removes our Temporal implementation. AOs used by other specs
are left intact.
2024-11-20 19:04:30 -05:00
Timothy Flynn
b94307583b
LibCrypto: Add user-defined literals to convert numbers to a BigInt
...
It is much more convenient to define constants with:
1000_bigint
Than with:
Crypto::UnsignedBigInteger { 1000 }
2024-11-20 19:04:30 -05:00
Timothy Flynn
e236f1d2ae
LibCrypto: Define UnsignedBigInteger::operator<=
...
We have all comparison operators except less-than-or-equal already.
2024-11-20 19:04:30 -05:00
Ali Mohammad Pur
63a5717bc7
LibDNS: Immediately resolve IPv4/IPv6 "hostnames" if A/AAAA is queried
...
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
This makes e.g. lookup(192.168.1.1, A) resolve to the IP instead of
querying DNS for the IP.
2024-11-20 21:37:58 +01:00
Ali Mohammad Pur
c5afe58540
LibDNS: Add a default entry for localhost
...
In the future, we may want to parse /etc/hosts (or equivalent) into the
cache; this commit only adds localhost to make the normal workflow work.
2024-11-20 21:37:58 +01:00
Ali Mohammad Pur
3bcd91b109
LibDNS: Hide some debug logs behind DNS_DEBUG
2024-11-20 21:37:58 +01:00
Ali Mohammad Pur
6911c45bab
LibDNS: Respect records' TTL in the resolver cache
2024-11-20 21:37:58 +01:00
Ali Mohammad Pur
879ae94183
LibRequests: Don't crash on requests without a read stream finishing
...
This can now happen due to the hostname not existing, as RS explicitly
performs DNS resolution before setting up the response pipe.
2024-11-20 21:37:58 +01:00
Ali Mohammad Pur
7e20f4726f
LibDNS+LibWeb+Ladybird+RequestServer: Let there be DNS over TLS
...
This commit adds our own DNS resolver, with the aim of implementing DoT
(and eventually DoH, maybe even DNSSEC etc.)
2024-11-20 21:37:58 +01:00
Ali Mohammad Pur
7f72c28e78
LibHTTP: Make HeaderMap movable and copyable
2024-11-20 21:37:58 +01:00
Ali Mohammad Pur
d704b61066
LibCore+LibTLS: Add an API for connect()'ing 'with hostname
...
This just unifies the API for all three sockets (UDP, TCP and TLS)
2024-11-20 21:37:58 +01:00
Pavel Shliak
8a07131229
LibGfx: Clean up #include directives
...
We actually include what we use where we use it.
This change aims to improve the speed of incremental builds.
2024-11-20 21:13:23 +01:00
Andreas Kling
063cd68bf4
LibWeb: Mark image elements for layout before firing their load event
...
This removes a long-standing source of flakiness seen for example in
WPT's /referrer-policy/ tests.
2024-11-20 19:04:37 +01:00
Luke Wilde
f638f84185
LibWeb: Make default document readiness be "complete"
...
This is required by mini Cloudflare invisible challenges, as it will
only run if the readyState is not "loading". If it is "loading", then
it waits for readystatechange to check that it's not "loading" anymore.
Initial about:blank iframes do not go through the full navigation and
thus don't go through HTMLParser::the_end, which sets the ready state
to something other than "loading". Therefore, the challenge would never
run, as readyState would never change.
Seen on https://discord.com/login
2024-11-20 16:20:28 +01:00
Andreas Kling
4203b7823f
LibWeb: Fix incorrect exception on replaceChild() with doctypes
...
We were checking for presence of the wrong child in the parent.
2024-11-20 16:10:57 +01:00
Andreas Kling
cd446e5e9c
LibWeb: Set doctype node immediately while parsing XML document
...
Instead of deferring it to the end of parsing, where scripts that
were expecting to look at the doctype may have already run.
2024-11-20 16:10:57 +01:00
Andreas Kling
ab0dc83d28
LibWeb: Make Node.normalize() ignore CDATASection nodes
...
We hadn't modeled the "exclusive text node" concept correctly.
2024-11-20 16:10:57 +01:00
Nico Weber
6fc06f45c2
LibWeb: Plumbing for svg stroke-dashoffset
2024-11-20 15:57:37 +01:00
Gingeh
4b1deb6fe1
LibWeb: Don't skip filtering when CSS contains null or surrogates
2024-11-20 15:47:19 +01:00
Jonne Ransijn
356507284e
LibWeb: Compare font keys by reference
...
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
`StyleComputer::font_matching_algorithm` was creating a copy of a
`FlyString` every time a `MatchingFontCandidate` was constructed or
copied, causing millions of unnecessairy reference updates when a
lot of fonts are loaded.
While a more permanent solution would be to not load so many unused
fonts, let's do the right thing and remove the unnecessairy copies of
`FlyString`.
2024-11-20 15:38:03 +01:00
Jonne Ransijn
ec5ea0d686
LibGfx: Return family names by reference to avoid unnecessairy cloning
2024-11-20 15:38:03 +01:00
Pavel Shliak
b3c253e50f
LibFileSystem: Clean up #include directives
...
This change aims to improve the speed of incremental builds.
2024-11-20 15:17:53 +01:00
Pavel Shliak
d0c0db5bb3
LibCompress: Clean up #include directives
...
This change aims to improve the speed of incremental builds.
2024-11-20 15:17:31 +01:00
Timothy Flynn
b99a3ec2df
LibWeb: Clone CDATASection nodes with the correct node type
...
We were cloning these as plain Text nodes, but the clone must also be a
CDATASection node.
2024-11-20 15:15:56 +01:00
rmg-x
74b27d620d
LibJS: Parse dates like "Wed Nov 20 2024"
2024-11-20 09:20:48 +00:00
stasoid
dabf3da7e5
LibCore: Fix bug in CreateFileMapping call
...
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
size >> 31 >> 1 is used instead of size >> 32 to support 32-bit Windows
(size_t is 32 bit there, and you cannot shift 32-bit value by 32 bits
on x86)
This is equivalent to sizeof(size) == 4 ? 0 : size >> 32
2024-11-19 22:07:01 -07:00
stasoid
11460b3daa
LibCore: Fix ConfigFile.cpp compilation on Windows
2024-11-19 22:07:01 -07:00
stasoid
43056a8684
LibCore: Port Directory to Windows
2024-11-19 22:07:01 -07:00
stasoid
77d205571d
LibCore/System: Add mkdir, openat (stub), fstatat (stub) for Windows
...
Also support directories in open().
2024-11-19 22:07:01 -07:00
Psychpsyo
f09ed59351
LibWeb: Add the search element
2024-11-19 23:30:43 +00:00
stasoid
866609c682
LibCore: Make Process::wait_for_termination return exit code
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, 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-19 14:40:03 -07:00
stasoid
3468a83e45
LibCore: Port Process to Windows
...
Windows doesn't have a concept of zombie children, hence:
* `disown` not needed
* we need a process handle because otherwise if the process have ended
by the time `wait_for_termination` is called
its pid may be reassigned to other process
2024-11-19 14:40:03 -07:00