Commit graph

47132 commits

Author SHA1 Message Date
Tom 328a64fbdc WindowServer: Fix drawing wallpaper on additional screens
We need to translate the source rectangle relative to the screen
location when blitting from the wallpaper bitmap.
2023-02-19 01:15:26 +01:00
Tom 15d4903efb WindowServer: Fix caching stretched wallpaper for multiple screens
This creates a cached bitmap for each unique screen resolution, which
allows us to share it between displays with the same resolution. If
the resolution is the same as the wallpaper, we can just use the
wallpaper as-is.
2023-02-19 01:15:26 +01:00
Sam Atkins 5b77346f53 LibGUI: Allow double-clicking PathBreadcrumbbar buttons to edit path
When viewing a deeply nested path, there may be very little of the
PathBreadcrumbbar itself visible to double-click on. This solves that
by allowing double-clicks on its segment buttons to behave the same.
(With the caveat that it first selects the double-clicked segment.)

In order to make this work, `on_double_click` now takes the modifiers
instead of the MouseEvent. In this case we don't use it so that's fine,
but maybe we should make all mouse callbacks consistently take the
MouseEvent& as a parameter.
2023-02-19 01:09:09 +01:00
Sam Atkins 8f717927f2 LibGUI: Add Button double-click callback 2023-02-19 01:09:09 +01:00
Sam Atkins af03cf9e80 FileManager: Use PathBreadcrumbbar instead of Breadcrumbbar :^) 2023-02-19 01:09:09 +01:00
Sam Atkins f0c2dcdbac LibGUI: Add PathBreadcrumbbar
This Widget wraps both a Breadcrumbbar and a TextBox for editing the
path manually, based heavily on the existing code in FileManager.

Breadcrumbbar itself requires outside code to micro-manage what it does.
This class provides a simpler interface for it: Users don't have to
worry about segments, they just give/receive a string for the current
path.
2023-02-19 01:09:09 +01:00
Sam Atkins f5cf41eb5d LibGUI+FileManager: Move has_{parent,child}_segment logic into BCB 2023-02-19 01:09:09 +01:00
kleines Filmröllchen fcb5259796 Base: Improve BrickGame documentation 2023-02-19 01:05:08 +01:00
Liav A 4a14138230 Kernel/FileSystem: Fix check of read offset for the RAMFSInode code
The check of ensuring we are not trying to read beyond the end of the
inode data buffer is already there, it's just that we need to disallow
further reading if the read offset equals to the inode data size.
2023-02-19 01:01:45 +01:00
Liav A 9790b81959 Kernel/FileSystem: Add check of read offset for the FATInode code
Apparently we lacked this important check from the beginning of this
piece of code. This check is crucial to ensure we only give back data
being related to the FATInode data buffer and nothing beyond it.
2023-02-19 01:01:45 +01:00
Sam Atkins 6cc5e09c71 LibWeb: Port StyleComputer to new Strings 2023-02-19 00:51:16 +01:00
Sam Atkins 1c77867c78 LibWeb: Port FontCache to new Strings 2023-02-19 00:51:16 +01:00
Sam Atkins faab2fe101 LibWeb: Store stylesheet sources as StringViews 2023-02-19 00:51:16 +01:00
Sam Atkins 13d2111b74 LibWeb: Port Selector to new Strings
Also use `Infra::is_ascii_case_insensitive_match()` in some appropriate
places, after checking the specs.
2023-02-19 00:51:16 +01:00
Sam Atkins c2f0b20d6b LibWeb: Port FontFace to new Strings 2023-02-19 00:51:16 +01:00
Sam Atkins 33e9c4e1b2 LibWeb: Port GeneralEnclosed to new Strings 2023-02-19 00:51:16 +01:00
Sam Atkins b5eb2ee478 AK: Make FlyString(String) constructor implicit
This stops us needing a lot of ugly `FlyString { ... }` wrappers. THis
is the behavior that `DeprecatedFlyString(DeprecatedString)` has so it
should be fine.
2023-02-19 00:51:16 +01:00
Sam Atkins 2026ea557e LibWeb: Use is_ascii_case_insensitive_match() where the spec says to 2023-02-19 00:46:47 +01:00
Sam Atkins f0b72b819e LibWeb: Make property/media-feature name matching ASCII case-insensitive
https://www.w3.org/TR/css-conditional-3/#dom-css-supports specifically
asks for this when calling `CSS::property_id_from_string()`, but in
general, CSS property and media-feature names can only contain ASCII.
2023-02-19 00:46:47 +01:00
Aliaksandr Kalenik 05b5a3bfba LibWeb: Transform translate() values to device pixels before painting 2023-02-19 00:43:40 +01:00
Linus Groh 10575fea9f LibGfx: Fix sign-compare compile error in TGALoader
I'm not sure why this isn't caught on other people's setups or CI, but
when building on NixOS it fails with:

    error: comparison of integer expressions of different signedness:
    ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
2023-02-19 00:37:51 +01:00
Linus Groh 533f2a4980 Ladybird: Add qtwayland to QT_PLUGIN_PATH in nix-shell script
Otherwise Qt would not find the wayland plugin it is instructed to use
via QT_QPA_PLATFORM, and would fall back to the second option, xcb,
which looks rather sad in a modern Wayland environment :^)

