Commit Graph

48094 Commits

Author SHA1 Message Date
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
Timothy Flynn
020c2b59c4 LibWeb: Support generating IDL namespaces
These are similar to prototypes and constructors in that they will now
be lazily instantiated when they are first requested.
2023-03-15 12:48:25 -04:00
Timothy Flynn
61ecdbca54 LibIDL: Begin parsing IDL namespaces
For example, the CSS namespace is defined via IDL, but we currently have
a manual implementation.
2023-03-15 12:48:25 -04:00
Sam Atkins
406a7ea577 LibSyntax+Libraries: Replace TextStyle with Gfx::TextAttributes
Rather than creating a TextStyle struct, and then copying its fields
over to a TextAttributes, let's just create a TextAttributes to start
with. This also simplifies the syntax highlighting code by letting us
define underlines along with the other text styling.
2023-03-15 14:55:49 +01:00
Sam Atkins
6d8f046fd0 LibGfx+Userland: Make TextAttributes::underline_style optional
Rather than having a style AND a field saying whether to use the style,
just make the style Optional.
2023-03-15 14:55:49 +01:00
Nico Weber
609b616085 LibGfx: Make a comment in BMPWriter more precise 2023-03-15 13:54:09 +00:00
Nico Weber
e37000b1ea LibGfx: Let decode_bmp_v5_dib() skip reserved field
This has no effect in practice: decode_bmp_v5_dib() is the last
thing called with the streamer object (...the streamer is passed
to set_dib_bitmasks(), but that doesn't read anything off it except
for DIBType::Info bitmaps, which v5 bitmaps aren't).

But dib_size is 16 larger for v5 than for v4, so we should read
16 bytes.

This is also useful for a hypothetical person who might look at
the reading code to figure out how the writing code should look like.
2023-03-15 13:54:09 +00:00
Nico Weber
8d3ab2de56 LibGfx: Make BMPWriter code a tiny bit shorter 2023-03-15 13:54:09 +00:00
Nico Weber
871a528f4d image: Preserve ICC profiles in BMP output 2023-03-15 13:54:09 +00:00
Nico Weber
6189994b24 LibGfx: Let BMPWriter optionally embed an ICC profile 2023-03-15 13:54:09 +00:00
Nico Weber
a93a88c73c LibGfx: Allow BMPWriter to write v5 bmps and make that the default 2023-03-15 13:54:09 +00:00
Nico Weber
1db0883fea LibGfx: VERIFY correct type length in PNGChunk ctor 2023-03-15 11:02:41 +00:00
Nico Weber
bc248d28f7 LibGfx: Make PNGChunk::m_type a String instead of a DeprecatedString
It's always 4 bytes, so the data fits in a String's inline buffer.
(Else I would've used a StringView.)
2023-03-15 11:02:41 +00:00
Nico Weber
fd57ba1d90 LibGfx: Use * a b s t r a c t i o n * in PNGChunk::store_type() 2023-03-15 11:02:41 +00:00
Nico Weber
1a03f45a73 LibGfx: Remove reckless PNGChunk::add(T) method
This method added function using host byte order, which is never what we
want.

In practice, it was fine because it was only called from add_u8()
(which is just 1 byte large) and add_as_big_endian() (since that did
endian swapping before calling the method). But the method doesn't
really help any and is dangerous, so remove it.

No behavior change.
2023-03-15 11:02:41 +00:00
Nico Weber
6a8c8aae9b LibGfx: Remove unused PNGChunk::add_as_little_endian() method
PNG uses big-endian data internally.
2023-03-15 11:02:41 +00:00
Nico Weber
76d8e5d866 image: Make the ppm writing code a tiny bit shorter 2023-03-15 11:02:41 +00:00
Nico Weber
fbc70eca93 image: Preserve ICC profiles in PNG output
This probably does strange things for CMYK jpegs, since JPEGLoader
converts those from CMYK to RGB but the ICC profile is still an CMYK
profile. The Right Fix for that is probably for JPEGLoader to consume
the profile when it does CMYK->RGB conversion and then not hand out
the profile data. (Or we could add a CMYK bitmap type.)

But most of the time, this is a progression :^)
2023-03-15 11:02:41 +00:00
Nico Weber
189ea375a5 LibGfx: Let PNGWriter optionally embed an ICC profile 2023-03-15 11:02:41 +00:00
Nico Weber
6e2d3fe0df LibGfx: Add PNGChunk::compress_and_add API 2023-03-15 11:02:41 +00:00
Nico Weber
75895bc892 LibGfx: Use ReadonlyBytes in PNGChunk API 2023-03-15 11:02:41 +00:00
Andreas Kling
71b7e65a52 Tests/LibWeb: Add ACID1 as a layout test
This will help us catch any future regressions immediately.
2023-03-15 11:43:54 +01:00
Andreas Kling
664f30a2c9 LibWeb: Don't truncate font sizes before scaling them to device pixels
This fixes an issue where fonts would often paint at the wrong sizes
with device pixel ratios other than 1.0.
2023-03-15 11:43:54 +01:00
Andreas Kling
a4927f523b LibGfx: Add Font::point_size()
This returns the font size in pt instead of px.
2023-03-15 11:43:54 +01:00
Andreas Kling
db545b51ef LibWeb: Make sure float: left boxes get pushed down if they can't fit 2023-03-15 11:43:54 +01:00
MacDue
52e2095a3f PartitionEditor: Add missing unveils
These were somewhat found by trial and error, but it seems like this
is now the required set to launch this without error.
2023-03-15 11:28:12 +01:00
Timothy Flynn
c11860bdcd Meta: Download pci.ids and usb.ids to Build/caches
This ensures we only need to download these files once for all build
configurations. We similarly download the UCD, CLDR, and TZDB to this
cache directory as well.
2023-03-15 11:26:34 +01:00
Pankaj Raghav
6ff85aa19a Kernel/Ramdisk: Propagate error during Ramdisk initialize
Use the same pattern for Ramdisk similar to other storage devices during
device initialization. This will propagate errors if the Ramdisk fails
to initialize.
2023-03-15 11:25:59 +01:00
Pankaj Raghav
b204da94b0 Kernel/Storage: Use NonnullRefPtr for storage controllers
Storage controllers are initialized during init and are never modified.
NonnullRefPtr can be safely used instead of the NonnullLockRefPtr. This
also fixes one of the UB issue that was there when using an NVMe device
because of NonnullLockRefPtr.

We can add proper locking when we need to modify the storage controllers
after init.
2023-03-15 11:25:59 +01:00
Seal Sealy
0dbca4af06 Ports: Add taskwarrior port 2023-03-15 07:59:51 +00:00
implicitfield
ba8bd2e558 LibGUI: Do not attempt to close non-existent notifications 2023-03-15 07:52:08 +00:00
Matthew Olsson
0c7eac8d9a Lagom: Remove debug line in LibJSGCVerifier 2023-03-15 08:48:49 +01:00