Commit graph

21736 commits

Author SHA1 Message Date
Jonah 569b56e2ad WebDriver: Add computedrole endpoint 2023-01-16 20:32:21 -05:00
Tim Ledbetter 3fb4d50982 PixelPaint: Preserve layer location when copying layers
Location metadata is now included when copying a layer to the
clipboard. This allows a pasted layer to be placed in the location it
was copied from.
2023-01-17 00:36:01 +01:00
Tim Ledbetter 112035d5c3 LibGUI: Allow extra metadata when copying bitmaps to the clipboard 2023-01-17 00:36:01 +01:00
Timothy Flynn d6ddca0c0f AK+LibUnicode: Provide Unicode-aware String titlecase transformation 2023-01-16 18:33:44 -05:00
Timothy Flynn bc51017a03 LibUnicode: Support full case folding for titlecasing a string
Unicode declares that to titlecase a string, the first cased code point
after each word boundary should be transformed to its titlecase mapping.
All other codepoints are transformed to their lowercase mapping.
2023-01-16 18:33:44 -05:00
Timothy Flynn b562348d31 LibUnicode: Generate simple case folding mappings for titlecase
Note we already generate the special case foldings for titlecase.
2023-01-16 18:33:44 -05:00
Timothy Flynn 6d710eeb43 LibUnicode: Add an overload of word segmentation for UTF-8 strings 2023-01-16 18:33:44 -05:00
Tim Schumacher 40cb41a16c LibLine: Do a whole bunch of internal error propagation 2023-01-16 21:04:48 +00:00
Tim Schumacher f9f1e1dd49 LibLine: Port most functions to Core::Stream 2023-01-16 21:04:48 +00:00
Lucas CHOLLET 0ab29cffd2 LibVirtGPU: Port to Core::Stream 2023-01-16 17:05:41 +00:00
Lucas CHOLLET 2e52de5744 LibCore: Add Stream::File::fd()
Unlike `leak_fd()` the stream is still owning the file descriptor after
the call.
2023-01-16 17:05:41 +00:00
Lucas CHOLLET c6aeb9811c Spreadsheet: Port to Core::Stream
It also takes advantage of the new, `Core::Stream`-friendly, interface
in `LibFileSystemAccessClient`.
2023-01-16 17:28:32 +03:30
Lucas CHOLLET 81008062a7 Spreadsheet: Port from Result to ErrorOr 2023-01-16 17:28:32 +03:30
Lucas CHOLLET 4952cdfe2b Spreadsheet: Move to a non-owning model for Stream in Writer::XSV 2023-01-16 17:28:32 +03:30
Timothy Flynn fc413711ee LibJS: Port trivial use cases in the Intl namespace to String 2023-01-16 10:12:37 +00:00
Timothy Flynn edfdade9e9 LibLocale: Add a method to convert LanguageID to a String 2023-01-16 10:12:37 +00:00
Timothy Flynn b6b5ddeb3b LibJS: Port StringIterator to String 2023-01-16 10:12:37 +00:00
Timothy Flynn 0d47c4e7a0 LibJS: Port the TrimString AO to String
This also adds spec comments to parseFloat to make it clear that we are
now deviating a bit from the spec (the TrimString invocation should be
infallible, but we want to propagate OOM errors).
2023-01-16 10:12:37 +00:00
Timothy Flynn 4235c59397 LibJS: Add a convenience StringView accessor to PrimitiveString 2023-01-16 10:12:37 +00:00
Brian Gianforcaro bffc29ae34 LibJS: Fix uninitialized member variable in DurationFormat
Reported-by: PVS Studio
2023-01-16 09:45:46 +01:00
Aliaksandr Kalenik 7dc0edcb86 LibWeb: Prevent floats from being placed higher than preceding blocks
CSS 2.2 section 9.5.1:
The outer top of a floating box may not be higher than the
outer top of any _block_ or floated box generated by an
element earlier in the source document.

