Commit graph

33891 commits

Author SHA1 Message Date
Ali Mohammad Pur bf5c2d0859 Utilities: Add a crypto benchmarking tool 2024-06-10 11:59:14 +02:00
Abhishek Raturi ceec7cd537 Hackstudio: Add a window title when diff is opened
Set window title when a diff is opened from Git
widget in HackStudio.
2024-06-09 14:13:29 -04:00
MacDue 9597403bf8 LibWeb: Slightly simplify popping SCs in AffineCommandExecutorCPU 2024-06-09 14:12:06 -04:00
MacDue d30350e951 LibWeb: Make methods for common AffineCommandExecutorCPU operations 2024-06-09 14:12:06 -04:00
MacDue 318f2925d3 LibGfx+LibWeb: Move generally useful path methods to LibGfx
This adds:

  - Path::rect()
  - Path::quad()
  - Path::rounded_rect()

Moving the corresponding implementations from LibWeb.
2024-06-09 14:12:06 -04:00
MacDue f9c944cc85 LibWeb: Support opacity in the AffineCommandExecutorCPU
This supports opacity via the standard method of painting stacking
context to a new bitmap, then blitting it back when popping the stacking
context.

One extra complication is we have to ensure clipping is flushed between
any change of the target bitmap. But other than that is all standard.
2024-06-09 14:12:06 -04:00
MacDue b2f63632f1 LibWeb: Support clipping in the AffineCommandExecutorCPU
This adds two paths for clipping. If the clip rect is known to be
rectangular (and axis-aligned), then normal/fast painter clipping is
used. Otherwise, a temporary buffer is made for 'expensive' clipping
(i.e. clipping by an arbitrary quadrilateral). All draw commands are
then redirected to the temporary buffer until the clipping needs to be
flushed. Clipping is flushed when the clip rect or target bitmap
changes. Flushing expensive clipping requires applying a clip mask to
the temporary buffer, and then blitting it to the target bitmap.

Note: If the bounds of a draw command are known to be within the current
clip 'expensive' clipping can be elided.

In future, it may be possible to avoid some of this masking by applying
path-clipping algorithms (but that's fairly tricky, and normally
requires stronger guarantees about paths than we currently have).
2024-06-09 14:12:06 -04:00
Kenneth Myhra 7cbe5c9d4a LibWeb: Implement static method ReadableStream.from(asyncIterable)
(cherry picked from commit 0ec0e92b100faf92256e704b9e94e9c90a04b642)
2024-06-09 16:24:09 +01:00
Kenneth Myhra 2e45967127 LibWeb: Implement AO readable_stream_from_iterable
(cherry picked from commit 01a8b5ee542c006665a0623c23df59bc6a94cb22)
2024-06-09 16:24:09 +01:00
Kenneth Myhra 9d016f5c7e LibWeb: Add non-standard AO set_up_readable_stream
This AO can be used instead of CreateReadableStream in cases where we
need to set up a newly allocated ReadableStream before initialization of
said ReadableStream, i.e. ReadableStream is captured by lambdas in an
uninitialized state.

(cherry picked from commit ce521a196dc3a50b5a7e35a09917e435b78da1d4)
2024-06-09 16:24:09 +01:00
Diego 11d81d6487 LibWasm: Validate that names are UTF-8 2024-06-09 16:30:09 +02:00
Enver Balalic b43d2307cd LibWasm: Implement f32x4 and f64x2 arithmetic SIMD ops
Adds all the arithmetic ops for f32x4 and f64x2 SIMD instructions.

With this, we pass 8375 additional tests :)

Quite a few of the spec tests for this are still failing.
I confirmed with the wasmer runtime manually for a number of them,
and we seem to match their and results. I'm not really sure
what's happening here, a spec bug or wasmer is broken in
the same way.

18476 failed before.
10101 failed after.
2024-06-09 16:30:09 +02:00
Diego ebee41494e LibWasm: Check data section offset for overflow during instantiation 2024-06-09 16:30:09 +02:00
Shannon Booth d1a997bdb5 LibWeb: Do not release_value twice parsing a referrer policy
This fixes a bug introduced in e7b752eb2d which was causing many live
sites (such as chat.openai.com and github.com/serenityos/serenity) to
crash.

