Commit graph

48125 commits

Author SHA1 Message Date
Nico Weber
e05bb47134 image: Add --strip-color-profile flag
With this flag, no color profile is copied from the source image
to the destination image.
2023-03-16 10:18:44 -04:00
Nico Weber
14581e98ad LibGfx: Remove stray space character in a comment 2023-03-16 09:20:48 -04:00
Nico Weber
b3a0534e02 LibGfx: Add test for serialized bytes of built-in sRGB profile 2023-03-16 09:20:48 -04:00
Timothy Flynn
2cfcbccdb5 LibWeb: Port WebAssembly.Table to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
ca96f8e364 LibWeb: Port WebAssembly.Memory to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
de32c44762 LibWeb: Port WebAssembly.Instance to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
fb1f15774f LibWeb: Port WebAssembly.Module to IDL 2023-03-16 13:54:16 +01:00
Timothy Flynn
5c97ffb94f LibWeb: Define WebAssembly namespace and import it in web bindings
This will contain concrete definitions of WebAssembly objects used by
generated WebAssembly IDL.
2023-03-16 13:54:16 +01:00
Timothy Flynn
af119d92cb LibIDL+LibWeb: Begin supporting the LegacyNamespace extended attribute
This is used by WebAssembly IDL files. For now, we mostly use this for
error messages and cache keys (to ensure compatibility with existing
code as WebAssembly is ported to IDL).
2023-03-16 13:54:16 +01:00
Timothy Flynn
1ff75618c0 LibIDL: Allow extended attributes on non-required IDL dictionary members
For example, WebAssembly.Memory will have:

    [EnforceRange] unsigned long maximum;
2023-03-16 13:54:16 +01:00
Timothy Flynn
3a11f65451 LibWeb: Add crude support for dereferencing JavaScript built-ins in IDL
This works similarly to the is_platform_object() helper, in that we do
not know that a type like ArrayBuffer needs to be qualified with JS::.
2023-03-16 13:54:16 +01:00
Timothy Flynn
0d921720b4 LibWeb: Support generating optional object IDL parameters
These are used by WebAssembly IDL.
2023-03-16 13:54:16 +01:00
Timothy Flynn
49e6cb7c3d LibWeb: Add LibJS includes to generated IDL constructor files
These will be needed by any constructor having a BufferSource parameter,
such as WebAssembly.Module.
2023-03-16 13:54:16 +01:00
Tim Ledbetter
bdaad815a1 PixelPaint: Rename Layer::resize() to Layer::scale()
This name more accurately describes the transform being performed.
2023-03-16 10:00:26 +01:00
Tim Ledbetter
690f3ae43b PixelPaint: Always specify a new bounding rect when resizing layers
This commit also removes the other Layer::resize() overloads, as they
are no longer used.
2023-03-16 10:00:26 +01:00
Tim Ledbetter
c17b32e058 PixelPaint: Make Resize Image scale each layer to the correct size
The "Resize Image" action will now scale layer such that
the corners of each layer maintain their position relative to the edge
of the canvas.

Previously, each layer was scaled to the same size of the canvas.
2023-03-16 10:00:26 +01:00
Tim Ledbetter
92a0a7e3fa PixelPaint: Don't resize layers when resizing the canvas
Calling Image::resize() with ScalingMode::None now resizes the canvas
without changing the size or position of any layers.
2023-03-16 10:00:26 +01:00
Karol Kosek
6c6af8ae4e ThemeEditor: Store tab title in PropertyTabs as StringView
Removes a hop that creates a deprecated string.

We cannot store the title directly as a String, because we would have to
find a way to propagate the errors during constructing global static
objects.
2023-03-16 09:58:42 +01:00
Karol Kosek
66402b0666 LibGUI+Userland: Port TabWidget set_tab_title to new string 2023-03-16 09:58:42 +01:00
Karol Kosek
4f08a05a3b LibGUI: Store Tab titles using the new string class 2023-03-16 09:58:42 +01:00
Karol Kosek
446c600d09 LibGUI+Applications: Port SettingsWindow::add_tab() to the new string 2023-03-16 09:58:42 +01:00
Karol Kosek
797968c310 LibGUI+Userland: Make TabWidget::*add_tab() take title using new string 2023-03-16 09:58:42 +01:00
Karol Kosek
5fed25ca9a PixelPaint: Port ImageEditor title to new string 2023-03-16 09:58:42 +01:00
Karol Kosek
3805e4e3a9 LibGUI+HackStudio+PixelPaint: Port Widget title to the new String
I had to add a set_title(String) helper function for ImageEditor because
TabWidget requires it. This is a temporary fix and will be handled in
subsequent commit.
2023-03-16 09:58:42 +01:00
Karol Kosek
858e55b653 LibCore: Add new REGISTER_STRING_PROPERTY macro 2023-03-16 09:58:42 +01:00
Karol Kosek
ee5838084d LibCore+Userland: Add DEPRECATED infix to REGISTER_STRING_PROPERTY macro 2023-03-16 09:58:42 +01:00
Julian Offenhäuser
f31a9e9374 Kernel: Refactor AHCIController to propagate more errors
Before, the mapping of our HBA region would be done in the constructor.
Since this can fail, I moved it into initialize().

Additionally, we now use the TypedMapping helper for mapping the HBA
instead of doing it manually. This actually uncovered a bug where we
would ignore any possible offset into the page we were mapping, which
caused us to miss the mapped registers entirely.
2023-03-16 09:55:15 +01:00
Julian Offenhäuser
5541dfd9f8 Kernel: Allow AHCIController::initialize() to fail
If we fail to initialize an AHCI controller, we now skip adding it to
the list of storage controllers in StorageManagement.
2023-03-16 09:55:15 +01:00
Julian Offenhäuser
d1e88a5141 Kernel: Propagate errors in StorageController reset() and shutdown()
These used to signal an error with a boolean return type. We now return
a sensible errno instead.
2023-03-16 09:55:15 +01:00
Mathis Wiehl
9927dab993 LibWeb: Don't drop single <br/> lines
Previously, when having inline contexts consisting of just a `<br/>`
tag, we would not create a line box.

