Commit graph

65475 commits

Author SHA1 Message Date
Andrew Kaster
1549d393b9 LibIPC: Remove socket path from IPC Client connections
We don't need these for Ladybird, and they are the only users of
some LibCore functions we can remove as well.
2024-11-26 11:00:48 +01:00
Sam Atkins
310cdc35f0 LibWeb: Fill-in some fixmes around sandboxing flag sets
...Including a couple of steps in
obtain_a_browsing_context_to_use_for_a_navigation_response() which
didn't have FIXMEs.

No apparent changes on WPT.
2024-11-26 10:59:50 +01:00
Sam Atkins
2c7e730726 LibWeb/HTML: Consume user activation when choosing a Navigable
Corresponds to https://github.com/whatwg/html/pull/10547
2024-11-26 10:59:50 +01:00
stasoid
b3464d0645 LibCore: Port MappedFile to Windows 2024-11-26 10:00:11 +01:00
stasoid
153dc6686c LibCore/MappedFile: Remove unnecessary fcntl call 2024-11-26 10:00:11 +01:00
stasoid
3f7affa825 LibCore/System: Add mmap, munmap for Windows 2024-11-26 10:00:11 +01:00
Pavel Shliak
4ae3a0dcba LibJS: Make a __JS_ENUMERATE comment more informative 2024-11-25 13:17:03 -07:00
Pavel Shliak
af9d855b70 LibGfx: Delete DeprecatedPath 2024-11-25 21:13:53 +01:00
Pavel Shliak
dbfe5be9ff LibGfx: Delete DeprecatedPainter 2024-11-25 21:13:53 +01:00
Glenn Skrzypczak
1e67b85571 LibWeb/Animation: Support progress values outside of [0,1]
If the progress is not in [0,1], the first two or the last two
keyframes are now used for interpolation outside the interval.
2024-11-25 18:10:24 +01:00
Glenn Skrzypczak
0d15cc4672 LibWeb/Animation: Fall back to discrete animation in more cases
Use discrete animation when the number of components or the types
of corresponding components do not match. This commit does not cover
all cases, but adds FIXME comments in the appropriate places.
2024-11-25 18:10:24 +01:00
Glenn Skrzypczak
4bec023b7b LibWeb/Animation: Cancel pending play task on pause
This fixes a bug in `pause()` that canceled the pause task instead
of the play task. This issue prevented the animation from being paused
while a play task is scheduled.
2024-11-25 18:10:24 +01:00
Andreas Kling
d625e12082 LibWeb: Implement the deriveBits algorithm for X448 2024-11-25 17:16:51 +01:00
Andreas Kling
96ddccd961 LibWeb: Implement the importKey algorithm for X448 2024-11-25 17:16:51 +01:00
Andreas Kling
4a734226aa LibWeb: Implement the exportKey algorithm for X448 2024-11-25 17:16:51 +01:00
Andreas Kling
5a8b0a2610 LibWeb: Implement the generateKey algorithm for X448 2024-11-25 17:16:51 +01:00
Andreas Kling
a7652d5073 Tests: Import WPT tests for X448 curves 2024-11-25 17:16:51 +01:00
Milo van der Tier
aa33acf3a2 LibWeb: Update existing style object when setting style attribute
Previously any existing ElementInlineCSSStyleDeclaration would get
overwritten by e.setAttribute("style", ...), while it should be updated
instead.

This fixes 2 WPT subtests.
2024-11-25 17:16:29 +01:00
Jelle Raaijmakers
be3a941f44 LibWeb: Add ChannelMergerNode interface 2024-11-25 17:16:06 +01:00
Jonne Ransijn
08b7e83f95 Tests: Make TestLibCoreFileWatcher more reliable
This test could fail when `/tmp/testfile` already exists.

There also shouldn't be a need to wait so long for this test,
except for on MacOS, where the `FileWatcher` implementation is
apparently less reliable.
2024-11-25 13:41:26 +01:00
devgianlu
506e490793 LibWeb+LibCrypto: Remove OID constants scattered around
Now that `Certificate` has been moved, the OID constants are easily
reachable in `LibCrypto`.
2024-11-25 13:38:38 +01:00
devgianlu
49c388b891 LibTLS+LibWeb+LibCrypto: Move Certificate to LibCrypto
By moving `Certificate` to `LibCrypto` it is possible to reuse a bunch
of code from in `LibCrypto` itself. It also moves some constants
and pieces of code to a more appropriate place than `LibTLS`.

