Commit graph

51084 commits

Author SHA1 Message Date
Simon Danner
d41e6a0451 Base: Add Unicode arrows to Katica Italic 10
2190-4
2023-06-07 00:47:22 +02:00
Karol Kosek
c0be5bc070 dd: Print elapsed time and write speed after copying 2023-06-07 00:45:26 +02:00
Karol Kosek
4020892945 dd: Make status=noxfer still print some statistics 2023-06-07 00:45:26 +02:00
Karol Kosek
2f6c99dce5 dd: Show statistics also after receiving an interrupt signal 2023-06-07 00:45:26 +02:00
Karol Kosek
f12dc8b7f5 SystemMonitor: Ignore unveil error about unexisting HackStudio binary
The minimal build configuration doesn't include HackStudio and
SystemMonitor refused to run after trying to unveil a not exiting file.

This change will just ignore this specific error for this specific file
as if nothing really happened.

The ability to quickly debug a process in HackStudio is not the main
feature of the application and HackStudio itself is rather heavy to be
put in the minimal configuration.

Additionally, I find it unnecessary to disable/hide the 'Debug in
HackStudio' action because build configurations are mostly for testing
purposes anyway. You will get a 'No such file or directory' error in the
console after activating the action though. :^)
2023-06-07 00:35:50 +02:00
Tim Ledbetter
a041f1671c LibC: Ignore signals that don't have a name in getsignalbyname()
This prevents a segfault in `kill` and `killall` when an invalid
signal name is given.
2023-06-07 00:24:09 +02:00
Tim Ledbetter
f0edf00dc0 kill: Parse multi-digit signal numbers correctly 2023-06-07 00:24:09 +02:00
Tim Ledbetter
78fbe28070 kill: Don't show SIGINVAL or SIGCANCEL in the signal list 2023-06-07 00:24:09 +02:00
Tim Ledbetter
2ffdd3e7c1 kill: Don't parse SIGINVAL as signal 0 2023-06-07 00:24:09 +02:00
Tim Ledbetter
c1b3b4d6d8 kill: Replace LibC kill call with LibCore equivalent 2023-06-07 00:24:09 +02:00
Xuekun Li
200a4a00dd LibGUI: Fix wrong cursor position after undoing RemoveTextCommand
When you undo some forward delete shortcuts like <Del> or <Ctrl-Del>,
the cursor will be put at the end of the text deleted, while the right
position should be the start of those text.
2023-06-06 23:53:02 +02:00
Lucas CHOLLET
b78622ddf7 LibGfx/PortableFormat: Reject images with a maximum value of 0
These images can't contain any meaningful information, so no need to try
to decode them. Doing so result in a `SIGFPE`, as we divide by this
value later on.

Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=57434&sort=-opened&can=1&q=proj%3Aserenity
2023-06-06 23:48:52 +02:00
Ben Wiederhake
800a0092ca LibCore: Avoid DeprecatedFile for resolve_executable_from_environment 2023-06-06 23:46:36 +02:00
Ben Wiederhake
f20d04726a LibFileSystem+Everything: Remove resolve_executable_from_environment 2023-06-06 23:46:36 +02:00
Ben Wiederhake
26efdf9d4f LibCore+LibFileSystem: Move resolve_executable_from_environment to Core 2023-06-06 23:46:36 +02:00
Ben Wiederhake
00bd443d1c UserspaceEmulator: Prefer FileSystem over DeprecatedFile 2023-06-06 23:46:36 +02:00
Emily Trau
eabadf9e02 Ports: Add Brotli 1.0.9 2023-06-06 23:41:58 +02:00
Emily Trau
9a17f890ed Ports: Add editline 1.17.1 2023-06-06 23:41:12 +02:00
dependabot[bot]
c241325b1f CI: Bump JamesIves/github-pages-deploy-action from 4.4.1 to 4.4.2
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.4.1 to 4.4.2.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/v4.4.1...v4.4.2)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 23:37:04 +02:00
Ben Wiederhake
4a359b5a42 Meta: Check that local includes can be resolved
If a local include does not point to a file in the repository, it should
be a system include instead. This is now checked on every commit.

While this does introduce significant overhead in terms of percentage,
I think that an additional 10ms on huge commits (or less on smaller
commits) are acceptable:

