Commit graph

34220 commits

Author SHA1 Message Date
Maciej 65d8d205ee LibWeb: Implement HTML DragEvent class
This just defines the class, drag events aren't actually fired yet.
2024-07-09 11:28:32 +01:00
Jamie Mansfield 27f3305b87 Base: Use % for keys in templates
The previous character used, @, conflicted with CSS. % is used by other
templating engines, and doesn't conflict with language features (e.g.
media queries).
2024-07-09 11:21:07 +02:00
doctortheemh 4ef76f3198 LibGfx: Decode AVIF images
Use libavif to decode AVIF images in LibGfx.
2024-07-09 08:15:47 +02:00
simonkrauter 062a266574 LibWeb: Use system colors for input type range and progress as default
Instead of using fixed arbitrary colors for the background of the bar,
AccentColor and Background are now used.
2024-07-08 21:06:42 +01:00
Aliaksandr Kalenik 067bb64eb5 headless-browser: Add CLI argument to enable Skia painter
Useful to check what ref-tests are currently broken with Skia painter.
2024-07-08 19:46:33 +01:00
Diego 31c7e98a4a LibWasm: Fix comparisons between 0.0 and -0.0
According to the spec, -0.0 < 0.0.
2024-07-08 15:12:16 +02:00
Diego c882498d44 LibWasm: Fix some floating-point conversion issues
NaN bit patterns are now (hopefully) preserved. `static_cast` does not
preserve the bit pattern of a given NaN, so ideally we'd use some other
sort of cast and avoid `static_cast` altogether, but that's a large
change for this commit. For now, this fixes the issues found in spec
tests.
2024-07-08 15:12:16 +02:00
Luke Warlow 63a5ff70e5 LibWeb: Implement :modal pseudo class
Adds the :modal pseudo class which matches dialogs opened with
showModal().
2024-07-08 11:34:06 +02:00
Tim Ledbetter 34b9873664 LibWeb: Populate filename in WindowOrWorkerGlobalScope.reportError()
Previously, when `WindowOrWorkerGlobalScope.reportError()` was called
the `filename` property of the dispatched error event was blank. It is
now populated with the full path of the active script.
2024-07-08 11:26:24 +02:00
Tim Ledbetter 572324d47b LibWeb: Invalidate input element style on focus change
The style of input and textarea elements is now invalidated when focus
is changed to a new element. This ensures any `:focus` selectors are
applied correctly.
2024-07-08 08:48:38 +01:00
Andreas Kling 9448c957c1 LibJS: Cache environment index for global declarative bindings
This allows global `let` and `const` variable accesses to be cached
by the GetGlobal instruction, and works even when the access is in a
different translation unit from the declaration.

Knocks a ~10% item off the profile on https://ventrella.com/Clusters/
2024-07-07 20:01:46 +02:00
Natsuki Ikeguchi ccb3a2f7ad LibWeb: Add initial implementation of global.reportError() 2024-07-07 13:53:01 +01:00
Olekoop cb6e438019 LibCore: Don't check for Core::NotificationType::None on Android
In this section on Android it seems to loop itself for some reason
As a quick hack we can just not check for Core::NotificationType::None
2024-07-07 03:43:32 -06:00
Daniel Bertalan 33bfac23ef LibJS: Add missing ValueInlines.h include for Value::to_numeric
When compiling with `-O2 -g1` optimizations (as done in the main
Serenity build), no out-of-line definitions end up emitted for
`Value::to_numeric`, causing files that reference the function but don't
include the definition from `ValueInlines.h` to add an undefined
reference in LibJS.so.

(cherry picked from commit 85b7ce8c2f6daf0db80e801d7fb2503d070765ce)
2024-07-07 11:32:57 +02:00
simonkrauter a676bd97a7 LibWeb: Correct HTMLMeterElement color selection
The logic of the comment "the region between the high boundary and the
maximum value must be treated as the optimum region" is correct.
However, the code below covered only two cases, the optimum case was
missing.
Fixes #473
2024-07-07 08:07:19 +02:00
Alec Murphy 1759b82114 LibWeb: Scroll page and nav history with keyboard
This patch implements basic keyboard functionality for page scrolling
and history traversal.
2024-07-07 08:05:22 +02:00
Jacob Wischnat 7a03ef45c2 LibMedia: Support videos with BT470BG color matrix 2024-07-07 07:39:07 +02:00
rmg-x 7f04ceb4f6 LibWeb: Add response status check when loading fallback favicon
If a favicon image response status was not ok,
we would still attempt to decode the received body data.
2024-07-06 15:51:22 -06:00
rmg-x 8085e3eb26 LibWeb: Add response status check in SharedImageRequest::fetch_image
If an image response status was not ok, we would still pass the received
body data to ImageDecoder which is not correct.
2024-07-06 15:51:22 -06:00
Ali Mohammad Pur e0465b8939 Revert "LibTLS+Everywhere: Switch to using WolfSSL"
This reverts commit 8bb610b97a.
Linking wolfSSL seems to cause more legal trouble than it's worth due to
it being GPLv2, so let's undo this for now.
2024-07-06 15:15:34 -06:00
Keith Cirkel 8d593bcfeb LibWeb: Add customElements.getName 2024-07-06 14:51:43 -06:00
Ali Mohammad Pur 8bb610b97a LibTLS+Everywhere: Switch to using WolfSSL
This commit replaces all TLS connection code with wolfssl.
The certificate parsing code has to remain for now, as wolfssl does not
seem to have any exposed API for that.
2024-07-06 22:15:19 +02:00
Aliaksandr Kalenik 172e080b07 LibCore: Print error code returned by vkCreateInstance()
Good to have at least some information about instance creation failure.
2024-07-06 18:58:22 +01:00
Gingeh e8d32bab58 LibWeb/CSS: Support hwb, oklab and oklch color functions 2024-07-06 05:18:00 -06:00
Gingeh 490a36bab1 LibWeb/CSS: Split parse_rgb_or_hsl_color into separate functions 2024-07-06 05:18:00 -06:00
Jamie Mansfield 65be928d4e LibWeb: Implement HTMLMediaElement.textTracks 2024-07-06 11:41:13 +02:00
Jamie Mansfield ecad28657a LibWeb/HTML: Implement TextTrackList IDL interface 2024-07-06 11:41:13 +02:00
Jamie Mansfield ba8e77df16 LibWeb: Implement TextTrack.id 2024-07-06 11:41:13 +02:00
Jamie Mansfield ab91a616b8 LibWeb: Allow TrackEvent track to be a TextTrack
Fixes two FIXMEs :^)
2024-07-06 11:41:13 +02:00
Aziz Berkay Yesilyurt 13cd653d1c LibWeb/HTML: Update Text Input Styling
So that it is closer to the spec.
https://www.w3.org/TR/css-ui-4/#input-rules
2024-07-06 10:21:35 +02:00
Arthur Hartwig Carlsson 9ed2669fc8 LibWeb: Don't insert out-of-flow elements into block pseudo elements
Like 1132c858e9, out-of-flow elements such
as float elements would get inserted into block level `::before` and
`::after` pseudo-element nodes when they should instead be inserted as a
sibling to the pseudo element. This change fixes that.