Where block is `BlockContainer` in LibWeb type system.
Which means `current_boxes` need to be cleared before
leaving block container.

```html
<style>
.wrapper {
  width: 100px;
  height: 300px;
  background-color: lightgray;
}

.box {
  margin: 10px;
  width: 50px;
  height: 50px;
  float: left;
}

.a { background-color: salmon; }
.b { background-color: slateblue; }
.c { background-color: green; }
</style>
<div class="wrapper">
	<div class="box a"></div>
	<div class="box b"></div>
</div>
<div class="box c">
</div>
```
2023-01-16 09:45:16 +01:00
Lucas CHOLLET 07f0873531 Presenter: Disable "Next" and "Previous" actions when non-applicable 2023-01-16 08:28:11 +01:00
Lucas CHOLLET 2372b3b8f9 Presenter: Add Presentation::has_a_[next,previous]_frame() 2023-01-16 08:28:11 +01:00
Tim Schumacher 3ed9627f4e LibIPC: Decode messages using Core::Stream internally 2023-01-15 23:06:31 -05:00
Tim Schumacher d1711f1cef AK: Define our own concept of "trivially serializable"
While at it, rename the `read_trivial_value` and `write_trivial_value`
functions to `read_value` and `write_value` respectively, since we'll
add compatibility for non-trivial types down the line.
2023-01-15 23:06:31 -05:00
Tim Schumacher 6777cb0975 LibCore: Fix up type mistakes in Stream::read_trivial_value 2023-01-15 23:06:31 -05:00
BodilessSleeper c5daa6d997 LibJS: Remove redundant ToString from ToTemporalZonedDateTime
Assert that the type of offsetString is either undefined or
string in order to avoid unnecessary ToString
Temporal commit: tc39/proposal-temporal@24ebcbd
2023-01-15 21:35:25 +00:00
BodilessSleeper 219db02b2f LibJS: Assert TemporalDateTimeToString if showCalendar is "never"
The only part of TemporalDateTimeToString that can fail is
MaybeFormatAnnotateCalendar which cannot fail if showCalendar is
"never" as it simply makes an empty string.
Temporal commit: tc39/proposal-temporal@a1faee6
2023-01-15 21:35:25 +00:00
Jelle Raaijmakers 5ed53b3474 LibGfx: Prevent reading OOB in TGA header decode 2023-01-15 19:59:33 +01:00
Tim Ledbetter 68fa8525bf ClipboardHistory: Add a Clear history action
This clears the history from the table view and clears the clipboard.
2023-01-15 19:19:06 +01:00
Tim Ledbetter 944c43a8b4 ClipboardHistory: Ensure model is populated on startup
This ensures that, if the applet restarts, it will remain in sync with
the clipboard.
2023-01-15 19:19:06 +01:00
Tim Ledbetter 174135f909 ClipboardHistory: Update clipboard when the topmost item is deleted 2023-01-15 19:19:06 +01:00
Tim Ledbetter 0f831dbcc7 ClipboardHistory: Don't attempt to delete an item if nothing is selected
This prevents a crash if the delete action is invoked using the delete
key while nothing is selected.
2023-01-15 19:19:06 +01:00
Tim Ledbetter 810c23b422 ClipboardHistory: Invalidate model on item removal
Not doing this caused the window to not update until the mouse was
clicked again.
2023-01-15 19:19:06 +01:00
Arda Cinar c1ee919add ls: Add an option to print the human readable sizes in powers of 10 2023-01-15 19:12:19 +01:00
Arda Cinar b1c7575769 du: Add an option to print the human readable sizes in powers of 10 2023-01-15 19:12:19 +01:00
Arda Cinar ae36a80a6c df: Add an option to print the human readable sizes in powers of 10 2023-01-15 19:12:19 +01:00
Tim Ledbetter dd582e4ae3 PixelPaint: Hold shift to increase move tool speed with the arrow keys
Holding shift while using the move tool with the arrow keys now moves
the selected layer in 10 pixel increments.
2023-01-15 19:11:25 +01:00
Sam Atkins 431c4165b5 Spider: Confirm ending the current game in more situations
As for Solitaire, we previously had a warning when trying to exit Spider
while a game was in progress. This adds the same functionality to other
actions that would end the current game: Starting a new one, or
changing the number of suits. When changing the number of suits, we do
apply the setting, so it will take effect for the next game that is
started.
2023-01-15 11:59:59 -05:00
Sam Atkins 8b59517ff2 Solitaire: Confirm ending the current game in more situations
We previously had a warning when trying to exit Solitaire while a game
was in progress. This adds the same functionality to other actions that
would end the current game: Starting a new one, or changing the number
of cards drawn. When changing the number of cards drawn, we do apply
the setting, so it will take effect for the next game that is started.
2023-01-15 11:59:59 -05:00
Lucas CHOLLET c0ada49a24 WidgetGallery: Use the non-deprecated API of LibFileSystemAccessClient
The patch is tiny as WidgetGallery is only using `LibFSAC` for its file
picker.
2023-01-15 16:39:12 +00:00
Liav A 01db302a33 Utilities: Add new utility for converting images to raw bitmap binaries
I used this utility to check if the possible TGA images' cases for
different origins (explictly the Y origin) are generating the same
bitmap, as I felt that my eyes are not a good-enough measurement tool
for this kind of task.
This might be useful in the future for testing other implementations so
I rather have this nice utility in our codebase.
2023-01-15 12:43:03 +01:00
Liav A b2626d3bc1 Lagom/Fuzzers: Add fuzzer for the TGALoader code 2023-01-15 12:43:03 +01:00
Liav A 2f2d808869 LibGfx: Add support for RLE compressed TGA images
RLE is an old technique being used for decades, as is known as
Run-Length-Encoding, which means that for repeating sequence of bytes,
we keep an indicator for the length of the sequence and only one sample
of it, to save storage space.