(cherry picked from commit 7a77130923d2246e5b304b107b549388d1f93a0c)
2024-06-09 10:06:31 +01:00
Jamie Mansfield 4913e09a82 LibWeb/CSS: Implement FontFaceSet.onloadingerror 2024-06-08 14:08:14 -04:00
Jamie Mansfield 9bfdecd165 LibWeb/CSS: Implement FontFaceSet.onloadingdone 2024-06-08 14:08:14 -04:00
Jamie Mansfield 06c1934c3e LibWeb/CSS: Implement FontFaceSet.onloading 2024-06-08 14:08:14 -04:00
Jamie Mansfield c171c9a6ec LibWeb/CSS: FontFaceSet extends EventTarget 2024-06-08 14:08:14 -04:00
Jamie Mansfield f99508a53a LibWeb/CSS: Stub FontFaceSet.check 2024-06-08 14:08:14 -04:00
Jamie Mansfield 4dfb52f133 LibWeb: Implement should block mixed content response to request 2024-06-08 14:07:54 -04:00
Jamie Mansfield e59bccd25e LibWeb: Upgrade mixed requests to potentially trustworthy URLs
(if appropriate)
2024-06-08 14:07:54 -04:00
Jamie Mansfield 7814dad6cf LibWeb: Implement should block mixed content request 2024-06-08 14:07:54 -04:00
Jamie Mansfield e7b752eb2d LibWeb: Implement "Set request’s referrer policy on redirect" AO 2024-06-08 14:07:38 -04:00
Jamie Mansfield 38bffd349b LibWeb/ReferrerPolicy: Add spec link for strip URL AO 2024-06-08 14:07:38 -04:00
Jamie Mansfield a5d298ff7a LibWeb/Fetch: Update "HTTP-redirect fetch" algorithm to latest spec
The spec and implementation's comments had diverged a little, this
brings them in line :)
2024-06-08 14:07:38 -04:00
Jamie Mansfield 91c7920b34 LibWeb: Implement HTMLAreaElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield 07cd441e95 LibWeb: Implement HTMLIFrameElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield c8e87352d8 LibWeb: Implement HTMLImageElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield 901fb0d068 LibWeb: Implement HTMLLinkElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield a6fd653afa LibWeb: Use Reflect for HTMLAnchorElement.referrerPolicy 2024-06-08 14:07:38 -04:00
Jamie Mansfield ade7c6c8fb LibWeb: Use Enumerated for HTMLScriptElement.referrerPolicy 2024-06-08 14:07:38 -04:00
circl ec1692eed2 Browser: Display name as "Browser" once again
This basically reverts 15211cd, since Ladybird has been hard-forked from
the SerenityOS project, this chrome is no longer officially part of it.
2024-06-08 10:30:07 -04:00
Andrew Kaster 3bb41e942f LibCore: Null-check struct addrinfo to avoid freeaddrinfo(NULL)
On some C libraries, like NetBSD and musl-libc, this under-specified
edge case results in a crash rather than silently ignoring the null
pointer.
2024-06-06 09:27:50 -06:00
Andrew Kaster 1bf926a125 LibCore: Be more BSD-friendly in Core::Environment
FreeBSD and NetBSD don't have secure_getenv(3), same as macOS.
FreeBSD 13 and lower also don't allow setting environ pointers to null.

Co-Authored-By: Robert Clausecker <fuz@FreeBSD.org>
2024-06-06 09:27:50 -06:00
Andrew Kaster da6891bf2e LibJS: Pass -1 as fd when using MAP_ANONYMOUS with mmap
NetBSD and FreeBSD get upset when we don't set the fd to an invalid
value when using a non-shared mapping.