This also makes future work on WebCryptoAPI easier.
2024-11-25 13:38:38 +01:00
devgianlu
fcdcba51f5 LibTLS+LibWeb: Decouple EC parameters from TLS::SupportedGroup
This is in preparation of the next commits to split the changes.
2024-11-25 13:38:38 +01:00
devgianlu
32a90a7fd1 LibTLS: Move some Certificate methods to the correct file
The implementation of `Certificate::is_valid` and
`Certificate::is_self_signed` were in `TLSv12.cpp` and they have been
moved to `Certificate.cpp`.

This is in preparation of the next commits to split the changes.
2024-11-25 13:38:38 +01:00
devgianlu
e42410a7a7 LibTLS: Move DefaultRootCACertificates to correct header file
The declaration of `DefaultRootCACertificates` was in `Certificate.h`
and its implementation in `TLSv12.cpp`. It has been moved over
to `TLSv12.h` for consistency.

This is in preparation of the next commits to split the changes.
2024-11-25 13:38:38 +01:00
devgianlu
07ced0cb34 LibCrypto: Make PEMType an enum class
This is required for the following commits to avoid a conflict
with the `Certificate` namespace.
2024-11-25 13:38:38 +01:00
rmg-x
03b9e555c0 Libraries: Remove LibArchive
This library isn't used by anything but the Android build which
currently doesn't work. We most likely won't be using a homegrown
implementation for archive formats in the future, regardless.
2024-11-25 13:37:45 +01:00
Sam Atkins
bdabc9b70d LibWeb/DOM: Update "inner invoke" to current spec
Two differences:

1. An extra step inserted to record timing info, which we don't yet
   implement.

2. The last step in the loop breaks instead of returning the value
   directly. (But this is functionally the same, as the following step
   does return that value.)

(Also removed the duplicated part of the comment in step 11 née 10.)

So, there's no actual change in behavior.
2024-11-25 13:34:40 +01:00
Timothy Flynn
f2c19f96f8 LibJS: Implement Temporal.Now 2024-11-25 13:32:58 +01:00
Timothy Flynn
f1c3e3d71a LibJS: Implement Temporal.Instant.prototype.round 2024-11-25 13:32:58 +01:00
Timothy Flynn
477f00aced LibJS: Implement Temporal.Instant.prototype.until/since 2024-11-25 13:32:58 +01:00
Timothy Flynn
1d67f28e72 LibJS: Implement Temporal.Instant.prototype.add/subtract/equals 2024-11-25 13:32:58 +01:00
Timothy Flynn
615ad70030 LibJS: Implement stringification Temporal.Instant prototypes 2024-11-25 13:32:58 +01:00
Timothy Flynn
90820873a2 LibJS: Implement the Temporal.Instant constructor
And the simple Temporal.Instant.prototype getters, so that the
constructed Temporal.Instant may actually be validated.
2024-11-25 13:32:58 +01:00
Timothy Flynn
1675f40e29 LibJS: Return a GC::Ref from the NumberToBigInt AO
All callers currently handle this without needing any further changes.
2024-11-25 13:32:58 +01:00
Pavel Shliak
39c500ec7c LibGfx: Use Skia for TinyVG rendering 2024-11-25 12:14:24 +01:00
stelar7
331f26a88b LibWeb: Implement IDBFactory::cmp 2024-11-25 11:53:50 +01:00
stelar7
c43b93e6fa LibWeb: Implement convert_a_value_to_a_key for IndexedDB 2024-11-25 11:53:50 +01:00
stelar7
34479e5664 LibWeb: Add a Key type for IndexedDB 2024-11-25 11:53:50 +01:00
stelar7
d26ac9c446 LibWeb: Implement code_unit_less_than 2024-11-25 11:53:50 +01:00
sideshowbarker
e2a7f844e6 LibWeb: Handle accessible-name computation for shadow roots and slots
This change adds handling for the “Determine Child Nodes” substep at
https://w3c.github.io/accname/#comp_name_from_content_find_child in the
“Accessible Name and Description Computation” spec. Specifically, it
adds handling for the “If the current node has an attached shadow root”
and “if the current node is a slot with assigned nodes” conditions.