GIMP can generate lossless-compressed TGA images, with RLE compression
being used. It means that for a compressed image, the data is no longer
arranged in sequence of pixels, but a sequence of pixel packets.
There are two possible pixel packets:
- RLE packets, which are encoded with one byte for indicating the
  run-length and another one pixel (3 bytes for TrueColor pixel), so
  essentially in runtime, the TGA decoder will use the length to plot
  the same pixel in multiple pixels of the output pixel bitmap.
- Raw packets, which are encoded with one byte as indicator for the
  length of the whole pixel sequence and N-length pixel sequence
  afterwards.
  This is not used for any sort of compression by the TGA format, but
  still needed to be supported for full compatibility with TGA images
  that uses the RLE compression.
2023-01-15 12:43:03 +01:00
Liav A a46df41265 LibGfx: Handle tga images with top-left and bottom-left orientation
GIMP allows a user to export a TGA image with either of these possible
orientations, so we can easily support it by looking at the X origin and
Y origin values to determine where to put the pixels in the bitmap.
2023-01-15 12:43:03 +01:00
Tom Needham 591bebe662 LibGfx: Add the TGA format into the list of bitmap formats :^) 2023-01-15 12:43:03 +01:00
Tom Needham 5bce58cd3e LibGfx: Plumb the TGALoader into ImageDecoder :^)
This patch plumbs the TGALoader into ImageDecoder
so TGA images can be decoded by the system
2023-01-15 12:43:03 +01:00
Tom Needham 21db070887 LibGfx: Add TGA Loader :^)
This patch adds a basic TGA Loader. Currently it can only handle
uncompressed files with a bit depth of 24 or 32 bits per pixel.
2023-01-15 12:43:03 +01:00
Arda Cinar 70da5f977b hexdump: Add an option to specify dump offset
This is very helpful when trying to make sense of large binary files :^)
2023-01-15 12:10:21 +01:00
Andreas Kling db27499865 LibWeb: Make sure that fetch() response cookies get saved
We have to provide the Web::Page* in order for cookies to get saved.
2023-01-15 10:53:58 +00:00