Commit Graph

47924 Commits

Author SHA1 Message Date
Sam Atkins
ffce6cc977 LibSyntax: Add Language-from-String/Path functions
These are taken from HackStudio, but slightly rearranged to be more
alphabetical, and returning an empty Optional instead of "Unknown".
2023-03-11 13:22:57 +00:00
Sam Atkins
82f58b8af0 AK: Forward-declare LexicalPath
And alphabetically sort the list while I'm at it.
2023-03-11 13:22:57 +00:00
Sam Atkins
8007c103dd LibSyntax: Move Language enum into its own files 2023-03-11 13:22:57 +00:00
Pankaj Raghav
a1f2f08764 Meta: Use the correct boot device addressing mode for NVMe devices
Commit: 2c84466ad8 ("Kernel/Storage: Introduce new boot device
addressing modes") changed the way we pass the boot device parameter.

That commit missed updating boot parameter in the run.sh script for NVMe
boot devices.
2023-03-11 13:15:00 +00:00
Pankaj Raghav
f8b67e1596 Kernel/Storage+Base: Fix boot_device_addressing document for NVMe
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
2023-03-11 13:15:00 +00:00
Aliaksandr Kalenik
84e17fcbcc WebDriver: Fix crash in async execute script endpoint
Removal of dummy execution context in
9aca54091a caused a crash in
`execute_async_script` because of empty execution contexts stack
during `create_resolving_functions` call.
2023-03-11 13:11:51 +00:00
Fabian Dellwing
7c0b360881 Kernel: Add non standard value to sys$sysconf
Add `_SC_PHYS_PAGES` to sys$sysconf syscall. This value is needed
for a port I'm working on.
2023-03-11 13:06:36 +00:00
Julian Offenhäuser
c705afa43a Kernel: Fix variable shadowing issue in PCIIDELegacyModeController
In this specific else case, primary_base_io_window would not be assigned
in the outer scope, leading to a crash immediately after.
2023-03-11 06:06:01 -07:00
Andrew Kaster
b996e15d9d CI: Remove stale dependence on Toolchain.yml from nightly job
We removed this file in 0a7d0362ea but
forgot to update the nightly job.
2023-03-11 05:36:14 -07:00
Andreas Kling
47797ff52c Meta: Remove Brian's entries from CODEOWNERS
The scope of these entries is not proportional to Brian's capacity for
code review at the moment, so let's stop marking him as "code owner" on
almost every PR. :^)
2023-03-11 13:11:09 +01:00
Andreas Kling
af8d5207f6 Meta: Don't check for newlines at EOF in Tests/LibWeb/Layout/ 2023-03-11 13:05:35 +01:00
Andreas Kling
f3556f239e LibWeb: Don't touch flex items after they we've been frozen
When using the flex shrink factor, the flexible length resolution
algorithm was incorrectly ignoring the `frozen` flag on items and would
update the same items again, causing overconsumption of the remaining
free space on the flex line.
2023-03-11 11:52:19 +01:00
Andreas Kling
0808463a7d LibWeb: Use FlexItem::outer_hypothetical_main_size() in one more place
Better than doing the calculation manually.
2023-03-11 11:45:17 +01:00
Andreas Kling
f97754942c LibWeb: Collapse margin-left with space used by left-side floats
We had an issue where boxes with margin-left were shifted right by
left-side floats twice instead of just once.
2023-03-11 10:46:26 +01:00
Andreas Kling
1cf5737e9e LibWeb: Add fast_is<T>() for various types stood out in a profile 2023-03-11 10:46:26 +01:00
Andreas Kling
f6426cdcd4 LibWeb: Use static_cast in SVGGeometryBox::dom_node()
These are only ever constructed with a corresponding SVGGeometryElement,
so we know it's safe to static_cast here.
2023-03-11 10:46:26 +01:00
Mathis Wiehl
ab4cf7c57d LibWeb: Don't overflow flex containers on margin auto
In case flex items had `margin: auto` on the primary flex axis, we were
still also distributing remaining space according to `justify-content`
rules. This lead to duplicated spacing in various places and overflows.

