Commit graph

24170 commits

Author SHA1 Message Date
Kemal Zebari
0060b8c4e5 Browser: Have BookmarksBarWidget signal bookmark changes for Tab
This fixes an issue with a tab not updating its bookmark button when
we either edit or delete a bookmark and the tab happens to be on the
same page associated with the bookmark URL. `BookmarksBarWidget`
"signals" a `Tab` object of any bookmark changes, where it will
update the bookmark button depending on if the current URL is an
existing bookmark or not.
2023-04-09 21:34:20 -06:00
Cameron Youell
58af4c85a4 KeyboardSettings: Port to Core::File 2023-04-09 20:58:54 -06:00
Cameron Youell
03008ec4e0 Tests: Use FileSystem instead of DeprecatedFile 2023-04-09 20:58:54 -06:00
Cameron Youell
7734eba03f Piano+LibAudio: Port to Core::File 2023-04-09 20:58:54 -06:00
huttongrabiel
ad5abc9a8f DisplaySettings: Use FileSystemAccessServer instead of FilePicker
Make a call to the FileSystemAccessServer instead of using FilePicker to
select a new wallpaper in BackgroundSettings.
2023-04-09 18:19:57 -06:00
Rodrigo Tobar
41fa1a1461 Utilities: Add more commands, addresses, spaces, cmdline parsing to sed
The initial version of sed implements only the `s` command (given on the
command line) applied to all lines of the input file. While this is
probably the most common scenario that people use sed with in the wild,
it's limited in several ways:

 * `s` is only one of the many commands that sed is meant to implement.
 * Commands may take one or two addresses that limits its applicability
   to input lines.
 * Commands in general operate over the "pattern" and "hold" spaces
   rather than blindly over input lines.
 * Command line parameters include specifying a script file, and
   optionally input file(s) and/or a script to execute.

This commit implements a big portion of these missing features:

 * It adds support for parsing *almost* all commands and their
   arguments.
 * It also implements the execution of a big portion of the commands.
 * It adds support for parsing the optional addresses that prefix a
   command, and enables/disables commands based on these address ranges.
 * It implements the pattern and hold spaces, which are the source of
   input/output for most of the commands.
 * It improves the command line argument handling to receive a script
   file, potentially multiple execution scripts, and optional input
   files.

Some know missing functionality:

 * The `{` and `}` commands are not supported yet.
 * Pattern-based addresses are not supported yet.
 * Labels and branches are parsed, but not supported at runtime.
2023-04-09 18:09:23 -06:00
stelar7
371974ed4a LibCrypto: Add PBKDF2 2023-04-09 17:05:18 -06:00
Matthew Olsson
0a220a19da LibWeb: Set up the DefaultController when constructing a WritableStream 2023-04-10 00:45:03 +02:00
Matthew Olsson
58f3009faa LibWeb: Implement WritableStreamDefaultWriter.write() 2023-04-10 00:45:03 +02:00
Matthew Olsson
48b67e41f0 LibWeb: Accept a JS::Value for size in enqueue_value instead of a double
This matches what the spec does, and consolidates all of the size-
related errors in one spot instead of distributing them throughout the
various uses of enqueue_value_with_size()
2023-04-10 00:45:03 +02:00
Matthew Olsson
1f7f63ae5a LibWeb: Move Streams/QueueOperations.h to Streams/AbstractOperations.h
This made more sense in the beginning, but now AbstractOperations.h is
so large that there isn't much benefit. This will resolve some ugly
include order issues in the coming commits.
2023-04-10 00:45:03 +02:00
Timothy Flynn
edf85d39c6 LibWeb: Port HTMLVideoElement to play videos with Video::PlaybackManager
This has several advantages over the current manual demuxing currently
being performed. PlaybackManager hides the specific demuxer being used,
which will allow more codecs to be added transparently to LibWeb. It
also provides buffering and controls playback rate for us.

