Commit graph

66717 commits

Author SHA1 Message Date
Sam Atkins
03a4ecce19 LibWeb/CSS: Merge TranslationStyleValue into TransformationStyleValue
As with ScaleStyleValue, the serialization is the only unique part of
this class, and we can just move it over.
2025-01-17 10:12:39 +01:00
Sam Atkins
ac15e626dd LibWeb/CSS: Merge ScaleStyleValue into TransformationStyleValue
The only ways this varies from the `scale()` function is with parsing
and serialization. Parsing stays separate, and serialization is done by
telling `TransformationStyleValue` which property it is, and overriding
its normal `to_string()` code for properties other than `transform`.
2025-01-17 10:12:39 +01:00
Sam Atkins
bd5d1b092a LibWeb/CSS: Move TransformationSV -> Transformation code into TSV 2025-01-17 10:12:39 +01:00
Sam Atkins
01d782a5ca LibWeb/CSS: Return TransformationStyleValue values by reference
Avoid copying the vector when we read from it.
2025-01-17 10:12:39 +01:00
Noah Bright
6c6bf322ea LibWeb/WebAudio: Define and partially implement AnalyserNode
https://webaudio.github.io/web-audio-api/#AnalyserNode

Most of the interface is naively implemented. Container types
probably need adjusted (Vector<double> is used for all the processing).
A Fourier Transform is needed, but that's waiting on either a 3rd
party library or a complex number type.

There are lots of simple miscellaneous filters that need to be applied.
It could be reasonable to implement from scratch, supposing that
it can be parallelized. It might be hard to find one library with
everything. Not my call though.

Some additional scaffolding around blocks and render quanta is
probably needed before this is developed much further, which
probably comes in at the level of the AudioNode.

Co-authored-by: Tim Ledbetter <tim.ledbetter@ladybird.org>
2025-01-17 10:11:24 +01:00
aplefull
50445dc9ef LibWeb: Don't add extra gap when placing flex items in reverse order 2025-01-17 10:10:43 +01:00
Shannon Booth
ac9670fb55 LibWeb/HTML: Fix grammar in spec note for error checking serialization
See: https://github.com/whatwg/html/commit/90720ff
2025-01-17 10:08:42 +01:00
Shannon Booth
76397c9ecd LibWeb: Use finalize for cleaning up all navigables
The use of this HashMap looks very spooky, but let's at least use
finalize when cleaning them up on destruction to make things slightly
less dangerous looking.
2025-01-17 10:08:42 +01:00
Timothy Flynn
59162c8155 LibJS: Adjust ad-hoc clamping behavior in RegulateISODate
Instead of clamping to the limits allowed by ISOYearMonthWithinLimits,
clamp to the limits allowed by the type we are converting to (i32). This
allows some callers to then reject years outside that range.
2025-01-17 10:08:06 +01:00
Timothy Flynn
d5b26183f3 LibJS: Convert errant MUST to TRY in Temporal.PlainDateTime.with 2025-01-17 10:08:06 +01:00
Timothy Flynn
c3fc8996bf LibJS: Refer to RFC 9557 instead of ISO 8601 where appropriate
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/9bb84b2
2025-01-17 10:08:06 +01:00
Timothy Flynn
313c050a61 LibJS: Do not override the timeZoneName option in Intl.DateTimeFormat
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/d76d11b
2025-01-17 10:08:06 +01:00
Tim Ledbetter
ea67f37348 Meta: Support importing WPT crash tests 2025-01-17 09:08:15 +01:00
Tim Ledbetter
ded19eaab8 Tests: Convert existing text test to crash test 2025-01-17 09:08:15 +01:00
Tim Ledbetter
bef7e704c5 headless-browser: Add support for crash tests
These are essentially the same as text tests, but they have no
associated expectation file. These tests pass if the test fully loads
without crashing.
2025-01-17 09:08:15 +01:00
Jelle Raaijmakers
76192e6ae7 CI: Do not insinuate PRs can be reopened in stalebot's close message
Elevated permissions are required to do so. Contributors can create a
new pull request based on their branch instead.
2025-01-16 23:40:19 +01:00
Timothy Flynn
e6b7c8cde2 LibUnicode: Consistently reject out-of-bounds segmenter indices
In the UTF-8 implementation, this prevents out-of-bounds access of the
underlying text data, as the ICU macro would essentially do something
akin to `text[text.length()]`.

The UTF-16 implementation already checks for out-of-bounds, but would
previously return 0. We now return an empty Optional in both impls. This
doesn't affect LibJS (the user of the UTF-16 impl), as it already does
bounds checking before invoking LibUnicode APIs.
2025-01-16 23:22:48 +01:00
Timothy Flynn
0c09a099a5 LibWeb: Add missing #include to InputEventsTarget.h
While investigating an issue with Unicode::Segmenter (the result of
which is passed to functions in this file), this missing include was
causing clangd to be unable to find non-virtual implementations.
2025-01-16 23:22:48 +01:00
Tim Ledbetter
d7ff409032 LibWeb: Align OfflineAudioContext constructors with current spec steps 2025-01-16 13:56:18 +00:00
Tim Ledbetter
f01ccf5424 LibWeb: Align AudioContext constructor with current spec steps 2025-01-16 13:56:18 +00:00
Shannon Booth
c33d72bb41 LibWeb/Fetch: Remove FIXME for since fixed spec bug 2025-01-16 01:16:47 +00:00
Tim Ledbetter
3d20587911 LibWeb: Fetch source file when HTMLTrackElement src attribute changes
This commit begins to implement the track processing model. When the
`src` attribute is updated, we now fetch the given source file.
Currently, we always fire an `error` event once fetching is completed,
as we don't support processing the fetched data.
2025-01-15 20:59:18 +01:00
Tim Ledbetter
e44fcc644f LibWeb: Use AttributeNames::value rather than StringView literals 2025-01-15 20:59:18 +01:00
Sam Atkins
18e0ff6537 LibWeb/CSS: Properly classify calculations inside transform functions
Assuming all calculations produce `<length-percentage>` is a very bad
assumption, and was causing crashes on https://ai.cloudflare.com/
2025-01-15 14:29:08 +00:00
matan-h
6fc62c1538 Docs: Add info about --enable-idl-tracing flag 2025-01-15 13:25:35 +00:00
Shannon Booth
51102254b5 LibWeb/HTML: Scroll to the fragment before loading the document
Otherwise nowhere ends up scrolling to the fragment specified by the
fragment in document's URL. This fixes ladybird scrolling to the
correct location in the document when navigating to a link that
has a fragment, e.g:

https://html.spec.whatwg.org/multipage/browsing-the-web.html#try-to-scroll-to-the-fragment

As well as use of the :target selector.
2025-01-15 12:43:48 +00:00
Shannon Booth
e74ca82083 LibWeb/XHR: Isomorphic decode accessing XMLHttpRequest response headers
Fixes a crash on:

https://wpt.live/html/browsers/browsing-the-web/navigating-across-documents/refresh/subresource.any.html
2025-01-15 12:35:56 +00:00
Tim Ledbetter
731c2365b6 WebDriver: Disable scrollbar painting when launching the browser 2025-01-15 12:33:53 +00:00
Tim Ledbetter
dd819d1dea LibWebView: Add an option to disable painting viewport scrollbars 2025-01-15 12:33:53 +00:00
Tim Ledbetter
639ed5a052 WebContent+LibWeb: Add an option to disable painting viewport scrollbars 2025-01-15 12:33:53 +00:00
Andrew Kaster
7c3b590d44 LibWeb/WebGL2: Implement MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS
This is a parameter for getParameter()
2025-01-15 11:25:22 +00:00
Andrew Kaster
f5e06a2457 LibWeb/WebGL2: Implement MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS
This is a parameter for getParameter()
2025-01-15 11:25:22 +00:00
Shannon Booth
7b637b1eee LibWeb/HTML: Only use maxlength <input> attribute when applicable 2025-01-15 11:41:39 +01:00
Shannon Booth
5aeae5e583 LibJS: Parse dates like "Wednesday, Jan 15, 2025"
This was getting called on abc.com
2025-01-15 10:42:29 +01:00
Timothy Flynn
e95096d2a9 LibWeb: Mark a few calls to set_attribute as infallible
These cannot possibly throw an exception because the attribute names are
already known to be valid.
2025-01-15 08:46:51 +01:00
stelar7
b43bb2429a LibWeb: Rename ConnectionQueue to RequestList 2025-01-14 23:46:09 +01:00
stelar7
439245b14a LibWeb: Import WPT tests for IDBKeyRange 2025-01-14 23:46:09 +01:00
stelar7
73272d92f0 LibWeb: Implement IDBKeyRange 2025-01-14 23:46:09 +01:00
stelar7
596f1d8426 LibWeb: Move IDBDatabase::close out of line 2025-01-14 23:46:09 +01:00
stelar7
47b8a015a7 LibWeb: Turn IDB internal Key into a GC type 2025-01-14 23:46:09 +01:00
Psychpsyo
5b9d18b462 LibWeb: Improve <select> dropdown position 2025-01-14 07:34:51 +00:00
stasoid
3e81d7ea2e AK: Show executable name in rich debug format on Windows 2025-01-13 20:05:05 -07:00
Psychpsyo
8cd2fe3d08 LibWeb: Fix CSS clip-path ignoring scroll position 2025-01-13 20:03:28 -07:00
Aliaksandr Kalenik
98691810b1 LibWeb: Fix insert/delete rule invalidation for adopted style sheets
Invalidation for adopted style sheets was broken because we had an
assumption that "active" style sheet is always attached to
StyleSheetList which is not true for adopted style sheets. This change
addresses that by keeping track of all documents/shadow roots that own
a style sheet and notifying them about invalidation instead of going
through the StyleSheetList.
2025-01-13 23:03:07 +01:00
devgianlu
24e374d7e1 LibCrypto: Remove old unused padding schemes and codes 2025-01-13 17:00:18 +01:00
devgianlu
a59b48cffc LibCrypto+LibWeb: Replace RSA_OAEP-EME implementation
This replaces the old `OAEP` implementation with one backed by OpenSSL.
The changes also include some added modularity to the RSA class by
making the `RSA_EME` and `RSA_EMSE` for encryption/decryption and
signing/verifying respectively.
2025-01-13 17:00:18 +01:00
devgianlu
70bc26e32a LibCrypto+LibTLS: Replace RSA_PKCS1-EMSA implementation
This commit replaces the old implementation of `EMSA_PKCS1_V1_5` with
one backed by OpenSSL. In doing so, the `sign` and `verify` methods of
RSA have been modified to behave like expected and not just be
encryption and decryption.

I was not able to split this commit because the changes to `verify` and
`sign` break pretty much everything.
2025-01-13 17:00:18 +01:00
devgianlu
4b832b67fb LibWeb: Add RSA-OAEP WPT tests
This serve as a regression check for the next commits
2025-01-13 17:00:18 +01:00
devgianlu
6e721110f9 LibCrypto: Make RSA class easily configurable
This is a small change to allow subclasses of `RSA` to configure the
`EVP_PKEY_CTX` without rewriting everything.
2025-01-13 17:00:18 +01:00
devgianlu
91c393ea98 LibCrypto: Use OpenSSL for RSA encryption and decryption 2025-01-13 17:00:18 +01:00