Commit graph

64342 commits

Author SHA1 Message Date
Sönke Holz
64ec4fab48 Kernel/aarch64: Rename RPi::UART to PL011 and move it out of the RPi dir
This PL011 driver doesn't have any RPi-specific code anymore.
Also change the documentation references to refer to the generic PL011
manual instead and adapt some register definitions.

Some definitions were previously named unused/unsupported. They were
mostly related to some hardware flow control lines and IrDA which the Pi
UARTs don't support.
2024-12-07 16:56:12 +01:00
Sönke Holz
9a58408fe7 Kernel/aarch64: Don't use RPi::MMIO for RPi::UART
Instead calculate the address in the platform init function.
2024-12-07 16:56:12 +01:00
Sönke Holz
e67330971c Kernel/aarch64: Use a platform init function for most of the RPi code
This required making the `debug_output` console configurable at runtime
by introducing a `DebugConsole` struct, which simply contains a callback
for printing a single character.
We should probably use something like this abstraction for all
architectures in the future.
2024-12-07 16:56:12 +01:00
Sönke Holz
d6d5379445 Kernel: Introduce a new abstraction for platform-specific init code
This new abstraction provides a simple solution for handling early
driver initialization without requiring some kind of dependency
management for devicetree drivers, which would otherwise be necessary.
2024-12-07 16:56:12 +01:00
Sönke Holz
240db03a27 AK: Make to_array work with zero-sized arrays
The other overload doesn't work for zero-sized arrays.

Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2024-12-07 16:56:12 +01:00
Ninad Sachania
46522b2efa Utilities/sed: Add tests for the transform command & comments 2024-12-05 10:08:43 -05:00
Ninad Sachania
ef6f3db1ca Utilities/sed: Add support for comments 2024-12-05 10:08:43 -05:00
Ninad Sachania
aa740e0db8 Utilities/sed: Implement the r file command 2024-12-05 10:08:43 -05:00
Ninad Sachania
039a515696 Utilities/sed: Implement the transform command 2024-12-05 10:08:43 -05:00
Ninad Sachania
40c629c419 Utilities/sed: Make blanks between [r|w] and file optional 2024-12-05 10:08:43 -05:00
Ninad Sachania
1924e94839 Utilities/sed: Add support for w file flag in the substitute command 2024-12-05 10:08:43 -05:00
Ninad Sachania
56f1661318 Utilities/sed: Dynamically calculate folding width based on term size 2024-12-05 10:08:43 -05:00
Ninad Sachania
8dfe2064f7 Utilities/sed: Wire up the the w file command 2024-12-05 10:08:43 -05:00
Ninad Sachania
754cbdbab0 Utilities/sed: Only quit after writing the output 2024-12-05 10:08:43 -05:00
Timothy Flynn
4a52145f8e LibWebView: Implement drag-and-drop for OutOfProcessWebView
Almost the entirety of drag-and-drop operations are handled within
LibWeb. This patch just hooks up the UI-side operations to trigger
the events.

A FIXME is left here to open files in the browser that were not accepted
by the web page.
2024-12-04 08:00:21 -05:00
Timothy Flynn
c3b1d533f6 LibWebView: Add explicit conversions between GUI and Web button codes
They happen to currently have the same values, but let's be explicit.
2024-12-04 08:00:21 -05:00
Timothy Flynn
81e469c911 LibGUI+WindowServer+Applications: Carry more data across drag events
To support drag-and-drop for LibWeb, the drag events need the full mime
data from WindowServer, not just the list of stringified mime types. We
only provided the full data in the drop events. This patch provides the
Core::MimeData type, as well as other mouse-event information needed for
LibWeb (what buttons / modifiers are pressed).