Reported-By: Thomas Klausner <wiz@gatalith.at>
2024-06-06 09:27:50 -06:00
dgaston edb10aa17a Chess: Add time controls
This commit adds functionality to the new game dialog to allow time
controls to be selected. The game logic is updated to take into account
losing on time, time bonuses for moves, and exporting the time control
to PGN.
2024-06-05 20:45:38 -04:00
dgaston 215d348600 Chess: Add new game widget
This change paves the way for adding options such as time controls and
variants when creating a new game.
2024-06-05 20:45:38 -04:00
Jamie Mansfield aa627454da LibWeb/Fetch: Update "HTTP fetch" algorithm to latest spec comments
The spec and implementation's comments had diverged a little, this
brings them in line :)
2024-06-05 05:04:11 +01:00
Jamie Mansfield bf8c6f939e LibWeb: Move NetworkPartitionKey into a header
This is used elsewhere, such as the HTMLLinkElement.
2024-06-05 05:02:55 +01:00
Jamie Mansfield 82fba65faa LibWeb: Implement HTMLImageElement.crossOrigin 2024-06-05 05:02:55 +01:00
Jamie Mansfield 5adce08003 LibWeb: Implement HTMLLinkElement.crossOrigin 2024-06-05 05:02:55 +01:00
Jamie Mansfield f888d42a33 LibWeb: Implement HTMLLinkElement.fetchPriority 2024-06-05 05:02:55 +01:00
Jamie Mansfield 148eeff94c LibWeb: Update "create a link request" for spec changes
Fetch priority is added, and one line is split into two :)
2024-06-05 05:02:55 +01:00
Jamie Mansfield 054e3698e2 LibWeb: Implement HTMLScriptElement.fetchPriority 2024-06-05 05:02:55 +01:00
Jamie Mansfield 5ae9b49099 LibWeb: Implement HTMLImageElement.fetchPriority 2024-06-05 05:02:55 +01:00
Jamie Mansfield 2b5c3886d9 LibWeb: Add from_string function for request priority 2024-06-05 05:02:55 +01:00
Jamie Mansfield d74efab59c LibWeb: Add IDL enum for fetch priority attribute 2024-06-05 05:02:55 +01:00
Diego a11b274798 LibWasm: Fix memarg multi-memory reading
The extension bit for the memory index present in memargs is at
position 6, but we previously checked position 5, which caused a few
spec issues.
2024-06-03 14:55:41 +02:00
Matthew Olsson 44bb6e8390 LibWeb: Handle the cssFloat and cssOffset keyframe properties properly 2024-06-03 10:53:32 +02:00
Matthew Olsson 36ceaf38d5 LibWeb: Check for nullish objects in process_a_keyframe algorithm 2024-06-03 10:53:32 +02:00
Matthew Olsson 37ee45db3d LibWeb: Use camelCase for JS keyframe objects 2024-06-03 10:53:32 +02:00
Matthew Olsson b5c682bc2e LibWeb: Copy the keyframes in KeyframeEffect's copy constructor 2024-06-03 10:53:32 +02:00
Matthew Olsson 5b84bd6e45 LibWeb: Add DocumentOrShadowRoot::get_animations() 2024-06-03 10:53:32 +02:00
Matthew Olsson 37322baf54 LibWeb: Ensure all DocumentTimeline objects have the same time value
The DocumentTimeline constructor used the current millisecond time to
initialize its currentTime, but that means that a newly created timeline
would always have a different time value than other timelines that have
been through the update_animations_and_send_events function.
2024-06-03 10:53:32 +02:00
Nico Weber 4e9480b719 LibGfx/WebP: Add a VERIFY() for an assumption
This should have no behavior change after the previous commit.
2024-06-03 07:48:53 +02:00
Nico Weber 857750dfed LibGfx/WebPLoader: Survive calling loop_count() before other accessors
Fixes `animation` asserting when reading a webp input.