Otherwise, without this change, AT users don’t hear the expected
accessible names in cases where the content for which an accessible name
being computed is in a shadow root or slot element.
2024-11-25 11:52:48 +01:00
Milo van der Tier
6bb8bf189f LibWeb: Store CSS color name in CSSRGB
When serializing an sRGB color value that originated from a named color,
it should return the color name converted to ASCII lowercase. This
requires storing the color name (if it has one).

This change also requires explicitly removing the color names when
computing style, because computed color values do not retain their name.
It also requires removing a caching optimization in create_from_color(),
because adding the name means that the cached value might be wrong.

This fixes some WPT subtests, and also required updating some of our own
tests.
2024-11-25 11:51:50 +01:00
Ali Mohammad Pur
ff311c1560 RequestServer+LibDNS: Don't .await() the DNS lookup promise
...and make sure it will eventually complete (or fail) by adding a
timeout retry sequence.

Fixes an issue where RequestServer would stick around after exit,
waiting for piled up DNS requests for a long time.
2024-11-25 11:46:35 +01:00
sideshowbarker
db29d248ad LibWeb: Fix accessible-name computation for “encapsulation” cases
This change makes Ladybird correctly handle all “encapsulation” tests in
the https://wpt.fyi/results/accname/name/comp_host_language_label.html
set of tests in WPT.

Those all test the requirement that when computing the accessible name
for a <label>-ed form control, then any content (text content or
attribute values) from the control itself that would otherwise be
included in the accessible-name computation for it ancestor <label> must
instead be skipped and not included.

The HTML-AAM spec seems to try to achieve that result by expressing
specific steps for each particular type of form control. But what all
that reduces/optimizes/simplifies down to is just, “skip over self”.

Otherwise, without this change, Ladybird includes that “self” content
from those “encapsulated” elements when doing accessible-name
computation for the elements — which results in AT users hearing
unexpected extra content in the accessible names for those elements.
2024-11-25 11:21:23 +01:00
sideshowbarker
7a6813cdea LibWeb: Fix input@type=button|submit|reset accessible-name computation
This change makes Ladybird conform to the requirements in the HTML-AAM
spec at https://w3c.github.io/html-aam/#accname-computation for the
cases of HTML input@type=button, input@type=submit, and input@type=reset
elements. Otherwise, without this change, Ladybird fails to expose the
expected accessible names for those cases.
2024-11-25 11:21:23 +01:00
sideshowbarker
12b7304876 LibWeb: Fix accessible-name computation for table, fieldset, image input
This change makes Ladybird conform to the requirements in the HTML-AAM
spec at https://w3c.github.io/html-aam/#accname-computation for the
cases of HTML table, fieldset, and input@type=image elements. Otherwise,
without this change, Ladybird fails to expose the expected accessible
names for those cases.
2024-11-25 11:21:23 +01:00
Jonne Ransijn
75b482bbb9 AK: Fix "assignment from temporary" check of Optional::operator=
There was an existing check to ensure that `U` was an lvalue reference,
but when this check fails, overload resolution will just move right on
to the copy asignment operator, which will cause the temporary to be
assigned anyway.

Disallowing `Optional<T&>`s to be created from temporaries entirely
would be undesired, since existing code has valid reasons for creating
`Optional<T&>`s from temporaries, such as for function call arguments.

This fix explicitly deletes the `Optional::operator=(U&&)` operator,
so overload resolution stops.
2024-11-24 23:04:34 -07:00
Jonne Ransijn
84e73c7f5f AK: Allow calling EXPECT on templates/list-initializers
Templates and list initializers may contain commas without surrounding
parenthesis, causing them to be passed as multiple macro arguments.
2024-11-24 23:04:34 -07:00
Jelle Raaijmakers
f0bcb07ff7 UI/Qt: Fall back to luma dark mode detection for unknown color scheme
The Qt style hints' color scheme can return ::Unknown, in which case we
still need to fall back to our 'old' method of using the luma component
of the background role color.
2024-11-24 21:02:50 -05:00
Nathan van der Kamp
1870f1a0a8 LibWeb: Fix crash when skipping to previous word with ctrl+left arrow
Before this change, skipping a word to the left in a non empty text
input element would crash when near the end of the text as the
offset + length of the substring would exceed the length of the string.
2024-11-24 21:02:38 -05:00