Further, it will allow us to much more easily implement the "media
timeline" to render a timestamp and implement seeking.
2023-04-09 23:55:05 +02:00
Timothy Flynn
7132047c92 LibVideo: Add a forwarding header
And change some non-plain structs to classes for consistency.
2023-04-09 23:55:05 +02:00
Timothy Flynn
918ed5c920 LibVideo: Add a getter for the PlaybackManager's selected track 2023-04-09 23:55:05 +02:00
Timothy Flynn
519b79abde LibVideo: Add a factory to create a PlaybackManager from in-memory data
The demuxer already has such a factory, so this just exposes the same
factory in the PlaybackManager.
2023-04-09 23:55:05 +02:00
Timothy Flynn
3591a13e85 LibVideo+VideoPlayer: Convert playback event handler to callbacks
To pass events from LibVideo's PlaybackManager to interested parties, we
currently dispatch Core::Event objects that outside callers listen for.
Dispatching events in this manner rely on a Core::EventLoop. In order to
use PlaybackManager from LibWeb, change this mechanism to instead use a
set of callbacks to inform callers of events.
2023-04-09 23:55:05 +02:00
Timothy Flynn
0f2b863c01 LibVideo: Initialize primitive member variables in PlaybackManager
Using uninitialized primitives is undefined behavior. In this case, all
videos would autoplay on Serenity, but not play at all on Lagom, due to
some m_playing booleans being uninitialized.
2023-04-09 23:55:05 +02:00
Ben Wiederhake
560133a0c6 Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
Matthew Olsson
6bbd920008 LibWeb: Implement WritableStreamDefaultWriter.releaseLock() 2023-04-09 21:45:39 +02:00
Matthew Olsson
5f4da20a56 LibWeb: Implement WritableStreamDefaultWriter.close() 2023-04-09 21:45:39 +02:00
Matthew Olsson
0c441fa7af LibWeb: Implement WritableStreamDefaultWriter.abort() 2023-04-09 21:45:39 +02:00
Matthew Olsson
c421b6113c LibWeb: Implement WritableStream.abort() 2023-04-09 21:45:39 +02:00
Matthew Olsson
ae2d67c28b LibWeb: Implement WritableStream.getWriter() 2023-04-09 21:45:39 +02:00
Matthew Olsson
f358ae1b13 LibWeb: Remove duplicate declaration in Streams/AbstractOperations.h 2023-04-09 21:45:39 +02:00
Aliaksandr Kalenik
47f03c3a9a LibWeb/Fetch: Use a basic filtered response for redirect navigations
Match following change in the spec:
8f109835dc
2023-04-09 19:10:45 +02:00
MacDue
20e9213cc4 LibWeb: Add initial implementation of CRC2D.clip()
This allows clipping your drawing by any path you like! To do this
all painting has been wrapped around a new draw_clipped() helper
method, which handles the clipping before/after painting.

Note: This clipping is currently missing support for intersecting
clip paths.
2023-04-09 18:42:45 +02:00
MacDue
92d9b6edb8 LibWeb: Add simple canvas path clipper
This adds CanvasPathClipper and ScopedCanvasPathClip. These allow
clipping the canvas by some arbitrary path.