(The other order of operations is still covered by TestImageWriter.cpp.)
2024-06-03 07:48:53 +02:00
Andreas Kling 3020c5766e LibGfx: Remove unnecessary use of LibGUI in Gfx::Palette
Let's not require a cross-library badge like this.
2024-06-02 20:26:56 +02:00
Andreas Kling 09980af4ea LibWeb: Add Web::UIEvents::MouseButton enum, drop dependency on LibGUI
This was the only thing LibWeb needed from LibGUI, and we can just
duplicate the enum in LibWeb and get rid of a bogus dependency.
2024-06-02 20:24:42 +02:00
Andreas Kling 3e46874858 LibSyntax: Remove minor unnecessary use of LibGUI
This was the only stuff that made it look like LibSyntax depends on
LibGUI, when it really doesn't.
2024-06-02 20:00:29 +02:00
Jamie Mansfield 295c4ef51a LibWeb/Fetch: Use MimeType in DataURL 2024-06-02 19:55:53 +02:00
Jamie Mansfield 2b59ba19e0 LibWeb/WebSockets: Use correct URL parser 2024-06-02 19:55:53 +02:00
Jamie Mansfield 48e834918a LibWeb/SVG: Implement SVGTransformList.numberOfItems 2024-06-02 19:55:53 +02:00
Jamie Mansfield 4a1d02e7d8 LibWeb/SVG: Implement SVGTransformList.length 2024-06-02 19:55:53 +02:00
Diego ad9457b725 LibWasm: Properly check memory.copy addresses
Prevents overflow when checking that `memory.copy` addresses are valid.
This prevents a potential crash in the VM.
2024-06-02 19:45:54 +02:00
Diego 308592969c LibWasm: Properly check table bounds in element instantiation
Offset is now checked using saturating addition to avoid overflow. This
prevents a crash in the VM during instantiation.
2024-06-02 19:31:25 +02:00
Diego 2fabbae0f6 LibWasm: Properly check active data segment offset in instantiation
Before, it was possible to crash the VM during instantiation when an
active data segment requested to put data in memory at an invalid
offset.
2024-06-02 19:30:40 +02:00
Andreas Kling ae90e26315 LibJS/Bytecode: Make constant deduplication a bit smarter
Instead of scanning through the list of seen constants, we now have a
more structured storage of the constants true, false, null, undefined,
and every possible Int32 value.

This fixes an O(n^2) issue found by Kraken/json-stringify-tinderbox.js
2024-06-02 16:34:08 +02:00
Andreas Kling 044539c60b LibJS/Bytecode: Rewrite Jump-to-Return-or-End as just Return or End
Instead of wasting time jumping to a shared Return or End instruction,
we can also emit a Return or End directly in many cases.
2024-06-02 16:34:08 +02:00
Andreas Kling 7971cfdd89 LibJS/Bytecode: Move bytecode operand rewriting to a separate pass
This way we don't have to do it whenever performing some kind of
instruction rewrite.
2024-06-02 16:34:08 +02:00
Andreas Kling 97983275bc LibJS/Bytecode: Perform constant folding on binary expressions
This turns expressions like `(2 + 3) * 8 / 2` into a constant (20)
at bytecode compilation time instead of generating instructions
to calculate the value.
2024-06-02 16:34:08 +02:00
Andreas Kling c372a084a2 LibJS/Bytecode: Add and use copy_if_needed_to_preserve_evaluation_order
This is a new Bytecode::Generator helper that takes an operand and
returns the same operand, or a copy of it, in case a copy is required
to preserve correct evaluation order.

This can be used in a bunch of places where we're worried about
clobbering some value after obtaining it.

Practically, locals are always copied, and temporary registers as well
as constants are returned as-is.
2024-06-02 16:34:08 +02:00
Matthew Olsson 73aadddbc1 LibWeb: Reject invalid keyframe offset values 2024-06-02 16:07:12 +02:00
Matthew Olsson e13cd914a9 LibWeb: Handle animating the 'all' property 2024-06-02 16:07:12 +02:00
Matthew Olsson 64ec66e209 LibWeb: Handle animating 'initial' property values 2024-06-02 16:07:12 +02:00
Matthew Olsson 2adb4c460d LibWeb: Change enum to enum class in KeyframeEffect 2024-06-02 16:07:12 +02:00
Matthew Olsson 6859826e3d LibWeb: Handle persisting an animation after it has been removed 2024-06-02 16:07:12 +02:00
Matthew Olsson a80af938eb LibWeb: Support subtree option in Animatable.getAnimations() 2024-06-02 16:07:12 +02:00
Matthew Olsson e2cb25e35c LibWeb: Support interpolation of mixed percentage dimension units 2024-06-02 15:12:17 +02:00
Diego d1cfddc177 LibWasm: Check section lengths when parsing
Sections in WebAssembly give their length in bytes after they're
declared. This commit makes sure that length is upheld.
2024-06-01 22:27:15 +02:00
Liav A. a7aa843bcc Utilities/tar: Open archive file before changing directory
Otherwise the utility will fail to open the archive file because it's
presumably not in the chosen directory.
2024-06-01 18:35:31 +02:00
Diego d906255cbb LibWasm: Improve table support
Implements `table.get`, `table.set`, `elem.drop`, `table.size`,
and `table.grow`. Also fixes a few issues when generating ref-related
spectests. Also changes the `TableInstance` type to use
`Vector<Reference>` instead of `Vector<Optional<Reference>>`, because
the ability to be null is already encoded in the `Reference` type.
2024-06-01 16:21:03 +02:00
Nico Weber 347e2831b2 LibGfx/WebPWriter: Do not write color index if only one channel varies
The benefit of the color indexing transform is to have only one
varying channel after it (the green channel, which after the
transform serves as index into the color table).