hyperfine -w1 './Meta/check-style.py AK/*.h AK/*.cpp' # Before
Benchmark 1: ./Meta/check-style.py AK/*.h AK/*.cpp
  Time (mean ± σ):      20.3 ms ±   0.4 ms    [User: 17.1 ms, System: 3.
5 ms]
  Range (min … max):    19.5 ms …  21.6 ms    128 runs

hyperfine -w1 './Meta/check-style.py AK/*.h AK/*.cpp' # After
Benchmark 1: ./Meta/check-style.py AK/*.h AK/*.cpp
  Time (mean ± σ):      32.3 ms ±   0.4 ms    [User: 27.9 ms, System: 4.
4 ms]
  Range (min … max):    31.4 ms …  34.9 ms    91 runs
2023-06-06 23:19:50 +02:00
Ben Wiederhake
6a351376aa Everywhere: Only use local includes where appropriate
If a local include does not point to a file in the repository, it should
be a system include instead.
2023-06-06 23:19:50 +02:00
Andreas Kling
9e807d7c6a LibWeb: Support start and end alignment values in flex layout
These should just behave the same as `flex-start` and `flex-end`.
2023-06-06 21:02:04 +02:00
Andreas Kling
abd6380cce LibWeb: Add CSS logical property aliases for margin and padding sides
These just map to the LTR+TB defaults for now, as we don't yet resolve
any of the inputs to the logical property selection algorithm.
2023-06-06 21:02:04 +02:00
Andreas Kling
941092e3ad LibWeb: Make CSS/Properties.json "logical-aliases-for" an array
This allows us to specify all aliases properties instead of just one.
2023-06-06 21:02:04 +02:00
Karol Kosek
970a3ef4d8 LibGfx: Fix partial loading of tall and interlaced PNG files
The function stopped copying data from a subimage when the _y_ value
exceeded the image _width_ value, resulting in an incomplete image.
2023-06-06 19:55:51 +02:00
Emily Trau
b8c847a3cd LibC: Add lutimes(2) and futimes(2) implementations
Needed for a port of nix
2023-06-06 15:55:42 +02:00
Daniel Bertalan
c6c0ce78f5 Kernel/aarch64: Account for reserved VideoCore range in the memory map
Instead of having a single available memory range that encompasses the
whole 0x00000000-0x3EFFFFFF range of physical memory, create a separate
reserved entry for the RAM range used by the VideoCore. This fixes a
crash that happens when we try to allocate physical pages in the GPU's
reserved range.

This will eventually be replaced with parsing the data from the device
tree, but for now, this should solve some of the recurring CI failures.
2023-06-06 15:45:52 +02:00
Daniel Bertalan
9359e49383 Kernel: Add query for VideoCore and ARM physical memory ranges 2023-06-06 15:45:52 +02:00
Jelle Raaijmakers
c2e24a2fa1 Meta: Use SERENITY_BOOT_DRIVE for aarch64 as well 2023-06-06 06:44:05 -07:00
Jelle Raaijmakers
210e90dab8 Meta: Enable NVME by default
This results in significant performance improvements in both sequential
and random disk reading and writing.
2023-06-06 06:44:05 -07:00
Jelle Raaijmakers
162a2b66eb Tests: Un-flake the recent TestEnvironment addition
Depending on stack values being correctly and deterministically
overwritten was a bit too optimistic, to be honest. This new logic uses
a value on the heap.
2023-06-06 12:20:38 +02:00
CanadaHonk
2cd4f135f0 js: Add --use-test262-global option
Add --use-test262-global option to expose the test262 global object
instead of normal script object.
2023-06-06 12:09:10 +02:00
PrestonLTaylor
080b4e5e27 LibWeb: Allow loading of SVGs in ImageResource
This will allow for SVGs to be loaded when used in CSS rules.
2023-06-06 11:04:14 +02:00
MacDue
c36b54a7bf LibGfx: Use stroke_to_fill() for rendering strokes in the AA painter
This probably should be cached somewhere, but this alone seems to give
nice results, and performance does not seem much worse.

Fixes #18519
2023-06-06 09:17:06 +02:00
MacDue
95a07bd4e5 LibGfx: Add Path::stroke_to_fill(thickness)
This function generates a new path, which can be filled to rasterize
a stroke of the original path (at whatever thickness you like). It
does this by convolving a circular pen with the path, so right now
only supports round line caps.

Since filled paths now have good antialiasing, doing this results in
good stroked paths for "free". It also (for free) fixes stroked lines
with an opacity < 1, nice line joins, and is possible to fill with a
paint style (e.g. a gradient or an image).

Algorithm from: https://keithp.com/~keithp/talks/cairo2003.pdf
2023-06-06 09:17:06 +02:00
Andreas Kling
c50ce2030d LibWeb: Allow event handler attributes on HTMLLinkElement
We were neglecting to set up event handlers for these due to a missing
call to the base class in HTMLLinkElement::parse_attribute().
2023-06-06 09:06:27 +02:00
Andreas Kling
b97004ea4a LibWeb: Fire "load" and "error" events for rel=preload link loads 2023-06-06 09:06:27 +02:00
Andreas Kling
3cea86632d LibWeb: Invalidate the layout tree on DOM node insertion 2023-06-06 09:06:27 +02:00
Jelle Raaijmakers
f081a89cd9 LibC: Do not crash if putenv variable is invalid
Dr. POSIX says:

    Although the space used by string is no longer used once a new
    string which defines name is passed to putenv(), if any thread in
    the application has used getenv() to retrieve a pointer to this
    variable, it should not be freed by calling free(). If the changed
    environment variable is one known by the system (such as the locale
    environment variables) the application should never free the buffer
    used by earlier calls to putenv() for the same variable.

Applications _should_ not free the data passed to `putenv`, but they
_could_ in practice. I found that our Quake II port misbehaves in this
way, but does not crash on other platforms because glibc/musl `putenv`
does not assume that environment variables are correctly formatted.

The new behavior ignores environment variables without a '=' present,
and prevents excessively reading beyond the variable's name if the data
pointed to by the environment entry does not contain any null bytes.

With this change, our Quake II port no longer crashes when switching
from fullscreen to windowed mode.
2023-06-06 08:18:44 +02:00
Ben Wiederhake
2420effa7d Browser: Store default config values in a single place
Note that this fixes contradictory default values for group
"Preferences", key "Home". This is exactly the kind of errors I want to
prevent with this new style.

The hope is that this can later be used to:
- verify that all accesses to the same key use the same default value,
- and extract the default values more easily.
2023-06-06 00:47:23 +02:00
Liav A
9ee098b119 Kernel: Move all Graphics-related code into Devices/GPU directory
Like the HID, Audio and Storage subsystem, the Graphics subsystem (which
handles GPUs technically) exposes unix device files (typically in /dev).
To ensure consistency across the repository, move all related files to a
new directory under Kernel/Devices called "GPU".

Also remove the redundant "GPU" word from the VirtIO driver directory,
and the word "Graphics" from GraphicsManagement.{h,cpp} filenames.
2023-06-06 00:40:32 +02:00
CanadaHonk
31a7dabf02 js: Add --disable-debug-output option
Added option to disable debug output (eg unhandled Promise rejections)
to the JS repl.
2023-06-06 00:07:20 +02:00
Ben Wiederhake
3d6b838df3 LibPartition: Migrate from DeprecatedFile to File
The implemented cloning mechanism should be sound:
- If a PartitionTable is passed a File with
  ShouldCloseFileDescriptor::Yes, then it will keep it alive until the
  PartitionTable is destroyed.
- If a PartitionTable is passed a File with
  ShouldCloseFileDescriptor::No, then the caller has to ensure that the
  file descriptor remains alive.
If the caller is EBRPartitionTable, the same consideration holds.
If the caller is PartitionEditor::PartitionModel, this is satisfied by
keeping an OwnPtr<Core::File> around which is the originally opened
file.

Therefore, we never leak any fds, and never access a Core::File or fd
after destroying it.
2023-06-05 14:50:09 +02:00
Andreas Kling
c197fb4037 LibWeb: Take box-sizing into account when sizing replaced elements
This fixes an issue where images with padding and/or border did not have
their size adjusted for `border-box`, thereby becoming larger than
intended by the author.
2023-06-05 09:00:00 +02:00
jwijenbergh
9531abcb1a Shell: Add a "." builtin that aliases to "source" in POSIX
This patch adds an alias to the source builtin when an user types ".".
We cannot just add an enumeration entry using __ENUMERATE_SHELL_BUILTIN
because "." is not a valid name in a function.
This patch adds handling similarly to the name rewriting of ":".

This alias is limited to POSIX mode only.
2023-06-05 09:25:11 +03:30
Karol Kosek
6e5457d9e0 Base: Add .mkv file association to Video Player
Video Player can play VP9 videos inside Matroska. Double-clicking on
such files in File Manager will now open this application.
2023-06-05 06:56:06 +02:00
Emily Trau
e6970ec5f4 LibC: Add missing spec links for string APIs 2023-06-05 06:55:54 +02:00
Emily Trau
04b06afd39 LibC: Fix memmem signature compliance 2023-06-05 06:55:54 +02:00
Shannon Booth
7f6a49c085 LibWeb: Ensure that contentType in Blob::slice is basic latin 2023-06-05 06:55:18 +02:00
Shannon Booth
a9e37be7a0 Tests/LibWeb: Add some text tests for 'parsing a legacy color value'
I was not aware of this framework back when implementing this back in
bc54560e59. Add in some basic tests for
this now that we are compliant with the specification.
2023-06-05 06:54:33 +02:00