Commit graph

60892 commits

Author SHA1 Message Date
Timothy Flynn 4b51a36044 Browser: Add support for a singleton chrome process
This partially supports the WebView::ChromeProcess mechanics. New
windows aren't totally supported and will just open a new tab for now.

When launched via the Browser's AppFile (either through quick launch or
the desktop shortcut), a new window will be requested.
2024-04-30 17:43:14 -06:00
Timothy Flynn 3990e630f2 FileManager: Launch applications with their AppFile-specified arguments
We should really use Core::Process here, but it does not yet support all
posix_spawn features we are currently using.
2024-04-30 17:43:14 -06:00
Timothy Flynn 7dd961c39f LibDesktop+LaunchServer: Propagate AppFile arguments over IPC
This will allow clients (namely FileManager) to use the arguments
specified in the AppFile.
2024-04-30 17:43:14 -06:00
Timothy Flynn b5e5354515 LibDesktop: Add an "Arguments" field to AppFile
This allows specifying arguments to be passed to the AppFile executable.
The Arguments string is delimted by ASCII spaces.
2024-04-30 17:43:14 -06:00
Timothy Flynn ca4891f5b3 Taskbar: Use the AppFile's spawn method to launch applications
A future patch will add argument support to the AppFile. This patch
means one less place that needs to be updated to support that.
2024-04-30 17:43:14 -06:00
Timothy Flynn dccd1cd348 LibDesktop+TaskBar: Propagate errors from AppFile::spawn and friends
Returning a boolean tells us nothing about why the spawn failed.
2024-04-30 17:43:14 -06:00
Andrew Kaster 416eb74fa5 Tests: Skip flaky unicode-range LibWeb Ref test
This seems related to CSS resources and the load event.
2024-04-30 07:18:40 -06:00
Andrew Kaster 37a0466285 CMake: Resolve FIXMEs related to CMake < 3.20
We already have required this version for quite a while for Lagom,
Ladybird and Serenity. Now that we require it in all of our CMakeLists,
let's scrub for better ways of writing things.
2024-04-30 07:14:17 -06:00
Andrew Kaster 65bfd2ca2d CMake: Bump Superbuild CMake requirement to 3.20
This more closely matches the serenity requirement (3.25), the Lagom
requirement (3.21) and the Ladybird requirement (3.23)
2024-04-30 07:14:17 -06:00
Andrew Kaster effd368b5b CMake: Remove redundant configuration options from Ladybird CMakeLists
These options are already specified in common_compile_options.cmake and
lagom_install_options.cmake
2024-04-30 07:14:17 -06:00
Sönke Holz b363abb082 Kernel/aarch64: Explicitly allow float instrs in {load,store}_fpu_state
LLVM 18 otherwise throws errors, as we use '-mgeneral-regs-only' in the
kernel.
The functions had to be moved into a .S, as there is no
'-mno-general-regs-only' and also no nice way to remove
'-mgeneral-regs-only' for a single .cpp file.
2024-04-30 06:32:58 -06:00
Liav A. 476b3703fd Utilities/mount: Resolve regression on mounting non-storage-backed FSes
Without this patch, we fail on manually mounting RAMFS (which I tested
for) but any filesystem that is not backed by actual storage will fail.
This bug was introduced in 0739b5df11 and
now is resolved by checking if the source fd is negative, to avoid fail
of the fstat call on it.
2024-04-30 06:03:10 -06:00
Timothy Flynn 1a1191cc6e Ladybird/AppKit: Add support for a singleton chrome process 2024-04-30 06:02:15 -06:00
Timothy Flynn bfb356fd6c Ladybird/AppKit: Track the currently active tab
Will be needed to open new tabs from other Ladybird processes from the
active tab.
2024-04-30 06:02:15 -06:00
Timothy Flynn 7ad7ec3c0c Ladybird/AppKit: Bring newly active windows/tabs to the front
This actually actives the underlying tab if needed. This wasn't an issue
previously, as new tabs were always created in already active windows.
But when new windows/tabs are requested from new Ladybird processes, we
need to actually activate those tabs.
2024-04-30 06:02:15 -06:00
Timothy Flynn 606df46e46 Ladybird/AppKit: Retrieve socket notifiers from the local thread data
For some reason, we occasionally receive a junk `info` pointer from the
CFSocketCallback we create for socket notifiers. Instead of capturing a
pointer to the local Core::Notifier for this `info` member, grab it from
the thread data instance based on the socket FD.