If there is only one varying channel before the transform, it's
not beneficial. (...except if there are <= 16 colors, then the
pixel bundling presumably still works.)
2024-06-01 14:52:00 +02:00
Jamie Mansfield e13b9bef5c LibWeb: Don't warn when 'scopes' is present in import maps
Another mistake I made when implementing import map support.
2024-06-01 07:42:48 -04:00
Jamie Mansfield 76eb7568c9 LibWeb: Set import map scopes when parsing 2024-06-01 07:42:48 -04:00
Andreas Kling 8b7ad09a07 LibJS: Add test to verify copying this to a local doesn't break
Co-Authored-By: Simon Wanner <simon+git@skyrising.xyz>
2024-06-01 09:39:50 +02:00
Andreas Kling e6b1e54c44 LibJS/Bytecode: Don't generate ResolveThisBinding if not needed
Functions that don't have a FunctionEnvironment will get their `this`
value from the ExecutionContext. This patch stops generating
ResolveThisBinding instructions at all for functions like that, and
instead pre-populates the `this` register when entering a new bytecode
executable.
2024-06-01 09:39:50 +02:00
Andreas Kling 9d22db2802 LibJS/Bytecode: Pretty-print the this register as "this" 2024-06-01 09:39:50 +02:00
Andreas Kling 507f83a615 LibJS/Bytecode: Always resolve this binding into dedicated register
We already have a dedicated register slot for `this`, so instead of
having ResolveThisBinding take a `dst` operand, just write the value
directly into the `this` register every time.
2024-06-01 09:39:50 +02:00
Andreas Kling 9d57b55f24 LibJS/Bytecode: Make Generator aware of the function it's compiling 2024-06-01 09:39:50 +02:00
Andreas Kling 59c2637fdc LibJS/Bytecode: Rename emit_function_body_bytecode() -> compile()
This function isn't really one of the "emit_foo" family -- it's the main
compilation driver!
2024-06-01 09:39:50 +02:00
Timothy Flynn b01e810a89 LibWeb+LibWebView+WebContent: Support case-insensitive find-in-page
This allows searching for text with case-insensitivity. As this is
probably what most users expect, the default behavior is changes to
perform case-insensitive lookups. Chromes may add UI to change the
behavior as they see fit.
2024-06-01 07:37:54 +02:00
Timothy Flynn fe3fde2411 AK+LibUnicode: Implement a case-insensitive variant of find_byte_offset
The existing String::find_byte_offset is case-sensitive. This variant
allows performing searches using Unicode-aware case folding.
2024-06-01 07:37:54 +02:00
Diego cf6aa77816 LibWasm: Fix memory limits validator discrepancy
The spec allows the maximum size of the linear memory to be 2^16.
However, we previously only allowed 2^16-1, which caused a spec
compliance issue.
2024-06-01 00:28:48 +02:00
Andrew Kaster a9fdd819c3 LibCore: Don't leak EventLoopImplementationUnix's ThreadData
The ThreadData still has a lifetime a longer than the thread it was
created for, but at least now it's not leaked at process exit.
2024-05-31 15:24:46 -06:00
Nico Weber 8a21992030 image: Add a --webp-allowed-transforms switch
This is mainly useful for testing.
2024-05-31 22:39:25 +02:00
Nico Weber 533b29dde7 LibGfx/WebPWriter: Add a toggle for disabling individual transforms 2024-05-31 22:39:25 +02:00
Nico Weber 47d3245ea7 LibGfx/WebPWriter: Do not convert -inf to unsigned
Else UBSan complains about the color indexing test in this PR.
2024-05-31 22:39:25 +02:00
Nico Weber 9e61912f64 LibGfx/WebPWriter: Fix bug computing max_symbol bit length
Storing a number n needs floor(log2(n) + 1) bits, not ceil(log2(n)).
(The two expressions are identical except for when n is a power of 2.)

