Commit graph

64582 commits

Author SHA1 Message Date
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
Andreas Kling
cf0516b616 LibWeb: Make MimeSniff::MimeType::parse() infallible
It already returns an empty Optional for failures, so there's no need to
wrap it in an ErrorOr as well.

(cherry picked from commit 5c20bc2afc23b04ccd8037d414592e4ee841a053;
amended to fix conflict in StyleComputer.cpp due to serenity not having
the third commit of LadybirdBrowser/ladybird#1278)
2024-11-28 22:42:14 -05:00
Andreas Kling
d8c9ff6c09 LibWeb: Make more MimeSniff::MimeType APIs infallible
(cherry picked from commit 88e7688940ceae92263b410dfb1722311ae27aee)
2024-11-28 22:42:14 -05:00
Andreas Kling
d4abeba027 LibWeb: Make MimeSniff::MimeType::create() infallible
(cherry picked from commit 9a8db40a239e3641bba138d6ec6c564c0cc0e2c5)
2024-11-28 22:42:14 -05:00
Nico Weber
1948dbaaf1 Meta: Add UIEvents/InputTypes.cpp to the GN build 2024-11-28 21:31:42 -05:00
Timothy Flynn
1c4996ff34 LibWeb: Move some classes from the DOM namespace to the HTML namespace
The following classes are in the HTML spec and thus belong in the HTML
namespace:

* BeforeUnloadEvent
* HTMLFormControlsCollection
* RadioNodeList

(cherry picked from commit 13b7355ec10c21be90df997c66022e246c57656d)
2024-11-28 21:31:42 -05:00
Aliaksandr Kalenik
e0cc97d2a9 LibWeb: Stub InputEvent.getTargetRanges()
We need this, because https://www.slatejs.org/ that is used by Discord
checks this function to decide whether a browser has "beforeinput" event
support.

(cherry picked from commit 3e8b2454fbcb80891b902ef725dd9549f8880233)
2024-11-28 21:31:42 -05:00
Aliaksandr Kalenik
647bfd63a5 LibWeb: Implement dispatching of "beforeinput" event
(cherry picked from commit 63f502ab0acb8da9fd0db16924df938758110447)
2024-11-28 21:31:42 -05:00
Aliaksandr Kalenik
f613fb9921 LibWeb: Implement dispatching of "input" event
(cherry picked from commit 0de61b0f65ee472d3cf4853b108eb1f9501e6275)
2024-11-28 21:31:42 -05:00
Aliaksandr Kalenik
a1d17acb7c LibWeb: Put cursor in last text node when contenteditable is focused
With this change we match behavior of other engines a bit more closer.

(cherry picked from commit d88e6bee5d14d05cd34bfd13926c6399326ac042)
2024-11-28 21:31:42 -05:00
Andreas Kling
3fe7d96fa7 LibWeb: Support Document.onvisibilitychange
We don't have a way to trigger this from a test, but the fix is so
simple that we might as well get it in. :^)

(cherry picked from commit 274411db9756a9dffe44e21b4da09c7808e9f465)
2024-11-28 21:31:42 -05:00