Commit graph

49726 commits

Author SHA1 Message Date
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
Timothy Flynn
806e08425a LibWeb: Clear the mouse event tracking node when it stops wanting events
This can occur if a mouse click on a mouse event tracking node causes a
page navigation. As the old document is torn down, the event handler may
have a stale reference to the tracking node. If a subsequent mouse event
occurs on that node, we would crash trying to access the node's styled
properties that are no longer valid.

To fix this, when we are deciding what node to send the event to, and we
have a mouse event tracking node, check if that node still wants the
event. If not, clear the tracking node.
2023-04-27 18:28:43 +02:00
Timothy Flynn
8f0b7fa370 LibWeb: Verify that a node has styled properties in its styled accessors
For example, it's possible to access Node::computed_values() on a node
that neither has style nor a parent with style. This ultimately results
in a null pointer dereference when we return parent()->computed_values()
as a fallback. This can be a little tricky to track down due to these
functions being inlined, so add an explicit verification.
2023-04-27 18:28:43 +02:00
Andreas Kling
d053cb6fae LibWeb: Fix bug where box-sizing: border-box made flex items too small
If a flex item has a preferred cross size of "auto", we should not be
subtracting padding and border in the cross axis when computing the
cross size.
2023-04-27 13:57:52 +02:00
Fabian Dellwing
824d23570a Ports: Remove getconf from bash examples
We fail to build `getconf.c` from the builtin examples. And therefore
don't install the rest. If we remove it, we successfully build the
rest of the examples.
2023-04-27 10:25:42 +01:00
Matthew Olsson
ed06429d33 LibWeb: Implement ReadableByteStreamController.error() 2023-04-27 07:57:53 +02:00
Matthew Olsson
c9be755367 LibWeb: Implement ReadableByteStreamController.close() 2023-04-27 07:57:53 +02:00
Matthew Olsson
ef3810d03d LibWeb: Add missing AOs for ReadableByteStreamController.[[PullSteps]] 2023-04-27 07:57:53 +02:00
Matthew Olsson
b57b3c54cc LibWeb: Add ReadableStreamBYOBReader to ReadableStreamReader type 2023-04-27 07:57:53 +02:00
Matthew Olsson
e8ad571082 LibWeb: Add ReadableStreamBYOBReader interface 2023-04-27 07:57:53 +02:00
Matthew Olsson
2b269d4a49 LibWeb: Fix a blatant nullptr dereference in ReadableStreamGenericReader 2023-04-27 07:57:53 +02:00
Aliaksandr Kalenik
9ee64b5694 LibWeb: Prevent margin double-counting with "collapse through" boxes
If there is a remaining margin-bottom in margin collapsing state
tracker after laying out all boxes in the current BFC, it must be
assigned to the last in-flow child since margin collapsing cannot
occur across a formatting context boundary.

The current issue where margin-bottom may be counted twice due to
"collapse through" margins in the last in-flow child box is addressed
with this fix by excluding such boxes during the search for a box to
assign the remaining margin.

Test case coming with this fix has a layout bug with incorrectly
computed line height.
2023-04-27 07:52:12 +02:00
Lucas CHOLLET
7fffa0176f KeyboardPreferenceLoader: Remove usage of DeprecatedFile 2023-04-27 07:29:49 +02:00
Lucas CHOLLET
f92ae03e76 DHCPClient: Remove usage of DeprecatedFile 2023-04-27 07:29:49 +02:00
Lucas CHOLLET
d7ca3a5196 LaunchServer: Remove usage of DeprecatedFile
And use the new `guess_mime_type_based_on_sniffed_bytes` helper.
2023-04-27 07:29:49 +02:00
Lucas CHOLLET
50b5528746 LibCore+file: Factorize code to detect mime-type from bytes of a file
This is always nice to factorize code, but even better when it contains
magic numbers.
2023-04-27 07:29:49 +02:00
Lucas CHOLLET
309a15e2aa LibSymbolication: Use Core::File instead of Core::DeprecatedFile 2023-04-27 07:27:14 +02:00
Lucas CHOLLET
c50b072852 IPCMagicLinter: Port to Core::File 2023-04-27 07:26:32 +02:00
Lucas CHOLLET
b35a6b206b IPCMagicLinter: Use LibMain 2023-04-27 07:26:32 +02:00
Timothy Flynn
4dcdc3bd25 Ladybird: Prohibit GUI interaction of the WebContent process on macOS
The WebContent process behaves a bit awkwardly on macOS. When we launch
the process, we have to create a QGuiApplication to access system fonts.
But on macOS, doing so creates an entry in the Dock, and also causes the
WebContent to be focused. So if you enter cmd+Q without first focusing
the Ladybird GUI, WebContent is closed, while the Ladybird process keeps
running.
2023-04-27 07:26:05 +02:00
Andreas Kling
cc86c07f58 LibGfx: Transform the x axis rotation for elliptical arcs
Without this, copy_transformed() will create paths with bogus elliptical
arcs. This was very noticeable with transformed ellipses in SVG.
2023-04-27 07:24:53 +02:00
Andreas Kling
a77accf3f4 LibGfx: Add AffineTransform::rotation()
Extracts the rotation from a 2D matrix.
2023-04-27 07:24:53 +02:00
Fabian Dellwing
8c1dacecba nc: Add -n option to suppress name resolution 2023-04-26 12:33:25 -06:00
Fabian Dellwing
7cfa108fad nc: Add -p option
With this change we support the well-known and shorter way to
create a listener on all interfaces:

`nc -lvp 1337`

instead of:

`nc -lv 0.0.0.0 1337`
2023-04-26 12:33:25 -06:00
Fabian Dellwing
eff3f52bda nc: Fix off-by-one-error in calls to inet_ntop 2023-04-26 12:33:25 -06:00
Fabian Dellwing
552e317a89 nc: Sort command line arguments alphabetically 2023-04-26 12:33:25 -06:00
Andreas Kling
f61947fa9e LibCore: Remove unused EventLoopManager::wake()
Only EventLoopImplementation needs to know how to wake up.
2023-04-26 19:17:04 +01:00
Andreas Kling
12c73915dc Tests: Re-enable TestLibCoreFileWatcher on macOS
Now that cross-thread event posting is unbroken, this should work.
2023-04-26 19:17:04 +01:00