Ensure that there is always a line box when a line is explicitly being
broken and also ensure it won't be trimmed due to being empty.

This will a fix a number of sites that use `<br>` tags for layouts
between block elements (even though the spec says they shouldn't).
2023-03-16 08:40:29 +00:00
Tim Ledbetter
2fe4be40af LibGUI: Store correct address in TreeViewModel's ModelIndices
After `8a48246` m_nodes[row] amd m_child_nodes[row] return a
NonnullRefPtr<Node>, so we were putting the wrong address
into the ModelIndex's data.
2023-03-16 08:05:58 +01:00
Andrew Kaster
49b07cda12 CI: Bump Android NDK version used in CI to 25.2.9519653
The previous version is no longer able to compile Lagom

Clang version 14.0.1 in NDK 24.0.8215888 crashes trying to build
Core::Process
2023-03-15 20:36:22 -06:00
Tim Ledbetter
26662d7ecd SpaceAnalyzer: Make "Open in File Manager" shortcut behave correctly
Previously, the incorrect action would be invoked when using the Open
in File Manager keyboard shortcut, while a directory was selected.
2023-03-16 00:02:08 +01:00
Tim Ledbetter
5ed78d39dd LibGUI: Don't invoke non-visible shortcuts 2023-03-16 00:02:08 +01:00
Tim Ledbetter
8ffe91c2f7 PixelPaint: Make the clone tool brush size consistent with other tools
Other brush tools treat the brush size as a radius, not diameter. The
clone tool now does the same.
2023-03-15 23:56:47 +01:00
Tim Ledbetter
8fa6a85100 PixelPaint: Scale the clone tool sample marker size with zoom level 2023-03-15 23:56:47 +01:00
Tim Ledbetter
da0ec8e635 PixelPaint: Repaint clone tool sample marker on size change 2023-03-15 23:56:47 +01:00
Tim Ledbetter
9f75c2b075 PixelPaint: Minimize clone tool sample marker repaints
This removes 2 FIXMEs :^)
2023-03-15 23:56:47 +01:00
Andreas Kling
19b3d40ad2 Ladybird: Get the system's current color theme settings from Qt
There isn't a 1:1 equivalent for all ColorRoles between Qt and LibGfx,
but we can at least make an effort to translate the various QPalette
preferred colors.

This makes text selection look a lot more "native" in Ladybird. :^)
2023-03-15 23:29:00 +01:00
Andreas Kling
5e81734520 LibGfx: Make the Palette constructor take NNRP<PaletteImpl> 2023-03-15 23:29:00 +01:00
Andreas Kling
5146b9b35e LibWeb: Scale the font when painting the text on buttons
Button text was staying the same size at all zoom levels. :^)
2023-03-15 23:29:00 +01:00
Andreas Kling
20132da88d LibWeb: Don't treat erroring subresource loads as success
If a subresource fails to load, we don't care that we got some custom
404 page. The subresource should still be considered failed.

This is an ad-hoc solution that unbreaks Acid2. This code will
eventually be replaced by fetch mechanisms.
2023-03-15 23:29:00 +01:00
Jelle Raaijmakers
954d660094 AK: Clear OrderedHashTable previous/next pointers on removal
With Clang, the previous/next pointers in buckets of an
`OrderedHashTable` are not cleared when a bucket is being shifted up as
a result of a removed bucket. As a result, an unfortunate pointer mixup
could lead to an infinite loop in the `HashTable` iterator, which was
exposed in `HashMap::keys()`.

Co-authored-by: Luke Wilde <lukew@serenityos.org>
2023-03-15 21:43:52 +01:00
Liav A
d16d805d96 Kernel: Merge {get,set}_process_name syscalls to the prctl syscall
It makes much more sense to have these actions being performed via the
prctl syscall, as they both require 2 plain arguments to be passed to
the syscall layer, and in contrast to most syscalls, we don't get in
these removed syscalls an automatic representation of Userspace<T>, but
two FlatPtr(s) to perform casting on them in the prctl syscall which is
suited to what has been done in the removed syscalls.

Also, it makes sense to have these actions in the prctl syscall, because
they are strongly related to the process control concept of the prctl
syscall.
2023-03-15 20:10:48 +01:00
Sam Atkins
1e36d54493 Meta: Make sure directories for pci.ids and usb.ids exist
`file(COPY_FILE ...)` fails if the target directory does not already
exist, whereas `install(FILES ... DESTINATION ...)` happily creates all
the required directories.
2023-03-15 12:49:49 -04:00
Sam Atkins
b18c1c7291 LibUnicode: Remove now-unused dir-iterator helper functions 2023-03-15 12:49:33 -04:00
Sam Atkins
414cafa7f8 LibLocale: Migrate code generators to Directory::for_each_entry() 2023-03-15 12:49:33 -04:00
Sam Atkins
8a8ad81aa1 LibUnicode: Migrate GenerateEmojiData to Directory::for_each_entry() 2023-03-15 12:49:33 -04:00
Sam Atkins
8672b380f6 LibUnicode: Read emoji file title from LexicalPath directly
... rather than taking the whole file name, and then manually trimming
the extension off.
2023-03-15 12:49:33 -04:00
Timothy Flynn
2d45e1fca5 LibWeb: Port the CSS namespace to IDL 2023-03-15 12:48:25 -04:00