This was mostly seen when spamming new window requests to an existing
Ladybird process.
2024-04-30 06:02:15 -06:00
Timothy Flynn 478ceb71ec Ladybird/AppKit: Ensure LibCore events are processed
When we receive a LibCore event, we post an "application defined" Cocoa
event to the NSApp. However, we are currently only processing these from
`pump`, which is only invoked manually.

Instead, we should listen for the event that we've posted and process
the event queue at that time. This is much closer to how Qt's event loop
behaves as well with EventLoopImplementationQtEventTarget.
2024-04-30 06:02:15 -06:00
Timothy Flynn 1b859bac64 Meta: Port recent changes to the GN build
cd07249482
acd5369774
7d05fe84bc
2024-04-30 06:02:15 -06:00
Idan Horowitz c96730c984 Meta: Enable networking by default on RISC-V 2024-04-30 06:01:26 -06:00
Idan Horowitz dfa2c98497 Kernel: Support the RISC-V PLIC
By supporting the RISC-V PLIC (Platform-Level Interrupt Controller)
we can now handle device (external) interrupts.
2024-04-30 06:01:26 -06:00
Idan Horowitz 0a2d520b15 Kernel: Handle CLINT interrupts separately from normal interrupts
Since CLINT interrupts are wired directly into the hart, instead of
going through an interrupt controller (the PLIC), trying to handle them
through the normal numbered-interrupt mechanism will just complicate it
for no reason.
Instead we now handle them directly in the trap handler.
2024-04-30 06:01:26 -06:00
Idan Horowitz 002bba4a97 Kernel: Configure PCI interrupt routing based on the FDT 2024-04-30 06:01:26 -06:00
Idan Horowitz 7102d90b2b Kernel: Verify we are running on hart 0
This is already an implicit assumption when we initialize our CPU id.
2024-04-30 06:01:26 -06:00
Idan Horowitz d3e285c253 Kernel: Deduplicate HardwareTimerBase::frequency()/ticks_per_second() 2024-04-30 06:01:26 -06:00
Andrew Kaster b89030f947 Meta: Add section about Ladybird to top-level README 2024-04-30 05:59:36 -06:00
Tim Ledbetter 1b1f27bdfb sort: Avoid unnecessary copies when hashing Line objects 2024-04-30 13:22:56 +02:00
Tim Ledbetter 5764356cae sort: Allow sorting of arbitrarily long lines 2024-04-30 13:22:56 +02:00
Tim Ledbetter 8b01abf9f7 AK: Don't move trivially copyable types in BufferedStream methods 2024-04-30 13:22:56 +02:00
Timothy Flynn 2d4d16ac37 LibWeb: Remove exceptional return types from infallible stream IDL 2024-04-30 08:14:12 +02:00
Timothy Flynn 572a7bb313 LibWeb: Remove exceptional return types from infallible stream AOs 2024-04-30 08:14:12 +02:00
Timothy Flynn c29916775e LibWeb: Mark stream AOs as infallible as required by the spec
There were several instances where the spec marks an AO invocation as
infallible, but we were propagating WebIDL::ExceptionOr. These mostly
cannot throw due to knowledge about the values they are provided. By
unwinding these, we can remove a decent amount of exception handling.
2024-04-30 08:14:12 +02:00
Timothy Flynn 3aa6ef8ac0 LibWeb: Use LibJS's is-infinity helper in the enqueue-value-with-size AO 2024-04-30 08:14:12 +02:00
Timothy Flynn 9d5e538247 LibWeb: Mark writable stream abort steps as infallible
These don't throw. We can remove a decent amount of exception handling
by marking them infallible.
2024-04-30 08:14:12 +02:00
Timothy Flynn fc070c8cbd LibWeb: Mark readable stream cancel/pull/release steps as infallible
These don't throw. We can remove a decent amount of exception handling
by marking them infallible.
2024-04-30 08:14:12 +02:00
Timothy Flynn 13021a0fb9 LibWeb: Remove small OOM error propagation from stream AOs 2024-04-30 08:14:12 +02:00
Timothy Flynn bbe6b84bd6 LibWeb: Mark most stream callbacks as infallible
There are a number of script-provided stream callbacks for various
stream operations, such as `start`, `pull`, `cancel`, etc. Out of all of
these, only the `start` callback can actually throw. And when it does,
the exception is realized immediately in the corresponding stream
constructor.