Serendipitously covered by the indexed color transform tests in this PR.
2024-05-31 22:39:25 +02:00
Nico Weber 5c990e87f4 LibGfx/WebPWriter: Add a dbgln_if() 2024-05-31 22:39:25 +02:00
Nico Weber e212c20228 LibGfx/WebPWriter: Implement pixel bundling for color indexing
If an image has <= 16 colors, WebP lossless files pack multiple
color table indexes into a single pixel's green channel, further
reducing file size. This adds support for that.

My current test files all have more than 16 colors. For a 16x16
black-and-white bitmap that contains a little smiley face in the
middle, this reduces the output size from 128B to 54B.
2024-05-31 22:39:25 +02:00
Nico Weber cae672e1f9 LibGfx/WebPWriter: Implement color indexing transform
If an image has 256 or fewer colors, WebP/Lossless allows storing
the colors in a helper image, and then storing just indexes into that
helper image in the main image's green channel, while setting
r, b, and a of the main image to 0.

Since constant-color channels need to space to store in WebP,
this reduces storage needed to 1/4th (if alpha is used) or 1/3rd
(if alpha is constant across the image).

If an image has <= 16 colors, WebP lossless files pack multiple
color table indexes into a single pixel's green channel, further
reducing file size. This pixel packing is not yet implemented in
this commit.

GIFs can store at most 256 colors per frame, so animated gifs
often have 256 or fewer colors, making this effective when
transcoding gifs.

(WebP also has a "subtract green" transform, which can be used
to need to store just a single channel for grayscale images, without
having to store a color table. That's not yet implemented -- for now,
we'll now store grayscale images using this color indexing transform
instead, which wastes to storage for the color table.)

(If an image has <= 256 colors but all these colors use only a single
channel, then storing a color table for these colors is also wasteful,
at least if the image has > 16 colors too. That's rare in practice,
but maybe we can add code for it later on.)

(WebP also has a "color cache" feature where the last few used colors
can be referenced using very few bits. This is what the webp spec says
is similar to palettes as well. We don't implement color cache writing
support yet either; maybe it's better than using a color indexing
transform for some inputs.)

Some numbers on my test files:

sunset-retro.png: No performance or binary size impact. The input
quickly uses more than 256 colors.

giphy.gif (184k): 4.1M -> 3.9M, 95.5 ms ± 4.9 ms -> 106.4 ms ± 5.3 ms
Most frames use more than 256 colors, but just barely. So fairly
expensive runtime wise, with just a small win.