This initial implementation is fairly naive, with a good few
allocations, though this can probably be improved in future.
2023-04-09 18:42:45 +02:00
MacDue
ef58062f71 LibGfx: Floor draw origin in fill path implementation
This is done to be consistent with enclosing_int_rect() which is
used elsewhere to work out offsets in PaintStyles. Without this, you
can get an off-by-one in painting.
2023-04-09 18:42:45 +02:00
MacDue
78aad28dba LibGfx: Add Point::to_floored<T>() 2023-04-09 18:42:45 +02:00
MacDue
26e56bdd08 LibGfx: Fix crash due to vector resize in close_all_subpaths()
Since close_all_subpaths() appends while iterating, the vector can
end up being resized and the iterator invalidated. Previously, this
led to a crash/UAF in some cases.
2023-04-09 18:42:45 +02:00
MacDue
064ca625df LibGfx: Add BitmapPaintStyle
This is a simple paint style for filling a path with a bitmap.
2023-04-09 18:42:45 +02:00
Matthew Olsson
5faa0014f2 LibWeb: Implement WritableStream.close() 2023-04-09 18:37:34 +02:00
Tim Schumacher
5f806ec53a LibTest: Add a TRY_OR_FAIL macro
This macro has the usual `TRY` semantics, but instead of returning the
error, it will let the test fail with the formatted error as the fail
message.
2023-04-09 18:27:06 +02:00
Linus Groh
b3cc320718 LibWeb/HTML: Use correct spec link for multipart/form-data encoding 2023-04-09 17:59:36 +02:00
Kenneth Myhra
d39ac0a0ed LibWeb: Port fire_webgl_context_event() to new FlyString 2023-04-09 17:27:27 +02:00
Kenneth Myhra
fb96966f1e LibWeb: Add WebGL::EventNames 2023-04-09 17:27:27 +02:00
Kenneth Myhra
f9d50e6eca LibWeb: Port fire_keyboard_event() to new FlyString 2023-04-09 17:27:27 +02:00
Kenneth Myhra
8f4d7f2854 LibWeb: Port fire_a_synthetic_pointer_event() to new FlySring 2023-04-09 17:27:27 +02:00
Kenneth Myhra
cbefab21be LibWeb: Port fire_a_page_transition_event() to new FlyString 2023-04-09 17:27:27 +02:00
Kenneth Myhra
bf048da8cb LibWeb: Port fire_progress_event() + request_error_steps() to new String
This ports XHR's fire_progress_event() and request_error_steps() to new
FlyString.

Signature of fire_progress_event() parameter event_name  was changed
from 'String const&' to 'FlyString const&'.
2023-04-09 17:27:27 +02:00
Kenneth Myhra
fdd33d818c LibWeb: Port DOMEventListener to new FlyString 2023-04-09 17:27:27 +02:00
Kenneth Myhra
2091a11488 LibWeb: Port EventTarget to new {Fly}String 2023-04-09 17:27:27 +02:00
Matthew Olsson
868cd95069 LibWeb: Add the WritableStreamDefaultController 2023-04-09 17:14:48 +02:00
Nico Weber
1f0b54c857 LibGfx: Limit ICC-size-is-multiple-of-4 check to v4 files
The v2 spec doesn't require it, and it's not true in practice
(e.g. Compact-ICC-Profiles/profiles/sRGB-v2-nano.icc has size 410).
2023-04-09 16:49:49 +02:00
Nico Weber
bed86fb578 LibGfx: Remove some of the noisier logging from webp lossless decoder
Prefix code decoding seems to work fairly well and produces a ton of
log output with `#define WEBP_DEBUG 1`, so remove the log lines.

(If needed it's always possible to just locally revert this commit.)

No behavior change, since WEBP_DEBUG isn't usually defined.
2023-04-09 16:49:38 +02:00
Idan Horowitz
f412e73bba DynamicLoader: Remove the unused load_regions vector 2023-04-09 11:10:37 +03:00
Karol Baraniecki
f532f9d279 BrickGame: Remember the "Show Shadow Piece" setting between executions
by using the ConfigServer.
2023-04-09 00:44:45 +02:00
Karol Baraniecki
439076df8a BrickGame: Add a menu option to disable the shadow drop hint 2023-04-09 00:44:45 +02:00
Karol Baraniecki
f3f14a7ef1 BrickGame: Show where a piece would end up when after a fast drop
To show it to the player, draw a faint outline of where the piece would
end up.
2023-04-09 00:44:45 +02:00
Karol Baraniecki
652a19b232 BrickGame: Use title case in menu items consistently
by fixing the "Toggle pause" option
2023-04-09 00:44:45 +02:00