All other callbacks have spec text of the form:

    Throwing an exception is treated the same as returning a rejected
    promise.

And indeed this is internally handled by the streams spec. Thus all of
those callbacks can be specified as returning only a promise, rather
than a WebIDL::ExceptionOr<Promise>.
2024-04-30 08:14:12 +02:00
Timothy Flynn ffb48ccd81 LibWeb: Ensure TransformStream's transform/flush callbacks do not throw
Unlike what the comments here currently indicate, these callbacks do
only return a Promise, and thus cannot throw.
2024-04-30 08:14:12 +02:00
Timothy Flynn 60ea803b2a LibWeb: Fix typo in mass copy-pasted comment in stream AOs 2024-04-30 08:14:12 +02:00
Timothy Flynn 9e8ff45962 LibWeb: Fix invalid spec link on the TransformStream constructor 2024-04-30 08:14:12 +02:00
Liav A. 37d62c16f8 Utilities: Initialize raw variables to default values in some utilities 2024-04-30 01:30:38 +02:00
Aliaksandr Kalenik 9275743626 LibWeb: Verify in runtime that stacking context is not painted twice
Duplicated stacking context painting is easy to introduce because of
a bit complicated traversal order and very painful to debug.
2024-04-29 20:32:14 +02:00
Aliaksandr Kalenik 9bc0552a80 LibWeb: Fix paint recording to stop visiting stacking context twice
...if its box is positioned and has z-index=0.
2024-04-29 17:26:13 +02:00
Andreas Kling 1db1ef9ea9 LibGfx: Make non-shared Bitmap used malloc() instead of mmap()
This drastically reduces the cost (in time AND space) of allocating
a Gfx::Bitmap.

Anything that needs to be shared is already using Core::AnonymousBuffer
anyway, so this shouldn't break anything important.

Do note that this makes it an error to create an empty (0x0) Bitmap,
which was previously allowed for some reason. Some small tweaks are
included to bail gracefully in such scenarios.
2024-04-29 09:49:28 +02:00
Andreas Kling db335f5f40 LibGfx+LibGUI: Move Bitmap volatility stuff to GUI::WindowBackingStore
This is only used by LibGUI to manage the volatility of window backing
stores, so let's move it out of Gfx::Bitmap.
2024-04-29 09:49:28 +02:00
Andreas Kling 0967bdad02 LibGfx: Remove the unused Bitmap::set_mmap_name() 2024-04-29 09:49:28 +02:00
Jamie Mansfield 17fc995ee4 Ladybird: Add a context menu to the tab bar
This shows the following actions:

* Reload Tab
* Duplicate Tab
* Move Tab
  * Move to Start
  * Move to End
* Close Tab
* Close Other Tabs
  * Close Tabs to Left
  * Close Tabs to Right
  * Close Other Tabs
2024-04-29 08:11:21 +02:00
Jamie Mansfield 56ed3d5e21 Ladybird: Increase minimum tab width to 128
This is double what the previous minimum is, and is more helpful when
lots of tabs are open.
2024-04-29 08:11:21 +02:00
Tim Ledbetter b9f0ea2178 LibWeb: Evaluate media rules for adopted style sheets
Previously, media rules were not evaluated for adopted style sheets.
2024-04-29 08:10:38 +02:00
Tim Ledbetter f4e0c5395a LibWeb: Don't apply disabled adopted style sheets to the document
Previously, we would apply any adopted style sheet to the document if
its alternate flag was not set. This meant that all adopted style
sheets would be applied, since constructed style sheets never have this
flag set.
2024-04-29 08:10:38 +02:00
Tim Ledbetter 84193f2746 LibWeb: Align StyleSheet title getter with the specification
The CSSOM specification says that StyleSheet.title should return null
if the title field is empty.
2024-04-29 08:10:38 +02:00