Commit graph

68652 commits

Author SHA1 Message Date
Shannon Booth
c86b5068d0 xml: Remove validity check on URL created with file scheme
It is not possible for this to return an invalid URL.
2025-02-19 08:01:35 -05:00
Shannon Booth
2c8dab36f3 LibWeb: Port EnvironmentSettings URL Parsing to return Optional<URL> 2025-02-19 08:01:35 -05:00
Jelle Raaijmakers
5f5d18d719 LibWeb: Do not crash when inserting block elements into inline SVGBoxes
Fixes #3395.
2025-02-19 13:49:24 +01:00
Jelle Raaijmakers
0c58dad7a6 LibWeb: Factor out conditions for creation of inline continuation
Having one big `if` to determine whether or not we should restructure an
inline layout node became a bit unwieldy. This extracts the logic into a
separate method.
2025-02-19 13:49:24 +01:00
Jelle Raaijmakers
c0109039cb LibWeb: Do not consider <foreignObject> for inline continuation
We used to have an exception for this element that erroneously got
removed in 336684bc5c.

Fixes #3453.
2025-02-19 13:49:24 +01:00
Piotr
c9edb6ffc4 LibWeb: Support for Content-Language HTTP header 2025-02-19 10:53:31 +00:00
Andrew Kaster
dda1573746 Devcontainer: Set VCPKG_FORCE_SYSTEM_BINARIES when building cache
vcpkg requires this flag to be set when building on non-x86 Linux,
as they don't ship enough cached tools for those platforms.

Put another way, we must allow system-installed versions of tools
such as CMake, Ninja, and pkg-config into the vcpkg build process
on these platforms.
2025-02-18 15:33:51 -07:00
Jelle Raaijmakers
de7ca7b157 LibWeb: Retain display: contents in ancestor stack for continuations
When restructuring inline nodes because of a block element insertion
during the layout tree build, we might end up with a `display: contents`
element in the ancestor stack that is not part of the actual layout
tree, since it's never actually used as a parent for any node. Because
we were only rewinding the ancestor stack with actual new layout nodes,
it became corrupted and layout nodes were added to the wrong parent.

This new logic leaves the ancestor stack intact, only replacing layout
nodes whenever a new one is created.

Fixes the sidebar on https://reddit.com.
Fixes #3590.
2025-02-18 23:31:49 +01:00
Tim Ledbetter
dd8cca180f LibWeb: Remove unintentional recursion in ValidityState::valid 2025-02-18 21:58:35 +01:00
Andrew Kaster
8e3798b25e LibWeb: Convert ConnectionTimingInfo to a standard layout struct
There's nothing about this type that requires it to be GC allocated
2025-02-18 11:26:34 -07:00
Andrew Kaster
47716a4e11 LibWeb: Explicitly capture resource in closures in load_resource
A hygine patch to not use a generic = capture, and remove some
unnecessary const-casts
2025-02-18 11:26:34 -07:00
Andrew Kaster
8760825bb4 LibWeb: Don't store Page on ResourceLoader
We only need a Page for file:// urls. At some point we probably
needed it for other kinds of requests, but the current functionality
doesn't need to store the Page pointer on the ResourceLoader.
2025-02-18 11:26:34 -07:00
Andrew Kaster
a869a1c056 LibWeb: Establish WebSocket connections in parallel 2025-02-18 11:26:34 -07:00
Psychpsyo
aa243000f3 LibWeb: Implement TimeRanges and HTMLMediaElement.seekable() 2025-02-18 10:45:32 -07:00
Psychpsyo
3952ff4786 LibWeb: Add a stub for HTMLMediaElement.played() 2025-02-18 10:45:32 -07:00
Psychpsyo
0206697d36 LibWeb: Implement MediaCapabilities.decodingInfo() 2025-02-18 10:18:40 -07:00
Psychpsyo
3b577e6135 Meta: Improve IDL generator for dictionary members
This makes it so that the IDL generator no longer assumed that
dictionary members with a default value are optional, since they
will always, at least, have the default value.
2025-02-18 10:18:40 -07:00
Psychpsyo
96bb250a4a LibWeb: Import setCustomValidity related tests 2025-02-18 10:17:06 -07:00
Psychpsyo
a8004a77bb LibWeb: Implement setCustomValidity IDL attribute 2025-02-18 10:17:06 -07:00
devgianlu
0926720c2a LibDNS: Add basic DNS::Resolver tests 2025-02-18 15:46:44 +01:00
devgianlu
42a18a4a91 RequestServer: Use default certificate for DNS over TLS 2025-02-18 15:46:44 +01:00
devgianlu
65966020d1 LibTLS: Forward can_read_without_blocking to underlying socket 2025-02-18 15:46:44 +01:00
Tim Ledbetter
0e470d5cdf LibWeb: Apply presentational hints for the HTMLHRElement align attribute 2025-02-18 12:06:44 +01:00
Tim Ledbetter
c217057cfd LibWeb: Apply presentational hints for the HTMLHRElement color attribute 2025-02-18 12:06:44 +01:00
Psychpsyo
83c4e22247 LibWeb: Implement validity IDL attribute 2025-02-18 06:37:11 +00:00
Aliaksandr Kalenik
184ae687c5 LibWeb+WebContent: Remove unused code in BrowsingContext 2025-02-17 19:11:14 -05:00
Shannon Booth
cf7b775709 LibWeb/URLPattern: Implement the URLPattern IDL getters
These simply return the compiled URLPattern pattern strings for
each component, and whether any of the components contained any
regexp groups.
2025-02-17 19:10:39 -05:00
Shannon Booth
f3662c6f88 LibURL/Pattern: Add a representation of a URL Pattern
This is the core object behind a URL pattern which when constructed
can be used for matching the pattern against URLs.