It looks like this issue was observed previously but missidentified
because there was logic to ignore margins at the start and end which
would partially paper over the root cause. However this created other
bugs (like for example not having a margin at beginning and end ;-)) and
I can find nothing in the spec or other browser behaviour that indicates
that this is something that should be done.

Now we skip justify-content space distribution alltogether if it has
already been distributed to auto margins.
2023-03-11 10:46:21 +01:00
Aliaksandr Kalenik
3716e1b8a0 Ladybird: Delete unused ConsoleClient and ConsoleGlobalObject
After the separation of LibWeb into WebContent process, ConsoleClient
and ConsoleGlobalObject are no longer used.
2023-03-11 08:09:10 +01:00
Andrew Kaster
3d33217d60 Ladybird+CI: Move layout_test.sh test runner from CI yml into CMake
We should be able to run this locally, as long as ENABLE_LAGOM_LADYBIRD
is true, or if building ladybird from the ladybird source directory.

This removes a special case from the Lagom CI yml file.
2023-03-10 23:01:55 +00:00
Lucas CHOLLET
af58f012be Tests: Add a test for JPEGs with RGB components 2023-03-10 22:22:36 +01:00
Lucas CHOLLET
a47d775be6 LibGfx/JPEG: Support RGB JPEGs
By default, JPEGs use YCbCr to encode colors however other encoding
exist. This patch adds the logic to determine which transformation is
needed and support for RGB encoded JPEGs :^).
2023-03-10 22:22:36 +01:00
Lucas CHOLLET
c60338e187 LibGfx/JPEG: Decode the App14 segment
This half-standardized application specific segment is used for color
transform information. It means that the decoder is know informed if the
image uses YCbCr, RGB, CMYK or even YCCK.
2023-03-10 22:22:36 +01:00
Lucas CHOLLET
00808c5eba LibGfx/JPEG: Use decimal instead of hexadecimal for APP markers 2023-03-10 22:22:36 +01:00
implicitfield
d4d1cab895 ThemeEditor: Support more color scheme-related roles 2023-03-10 22:03:49 +01:00
implicitfield
e9e4baee77 Everywhere: Support overriding the system color scheme 2023-03-10 22:03:49 +01:00
implicitfield
fba0cee622 Flood: Update the man page to reflect current color scheme handling 2023-03-10 22:03:49 +01:00
Ali Mohammad Pur
56b5b78d7b Shell: Error out on invalid `export' argument
Previously `export =` would crash the shell, make this an error instead.
2023-03-10 22:33:30 +03:30
Andrew Kaster
a5c47d0be3 LibAudio: Include missing AK/Stream.h in Loader.h
This fixes the FuzzQOILoader build.
2023-03-10 11:44:11 -07:00
Tom
52e45fb6fa LibWeb+Base: Fix row-height bug in Grid when there is a column gap
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.
2023-03-10 18:20:27 +01:00
Andreas Kling
da861fe7af Tests/LibWeb: Use SerenitySans in new layout tests
This ensures consistent font metrics no matter which platform fonts
are available.
2023-03-10 18:10:33 +01:00
Andreas Kling
ff7b949061 LibWeb: Make HTMLScript private members private once again
These were accidentally made public a while ago. Thankfully nobody
started poking into script element internals since then. :^)
2023-03-10 14:59:46 +01:00
Andreas Kling
e8f5085669 LibWeb: Implement Range.createContextualFragment() 2023-03-10 14:58:55 +01:00
Andreas Kling
fb6d6a985f LibWeb: Implement Element.setAttributeNode{,NS}() 2023-03-10 14:56:29 +01:00
Andreas Kling
8c5c78f1f1 LibWeb: Implement Document.createAttribute{,NS}() 2023-03-10 14:56:03 +01:00
Andreas Kling
109ed27423 LibWeb: Rewrite FFC "resolve flexible lengths" algorithm from draft spec
The draft CSS-FLEXBOX-1 spec had a more detailed description of this
algorithm, so let's use that as our basis for the implementation.

Test by Aliaksandr. :^)
2023-03-10 13:38:34 +01:00
Andreas Kling
1cd61723f0 LibWeb: Show layout test failure diffs in unified format (diff -u) 2023-03-10 13:38:34 +01:00
Andreas Kling
0ef07383e5 LibWeb: Fix bogus min/max-height for box-sizing:border-box flex items
When resolving these constraints to CSS pixel sizes, we have to resolve
padding-top and padding-bottom against the flex container's *width*,
not its height.
2023-03-10 13:38:34 +01:00
Andreas Kling
24d5a9d7df LibWeb: Fix bogus percentage vertical padding with box-sizing:border-box
The padding-top and padding-bottom properties are relative to the
*width* of the containing block, not the height.

It's funny how we keep making this same mistake again and again. :^)
2023-03-10 13:38:34 +01:00
Andreas Kling
07f6ee9e73 LibWeb: Simplify FFC get_pixel_{width,height} internal helper API
These took an Optional<CSS::Size> for some reason, but that was not
necessary. Just take a CSS::Size.
2023-03-10 13:15:45 +01:00
Andreas Kling
6b19397452 LibWeb: Avoid unnecessary work for box-sizing: content-box flex items 2023-03-10 13:15:45 +01:00
Andreas Kling
64bda6de2a LibWeb: Use equals_ignoring_ascii_case() in infra helper 2023-03-10 13:15:44 +01:00
Andreas Kling
a504ac3e2a Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
Let's make it clear that these functions deal with ASCII case only.
2023-03-10 13:15:44 +01:00
Andreas Kling
03cc45e5a2 Kernel: Use RefPtr instead of LockRefPtr for File and subclasses
This was mostly straightforward, as all the storage locations are
guarded by some related mutex.

The use of old-school associated mutexes instead of MutexProtected
is unfortunate, but the process to modernize such code is ongoing.
2023-03-10 13:15:44 +01:00
kleines Filmröllchen
61bb9103c2 Base+Userland: Add support for QOA files everywhere
This adds MIME type sniffing,
`file` support,
LaunchServer support to open QOA in SoundPlayer,
and audio icons
2023-03-10 04:07:14 -07:00
kleines Filmröllchen
0f7a5006d1 Meta/Lagom: Add a fuzzer for QOA 2023-03-10 04:07:14 -07:00
kleines Filmröllchen
0b421a3764 LibAudio: Implement the Quite Okay Audio format
Brought to you by the inventor of QOI, QOA is a lossy audio codec that
is, as the name says, quite okay in compressing audio data reasonably
well without frequency transformation, mostly introducing some white
noise in the background. This implementation of QOA is fully compatible
with the qoa.h reference implementation as of 2023-02-25. Note that
there may be changes to the QOA format before a specification is
finalized, and there is currently no information on when that will
happen and which changes will be made.

This implementation of QOA can handle varying sample rate and varying
channel count files. The reference implementation does not produce these
files and cannot handle them, so their implementation is untested.

The QOA loader is capable of seeking in constant-bitrate streams.

QOA links:
https://phoboslab.org/log/2023/02/qoa-time-domain-audio-compression
https://github.com/phoboslab/qoa
2023-03-10 04:07:14 -07:00
kleines Filmröllchen
3c65c22728 LibAudio: Replace Result with ErrorOr
Since they are API compatible, this change is very simple.
2023-03-10 04:07:14 -07:00
kleines Filmröllchen
b38beb106e AK: Add constexpr floor and round 2023-03-10 04:07:14 -07:00
Johannes Fritz
6f29ea9976 Base: Replace office.png icon with BSD licensed one 2023-03-10 03:53:29 -07:00
Andrew Kaster
8f8e04677d Documentation: Reorganize Lagom README and update fuzzer documentation
Add some prose to the introduction of Lagom about how we use it. Also,
move the section on including Lagom in other projects above the fuzzer
documentation.

Remove the explicit cmake commands from the Fuzzer documentation, as the
script should be the source of truth.
2023-03-10 03:48:41 -07:00