Commit graph

49662 commits

Author SHA1 Message Date
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
Andreas Kling b61a87c03c LibCore: Move post_event() back to EventLoopImplementation
This shouldn't have been moved to EventLoopManager, as the manager is
global and one-per-process, and the implementation is one-per-loop.

This makes cross-thread event posting work again, and unbreaks
SoundPlayer (and probably other things as well.)
2023-04-26 19:17:04 +01:00
Andreas Kling 7035a19645 LibAudio: Wait for enqueuer thread to start before poking its event loop 2023-04-26 19:17:04 +01:00
Fabian Dellwing 6990d4e025 Ports: Cleanup the build process a bit for taskwarrior 2023-04-26 16:54:31 +02:00
Aliaksandr Kalenik 3c89286467 LibWeb: Implement creation of fresh top-level traversables
Co-authored-by: Andreas Kling <kling@serenityos.org>
2023-04-26 15:51:50 +02:00
Aliaksandr Kalenik 9a19bdbfcf LibWeb: Implement Navigable::initialize_navigable() 2023-04-26 15:51:50 +02:00
Aliaksandr Kalenik 74ab8ec4f0 LibWeb: Add step property in SessionHistoryEntry 2023-04-26 15:51:50 +02:00
Timothy Flynn 61c0174fec Browser+Ladybird: Render text in the JS console with a monospace font 2023-04-26 15:43:57 +02:00
Timothy Flynn d44df16704 Ladybird: Explicitly set the font family for CSS generic fonts
We currently query Qt for system fonts using QFont::setStyleHint(). The
docs from Qt have the following note regarding this API on X11:

    Qt does not support style hints on X11 since this information is not
    provided by the window system.

This prevents any monospace font from working on X11 systems. For now,
work around this by specifying the font-family for fonts which Qt has
listed as mapping to a CSS generic font-family.
2023-04-26 15:43:57 +02:00
LekKit 9fe6dcb50b Ports: Use makeopts in RVVM port 2023-04-26 12:48:56 +02:00
LekKit 1a3009fa2b Ports: Fix RVVM port syntax 2023-04-26 12:48:56 +02:00
LekKit 12730cefce Ports: Add RVVM port 2023-04-26 12:48:56 +02:00
iyush ac435f914c LibCpp: Support for parsing c-style fixed arrays (arr[2])
Also adds tests for finding declaration of arrays inside
CppComprehension which requires proper parsing for passing.

Side-effect of this patch: if we ctrl+click on array variables, it
should jump to the correct declaration inside HackStudio.
2023-04-26 09:40:25 +01:00
Jelle Raaijmakers 34b04271f4 Ports/SDL2: Handle window close requests correctly
We were going about this the wrong way:

* We should not send `SDL_QUIT` events; SDL2 is doing this for us
  already when the last window is closed, for example.
* The `SDL_WINDOWEVENT_CLOSE` event does not represent a closed window,
  but rather a _request_ from the window manager to close a window.

This resolves the issue with the PrBoom+ port where the quit screen
would not be shown when trying to close the main window.
2023-04-26 09:37:16 +01:00
Jelle Raaijmakers e283dfdeb6 Ports/scummvm: Enable release mode
This brings the binary's size down to 100 MiB, from about 600 MiB. The
`--enable-optimizations` flag is implied with `--enable-release`.
2023-04-26 09:37:16 +01:00