However, the implementation here is missing key functions such as
the constructor and the 'test'/'exec' functions as that relies on
a significant amount of supporting URLPattern infrastructure such
as two different parsers and a tokenizer.

However, this is enough for us to implement some more of the IDL
wrapper layer of this specification.
2025-02-17 19:10:39 -05:00
Shannon Booth
5521836929 LibURL/Pattern: Add a representation of a URL Pattern 'component'
A URL pattern consists of components such as the 'port', 'password'
'hostname', etc. A component is compiled from the input to the
URLPattern constructor and is what is used for matching against
URLs to produce a match result.

This is also where the regex dependency is introduced into LibURL
to support the URLPattern implementation.
2025-02-17 19:10:39 -05:00
Aliaksandr Kalenik
93253e993b LibWeb: Fix invalidations calculation for values with relative units
...in inherited style update. Instead of comparing old absolutized value
with new non-absolutized value, we should wait until
`absolutize_values()` and then compare old and new values, when both are
absolutized.

Improves performance on pages with GitHub action logs where previously
we had to invalidate layout after hover style recalculation, because
there was `margin-left: 1rem`.
2025-02-18 00:24:45 +01:00
Aliaksandr Kalenik
9dd59e0673 LibWeb: Early return when invalidations=none in animation style update
This allows to skip a bunch of unnecessary work performed by
`apply_style()`.
2025-02-18 00:24:45 +01:00
Aliaksandr Kalenik
1e07227e98 LibWeb: Early return when invalidations=none in inherited style update
This allows to skip a bunch of unnecessary work performed by
`apply_style()`.
2025-02-18 00:24:45 +01:00
Aliaksandr Kalenik
e5b4fe2c65 LibWeb: Fix wrong invalidations calculation in inherited style update
We were incorrectly comparing new value against itself instead of the
old value to determine required set of invalidations.
2025-02-18 00:24:45 +01:00
devgianlu
ba607e2127 LibCrypto: Add SECP521r1 test 2025-02-18 00:02:26 +01:00
devgianlu
f630ca7cd0 LibCrypto: Rename and remove unused methods from SECPxxxr1 class 2025-02-18 00:02:26 +01:00
devgianlu
048d6b8012 LibCrypto: Remove unused constructors from RSA class 2025-02-18 00:02:26 +01:00
devgianlu
3431b3235c LibCrypto: Prevent exporting invalid DER RSAPrivateKey 2025-02-18 00:02:26 +01:00
devgianlu
7180c5f13b LibCrypto: Remove unused EllipticCurve abstract class
This was required only to support our custom TLS implementation, but
does not serve any purpose other than forcing improper APIs.
2025-02-18 00:02:26 +01:00
devgianlu
8ae01f81c9 LibCrypto: Remove unused MGF class 2025-02-18 00:02:26 +01:00
devgianlu
510aa223c2 LibCrypto: Remove unused ChaCha20 class 2025-02-18 00:02:26 +01:00
devgianlu
7fb15ef936 LibCrypto: Remove unused Poly1305 class 2025-02-18 00:02:26 +01:00
devgianlu
ce3e79a402 LibCrypto: Remove unused ChaCha20Poly1305 class 2025-02-18 00:02:26 +01:00
devgianlu
bc0bb0d535 LibCrypto: Remove unused Certificate class 2025-02-18 00:02:26 +01:00
devgianlu
24d3da64e5 LibWebSocket: Support specifying root certificate path 2025-02-17 19:52:43 +01:00
devgianlu
b8f609099a LibTLS: Remove unused DefaultRootCACertificates
The certificates are set inside `DefaultRootCACertificates` in some
places, but no one reads them.
2025-02-17 19:52:43 +01:00
devgianlu
7a38a3e994 LibTLS: Replace TLSv12 implementation with OpenSSL 2025-02-17 19:52:43 +01:00
devgianlu
d6e9d2cdbb LibCore: Expose TCPSocket file descriptor 2025-02-17 19:52:43 +01:00
devgianlu
b6ec31b590 LibCrypto: Move OPENSSL_TRY helper function outside namespace
This allows using `OPENSSL_TRY` and `OPENSSL_TRY_PTR` outside of the
`Crypto` namespace.
2025-02-17 19:52:43 +01:00
devgianlu
53dd99098c LibTLS: Move DefaultRootCACertificates to own file 2025-02-17 19:52:43 +01:00
devgianlu
6889fa9695 LibWeb: Add simple in-tree WebSocket test 2025-02-17 19:52:43 +01:00