This fixes a few layout issues on the swedish tax agency website
(skatteverket.se). :^)
2024-07-06 10:02:29 +02:00
Arthur Hartwig Carlsson 196922ae5b LibWeb: Refactor out-of-flow and in-flow into functions
The concept of out-of-flow and in-flow elements is used in a few places
in the layout code. This change refactors these concepts into functions.
2024-07-06 10:02:29 +02:00
Andreas Kling 9c80326053 LibWeb: Ensure EC on stack when resolving/rejecting image decode promise
Fixes #419
2024-07-06 09:49:51 +02:00
Tim Ledbetter 0a1fc7ee13 LibWeb/CSS: Use serif for font and font-family initial property values
These properties previously used sans-serif for their initial values.
2024-07-06 08:26:57 +01:00
Tim Ledbetter 58589d6250 LibWeb/CSS: Set initial value of color property to canvastext
Previously the non-standard value `-libweb-palette-base-text` was used.
2024-07-06 08:26:57 +01:00
Andrew Kaster bd97442771 Meta: Add vulkan and vulkan-headers to vcpkg dependencies
Also require a specific ICU version to not run into unexpected problems.
2024-07-06 01:44:58 +02:00
circl 91e3ef6dbf LibWeb/ResourceLoader: Report file: errors as "network errors"
This triggers the generated error page which is more informative.
2024-07-05 15:08:13 -06:00
circl e35b055192 LibWeb/ResourceLoader: Call error callback if resource: load fails 2024-07-05 15:08:13 -06:00
circl 4e6eb35520 LibWeb/Fetch: Pass error from ResourceLoader into network_error 2024-07-05 15:08:13 -06:00
circl b83e82c32c LibWeb: Pass network error message to generated error page 2024-07-05 15:08:13 -06:00
Alex Studer cdd91f4b48 Ladybird+LibCore+Meta: Update font paths and names for Android
We also disable fontconfig, because it doesn't have support for Android.
2024-07-05 14:27:25 -06:00
Alex Studer e8b398ca34 LibMedia: Add a stub implementation of FFmpegVideoDecoder for Android
We don't have ffmpeg available on Android, so provide a dummy
FFmpegVideoDecoder and disable linking against ffmpeg for Android.
2024-07-05 14:27:25 -06:00
Salem Yaslem ab82fc8993 LibCore: Support IPv6 for TCP and UDP connection 2024-07-05 14:26:22 -06:00
BenJilks 47aee289d8 LibWeb: Change flex remaining space distribution to include gap
The remaining space is in addition to, not of in place of the
main gap.
2024-07-05 21:31:41 +02:00
Francesco Gazzetta 210e6edd9f LibWeb: Get skia version constraint from vcpkg.json
This way we only have to update it in one place.
2024-07-05 09:56:42 -06:00
Francesco Gazzetta 543b415b7d LibWeb: Allow using system skia
unofficial-skia is a vcpkg-specific package. With this change ladybird
can be built against skia as provided by system package managers such as
guix, mingw, and (soon) nix. All those packages include a .pc file, so
we use pkg-config.
2024-07-05 09:56:42 -06:00
Dennis Camera 14d26397f0 LibWeb: Add user agent CPU string for PowerPC 2024-07-05 09:50:13 -06:00
Thomas Klausner c99674c6ac LibGfx: Fix build on NetBSD
NetBSD provides its own popcount() function.
2024-07-05 09:46:02 -06:00
Daniel Bertalan 947606afcf LibGfx: Do not draw U+FFFD for unknown glyphs
The Replacement Character (U+FFFD) is most commonly used to signal a
text encoding error, i.e. when a stream of bytes couldn't be converted
to a sequence of code points. For glyphs that don't exist in a
particular font, our rendering logic already does the right thing by
drawing empty boxes (`.notdef`); let's not forcibly turn these into
U+FFFD during rendering.
2024-07-05 13:42:07 +02:00
Jamie Mansfield 0a3082ef05 LibWeb: Add missing edge visit for TextTrack in HTMLTrackElement 2024-07-05 09:17:01 +02:00