Commit graph

49703 commits

Author SHA1 Message Date
Daniel Bertalan c911fb0150 AK: Add Span::align_to
This method returns a sub-span whose data pointer and size is aligned to
a specified alignment.
2023-04-29 08:24:18 +02:00
Nico Weber ab98ad4e70 ICC: Add a missing " at the end of a comment 2023-04-29 06:49:36 +02:00
Nico Weber 227072a5af ICC: Rename XYZ and XYZNumber fields to uppercase
Given that XYZ and xyz are distinct things, let's use the correct
case for these member variables.

No behavior change.
2023-04-29 06:49:36 +02:00
Nico Weber 1e5ececf75 ICC: Add comment with a link to WellKnownProfiles.cpp 2023-04-29 06:49:36 +02:00
Nico Weber de7a413a9f ICC: Add a test for Profile::to_pcs 2023-04-29 06:49:36 +02:00
Nico Weber af453b246a ICC: Add method to convert a color to the profile connection space
Only implemented for matrix profiles so far.

This API won't be fast enough to color manage images, but let's
get something working before getting something fast.
2023-04-29 06:49:36 +02:00
Nico Weber e76d2238bb ICC: Make number_of_components_in_color_space() external
...and make its return type unsigned.
2023-04-29 06:49:36 +02:00
Nico Weber 037d213fdf ICC: Make struct XYZ store float instead of double
Should be good enough.
2023-04-29 06:49:36 +02:00
Tim Ledbetter e1de31a3fe Chess: Display appropriate dialog when engine move ends the game
A dialog is now displayed when an engine move results in a checkmate
or a draw. In the case of threefold repetition or the fifty move rule,
the engine will always accept a draw. A human player is asked if they
would like to accept a draw.
2023-04-29 06:47:22 +02:00
Aliaksandr Kalenik d9f0c2a806 LibWeb: Implement "distribute height to rows" step in TFC
This commit implements following missing steps in table layout:
- Calculate final table height
- Resolve percentage height of cells and rows using final table height
- Distribute avilable height to table rows
2023-04-29 06:46:45 +02:00
Aliaksandr Kalenik 9fd51a59ff LibWeb: Fix division by zero in table columns width distribution
If total max columns width (grid_max) is zero then available width
should be divided equally between columns. Previously there was
division by zero: `column.max_width / grid_max`.
2023-04-29 06:46:45 +02:00
MacDue 77a5f40736 Base: Fix incorrectly closed tag in welcome.html 2023-04-29 05:42:57 +02:00
Liav A eb90d468ac SystemServer: Remove unused code for generating /dev/hwrng
This device was removed in b596af363c, so
we can't really create anything related to it, therefore this piece of
code should be removed too.
2023-04-28 23:26:31 +02:00
Tim Schumacher 9ab598af49 Revert "Kernel/x86: Bake the Prekernel and the Kernel into one image"
Some hardware/software configurations crash KVM as soon as we try to
start Serenity. The exact cause is currently unknown, so just fully
revert it for now.