To do this, we add a specific WindowServer IPC to inform the Application
of the event. We previously tagged mouse-move events with some drag data
and formed the drag event client-side. That extra data is removed in
favor of this new IPC.
2024-12-04 08:00:21 -05:00
Sönke Holz
b499279162 LibELF+Kernel: Don't define SERENITY_PAGE_SIZE in ELFABI.h
ELFABI.h gets included during the toolchain build, so we shouldn't
include AK headers from that file.
SERENITY_PAGE_SIZE also isn't really related to ELF ABI, so move it to
the serenity_limits.h header.
2024-12-03 20:57:24 +01:00
implicitfield
5974f087ee LibELF: Introduce a SERENITY_PAGE_SIZE define for cross-compilation
Currently, LibELF uses the host's page size for validation (even on
Lagom), which causes issues with PrekernelPEImageGenerator, since that
always uses 4 KiB pages for cross-compilation purposes.
2024-12-02 10:24:36 -05:00
implicitfield
a3fc110ea8 Meta: Use the same disk size for genext2fs as for everything else
INODE_COUNT gets modified after it has been initially used to compute
DISK_SIZE_BYTES, so the approach introduced in caefb208 didn't actually
work as intended.
2024-12-02 10:24:36 -05:00
Sönke Holz
c385e8beb1 EFIPrekernel: Don't depend on install_libc_headers
This target was removed in 175f9dc5c3, but the dependency on it wasn't
removed from faeb9ff521 before PR #24995 was merged.
This should make everything build again.
2024-12-01 13:53:02 +01:00
Sönke Holz
faeb9ff521 EFIPrekernel: Add basic skeleton 2024-12-01 13:20:45 +01:00
Sönke Holz
9e306b858a Kernel: Add Kernel_shared_object as a BYPRODUCT of the POST_BUILD step 2024-12-01 13:20:45 +01:00
Sönke Holz
e02bebfcd4 Kernel: Generate Kernel_shared_object on all architectures
This file will be linked to the EFIPrekernel.
2024-12-01 13:20:45 +01:00
Sönke Holz
ccf7533b45 EFIPrekernel: Make dbgln usable
This simply makes dbgln use the EFI Simple Text Output Protocol.
2024-12-01 13:20:45 +01:00
Sönke Holz
ef79054505 EFIPrekernel: Add basic kmalloc implementation 2024-12-01 13:20:45 +01:00
Sönke Holz
9d6cd9b992 EFIPrekernel: Add linker script 2024-12-01 13:20:45 +01:00
Sönke Holz
f5540e1f81 Prekernel: Make the UBSan print_location stub halt on all architectures 2024-12-01 13:20:45 +01:00
Sönke Holz
220e6d8f3d Meta: Don't use the gtk,gl=on display backend with NVIDIA graphics
This is quite a crude check and may lead to false positives. But it's
better than having a black screen on systems with NVIDIA graphics.
2024-11-30 17:37:28 -05:00
Ninad Sachania
5175a014f0 Utilities/shot: Display rulers when selecting a region 2024-11-30 21:50:03 +01:00
Jelle Raaijmakers
ccda8d1e28 LibWeb: Implement indexed property support for HTML::Storage
We only supported named properties on Storage, and as a result
`localStorage[0]` would be disconnected from the Storage's backing map.

Fixes at least 20 subtests in WPT in /webstorage.

(cherry picked from commit 4c189166f4f721211ff9b693f306f65033d70ac1)
2024-11-29 23:02:23 -05:00
Timothy Flynn
091e832b48 LibIPC: Pass AK::Duration by value over IPC
AK::Duration is simply an integer, and does not need to be passed by
reference.

(cherry picked from commit 6ce473af72ba666a8bae80a7f7691d233bdd2a43)
2024-11-29 20:25:45 -05:00
stasoid
eb60c2eea1 LibWeb/Layout: Account for box-sizing in table width/height calculations
Fixes #1726

Fixes
wpt/css/CSS2/abspos/abspos-containing-block-initial-004c.xht
wpt/css/CSS2/abspos/abspos-containing-block-initial-004d.xht
wpt/css/CSS2/abspos/abspos-containing-block-initial-005b.xht
wpt/css/CSS2/abspos/abspos-containing-block-initial-005d.xht

(cherry picked from commit a90b7026fb8939a773a6c5339364ea1a7d508fde)
2024-11-29 20:25:25 -05:00
Tim Ledbetter
0b198ecb54 LibWeb: Ignore negative values when setting HTMLProgressElement.max
When attempting to set `HTMLProgressElement.max` to a value not greater
than 0, we were previously setting the value to 1. We now retain the
previous value.

(cherry picked from commit 99f8972928dc855540d11639fd08779219f602c1)
2024-11-29 20:25:25 -05:00
Tim Ledbetter
b62904770f LibWeb: Limit HTMLTextAreaElement attributes to allowed values
If `HTMLTextAreaElement.rows` or `HTMLTextAreaElement.cols`
is set to a value larger than 2147483647, then it should be set to its
default value.

