Commit graph

42046 commits

Author SHA1 Message Date
Brian Gianforcaro
b8e0cec20e Meta: Instruct stale-bot to ignore pr-is-blocked PRs 2022-10-15 12:05:57 +02:00
Gunnar Beutner
afa9060012 Kernel: Fix build error on AARCH64
This currently fails with:

error: #pragma once in main file [-Werror]
2022-10-15 06:01:45 +00:00
ne0ndrag0n
323c403d43 NetworkSettings+SpiceAgent: Update and add required unveil paths 2022-10-15 05:59:39 +00:00
snooze6214
1fde3737f4 LibJS: Move time zone annotation parsing into ParseISODateTime
This is an editorial change in the Temporal spec.

See: tc39/proposal-temporal@c410e25e47
2022-10-15 05:09:09 +00:00
Undefine
135ca3fa1b Kernel: Add support for the FAT32 filesystem
This commit adds read-only support for the FAT32 filesystem. It also
includes support for long file names.
2022-10-14 18:36:40 -06:00
Undefine
9718667bcf AK: Add StringView::find_last_not 2022-10-14 18:36:40 -06:00
demostanis
48aea321c5 Meta: Don't tell to run script as root when that's not the actual error
Before, and that was the cause of many confusion in #build-problems
on Discord, the Meta/build-image-*.sh scripts would error out with
the message "this script needs to run as root" while the actual error
was unrelated.
2022-10-15 01:40:01 +02:00
Timothy Flynn
d007337d97 AK: Explictly disallow lvalue reference types within Variant
This prevents an ICE with GCC trying to declare e.g. Variant<String&>.

Using a concept is a bit overkill here, but clang otherwise trips over
the friendship declaration to other Variant types:

    template<typename... NewTs>
    friend struct Variant;

