When joined border width is zero width, then the midpoint
of the joined corner is no longer need to be computed
anymore. Just set the mid point to be the endpoint of the
corner.
This option allows the user to change which colums are displayed
by giving comma or space separated list of column format specifiers.
A column format specifier is of the form: `COLUMN_NAME[=COLUMN_TITLE]`.
Where `COLUMN_NAME` is any of: uid, pid, ppid, pgid, sid, state, tty,
or cmd. Specifying a `COLUMN_TITLE` will change the name shown in the
column header.
`COLUMN_TITLE` may be blank. If all given column titles
are blank, the header is omitted.
The refactor of the border painting mainly to handle:
1. Single border with minor border radius.
2. Different border widths and border colors joined situations.
This refactor only apply to solid border.
The main differece is to use Path.fill to paint each border,
not fill_rect anymore. There's a special case need to consider.
The Path.fill will leave shared edge blank between two borders.
To handle this, we decide to combine the borders with same color
to paint together.
When specifying either `background-position-x: right` or
`background-position-y: bottom` without an offset value no
EdgeStyleValue was created.
However, the spec says the offset should be optional.
Now, if you do not provide an offset, it creates the EdgeStyleValue
with a default offset of 0 pixels.
Previously, it was assumed that only one filtering option, such as
`-u` or `-p` would be used at a time. With this PR, processes are now
shown if they match any of the specified filters.
Describe how to use the two new context and unified format options in
the diff utility. Also change the example comparison of two files so
they contain more lines as that is much more interesting (and useful).
This small utility is something we probably needed for a very long
time - a way to print memory statistics in an elegant manner.
This utility opens /sys/kernel/memstat, reads it and decode the values
into human readable entries, possibly even into human-readable sizes.
Use LibCore ArgsParser to parse the parameters instead of using the raw
strings from the argv (Main::Arguments) array.
Also, use indicative names for variables in the code so the utility code
is more understandable.
I could not find a vector graphic of Buggie, so I've now made one
and am adding it exclusively as a .tvg :^)
Should be easy to convert to an SVG too :)
This man page was referenced from some places. This is mostly a
condensed version of the POSIX behavior that the system call
implementation already has, only documenting the obviously visible
errors (in source code) we do actually report.
This is a preparation before we can create a usable mechanism to use
filesystem-specific mount flags.
To keep some compatibility with userland code, LibC and LibCore mount
functions are kept being usable, but now instead of doing an "atomic"
syscall, they do multiple syscalls to perform the complete procedure of
mounting a filesystem.
The FileBackedFileSystem IntrusiveList in the VFS code is now changed to
be protected by a Mutex, because when we mount a new filesystem, we need
to check if a filesystem is already created for a given source_fd so we
do a scan for that OpenFileDescription in that list. If we fail to find
an already-created filesystem we create a new one and register it in the
list if we successfully mounted it. We use a Mutex because we might need
to initiate disk access during the filesystem creation, which will take
other mutexes in other parts of the kernel, therefore making it not
possible to take a spinlock while doing this.
This change was a long time in the making ever since we obtained sample
rate awareness in the system. Now, each client has its own sample rate,
accessible via new IPC APIs, and the device sample rate is only
accessible via the management interface. AudioServer takes care of
resampling client streams into the device sample rate. Therefore, the
main improvement introduced with this commit is full responsiveness to
sample rate changes; all open audio programs will continue to play at
correct speed with the audio resampled to the new device rate.
The immediate benefits are manifold:
- Gets rid of the legacy hardware sample rate IPC message in the
non-managing client
- Removes duplicate resampling and sample index rescaling code
everywhere
- Avoids potential sample index scaling bugs in SoundPlayer (which have
happened many times before) and fixes a sample index scaling bug in
aplay
- Removes several FIXMEs
- Reduces amount of sample copying in all applications (especially
Piano, where this is critical), improving performance
- Reduces number of resampling users, making future API changes (which
will need to happen for correct resampling to be implemented) easier
I also threw in a simple race condition fix for Piano's audio player
loop.
Previously, the `-p` option printed the path of the file being
processed before any strings for that file. The `-f` prints the file
path before each string . This matches the behavior of strings on
Linux and FreeBSD.
This is a sensible separation of concerns that mirrors the WindowServer
IPC split. On the one hand, there is the "normal" audio interface, used
for clients that play audio, which is the primary service of
AudioServer. On the other hand, there is the management interface,
which, like the WindowManager endpoint, provides higher-level control
over clients and the server itself.
The reasoning for this split are manifold, as mentioned we are mirroring
the WindowServer split. Another indication to the sensibility of the
split is that no single audio client used the APIs of both interfaces.
Also, useless audio queues are no longer created for managing clients
(since those don't even exist, just like there's no window backing
bitmap for window managing clients), eliminating any bugs that may occur
there as they have in the past.
Implementation-wise, we just move all the APIs and implementations from
the old AudioServer into the AudioManagerServer (and respective clients,
of course). There is one point of duplication, namely the hardware
sample rate. This will be fixed in combination with per-client sample
rate, eliminating client-side resampling and the related update bugs.
For now, we keep one legacy API to simplify the transition.
The new AudioManagerServer also gains a hardware sample rate change
callback to have exact symmetry on the main server parameters (getter,
setter, and callback).
If more than one file is specified on the command line and the `-L`
option is used, the totals field will show the longest line
encountered; it is not a sum like the other values.
The intention for this utility is to eventually become a general-purpose
multimedia conversion tool like ffmpeg (except probably not with as many
supported formats, stream mappings and filters). For now, we can not
write any video format so the added complexity is not necessary at the
moment.
Works for fills and strokes (using colors, gradients, or patterns),
along with images.
fill_rect() has been updated to use fill_path(), which allows it to
easily transform the rect, and already supports opacity.
Co-authored-by: MacDue <macdue@dueutil.tech>
The translation to the bounding box location is handled by the gradient
transform, also doing it here breaks things.
This fixes the MDN <radialGradient> example.
It's a png file, not a jpeg file, so give it the correct name.
If I read WindowFrame.cpp right, the hover bitmap only works if
the file is named .png, too.
(Noticed by running `find Base/res/icons -name '*.jpg'`.)
Update the Assistant manpage with instructions on how to run a command
in Terminal. Reflect this to the Assistant section in Tips-and-Tricks.
Also add instructions for launching applications with arguments.
The creator of this site is most definitely not going to enforce his
copyright, yes, but it's still a bad idea to keep around an unlicensed
copy of someone else's work. We no longer use it to 'test' anything, so
let's just remove it entirely.
bmpsuite on GitHub is licensed under the GPLv3:
https://github.com/jsummers/bmpsuite/blob/master/COPYING.txt
However, we did not "conspicuously and appropriately publish on each
copy an appropriate copyright notice", therefore we probably were in
violation with GPLv3 paragraph 4, "Conveying Verbatim Copies".
Let's just remove this entirely, because Ladybird can just access
the original pages instead.
At the time of writing, `bmpsuite.html` and the HTML response from the
linked URL are byte-identical.
This ensures that the RAM does not fill up with already processed
coredumps when many tests crash (as is the case on AArch64). We only
do this in self-test mode so as to avoid racing CrashDaemon.
This partially implements CSS-Animations-1 (though there are references
to CSS-Animations-2).
Current limitations:
- Multi-selector keyframes are not supported.
- Most animation properties are ignored.
- Timing functions are not applied.
- Non-absolute values are not interpolated unless the target is also of
the same non-absolute type (e.g. 10% -> 25%, but not 10% -> 20px).
- The JavaScript interface is left as an exercise for the next poor soul
looking at this code.
With those said, this commit implements:
- Interpolation for most common types
- Proper keyframe resolution (including the synthetic from-keyframe
containing the initial state)
- Properly driven animations, and proper style invalidation
Co-Authored-By: Andreas Kling <kling@serenityos.org>
Corrects a slew of titles, buttons, labels, menu items and status bars
for capitalization, ellipses and punctuation.
Rewords a few actions and dialogs to use uniform language and
punctuation.
These 2 are an actual separate types of syscalls, so let's stop using
special flags for bind mounting or re-mounting and instead let userspace
calling directly for this kind of actions.
Several differences here:
- Passing `-q` multiple times will add them together, instead of the
last one overwriting the previous ones.
- `-q` PIDs can be separated by commas as well as spaces.
- We check that the PIDs are integers while parsing the arguments,
instead of later on.
The "parse a list of things as an option" is extracted into a helper
function, because we're going to want the same logic for `-g`, `-G`,
`-p`, `-t`, `-u`, and `-U`.
Since LibFSAC requires a reified window before loading a font, it
makes sense to have a safe null state for the app.
This lets us stay alive after a failed file request on startup,
handle failure at any point during initialization, and claw back
memory from all our font RefPtrs.
A default startup font or none at all can now be set in FontEditor.ini
This allows it to read/write to the user's clipboard properly. Prior to
this, it would be writing to the Clipboard server running under the
window user, which doesn't impact other users (like anon).
Co-authored-by: Daniel Bertalan <dani@danielbertalan.dev>
Csilla Regular 12 is used for inline code in LibMarkdown. It was
missing basic arrows and ellipsis needed by man pages referencing menu
items. I have added these and some extras.
General Punctuation
https://www.unicode.org/charts/PDF/U2000.pdf
2010, 2012-2026, 2032-203A, 203F-2040, 2044, 2047-2048, 204B
Arrows
https://www.unicode.org/charts/PDF/U2190.pdf
2190-2193
- FontEditor.md
- Magnifier.md
- Presenter.md
- Terminal.md
Where an arrow is indicated by -> turn it into an actual arrow →
(U+2192 Rightwards Arrow). This looks much neater.
Inspired by Notion doing this automatically when you type "->".
I've made various corrections: fixing grammatical errors, removing
unnecessary or adding-in missing spaces. Made the style of references
to menu items more consistent. Generally I've tried to make the pages
read better. Terminal has had more adjustment than the others as its
Settings were recently changed and the man page now reflects this.
This adds information about the user owning the process to our netstat
output. We do not fully match the behaviour of Linux as we don't show
an inode information.
I've been unsatisfied with the current Assistant app icon (16px).
After trying many variations, I have ended-up with this. The changes
may be slight, but the bow tie now has a more natural shape including
a more prominent knot, bringing it more inline with the 32px version.
Plus the shading has been tweaked.
In Snake, the menu for choosing a skin looked messy due to
inconsistent capitalization. Two skins names were entirely lowercase.
For the sprite-based skins, the menu takes the name of each skin's
directory, so I have capitalized these.
Capitalizing the original snake skin required more change than simply
renaming a directory.
The pattern to construct `Application` was to use the `try_create`
method from the `C_OBJECT` macro. While being safe from an OOM
perspective, this method doesn't propagate errors from the constructor.
This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually
define a `create` method that can bubble up errors from the
construction stage.
This commit also removes the ability to use `argc` and `argv` to
create an `Application`, only `Main`'s `Arguments` can be used.
From a user point of view, the patch renames `try_create` => `create`,
hence the huge number of modified files.
The graphics directory is a more suitable home for game assets.
Also, move card backs into their own subfolder in preparation for a
themes subfolder for card fronts.
These were part of the postcreate script previously, but with the new
powers of sed, we can text-replace the library name and make changing
them much more convenient.
Namely, the window title and size are carried over, since a larger
window with a more readable "Example Application" title is better to
understand. I also took the opportunity to add a missing trailing
newline to the generated CMake file.
This program has never lived up to its original idea, and has been
broken for years (property editing, etc). It's also unmaintained and
off-by-default since forever.
At this point, Inspector is more of a maintenance burden than a feature,
so this commit removes it from the system, along with the mechanism in
Core::EventLoop that enables it.
If we decide we want the feature again in the future, it can be
reimplemented better. :^)
Without `-y`, to show the current full year you'd have to specify which
one: `cal 2023`. Adding `-y` makes it possible to see the full current
year without remembering what year we are in.
This option is also stolen from FreeBSD :^)
Additionally, validate args: prevent passing both -3 and -y at the
same time. Passing both `--three-month-mode` and `--year` to `cal`
doesn't make sense. You'd either want the one or the other.
Making it configurable in system settings :^)
The --start-day option can still overwrite this global default.
This change makes it no longer possible to use unveil: as we have
to load the Calendar config file, which might be in a dynamic location.
It's also neccessary to add `cpath` to the pledge, as opening a
nonexistent config file with Core::ConfigFile::open_for_app creates it.
Making all the other parts of the world happier :^)
Add a `--starting-day` (`-s`) option to be compatible with GNU cal,
which has a similar option. The GNU option takes allows passing either
an int or a day name. Let's do something similar using weekdays we
already have in AK/DateConstants.h.
Also add myself to the copyright header, as by now I've modified most of
the lines in this file.
...instead of putting a star `*` next to it. This makes `cal`s output
much prettier, and gets rid of one FIXME. :^)
Don't use the escape sequence from the deleted FIXME - \e[30;47m would
set the background to white and foreground to black - which presumably
wouldn't do much on a light-theme terminal. Instead use \e[7m which sets
the color as "inverted".
Every other cal implementation just highlights the current day instead
of letting you specify a custom one to highlight. It doesn't seem to be
that useful, and is currently broken - no day gets highlighted at all,
because the `target_day` global is never written to.
Moreover, this complicates parsing the arguments. This commit also fixes
parsing a case where just a year is provided to `cal` - for example `cal
2023`.
This is quite useful for userspace applications that can't cope with the
restriction, but it's still useful to impose other non-configurable
restrictions by using jails.
Previously, `Heap` would store serialized data in blocks of 1024 bytes
regardless of the actual length. Data longer than 1024 bytes was
silently truncated causing database corruption.
This changes the heap storage to prefix every block with two new fields:
the total data size in bytes, and the next block to retrieve if the data
is longer than what can be stored inside a single block. By chaining
blocks together, we can store arbitrary amounts of data without needing
to change anything of the logic in the rest of LibSQL.
As part of these changes, the "free list" is also removed from the heap
awaiting an actual implementation: it was never used.
Note that this bumps the database version from 3 to 4, and as such
invalidates (deletes) any database opened with LibSQL that is not
version 4.
This is to allow testing autoplay, poster images, etc. without having to
stash local changes to the page. This also changes the URLs used on the
page to be relative to the page itself, to allow the page to load both
on Serenity and Lagom.
This adds a checkbox to enable autoplay on all websites (disabled by
default) and a website list to enable autoplay on individual websites
(set to file:// URLs only by default).
VALUES-4 defines the internal representation of `calc()` as a tree of
calculation nodes. ( https://www.w3.org/TR/css-values-4/#calc-internal )
VALUES-3 lacked any definition here, so we had our own ad-hoc
implementation based around the spec grammar. This commit replaces that
with CalculationNodes representing each possible node in the tree.
There are no intended functional changes, though we do now support
nested calc() which previously did not work. For example:
`width: calc( 42 * calc(3 + 7) );`
I have added an example of this to our test page.
A couple of the layout tests that used `calc()` now return values that
are 0.5px different from before. There's no visual difference, so I
have updated the tests to use the new results.
Add a list of system and general keyboard shortcuts as well as a list
of tips and tricks to man7 (Miscellanea). Add links to these in the
Help-index to aid discoverability for new users.
Prior to this commit, when you double-click a .zip file to open it, it
gets opened in Text-Editor as there is no other file association.
Now, when FileManager is invoked with a .zip file as the first argument,
a temporary directory will be created and the .zip will be extracted
into it. Once the FileManager window is closed, Core::TempFile will
delete the temporary directory.
This adds something like what we see in other operating systems' file
explorers, except for the fact that most other operating systems will
treat the .zip file as its own independent read-only filesystem. It
would be nice to do that in the future, but I feel like this is
sufficient for now.
by making them `monospace` in the Help page, and bold in the manual.
This helps to quickly find out where the keyboard controls are in the
manual when skimming its contents.
The LUN.target_id parameter points to a NVMe Namespace which starts from
1 and not 0. Fix the document to reflect the same while addressing a
nvme device in the boot parameters
This fixes a bug in the CSS Grid when there is a column and/or row gap,
as previously it would take the index of the incorrect column when
finding the `AvailableSize`.
There is a mild complication in the GridFormattingContext as the
OccupationGrid does not take into account the gap columns and rows that
later appear in the `Vector<TemporaryTrack>` columns and rows. The
PositionedBoxes are kind of a connection between the two, and so it's
now more explicit whether you would like to refer to a column by its
position taking into the gap columns/rows or not.
These symlinks' only purpose was to be copied into the rootfs along with
the rest of Base. Instead of storing symlinks to files that either
don't exist in the Base directory, or point to an absolute path outside
of the serenity folder, move these symlinks into the
build-root-filesystem.sh script.
🏻 - U+1F3FB LIGHT SKIN TONE
🏼 - U+1F3FC MEDIUM-LIGHT SKIN TONE
🏽 - U+1F3FD MEDIUM SKIN TONE
🏾 - U+1F3FE MEDIUM-DARK SKIN TONE
🏿 - U+1F3FF DARK SKIN TONE
This was added in d1de7f7782, but these are not the right code points
(missing U+200D), and we already have a BLACK CAT emoji with the right
code points.
Before, the shading of the Presenter icons was the wrong way round and
the external contrast was not as good as it could be. This has been
rectified and the icons are now light on the left- and dark on the
right-side. Also, they now use the same gray colors as other system
icons, making them sit much more nicely together, and have been
generally improved.
We currently aren't parsing the last line of emoji-serenity.txt because
Core::Stream does not think the last line is readable. We should, of
course, fix Core::Stream. But keeping a trailing newline here is nice
anyways.
This subdirectory is meant to hold all constant data related to the
kernel. This means that this data is never meant to updated and is
relevant from system boot to system shutdown.
Move the inodes of "load_base", "cmdline" and "system_mode" to that
directory. All nodes under this new subdirectory are generated during
boot, and therefore don't require calling kmalloc each time we need to
read them. Locking is also not necessary, because these nodes and their
data are completely static once being generated.
👂 - U+1F442 Ear
Improve + bring colors in line with other body part emojis
👃 - U+1F443 Nose
Improve + bring colors in line with other body part emojis
👅 - U+1F445 Tongue
🤌 - U+1F90C Pinched Fingers
🤘 - U+1F918 Sign of the Horns
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
Found using git grep -FIn $'\u00a0'
I just got bit by this type of bug in a different project, and was
wondering whether Serenity has this problem, too. See also:
https://dhwthompson.com/2019/my-favourite-git-commit
Currently when trying to use the right-shift on the pt-br layout
it prints a "?" on key-down on top of applying the shift modifier.
This patch removes the unwanted "?".
This filesystem is based on the code of the long-lived TmpFS. It differs
from that filesystem in one keypoint - its root inode doesn't have a
sticky bit on it.
Therefore, we mount it on /dev, to ensure only root can modify files on
that directory. In addition to that, /tmp is mounted directly in the
SystemServer main (start) code, so it's no longer specified in the fstab
file. We ensure that /tmp has a sticky bit and has the value 0777 for
root directory permissions, which is certainly a special case when using
RAM-backed (and in general other) filesystems.
Because of these 2 changes, it's no longer needed to maintain the TmpFS
filesystem, hence it's removed (renamed to RAMFS), because the RAMFS
represents the purpose of this filesystem in a much better way - it
relies on being backed by RAM "storage", and therefore it's easy to
conclude it's temporary and volatile, so its content is gone on either
system shutdown or unmounting of the filesystem.
This patch adds a new gradient tool to pixelpaint that allows us to fill
the canvas with a smooth color gradient outline at the edge of the
filled area.
Let's put test files with the tests themselves, instead of a random user
directory. (But still copy them so they appear in the user directory
for convenience.)
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.
We do not want to move POSIX utilities into subsections since they have
standard names, but we can do whatever we want with Applications :^).
This is particularly advantageous as many applications contain several
images, which declutters the man1 directory.
We've had quite some instances of people reintroducing these kinds of
links because they didn't know about the "new" help:// scheme. This
check should now prevent that from happening, though it might in rare
circumstances trigger a false positive.
When laying out abspos boxes, we compute the height twice: before and
after the inside of the box has been laid out.
The first pass allows percentage vertical values inside the box to be
resolved against the box's height. The second pass resolves the final
used value for the height of the box itself.
In cases where the box height depends on the results of inside layout,
we were incorrectly setting the box to having a definite zero height.
This led to incorrect results when sizing an abspos flex container,
since the FFC sizes containers (in row layouts) based on whether the
container has a definite height.
To avoid this problem, this patch adds an enum so we can differentiate
between the two abspos height computation passes. If the first pass
discovers a dependency on the inside layout, we simply bail out of
computing the height, leaving it as indefinite. This allows the FFC
to size its container correctly, and the correct height gets set by
the second pass.
The setting of scan code set sequence is removed, as it's buggy and
could lead the controller to fail immediately when doing self-test
afterwards. We will restore it when we understand how to do so safely.
Allow the user to determine a preferred detection path with a new kernel
command line argument. The defualt option is to check i8042 presence
with an ACPI check and if necessary - an "aggressive" test to determine
i8042 existence in the system.
Also, keep the i8042 controller pointer on the stack, so don't assign
m_i8042_controller member pointer if it does not exist.
Similar to the Settings application, this adds a single Screensaver
application to launch all screensaver demos. This is to declutter the
taskbar menu a bit.
We currently hard-code excluding Settings apps from the system menu.
This adds an "ExcludeFromSystemMenu" option to the AppFile configuration
to selectively exclude these apps, which all Settings app now set.
This is to allow selectively excluding a few Demo apps in a future
commit.
This wasn't doing anything interesting enough to justify being its own
demo application. If we need a spinning cube, we can just load a cube
model into 3DFileViewer. :^)
Base+Userland: Add menu item icons
This adds missing icons to Presenter Presentation menu.
This adds missing icon to Image Viewer View menu.
This adds a scale icon for the Image Viewer and Font Editor.
This moves the Fit Image to View icon to the 16x16 folder as it's now
used by Image Viewer and not only Pixel Paint.
This improves the fullscreen and play icons so that they fit together
better.
This was a plain-looking test app for debugging mouse events.
Mouse events work now, and if we want mouse testing facilities, they
can be added to MouseSettings instead.
- 👐 U+1F450 Open Hands
- 🙌 U+1F64C Raising Hands is modified to match 👐 and other hand emoji.
- ✊ U+270A Raised Fist
- ✴️ U+2734 Eight-Pointed Star
- ❇️ U+2747 Sparkle
- ❎ U+274E Cross Mark Button
- ❤️🔥 U+2764 U+200D U+1F525 Heart on Fire
- 〰️ U+3030 Wavy Dash
This utility lets a user to figure out what are the dependency libraries
for an ELF dynamic object, whether it's a dynamically loaded executable
or dynamically loaded library.
Check if the process we are currently running is in a jail, and if that
is the case, fail early with the EPERM error code.
Also, as Brian noted, we should also disallow attaching to a jail in
case of already running within a setid executable, as this leaves the
user with false thinking of being secure (because you can't exec new
setid binaries), but the current program is still marked setid, which
means that at the very least we gained permissions while we didn't
expect it, so let's block it.
Implement collapsing of a box margin-top and first in-flow
child margin-top by saving function that updates y position
of containing block inside BlockMarginState and then for
every child until "non-collapsed through" child is reached
y position of containing block is updated by calling
update_box_waiting_fox_final_y_position_callback.
Fixes a bug where when you had spans that that were bigger than the
grid, would create enough tracks to accomodate them. When a fixed
position is given, there should be at a minimum a row/column available
for the track. The span will be truncated if there is no space for it
later.