(cherry picked from commit 7fe3bf07e20b21c7db676a344453e1ee2ecce943)
2024-11-29 20:25:25 -05:00
Tim Ledbetter
02bcc9302f LibWeb: Limit HTMLMarqueeElement attributes to allowed values
If `HTMLMarqueeElemnt.scrollAmount` or `HTMLMarqueeElemnt.scrollDelay`
is set to a value larger than 2147483647, then it should be set to its
default value.

(cherry picked from commit a8719a706b077c6b32af302df7d201560fbe9dd1)
2024-11-29 20:25:25 -05:00
Tim Ledbetter
d094fc8351 IDLGenerators: Set reflected unsigned long value according to spec
Setting an unsigned long attribute with IDL to a value outside the
range 0 to 2147483647, the value should be set to the default value.

(cherry picked from commit e5c99b475aba6a2a4a957f2adc8398a1693aade6)
2024-11-29 20:25:25 -05:00
Hermes Junior
921d76d48a LibWeb: Make javascript mime matching spec compliant
When mime essence matching, the spec only asks for a string comparison
ignoring ascii case. The whitespace trimming and parsing of the mime
produces unexpected and wrong results.
Fixes tests on WPT html/semantics/scripting-1/the-script-element :^)

(cherry picked from commit cdd78be2d33d29a0a959ad7a2b2dc22fbaaa2c81)
2024-11-29 20:25:25 -05:00
Aliaksandr Kalenik
ff456de493 LibWeb: Fix "input" events being dispatched twice when cancelled
(cherry picked from commit 648fac7215e1841e3714d4c72c7aee75152da522)
2024-11-29 20:25:25 -05:00
Ninad Sachania
cb99ab912b Utilities/cut: Show error instead of crashing for invalid UTF-8 lines 2024-11-29 16:35:10 -05:00
Andreas Kling
073b3b992d AK: Make String::number() infallible
This API will always succeed in creating a String representing the
provided number in base-10.

(cherry picked from commit dd419b5a8df3b9a32478c4a8f0ea9f70334214cd;
amended to update the rest of the system. No conflicts though!)
2024-11-29 16:03:30 -05:00
Gingeh
fa5b2e8661 LibWeb: Compute mimetype when loading a document
computed type != supplied type

(cherry picked from commit 47992f7b39a69cbb927d281cdfd3e818af068bde)
2024-11-29 15:05:55 -05:00
implicitfield
d9eaaee6e0 CI: Check filesystem consistency after running tests 2024-11-29 10:59:24 -05:00
implicitfield
caefb208f0 Meta: Stop requesting 128-byte inodes when creating the root filesystem
We now have full support for large inodes, so we don't need to rely on
the deprecated 128-byte inodes anymore. Note that genext2fs doesn't
support large inodes, so we have to account for that when using that
utility.
2024-11-29 10:59:24 -05:00
implicitfield
0e368bb71a Kernel/Ext2FS: Add full support for large inodes
128-byte inodes are more-or-less deprecated since they store timestamps
as unsigned 32-bit integer offsets from the UNIX epoch. Large inodes, on
the other hand, contain records that may specify a different epoch, and
are thus less susceptible to overflows. These very same records also
have the capability to store timestamps with nanosecond precision, which
this commit adds full support for as well.
2024-11-29 10:59:24 -05:00
implicitfield
2a205768b6 Kernel/Ext2FS: Backport a missing large inode member 2024-11-29 10:59:24 -05:00
implicitfield
e7baffaba0 Ext2FS: Serialize timestamps as signed offsets
The header would have you believe these are unsigned, but they should
really be treated as signed.
2024-11-29 10:59:24 -05:00
Andreas Kling
a8e73f3d9f LibWeb: Remove unnecessary use of TRY_OR_THROW_OOM in XMLHttpRequest
(cherry picked from commit 279d229f71b52e1fd91100a74aa314c90db968da)
2024-11-28 22:42:14 -05:00
Andreas Kling
3b60d2af5b LibWeb: Make XMLHttpRequests functions related to MimeType infallible
(cherry picked from commit fa1c5a3e85e5d479b3ce4975b06b271a67df0be5)
2024-11-28 22:42:14 -05:00
Andreas Kling
e85f364f52 LibWeb: Make MimeSniff::Resource::sniff() infallible
Everyone was already using this API as if it were infallible anyway.

(cherry picked from commit 600cb5ccbaba019954f17c7d317ba6fe54a24117;
amended to fix another conflict in StyleComputer.cpp due to serenity
still not having the third commit of LadybirdBrowser/ladybird#1278)
2024-11-28 22:42:14 -05:00