This reverts commit 897c4e5145.
2023-04-28 23:24:19 +02:00
Emil Militzer a8d08357c9 LibWeb: Compute inset for relative positioned inline-block 2023-04-28 18:12:02 +02:00
Aliaksandr Kalenik 62bc8590ad LibWeb: Implement "get all used history steps" for traversables
https://html.spec.whatwg.org/multipage/browsing-the-web.html#getting-all-used-history-steps
2023-04-28 18:11:44 +02:00
Aliaksandr Kalenik 6ec88b36b9 LibWeb: Implement "get the target history entry" for navigables 2023-04-28 18:11:44 +02:00
Aliaksandr Kalenik d9d8896380 LibWeb: Implement "get session history entries" for navigables
https://html.spec.whatwg.org/multipage/browsing-the-web.html#getting-session-history-entries
2023-04-28 18:11:44 +02:00
Aliaksandr Kalenik 4c6564e3c1 AK: Add values() method in HashTable
Add HashTable::values() method that returns all values.
2023-04-28 18:11:44 +02:00
Aliaksandr Kalenik c9c8f2413f LibWeb: Change Navigable::traversable_navigable() to be const 2023-04-28 18:11:44 +02:00
Aliaksandr Kalenik 6660eb3e1b LibWeb: Add non-const session_history_entries getter in traversable 2023-04-28 18:11:44 +02:00
Aliaksandr Kalenik 51d64bdaec LibWeb: Add NestedHistory in DocumentState 2023-04-28 18:11:44 +02:00
Daniel Bertalan a0356a0302 Kernel/aarch64: Fix build after is_sharing_with_others API removal
This commit fixes the build after the removal of
`GenericInterruptHandler::is_sharing_with_others` in 8944ca830f.
2023-04-28 15:00:06 +02:00
Ali Mohammad Pur 41cf52a623 AK: Make the Optional formatter always available and tweak its format
There's no real reason to make this a debug-only formatter, on top of
that, jakt has a optional formatter that prints None/foo instead of
OptionalNone/Optional(foo), which is more concise anyway, so switch to
that.
2023-04-28 14:55:56 +02:00
MacDue 8ff6239d4f Base: Add SVG gradients test page 2023-04-28 09:42:28 +02:00
MacDue afd355c135 LibWeb: Resolve and paint SVG gradient fills
This bit is mostly ad-hoc for now. This simply turns fill: url(#grad1)
into document().get_element_by_id('grad1') then resolves the gradient.
This seems to do the trick for most use cases, but this is not
attempting to follow the spec yet to keep things simple.
2023-04-28 09:42:28 +02:00
MacDue aa3464466e LibWeb: Implement SVGLinearGradientElement (<linearGradient>)
This represents the SVG <linearGradient>. The actual gradient is
converted to a Gfx::PaintStyle for use in SVG fills... There is a little
guesswork in the implementation, but it seems to match Chrome/Firefox.

Note: Still not hooked up to actual painting in this commit.
2023-04-28 09:42:28 +02:00
MacDue 89d3c6d718 LibGfx: Implement PaintStyle for SVG linear gradients 2023-04-28 09:42:28 +02:00
MacDue 71938550fa LibWeb: Implement SVGGradientElement
This is the base class for all SVG gradient types. This supports:

- The `gradientUnits` attribute
- The `gradientTransform` attribute
- And following `xlink:hrefs` for inheriting <stops>/attributes
2023-04-28 09:42:28 +02:00
MacDue a5fa5e55ef LibWeb: Allow specifying a URL for an SVG fill
This does not do anything yet, but will allow for gradients later!
2023-04-28 09:42:28 +02:00
MacDue 2fbe5b969b LibWeb: Add URLStyleValue to represent general url() values
This is primarily being added to support `fill: url(#gradient)` for
SVGs.
2023-04-28 09:42:28 +02:00
MacDue b19d2634f6 LibWeb: Implement SVGStopElement (<stop>)
This is used to specify the color/position of color stops for SVG
gradients.
2023-04-28 09:42:28 +02:00
MacDue 297d8eebcd LibWeb: Add stop-color as a CSS property
(This is to set the color of a stop for an SVG gradient)
2023-04-28 09:42:28 +02:00
MacDue f099ee3d47 LibWeb: Allow doing .to_color() on a StyleValue without a layout node
This will be needed to access the color of a stop from a SVG gradient
<stop> element (which does not participate in layout, so does not have
a layout node).
2023-04-28 09:42:28 +02:00
MacDue 2013761feb LibWeb: Add SVG tag names for <linearGradient>s 2023-04-28 09:42:28 +02:00
MacDue 66d1b78348 LibWeb: Implement SVGAnimatedNumber
See https://www.w3.org/TR/2013/WD-SVG2-20130409/types.html#InterfaceSVGAnimatedNumber
2023-04-28 09:42:28 +02:00
MacDue 454ecf24ea AK+LibTimeZone: Add debug only formatter for Optional
I found this handy for debugging, and so might others.

This now also adds a formatter for TimeZone::TimeZone. This is needed
for FormatIfSupported<Optional<TimeZone::TimeZone>> to compile. As
FormatIfSupported sees a formatter for Optional exists, but not that
there's not one for TimeZone::TimeZone.
2023-04-28 09:42:28 +02:00
Samuel Bowman fc1fd907b4 Kernel: Create all kernel processes before enabling boot profiling
Process created performance events for kernel processes are only ever
emitted for the kernel processes that exist when profiling is enabled.
Any new kernel processes created after profiling is enabled will not
have corresponding process created performance events, so all kernel
processes should be created before enabling profiling.

NetworkTask was the only kernel process being created after enabling
profiling, so we now just create it before enabling profiling. This
fixes an issue where Profiler was failing to parse boot profiles as a
result of NetworkTask not having a process created event.
2023-04-28 09:27:55 +02:00
Liav A 897c4e5145 Kernel/x86: Bake the Prekernel and the Kernel into one image
The new baked image is a Prekernel and a Kernel baked together now, so
essentially we no longer need to pass the Prekernel as -kernel and the
actual  kernel image as -initrd to QEMU, leaving the option to pass an
actual initrd or initramfs module later on with multiboot.
2023-04-28 09:23:30 +02:00
Aliaksandr Kalenik 2a1e58f8cc LibWeb: Consider cell computed height in total row min height of table
Previously, the minimum height of a table row was calculated based
on the automatic height of the cells inner layout. This change makes
computed height of a cell boxes also be considered if it has definite
value.
2023-04-28 06:17:07 +02:00
Aliaksandr Kalenik 9b4cd0dab7 LibWeb: Consider row computed height in total row min height of table
Fixes the issue that currently we do not consider table rows height
while calculating min row height even if it is definite value.
2023-04-28 06:17:07 +02:00
Ali Mohammad Pur d06057f88b AK: Don't refer to AK::swap() as ::swap()
While swap() is available in the global namespace in normal conditions,
!USING_AK_GLOBALLY will make this name unavailable in the global
namespace, making these calls fail to compile.
2023-04-28 05:56:04 +02:00
Tim Ledbetter 482f7f9775 Chess: Send a ucinewgame command to the engine on starting a new game
This fixes an issue where the engine would crash when starting a new
game playing as white.
2023-04-28 05:55:51 +02:00
Tim Ledbetter 536f6b8b34 ChessEngine: Reset the engine state on receiving a ucinewgame command 2023-04-28 05:55:51 +02:00
Tim Ledbetter 18735960de LibChess: Add the ucinewgame command
This command is sent from the GUI to tell the engine that the next
position will be from a different game.
2023-04-28 05:55:51 +02:00
Ali Mohammad Pur 7e6341587b AK+Everywhere: Disallow Error::from_string_view(FooString)
That pattern seems to show up a lot in code written by people that
aren't intimately familiar with the lifetime model of Error and Strings.
This commit makes the compiler detect it and present a more helpful
diagnostic than "garbage string at runtime".
2023-04-28 05:55:20 +02:00
Jelle Raaijmakers cc35bab143 DisplaySettings: Show bilinear filtered wallpaper in MonitorWidget
After 7b10c8048c, this is probably more correct.
2023-04-27 21:17:11 +01:00
Jelle Raaijmakers c7f651d526 DisplaySettings: Remove unused code from MonitorWidget 2023-04-27 21:17:11 +01:00
Raphaël Jakse f99a5e10a3 Documentation: Add dependencies for openSUSE 2023-04-27 21:43:09 +02:00
Andreas Kling c0b4083b02 LibWeb: Blockify pseudo elements that are flex items
When deciding on a box type transformation (blockify/inlinify) for a
pseudo element, we have to use the originating element as a reference
rather than the parent.

(The originating element *is* the parent for its pseudo elements.)
2023-04-27 18:29:02 +02:00