Andrew Kaster
c85043f2e1
CI: Bump CI Xcode version to 16.2
2025-04-03 16:47:48 -06:00
Timothy Flynn
d403f02988
AK: Remove unused capacity field from StringData
...
This was added to be used with `kfree_sized` when we construct a String
from a StringBuilder. As of 53cac71cec
, it
is unused, causing some compilers to raise a warning.
This reduces the size of StringData from 24 to 16 bytes.
2025-04-03 23:44:40 +02:00
Aliaksandr Kalenik
12a2aebeb6
LibWeb: Move painting surface allocation into rendering thread
...
Skia has a check in debug mode to verify that surface is only used
within one thread. Before this change we were violating this by
allocating surfaces on the main thread while using and destructing them
on the rendering thread.
2025-04-03 22:01:43 +02:00
Andreas Kling
3169747989
LibJS: Emit PutById instead of PutByValue when key is string literal
...
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Build Dev Container Image / build (push) Has been cancelled
Basically convert o["foo"]=x into o.foo=x when emitting bytecode.
These are effectively the same thing, and the latter format opts
into using an inline cache for the property lookups.
2025-04-03 18:47:38 +02:00
Andreas Kling
4426c50a18
LibJS: Emit GetById instead of GetByValue when key is string literal
...
Basically convert o["foo"] into o.foo when emitting bytecode. These are
effectively the same thing, and the latter format opts into using an
inline cache for the property lookups.
2025-04-03 18:47:38 +02:00
Andreas Kling
976ccb9224
LibJS: Add fast path for Int32 values in ToBoolean
...
It's not uncommon to branch on the boolean value of integers,
so let's do that on the ToBoolean fast path.
2025-04-03 18:47:38 +02:00
Andreas Kling
8de03e8cfd
LibJS: Add fast paths in ToNumeric for booleans, null and undefined
...
These are still in the out-of-line "slow path" for ToNumeric, but
skipping all the coercion machinery can save us a lot of time.
2025-04-03 18:47:38 +02:00
Andrew Kaster
3fcef0c519
Revert "CI: Temporarily install CMake 3.x"
...
This reverts commit c5c3859205
.
2025-04-03 08:03:48 -06:00
Andrew Kaster
20352cc05b
Meta: Update vcpkg to latest main revision
...
This should resolve CMake 4.0 issues on macOS using the fix upstream
vcpkg came up with.
2025-04-03 08:03:48 -06:00
Andrew Kaster
91c1aed57f
Revert "Meta: Add workaround for CMake 4.0 policy minimum changes"
...
This reverts commit 04d44c9b26
.
2025-04-03 08:03:48 -06:00
Andreas Kling
cba80580e2
Revert "LibJS: Avoid calling generic Instruction::length() during dispatch"
...
This reverts commit 8f2ee01e6f
.
Speculative revert, as this appears to severely regress performance on
our JS benchmark runner.
2025-04-03 15:09:49 +02:00
Andreas Kling
ec590ef3e6
LibJS: Add builtin for Math.random()
2025-04-03 13:56:39 +02:00
Andreas Kling
714e8aec8a
LibJS: Add builtin for Math.imul()
2025-04-03 13:56:39 +02:00
Andreas Kling
ab5d5d8b50
LibGC: Avoid excessive bitfield use in GC::Cell
...
We didn't actually save any space by making the Cell flags bitfields.
In fact, it just forced us to do bit twiddling when accessing them.
2025-04-03 13:56:39 +02:00
Andreas Kling
8f2ee01e6f
LibJS: Avoid calling generic Instruction::length() during dispatch
...
Since we know the exact type, we can avoid calling the generic lookup
function that branches on instruction type.
2025-04-03 13:56:39 +02:00
Aliaksandr Kalenik
4b04e97feb
LibWeb: Send IPC messages exceeding socket buffer through shared memory
...
It turned out that some web applications want to send fairly large
messages to WebWorker through IPC (for example, MapLibre GL sends
~1200KiB), which led to failures (at least on macOS) because buffer size
of TransportSocket is limited to 128KiB. This change solves the problem
by wrapping messages that exceed socket buffer size into another message
that holds wrapped message content in shared memory.
Co-Authored-By: Luke Wilde <luke@ladybird.org>
2025-04-03 13:55:41 +02:00
Aliaksandr Kalenik
bc0ec84100
LibWeb: Don't queue rendering task for empty display lists
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
2025-04-02 23:22:38 +02:00
Aliaksandr Kalenik
cf143cf118
LibWeb: Don't call flush() when no surface is passed in execute_impl()
...
`DisplayListPlayer::execute_impl()` can receive null surface if it was
invoked to rasterize nested display lists (we use them for iframes). In
this case we should not call `flush()` by the end of execution and wait
until outer display list execution will do that.
2025-04-02 23:22:38 +02:00
Timothy Flynn
920170f60a
LibWebView+UI: Remove native do-not-track setting
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Build Dev Container Image / build (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
2025-04-02 14:16:18 -04:00
Timothy Flynn
1be3e7fd8a
LibWebView: Add do-not-track setting to about:settings
2025-04-02 14:16:18 -04:00
Timothy Flynn
49dae536a7
Base: Replace bespoke input switch with native element
...
Turns out we support <input type=checkbox switch>, so let's use it!
2025-04-02 14:16:18 -04:00
Andrew Kaster
04d44c9b26
Meta: Add workaround for CMake 4.0 policy minimum changes
...
In CMake 4.0, having a minimum policy version set to less than 3.5 is
a hard error at configure time. Add an override until the issue can be
resolved in vcpkg itself.
2025-04-02 10:50:18 -06:00
Andrew Kaster
8e0786641f
Meta: Explicitly enable zstd feature for tiff in vcpkg
...
Without this, the library was pulling system libzstd implicitly.
2025-04-02 10:50:18 -06:00
Andrew Kaster
6c0f97dcf2
Meta: Omit vcpkg overlay ports from style and EOF lints
2025-04-02 10:50:18 -06:00
Andrew Kaster
8455d23a4b
Revert "Meta: Add fontconfig and freetype vcpkg overlays"
...
This reverts commit 20890d7b70
.
The maintenance and downtime for the freedesktop GitLab is resolved.
2025-04-02 10:50:18 -06:00
Andrew Kaster
1fec9d6917
Meta: Update vcpkg to latest master
...
This includes some fixes for cmake 4.0, but not all.
2025-04-02 10:50:18 -06:00
Sam Atkins
3af25b9d2f
LibWeb/SVG: Mark SVG factory functions as [NewObject]
...
Corresponds to 9991813a66
2025-04-02 17:28:45 +01:00
Sam Atkins
b74ec1ab7e
LibWeb/SVG: Remove fixme about SVGSVGElement::getElementById()
...
Resolved in e02e2c6465
2025-04-02 17:28:45 +01:00
Sam Atkins
07adbddbcd
LibWeb/SVG: Remove SVGAElement.text attribute
...
Corresponds to 7210af6604
2025-04-02 17:28:45 +01:00
Sam Atkins
02e8c0e1d1
LibWeb/HTML: Allow throwing SecurityError for push/replaceState() abuse
...
Corresponds to 73e51b414b
2025-04-02 17:28:06 +01:00
Sam Atkins
7367150536
LibWeb/HTML: Update FIXME to not reset form-associated custom elements
...
Corresponds to e6bdd0557a
2025-04-02 17:28:06 +01:00
R-Goc
5226a566e9
AK: Modify IntrusiveRedBlackTree for Windows
...
IntrusiveRedBlackTree relies on a member pointer for accessing the value
of a node. On windows member pointers can be of variable length,
depending on the inheritance structure of the class. This commit casts
the 4 byte member pointer, or rather offset to a full pointer type, so
that the bit_cast to u8* works, as previously the source was smaller
than the destination, which fails inside __builtin_bit_cast().
2025-04-02 10:22:08 -06:00
Timothy Flynn
e879fd29b3
Base: Use correct color code for Slate Blue 100
2025-04-02 11:41:01 -04:00
Sam Atkins
405785f584
Tests: Disable 3 tests that are flaky on CI
2025-04-02 16:08:53 +01:00
Sam Atkins
86b57a5205
LibWeb/CSS: Use font_format_is_supported() when parsing font sources
2025-04-02 15:53:50 +01:00
Sam Atkins
bd7a08da3b
Tests: Reimport font-stretch tests as font-width
...
Corresponds to 7c0c4806bb
2025-04-02 14:55:27 +01:00
Tim Ledbetter
cbb169820a
LibWeb/CSS: Implement the CSSImportRule.media
attribute
2025-04-02 13:53:03 +01:00
Tim Ledbetter
b93d2b7be2
IDLGenerators: Don't attempt to set null [PutForwards]
attribute
...
Previously, attempting to set a `[PutForwards]` annotated attribute,
would crash if the associated getter returned null.
2025-04-02 13:53:03 +01:00
Tim Ledbetter
ac19b0cda8
LibWeb/CSS: Support media queries in import at-rules
2025-04-02 13:53:03 +01:00
Timothy Flynn
c1fe912bf9
UI/AppKit: Implement an autocomplete view for the location bar
2025-04-02 08:52:45 -04:00
Timothy Flynn
60dd5cc4ef
UI/Qt: Migrate to LibWebView's autocomplete engine
...
As a result, we now no longer depend on Qt::Network.
2025-04-02 08:52:45 -04:00
Timothy Flynn
a87c264088
UI/Qt: Add a couple of missing includes
...
These are currently being transitively included. This will no longer be
the case in a future patch.
2025-04-02 08:52:45 -04:00
Timothy Flynn
5d2e6ffe30
LibWebView: Add autocomplete settings to about:settings
...
This implements an autocomplete engine inside LibWebView, to replace the
engine currently used by Qt. Whereas Qt uses the Qt Network framework to
perform autocomplete requests, LibWebView uses RequestServer. This moves
downloading this untrusted data out of the browser process.
This patch only implements the persisted settings and their UI. It does
not integrate this engine into the browser UI.
2025-04-02 08:52:45 -04:00
Timothy Flynn
92e1d297be
LibRequests: Protect Request callbacks against stopped requests
...
When the request is stopped, we clear its internal stream data. There is
a window where RequestServer may have sent an IPC message whose callback
will try to access that data in the time between the data being cleared
and RS receiving the stop signal. When this happens, just bail from IPC.
2025-04-02 08:52:45 -04:00
Timothy Flynn
0de017df9b
LibRequests: Move NetworkError stringification to LibRequests
...
Let's also rename the file to NetworkError.h while we're here. No need
to have "Enum" in the name.
2025-04-02 08:52:45 -04:00
Shannon Booth
a5df972055
LibWeb: Do not store network errors as a StringView
...
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This is very clearly a very dangerous API to have, and was causing
a crash on Linux as a result of a stack use-after-free when visiting
https://www.index.hr/ .
Fixes #3901
2025-04-02 11:43:53 +02:00
Kenneth Myhra
82a2ae99c8
Everywhere: Remove DeprecatedFlyString + any remaining references to it
...
This reverts commit 7c32d1e8a5
.
2025-04-02 11:43:13 +02:00
Ali Mohammad Pur
4136d8d13e
LibRegex: Use an interned string table for capture group names
...
This avoids messing around with unsafe string pointers and removes the
only non-FlyString-able user of DeprecatedFlyString.
2025-04-02 11:43:13 +02:00
Andreas Kling
6bb0d585e3
LibJS: Elide function wrapper for class field literal initializers
...
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
If a class field initializer is just a simple literal, we can skip
creating (and calling) a wrapper function for it entirely.
1.44x speedup on JetStream3/raytrace-private-class-fields.js
1.53x speedup on JetStream3/raytrace-public-class-fields.js
2025-04-01 23:55:20 +02:00
Aliaksandr Kalenik
fd147e6be0
LibWeb: Protect SkiaBackendContext with a mutex
...
The Skia Ganesh backend we currently use doesn't support painting from
multiple threads, which could happen before this change when the main
thread used Skia to paint on the HTML canvas while the rendering thread
was working on display list rasterization.
Fixes https://github.com/LadybirdBrowser/ladybird/issues/4172
2025-04-01 23:39:05 +02:00