Tim Ledbetter
4593c28769
LibWeb: Update validate_and_extract
and its users to the latest spec
2025-06-19 11:00:53 +01:00
Tim Ledbetter
07b3b70a10
LibWeb: Return the correct computed value for opacity properties
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-06-19 10:27:35 +02:00
Tim Ledbetter
269d5bb40e
LibWeb: Resolve percentages for opacity properties at parse time
2025-06-19 10:27:35 +02:00
Gingeh
e96338dd63
LibWeb: Don't play initially-paused animations
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-06-18 17:17:29 +02:00
Aliaksandr Kalenik
6169e91994
LibWeb: Delete redundant GridFitContent class from track representation
...
GridSize already supports the FitContent type, so there is no need to
additionally wrap it in a GridFitContent class.
2025-06-18 15:51:10 +01:00
Tim Ledbetter
e0af205d69
LibWeb/CSS: Implement the empty-cells
property
...
This property sets whether table borders and backgrounds are painted
if a given table cell has no visible content.
2025-06-18 14:55:03 +01:00
Luke Wilde
ffae0d8b2d
LibGfx/AVIF: Always reduce decoding output to a bit depth of 8
...
Gfx::Bitmap only supports a bit depth of 8, therefore we refused to
load AVIF images which didn't have this bit depth.
However, we can tell the libavif decoder to reduce the output depth by
setting avifRGBImage.depth to 8. This allows us to support any input
depth.
Makes images load on https://www.ikea.com/ which uses Cloudflare Images
to re-encode their images to 16-bit AVIF.
2025-06-18 14:27:24 +02:00
Shannon Booth
5f5975c81d
LibWeb/HTML: Iterate safely in perform_a_microtask_checkpoint()
...
This list we are iterating over is removed from when there are
no more GC references to an ESO. This may be triggered by a GC
allocation. Since
UniversalGlobalScopeMixin::notify_about_rejected_promises performs
GC allocations (by, for example, allocating a GC function), it
is not safe to simply iterate over this list.
Fix this by taking a strong reference to all registered ESOs by
copying them across to a RootVector before iteration.
Fixes : #4652
2025-06-18 13:08:30 +02:00
Shannon Booth
00002c6443
LibWeb/HTML: Unregister ESO during finalize phase
...
It is generally safer for GC cells to do cleanup work during the
finalize phase.
2025-06-18 13:08:30 +02:00
stelar7
3815a7c1eb
LibWeb: Implement cleanup_indexed_database_transactions
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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-06-18 19:05:41 +12:00
Tim Ledbetter
fa1e02e5d7
LibWeb: Allow calc()
values in cubic-bezier()
easing functions
2025-06-18 08:57:06 +02:00
Tim Ledbetter
c5a3eaaf45
LibWeb: Allow calc()
values in steps()
easing functions
2025-06-18 08:57:06 +02:00
Veeti Paananen
21b531598d
LibWeb/CSS: Fix reference bug when canonicalizing linear easing stops
...
+2 WPT tests
2025-06-18 08:53:10 +02:00
Gingeh
5e1e0d4e18
LibWeb: Remove some popover AD-HOC comments
...
Spec PR: https://github.com/whatwg/html/pull/11253
2025-06-18 08:51:22 +02:00
Shannon Booth
fc62a05c98
LibWeb/DOM: Set Document's origin in JS constructor
...
We were missing this spec step, which meant that the created
document had no origin, causing a crash when accessed for same-origin
checks.
2025-06-18 08:49:01 +02:00
Carter Snook
1861f24979
LibJS: Avoid Symbol methods for RegExp on primitives
...
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
Normative PR: https://github.com/tc39/ecma262/pull/3009 (unmerged as of this commit)
There are a few test262 tests for this, see https://test262.fyi/#built-ins/String/prototype
JSC and Rhino have have already added these changes.
2025-06-17 17:54:36 -06:00
Colin Reeder
d4a5d16d27
LibGfx: Explicitly link against fontconfig
2025-06-17 16:55:50 -06:00
Colin Reeder
b7b5e71767
LibWeb: Explicitly link against GL
2025-06-17 16:55:50 -06:00
Ben Eidson
15aa7dce29
LibWeb/WebAudio: Implement AudioNode::connect()
...
Sets up the basic infrastructure for the audio node graph and
implements the AudioNode `connect()` method with its related overides.
AudioNodes store vectors of AudioNodeConnections and
AudioParamConnections to represent links between nodes.
2025-06-17 16:54:19 -06:00
Totto16
cee874caaf
LibWeb: Factor out CanvasSettings mixin into separate file
...
This refactors this mixin, that was introduced in #4506 to be the same
as all other mixins, so that it can be used for #3788
2025-06-17 16:54:04 -06:00
Daniel Bertalan
edeef940b6
LibJS: Fix pointer authentication failure in TypedArray
...
`TypedArray` objects need to know their own constructor objects to allow
copying. This was implemented by storing a function pointer to the
`Intrinsic` object's method which returns the constructor object.
The problem is that function pointers aren't polymorphic, we can't
legally just cast e.g. a `Derived* (*ptr)(void)` to `Base*
(*ptr)(void)` (this is why the code needed a `bit_cast` to even
compile). But this wasn't actually a problem in practice because their
ABIs were the same. But with pointer authentication (Apple's `arm64e`
ABI) this signature mismatch becomes a hard failure and crashes the
process.
Fix this by adding a virtual function that returns the intrinsic
constructor (actually, a `NativeFunction`, as typed arrays constructors
don't inherit from the base `TypedArray` constructor) instead of the
function pointer.
With this, test-js passes and Ladybird launches correctly when built
(with a lot of vcpkg hacks) for arm64e.
2025-06-17 15:44:37 -06:00
stasoid
460b257449
LibIPC: Enable in Windows CI
2025-06-17 15:36:47 -06:00
stasoid
8af2a49b5c
LibIPC: Make TransportSocketWindows responsible for reading entire
...
messages. Port of a371f84
to Windows.
2025-06-17 15:36:47 -06:00
stasoid
ccf303eefc
LibIPC: Move AutoCloseFileDescriptor to its own header
2025-06-17 15:36:47 -06:00
stasoid
75b0e9a199
LibCore: Fix race condition in PosixSocketHelper::read on Windows
...
CancelIo introduces a race condition: if data arrives between calls to
WSARecv and CancelIo it will be lost.
See also: https://vstinner.github.io/asyncio-proactor-wsarecv-cancellation-data-loss.html
2025-06-17 20:56:32 +02:00
Shannon Booth
e0d7278820
LibURL+LibWeb: Make URL::Origin default constructor private
...
Instead, porting over all users to use the newly created
Origin::create_opaque factory function. This also requires porting
over some users of Origin to avoid default construction.
2025-06-17 20:54:03 +02:00
Shannon Booth
5deb8ba2f8
LibWeb: Explicitly set Document's origin
...
As part of the effort of removing the default constructor of
Origin, since document has the origin set after construction,
port Document's origin over to an Optional<Origin>.
This exposes that we were never setting the origin of the document
during fragment parsing. For now, to maintain previous behaviour,
let's explicitly set it to an opaque origin.
2025-06-17 20:54:03 +02:00
Shannon Booth
de79eb4410
LibWeb: Give NonFetchSchemeNavigationParams a constructor
2025-06-17 20:54:03 +02:00
Shannon Booth
0d905b1846
LibWeb: Give NavigationParams a constructor
...
This allows for NavigationParams to hold non-default constructable
types.
2025-06-17 20:54:03 +02:00
Shannon Booth
766cbf4937
LibGfx: Remove dependency on LibURL
...
This was previously a dependency (from ICC, if I recall correctly),
but this no longer appears to be the case.
2025-06-17 20:54:03 +02:00
Shannon Booth
1a34485460
LibWeb/HTML: Serialize time origin in environments
...
Which is caught from changing across to this form of initializing
the object.
2025-06-17 20:54:03 +02:00
Luke Wilde
f12b6b258f
LibJS: Don't use presence of function params to identify function scope
...
Instead, we can just use the scope type to determine if a scope is a
function scope.
This fixes using `this` for parameter default values in arrow functions
crashing. This happened by `uses_this_from_environment` was not set in
`set_uses_this`, as it didn't think it was in a function scope whilst
parsing parameters.
Fixes closing modal dialogs causing a crash on https://www.ikea.com/
No test262 diff.
Reverts the functional part of 08cfd5f
, because it was a workaround for
this issue.
2025-06-17 20:48:45 +02:00
Aliaksandr Kalenik
b9b6927b85
LibWeb: Fix swapped strings for auto-fill and auto-fit in GridRepeat
...
...serialization.
2025-06-17 17:43:04 +01:00
Jelle Raaijmakers
e8e6dbcee0
LibWeb: Fix document element's .scrollHeight
and .scrollWidth
...
We were using the viewport's size as the viewport scrolling area, but
those are completely different things.
2025-06-17 17:17:34 +01:00
Jelle Raaijmakers
8f139d065c
LibWeb: Simplify ViewportPaintable::assign_scroll_frames()
...
No functional changes.
2025-06-17 17:17:34 +01:00
Jelle Raaijmakers
e104d896eb
LibWeb: Rename Navigable::m_size
to ::m_viewport_size
...
All other viewport-related dimensions are referenced to by 'viewport',
so let's rename the member that stores the viewport size to prevent
further confusion.
2025-06-17 17:17:34 +01:00
Jelle Raaijmakers
46a46a1c61
LibGfx+LibWeb: Append glyphs in LineBoxFragment run more efficiently
...
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / 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
Since we know the number of glyphs we're going to append, ensure the
LineBoxFragment run's capacity once and perform unchecked appends.
2025-06-17 17:03:33 +02:00
Jelle Raaijmakers
5ac067c804
LibGfx: Inline Font::pixel_metrics()
...
Calls to this method were showing up in profiles.
2025-06-17 17:03:33 +02:00
Jelle Raaijmakers
df20ac0f3c
LibGfx: Optimize Gfx::measure_text_width()
...
Instead of constructing a GlyphRun, just add the X advances of all
glyphs to determine a text's width.
2025-06-17 17:03:33 +02:00
Jelle Raaijmakers
631c857301
LibGfx: Only determine glyphs info once in TextLayout
...
We were calling into `hb_buffer_get_glyph_infos()` twice and setting up
an unused `Vector<hb_glyph_info_t>`.
2025-06-17 17:03:33 +02:00
Jelle Raaijmakers
c91718148d
LibWeb: Undo curious case of line wrapping
2025-06-17 17:03:33 +02:00
Jelle Raaijmakers
e80914a399
LibGfx: Use Vector::extend()
to extend fonts in FontCascadeList
...
This only grows the capacity once, if required.
2025-06-17 17:03:33 +02:00
Jelle Raaijmakers
4a514020e0
LibWeb: Remove unused include from InlineLevelIterator
2025-06-17 17:03:33 +02:00
Sam Atkins
7fe854c131
LibWeb/CSS: Link CalculationContext to new spec definition
...
Corresponds to ad244f3413
There's nothing that we need to do differently I think, but it's nice to
have a clear spec definition to refer to. :^)
2025-06-17 12:38:27 +01:00
Sam Atkins
a263ba78ed
LibWeb/CSS: Add FIXME that color-mix() now takes 1+ colors, not 2
...
Corresponds to 83c7bffe51
2025-06-17 12:38:27 +01:00
Sam Atkins
af9a227ca3
LibWeb/HTML: Implement HTMLElement.scrollParent
...
Corresponds to d3effb701c
What a "fixed position container" is isn't clear to me, and we don't
seem to use that elsewhere, so I've left the steps using that as FIXMEs
for now.
There's no test coverage for this in WPT yet and I'm not confident
enough in the specific behaviour to write one myself. So, waiting on
https://github.com/web-platform-tests/wpt/issues/53214
2025-06-17 12:38:27 +01:00
Sam Atkins
5d5f16845c
LibWeb/HTML: Bring HTMLElement::offset_parent() up to date
2025-06-17 12:38:27 +01:00
Sam Atkins
3fbd3146a1
LibWeb/DOM: Implement "is closed-shadow-hidden" algorithm
2025-06-17 12:38:27 +01:00
Sam Atkins
1435480d76
LibWeb/CSS: Add fixme for sRGB color interpolation
...
Corresponds to a0a9886063
2025-06-17 12:38:27 +01:00
Jelle Raaijmakers
046d1169de
LibWeb: Only calculate enclosing rect for fragments if we use it
...
This would show up in profiles for pages with lots of fragments. No
functional changes.
2025-06-17 11:55:28 +02:00