(See comment on #24454 for the previous 4.9 MiB -> 4.1 MiB drop.)

7z7c.gif (11K): 118K -> 40K
Every frame has less than 256 colors (but more than 16, so no packing),
and so we can cut filesize roughly to 1/3rd: We only need to store an
index per channel. From 10.7x as large as the input to 3.6x as large.
2024-05-31 22:39:25 +02:00
Nico Weber 633f509eb4 LibGfx/WebP: Move TransformType to WebPSharedLossless.h 2024-05-31 22:39:25 +02:00
Nico Weber 804e85265e LibGfx/WebPWriter: Use an IsOpaque struct for tracking opacity
No behavior change, but this makes it easy to correctly set this
flag when adding an indexing transform: Opacity then needs to be
determined based on if colors in the color table have opacity,
not if the indexes into the color table do.

With this struct, only the first time something sets opacity is
honored, giving us those semantics.
2024-05-31 22:39:25 +02:00
Nico Weber c5dedbc54a LibGfx/WebPWriter: Give write_VP8L_coded_image() a kind parameter
This way, it can be used to write entropy-coded-images too,
which will be used when writing transforms.
2024-05-31 22:39:25 +02:00
Nico Weber b50702f490 LibGfx/WebP: Move ImageKind to WebPSharedLossless.h 2024-05-31 22:39:25 +02:00
Nico Weber 9dfb254c73 LibGfx/WebPWriter: Extract write_VP8L_coded_image() 2024-05-31 22:39:25 +02:00
Nico Weber d9aa594e86 LibGfx/WebPWriter: Add comment for image-stream production 2024-05-31 22:39:25 +02:00
Nico Weber 286cc6f905 LibGfx/WebPLoader: Prefix a few dbgln_if()s with chunk name 2024-05-31 22:39:25 +02:00
Nico Weber a2ddf054f2 LibGfx/WebPWriter: Remove two obsolete comments
In an early version of the huffman writing code, we always used 8 bits
here, and the comments still reflected that. Since we're now always
writing only as many bits as we need (in practice, still almost always
8), the comments are misleading.
2024-05-31 22:39:25 +02:00
Andreas Kling 391c53025e Revert "LibProtocol: Retry reading if read errors with EAGAIN"
This reverts commit d0f88d4958.

This made us hang when loading GitHub repo pages.
2024-05-31 17:17:24 +02:00
Andreas Kling a48fc971c6 LibJS: Rearrange ExecutionContext members to shrink the class
Just a minor tweak to make the class 8 bytes smaller.
2024-05-31 16:31:33 +02:00
Andreas Kling a3782782fa LibJS: Remove two unused members from ExecutionContext 2024-05-31 16:31:33 +02:00
Romain Chardiny f5cacf25e1 Utilities: Add shred utility 2024-05-31 13:49:34 +01:00
Romain Chardiny 892da127d0 LibCore: Add wrapper for fsync() 2024-05-31 13:49:34 +01:00
Simon Wanner 11bb216912 LibTextCodec: Add replacement decoder 2024-05-31 07:56:26 +02:00
Simon Wanner 7f3b457e62 LibTextCodec: Add EUC-KR decoder 2024-05-31 07:56:26 +02:00
Simon Wanner ded6512ca8 LibTextCodec: Add Shift_JIS decoder 2024-05-31 07:56:26 +02:00
Simon Wanner 06f7c393b2 LibTextCodec: Add ISO-2022-JP decoder 2024-05-31 07:56:26 +02:00
Simon Wanner 45f0ae52be LibTextCodec: Add EUC-JP decoder 2024-05-31 07:56:26 +02:00
Simon Wanner 9943bb1d8e LibTextCodec: Add Big5 decoder 2024-05-31 07:56:26 +02:00
Simon Wanner 2ce61fe6ea LibTextCodec: Add GBK/GB18030 decoder
Includes changes from GB-18030-2022, which are not yet included in the
Encoding Specification, but WebKit, Blink and WPT are already updated.
2024-05-31 07:56:26 +02:00
Simon Wanner 9ed52504ab LibTextCodec: Delegate to process() in default validate() implementation 2024-05-31 07:56:26 +02:00
Simon Wanner 88c2586f25 LibTextCodec: Remove unused decoder classes 2024-05-31 07:56:26 +02:00
Andrew Kaster 46e00a8f5e LibWeb: Parse TokenizedFeatures from window.open 2024-05-30 16:16:33 -04:00
Andrew Kaster e2d50dc5dd LibWeb: Move window.open TokenizedFeature parsing into its own file 2024-05-30 16:16:33 -04:00
Tim Ledbetter 79143833b6 LibWeb/WebDriver: Ensure error responses are serialized correctly 2024-05-30 13:53:24 -04:00
stelar7 a4e97c1598 WebDriver: Dont assume the pageLoad is an i64 2024-05-30 11:46:02 -04:00
stelar7 fa9c234976 WebDriver: Parse webSocketUrl capability 2024-05-30 11:46:02 -04:00
Matthew Olsson 9ea6ab0ad4 LibJS+LibWeb: Fix a ton of JS_CELL-like macro issues 2024-05-30 09:29:20 -06:00
Tim Ledbetter 7aea87c9df LibWeb+LibWebView+WebContent: Add basic find in page functionality
This allows the browser to send a query to the WebContent process,
which will search the page for the given string and highlight any
occurrences of that string.
2024-05-30 16:30:11 +02:00
Diego 4eaabdad34 LibWasm: Properly read blocktypes
This works for now, but is technically still not spec compliant. Right
now, we're (potentially) missing one bit when reading function indices.
See the relevant issue: #24462.
2024-05-29 22:33:15 +02:00
Daniel Bertalan 9d3b73743e sql: Work around Clang 17/18 run-time call to consteval function
There was an issue with Clang that causes `consteval` function calls
from default initializers of fields to be made at run-time. This
manifested itself in the case of `ByteString::formatted` as an undefined
reference to `check_format_parameter_consistency` once format string
checking was enabled for Clang builds. The workaround is simple (just
move it to the member initializer list), and unblocks a useful change.
2024-05-29 13:34:15 -06:00
Andrew Kaster ca806a3e18 WebDriver+WebContent: Add /session/🆔/window/consume-user-activation
This extension to the WebDriver spec is defined in the HTML spec, how
fun.
2024-05-29 21:30:15 +02:00
Andrew Kaster 9bc1318a78 LibWeb: Consume user activation when showing a picker dialog 2024-05-29 21:30:15 +02:00
Andrew Kaster a3a74245d6 LibWeb: Implement consume user activation AO 2024-05-29 21:30:15 +02:00
Andrew Kaster 45860e3878 LibWeb: Move consume history-action user activation to Window 2024-05-29 21:30:15 +02:00
Andrew Kaster 9c6ebe21d2 LibWeb: Remove get prefix from activation timestamp getters 2024-05-29 21:30:15 +02:00
Andrew Kaster 2fde20993b LibWeb: Update show the picker if applicable to latest spec text 2024-05-29 21:30:15 +02:00
Jamie Mansfield 7da449ce01 LibWeb: Check correct activation (spec fix)
See:
- https://github.com/whatwg/html/commit/d28284f
2024-05-29 09:32:59 -06:00
Jamie Mansfield 34b2a4f7ca LibWeb: Add getter for history-action activation 2024-05-29 09:32:59 -06:00
Jamie Mansfield a741f68eb9 LibWeb: Implement "consume history-action user activation" 2024-05-29 09:32:59 -06:00
Jamie Mansfield 30539db2fc LibWeb: Use Infinity<double> for infinity
Co-authored-by: Matthew Olsson <matthewcolsson@gmail.com>
2024-05-29 09:32:59 -06:00
Jamie Mansfield 01bd179eef LibWeb: Implement UserActivation 2024-05-29 09:32:59 -06:00
Jamie Mansfield 227151b881 LibWeb: Add getter for sticky activation 2024-05-29 09:32:59 -06:00
Matthew Olsson 1965943026 LibWeb: Reject invalid AnimationEffect duration string values 2024-05-29 08:18:24 +02:00
Matthew Olsson 3e221fbb2d IDLGenerators: Handle restricted/unrestricted floating point types 2024-05-29 08:18:24 +02:00
Matthew Olsson 2bd8093449 LibWeb: Detect explicit null timeline given in KeyframeAnimationOptions
We already do this for the timeline argument in the KeyframeEffect
constructor
2024-05-29 08:18:24 +02:00
Matthew Olsson 7bd62809a9 LibWeb: Include leading colons in KeyframeEffect::pseudo_element() 2024-05-29 08:18:24 +02:00
Matthew Olsson 854d02fe10 LibWeb: Reject more invalid pseudo-element selectors in KeyframeEffect
The old way this was written wouldn't actually check for the presence of
the two initial colons in the pseudo-element string.
2024-05-29 08:18:24 +02:00
Matthew Olsson e188ab1493 LibWeb: Add missing spec links to KeyframeEffect 2024-05-29 08:18:24 +02:00