This feels like something that should be addressed upstream in nixpkgs
eventually.
2023-02-19 00:37:51 +01:00
Linus Groh 5468e363fa Ladybird: Add libxcrypt to nativeBuildInputs in nix-shell script
This makes <crypt.h> available.
2023-02-19 00:37:51 +01:00
Peter Elliott 3481e44d01 Ports: Port wayland-client 2023-02-19 00:37:37 +01:00
Peter Elliott 3440292e73 Ports: Port the Expat XML parser 2023-02-19 00:37:37 +01:00
Peter Elliott f20902deb3 Kernel: Support sending filedescriptors with sendmsg(2) and SCM_RIGHTS
This is necessary to support the wayland protocol.
I also moved the CMSG_* macros to the kernel API since they are used in
both kernel and userspace.
this does not break ntpquery/SCM_TIMESTAMP.
2023-02-19 00:37:37 +01:00
Peter Elliott ae5d7f542c Kernel: Change polarity of weak ownership between Inode and LocalSocket
There was a bug in which bound Inodes would lose all their references
(because localsocket does not reference them), and they would be
deallocated, and clients would get ECONNREFUSED as a result. now
LocalSocket has a strong reference to inode so that the inode will live
as long as the socket, and Inode has a weak reference to the socket,
because if the socket stops being referenced anywhere it should not be
bound.

This still prevents the reference loop that
220b7dd779 was trying to fix.
2023-02-19 00:37:37 +01:00
Peter Elliott 2808b03764 Kernel: Support F_DUPFD_CLOEXEC command to fcntl(2)
Specified by POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
2023-02-19 00:37:37 +01:00
Nico Weber 22c0e6b60e LibGfx: Implement serialization of MeasurementTagData 2023-02-19 00:01:44 +01:00
Nico Weber 8e5392f9c0 LibGfx: Move ICC MeasurementHeader to BinaryFormat.h 2023-02-19 00:01:44 +01:00
Nico Weber a1de65c34f LibGfx: Implement serialization of TextTagData 2023-02-19 00:01:44 +01:00
Nico Weber eaa0e3484b LibGfx: Make TextTagData verify input is 7-bit ASCII
TextTagData::from_bytes() errors out if that isn't the case, but
let's make sure other potential future callers get it right too.
2023-02-19 00:01:44 +01:00
Nico Weber df5dbc180f LibGfx: Implement serialization of SignatureTagData 2023-02-19 00:01:44 +01:00
Nico Weber 3690305794 LibGfx: Implement serialization of CurveTagData 2023-02-19 00:01:44 +01:00
Nico Weber 1ca7f109a1 LibGfx: Implement serialization of CicpTagData 2023-02-19 00:01:44 +01:00
Nico Weber fd590fe55d LibGfx: Implement serialization of ChromaticityTagData 2023-02-19 00:01:44 +01:00
Nico Weber ececea9a1c LibGfx: Implement serialization of ParametricCurveTagData
With this, simple v4 matrix profiles using parametric curves, such as
Compact-ICC-Profiles/profiles/sRGB-v4.icc, can be completely serialized
and the serialized file can be read again by `icc` :^)
2023-02-19 00:01:44 +01:00
Nico Weber 685e2da302 LibGfx: Implement serialization of S15Fixed16ArrayTagData 2023-02-19 00:01:44 +01:00
Nico Weber 931594fce3 LibGfx: Implement serialization of XYZTagData 2023-02-19 00:01:44 +01:00
Nico Weber eb6dccb675 LibGfx: Implement serialization of MultiLocalizedUnicodeTagData 2023-02-19 00:01:44 +01:00
Nico Weber 4a62cf35fc LibGfx: Move MultiLocalizedUnicodeRawRecord to BinaryFormat.h 2023-02-19 00:01:44 +01:00
Nico Weber 4e72a35398 LibGfx: Add scaffolding for writing tag data
This doesn't deduplicate identical TagDatas yet.

It also doesn't implement actual serialization of TagData yet.
2023-02-19 00:01:44 +01:00
Nico Weber 1457e36b79 LibGfx: Write ICC tag table
All offsets and sizes are set to 0 for now, so this still doesn't
produce a valid icc file. It gets closer, though.
2023-02-19 00:01:44 +01:00
Nico Weber 9bd7048519 LibGfx: Move ICC TagTableEntry to BinaryFormat.h 2023-02-19 00:01:44 +01:00
Nico Weber 026d9ceaf9 LibGfx: Extract encode_header() function in ICC writing code 2023-02-19 00:01:44 +01:00
Lucas CHOLLET 743b6e8781 LibGfx: Rename format name from jpg to jpeg 2023-02-18 23:56:24 +01:00
Lucas CHOLLET 9c1dbf1ac5 SpiceAgent: Rename ClipboardType::JPG to ClipboardType::JPEG 2023-02-18 23:56:24 +01:00
Lucas CHOLLET 856d0202f2 LibGfx: Rename JPGLoader to JPEGLoader
The patch also contains modifications on several classes, functions or
files that are related to the `JPGLoader`.

Renaming include:
 - JPGLoader{.h, .cpp}
 - JPGImageDecoderPlugin
 - JPGLoadingContext
 - JPG_DEBUG
 - decode_jpg
 - FuzzJPGLoader.cpp
 - Few string literals or texts
2023-02-18 23:56:24 +01:00
Undefine ab298ca106 Kernel: Dont crash if power states gets set to an invalid value 2023-02-18 23:52:20 +01:00
Timothy Flynn b4113536ef LibJS: Use substrings-with-superstrings in Intl.NumberFormat's grouping
To add grouping to a number, we take a string such as "123456.123" and
break it into integer and fraction parts. Then we take the integer part
and break it into locale-specific sized groups to inject the locale's
group separator (e.g. a comma in en-US). We currently create new strings
for each of these groups. Instead, we can use the shared superstring
method to avoid all of that string copying.
2023-02-18 20:00:15 +01:00