Without using a concept, clang believes this is re-declaring the Variant
type with differing requirements ("error: requires clause differs in
template redeclaration").
2022-10-15 01:26:14 +02:00
Pavel
db23e2d546 Base: Add test page for exceptions
Created a simple page where you can check
that the exceptions appear in the JS console.
2022-10-15 01:25:12 +02:00
Pavel
40aad77ab1 WebContent+LibWeb+LibJS: Report exceptions to the JS console
Print exceptions passed to `HTML::report_exception` in the JS console

Refactored `ExceptionReporter`: in order to report exception now
you need to pass the relevant realm in it. For passed `JS::Value`
we now create `JS::Error` object to print value as the error message.
2022-10-15 01:25:12 +02:00
leeight
2eb6dbd4f0 headless-browser: Add ca-certs-path options 2022-10-15 02:44:47 +03:30
Lucas CHOLLET
c837a1a8de LibAudio: Factorize stream initialisation to base class LoaderPlugin
All actual plugins follow the same logic to initialize their stream,
this commit factorizes all of this to their base class: `LoaderPlugin`.
2022-10-14 23:11:23 +02:00
Lucas CHOLLET
754b129f4a LibAudio: Allow the MP3 plugin to be constructed from a byte buffer 2022-10-14 23:11:23 +02:00
Lucas CHOLLET
bb17ee8397 LibAudio: Port the MP3 plugin to Core::Stream 2022-10-14 23:11:23 +02:00
Lucas CHOLLET
597a614ce6 LibAudio: Remove the last occurrence of Core::File in the Flac plugin
The design is deeply inspired from what is done in the Wav plugin.
2022-10-14 23:11:23 +02:00
Lucas CHOLLET
f028930033 LibAudio: Remove the last occurrence of Core::File in the Wav plugin 2022-10-14 23:11:23 +02:00
Lucas CHOLLET
2d6124049a LibAudio: Get rid of unused method Loader::file()
`aplay` and two files of `SoundPlayer` were relying on the include of
`LibCore/File.h` by `Loader.h`.
2022-10-14 23:11:23 +02:00
Sam Atkins
1444b42936
Base: Fix my mistake
I would say this serves me right, except I'm still committing to
master using the web editor. :thonk:
2022-10-14 19:53:17 +01:00
Sam Atkins
8df3f9c7cd
Base: Add a quote
I may or may not be using the web editor... #yolo
2022-10-14 19:49:12 +01:00
Andreas Kling
27a7c5ef40 LibWeb: Implement CSS fit-content algorithm precisely as spec says
We were using the available space in place of the stretch-fit size.
This was an oversight, and this patch fixes that. It's very possible
that this will uncover broken behavior elsewhere.
2022-10-14 19:53:52 +02:00
Andreas Kling
d7d8e3c78b LibWeb: Resolve *all* percentages in abspos height calculation
We were neglecting to resolve() percentages for many values.
2022-10-14 19:52:07 +02:00
Andreas Kling
834d98520a LibWeb: Implement basic support for align-content in flex layout
This property tells us how to lay out multi-line flex containers.
I implemented all modes except `space-between` and `space-around`.
Those are left as FIXMEs.
2022-10-14 19:50:15 +02:00
Andreas Kling
f8a2c0586a LibWeb: Parse the CSS align-content property 2022-10-14 19:50:15 +02:00
Andreas Kling
b062a0fb7c LibWeb: Make TextNode::ChunkIterator emit an empty chunk for content:""
This ensures that we create a line box for content:"", which would
otherwise get pruned by the empty line cleanup in IFC.

The empty line box is important in this case, since it gives us a
reference point for measuring the automatic height of the IFC's
containing block. By having an empty line, we can now correctly measure
the impact of vertical margins on a generated box with content:""
and allow them to contribute to the block height.
2022-10-14 19:50:15 +02:00
Andreas Kling
c70801ddbc LibWeb: Don't treat content: "" as collapsible whitespace
I couldn't find anything in specs about this, but it seems to be roughly
consistent with other engines.
2022-10-14 19:50:15 +02:00
Andreas Kling
4ddfc3a6db LibWeb: Mark content: "string" text nodes as generated
This will allow us to give them special treatment, particularly when
they are an empty string.
2022-10-14 19:50:15 +02:00
Andreas Kling
063d6cab8b LibWeb: Remove unused Layout::TextNode::ChunkIterator::m_layout_mode 2022-10-14 19:50:15 +02:00
Andreas Kling
42538b5375 LibWeb: Fix bogus inline-block check in line box layout
When checking if a line box fragment "isn't just dumb inline content",
we were checking "is replaced or inline-block". What we really need to
be checking is "is replaced or inline-outside-but-not-flow-inside".
So now we check that.

This fixes an issue where inline-flex boxes were given incorrect extra
height due to being treated as regular text for purposes of line height
calculation.
2022-10-14 19:50:14 +02:00
Andreas Kling
20711c76b7 LibWeb: Apply min/max constraints to sizes that are initially definite
Also add a comment explaining how we determine initial definite sizes.
2022-10-14 19:50:14 +02:00
Andreas Kling
7f6ba8b910 LibWeb: Clamp flex item's automatic cross sizes to min/max sizes
This takes care of an old FIXME.
2022-10-14 19:50:14 +02:00
Andreas Kling
13792e572c LibWeb: Mark percentage heights as initially definite when appropriate
Percentage heights are now considered definite when their containing
block has a definite height. This makes profile pictures have geometry
on Twitter. (We still don't load the images themselves though.)
2022-10-14 19:50:14 +02:00
Luke Wilde
d5d1146cc3 LibJS/Temporal: Fix inconsistency in order of observable operations
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/a3a8237
2022-10-14 18:55:12 +02:00
Mart G
7394316818 HexEditor: Render selection background without gaps between rows
The selected region in HexEditor is indicated by rendering a different
background color for the selected bytes.

Previously this background was rendered so that the background
rectangles were not contigous between different rows. This caused a high
contrast pattern that interfered with the readability of the hexadecimal
digits.

Now the background is rendered as a single contiguous block.
2022-10-14 16:24:51 +01:00
kleines Filmröllchen
e6ea49d10b LibAudio: Fix 24-bit PCM rescaling
This code was so totally wrong I can't even explain it.
2022-10-14 09:20:38 -06:00
kleines Filmröllchen
5f71c81e1b LibAudio: Correctly rescale 8-bit PCM samples
8-bit PCM samples are unsigned, at least in WAV, so after rescaling them
to the correct range we also need to center them around 0. This fix
should make 8-bit WAVs have the correct volume of double of what it was
before, and also future-proof for all other unsigned PCM sample formats
we may encounter.
2022-10-14 09:20:38 -06:00
Timothy Flynn
1524288127 LibSQL: Rewrite the SQL::Value type to be contained within one class
Currently, the Value class is essentially a "pImpl" wrapper around the
ValueImpl hierarchy of classes. This is a bit difficult to follow and
reason about, as methods jump between the Value class and its impl
classes.

This changes the Variant held by Value to instead store the specified
types (String, int, etc.) directly. In doing so, the ValueImpl classes
are removed, and all methods are now just concise Variant visitors.

As part of this rewrite, support for the "array" type is dropped (or
rather, just not re-implemented) as it was unused. If it's needed in the
future, support can be re-added.

This does retain the ability for non-NULL types to store NULL values
(i.e. an empty Optional). I tried dropping this support as well, but it
is depended upon by the on-disk storage classes in non-trivial ways.
2022-10-14 17:47:44 +03:30
Timothy Flynn
7d41b46a7d LibSQL: Remove infallible type conversions from SQL::Value
Force the callers to either know that the type is convertible, or to
handle the conversion failure.
2022-10-14 17:47:44 +03:30
Timothy Flynn
af3980384b LibSQL: Return StringView from enum-to-string converters
No need to allocate here. Also mark these methods as constexpr rather
than inline static.
2022-10-14 17:47:44 +03:30
Timothy Flynn
c0b54f18b5 LibSQL: Copy SQL::Value instances less frequently (which may be vectors) 2022-10-14 17:47:44 +03:30
Timothy Flynn
5f549fe5d9 LibSQL: Add missing header includes
These are explicitly needed, and will cause compile errors as headers
moved around in subsequent commits.
2022-10-14 17:47:44 +03:30
leeight
2029c98fa7 LibWeb: Add missing property and methods for history object
We provide `length` property and `go` / `back` / `forward` methods
implementation here.
2022-10-14 16:01:35 +02:00
snooze6214
2b9cf5a7b4 PixelPaint: Unveil clipboard using the right path
Commit #3197c17 introduced a session based clipboard portal.
This made pixel-paint fail to launch, because it had an unveil that
used the old path to the clipboard. This commit fixes that and now
unveils the new session based clipboard portal.
2022-10-14 15:42:07 +02:00
Liav A
7520acd4eb Kernel: Move Scheduler current time method to the TimeManagement code 2022-10-14 14:13:51 +02:00
Liav A
3651d9701e Kernel: Abstract platform-specific current time methods from Scheduler
This change ensures that the scheduler doesn't depend on a platform
specific or arch-specific code when it initializes itself, but rather we
ensure that in compile-time we will generate the appropriate code to
find the correct arch-specific current time methods.
2022-10-14 14:13:51 +02:00
kleines Filmröllchen
c439a34ff7 Meta: Get rid of /res/version.ini
There are no more users of this legacy version API. :yakgone:
2022-10-14 13:45:33 +02:00
kleines Filmröllchen
cb0b82ec46 Userland+LibCore: Remove legacy SERENITY_VERSION from Core::Version
This was being used as a default version argument in a couple of APIs,
so those need to change signature and the caller always needs to provide
a version.
2022-10-14 13:45:33 +02:00
kleines Filmröllchen
38bb189772 LibCore: Read version information from uname() instead of /res/version 2022-10-14 13:45:33 +02:00
kleines Filmröllchen
83da2be8f3 uname: Report system revision version aka git commit hash
This can be done with -v and makes uname fully POSIX compliant as far as
I can tell.
2022-10-14 13:45:33 +02:00
kleines Filmröllchen
4c7eef874d Kernel: Read version and git commit hash from baked-in version info
... instead of hard-coding it in the uname syscall.
2022-10-14 13:45:33 +02:00
kleines Filmröllchen
7e11b9a276 Kernel: Move sys$uname to use TypedTransfer
This should equate to roughly the same code but improve typechecking.
2022-10-14 13:45:33 +02:00