Ali Mohammad Pur
191499696b
wasm: Make it possible to provide exported functions using js
...
This can be done by passing
`--export-js <module>.<fn>[(<arg>:type, ...)][:type]=<source>`,
which uses a js function `(arg...) => source` to resolve the requested
import `module::fn`.
All literal wasm value types (i<n> and v128) are supported as both
parameter and return types.
2025-08-26 15:20:33 +02:00
Ali Mohammad Pur
6732e1cdc3
LibWasm: Don't clobber registers on (most) calls
...
This still passes the values on the stack, but registers are now allowed
to cross a call boundary.
This is a very significant (>50%) improvement on the small call
microbenchmarks on my machine.
2025-08-26 15:20:33 +02:00
Kenneth Myhra
4963dea504
LibWeb/XHR: Remove outdated FIXME about Streams not integrated in XHR
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (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
Streams were integrated into XHR::send() in: https://github.com/SerenityOS/serenity/pull/24132
2025-08-26 07:18:49 -04:00
Kenneth Myhra
5d94119f4c
LibWeb/XHR: Add missing spec comment for step 12 in XHR::send()
2025-08-26 07:18:49 -04:00
Kenneth Myhra
e6a3307955
LibWeb/XHR: Remove outdated FIXMEs about propagating errors
...
The methods these FIXMEs refer to is no longer fallible.
2025-08-26 07:18:49 -04:00
Kenneth Myhra
2b832fdc31
LibWeb/XHR: MUST handle_{errors,response_end_of_body} in async context
...
These cannot throw in an async context and we no longer care about minor
OOM errors so let's MUST these.
2025-08-26 07:18:49 -04:00
rmg-x
ac755d0916
Tests/LibWeb: Reset zoom on web view before running tests
...
This prevents test failures when running locally if the user set a
default zoom level other than 1.0
2025-08-26 06:31:22 -04:00
rmg-x
9b0157523d
Base+UI: Implement user interface for defaultZoomLevelFactor setting
2025-08-26 06:31:22 -04:00
rmg-x
333164ecf9
LibWebView: Add defaultZoomLevelFactor setting and necessary plumbing
2025-08-26 06:31:22 -04:00
Idan Horowitz
73266c8498
LibWeb: Add missing cookie-age-limit steps to CookieStore::set()
2025-08-26 06:28:10 -04:00
Idan Horowitz
e059c9d5a3
WebContent: Add missing step in WebDriver cookie serialization
2025-08-26 06:28:10 -04:00
Idan Horowitz
e3a5d117a6
LibWeb: Mark CookieChangeEvent's changed and deleted as CachedAttribute
...
This makes them actually conform to the [SameObject] extended attribute.
2025-08-26 06:28:10 -04:00
Idan Horowitz
4c49ce5fe5
LibWeb: Add support for caching IDL attribute values
...
This lets us properly implement for [SameObject] for generated
constructs like FrozenArray<T>.
2025-08-26 06:28:10 -04:00
Callum Law
912ffc3f84
LibWeb: Remove unnecessary ComputedProperties::maybe_null_property
...
We know that all (longhand) properties have a value so this is
unnecessary.
2025-08-26 12:17:55 +02:00
Callum Law
6bccc7c242
LibWeb: Don't allocate space for shorthands in ComputedProperties
...
Only longhands have computed values so allocating space for shorthands
is just wasted memory
2025-08-26 12:17:55 +02:00
Callum Law
9f5696e9c5
LibWeb: Avoid getting shorthand property from ComputedProperties
...
ComputedProperties only includes longhands so we shouldn't try to get
shorthands - this will be asserted in a later commit.
2025-08-26 12:17:55 +02:00
Callum Law
1ba64a1d7e
LibWeb: Remove StyleComputer as friend of ComputedProperties
...
Everything we need to do with ComputedProperties in StyleComputer can be
done via the public APIs
2025-08-26 12:17:55 +02:00
Callum Law
ed947940d7
LibWeb: Simplify conversion of percentage line-height to absolute length
...
We can take advantage of the fact that we already do this in
`compute_line_height`.
2025-08-26 12:17:55 +02:00
Callum Law
1a3da3d825
LibWeb: Don't store separate computed value for font_size
...
The StyleValue stored in m_property_values is already in it's computed
form and it's trivial to pull the underlying value out so there is no
need to store this separately.
Also removes unnecessary handling of percentage values in
`absolutize_values` - this is already handled within `compute_font`.
2025-08-26 12:17:55 +02:00
Callum Law
8682a97933
LibWeb: Only include longhands when dumping resolved style
...
Shorthands will always be null so are not useful
2025-08-26 12:17:55 +02:00
Callum Law
487d0abd7c
LibWeb: Only consider longhands when recomputing inherited style
...
Only longhands have computed values so checking shorthand values is
unnecessary
2025-08-26 12:17:55 +02:00
Callum Law
c635a43c18
LibWeb: Only consider longhand properties when computing invalidation
...
We only store computed values for longhand properties so checking
shorthand properties is unnecessary
2025-08-26 12:17:55 +02:00
Callum Law
fba4187c8f
LibWeb: Add a constant for the number of longhand properties
...
We use this in multiple places (and will in more places in the future)
so it's worth having as a constant from a clarity point of view
2025-08-26 12:17:55 +02:00
Callum Law
58431603ca
LibWeb: Remove unused Element::resolved_css_values
2025-08-26 12:17:55 +02:00
Callum Law
5431f1534a
LibWeb: Remove unnecessary check on ComputedProperties array size
...
This is a constant length array - this check will always be false
2025-08-26 12:17:55 +02:00
Jelle Raaijmakers
65910dc343
LibWeb: Update focusing spec steps
...
Update a couple of focus-related spec steps and their implementations.
The most relevant change is that we no longer allow focusing on elements
that return false for `->is_focusable()`, which necessitates fixing a
broken test that tried to `.focus()` on `<div>`s that were not
focusable. That test's output now more accurately reflects the expected
outcome as seen in other browsers.
2025-08-26 10:25:59 +02:00
Jelle Raaijmakers
cc19dd3fb0
LibWeb: Simplify getting the document's root element in elementFromPoint
2025-08-26 10:25:59 +02:00
Jelle Raaijmakers
518c048eb4
LibWeb+WebContent: Rename Document::focused_element to ::focused_area
...
And make it a DOM::Node, not DOM::Element. This makes everything flow
much better, such as spec texts that explicitly mention "focused area"
as the fact that we don't necessarily need to traverse a tree of
elements, since a Node can be focusable as well.
Eventually this will need to be a struct with a separate "focused area"
and "DOM anchor", but this change will make it easier to achieve that.
2025-08-26 10:25:59 +02:00
Jelle Raaijmakers
90f1c8724b
LibWeb: Nested editing host focus should propagate to farthest ancestor
...
Nested editing hosts should act as a single big editing host, as long as
there are no uneditable elements in between.
2025-08-26 10:25:59 +02:00
Jelle Raaijmakers
6c0a0b86ba
LibWeb: Simplify delete and return actions in EditingHostManager
...
No functional changes.
2025-08-26 10:25:59 +02:00
Jelle Raaijmakers
60a501d824
LibWeb: Do not update selection on uneditable contents without Shift key
...
If selection navigation happens through an editing host, we should
enforce that for collapsed navigations (i.e. moving the caret) it can
only happen if the focus node of the selection is editable.
2025-08-26 10:25:59 +02:00
Jelle Raaijmakers
09645875ea
LibWeb: Clean up Selection::move_offset_to_* methods
...
No functional changes.
2025-08-26 10:25:59 +02:00
Jelle Raaijmakers
2e910dd6e1
LibIDL: Change overload sets to be ordered
...
We fill these overload sets from vectors, which means that by the time
we iterated over them, any semblance of their original ordering was
lost. Their ordering is important, because we invoke
define_native_function() for them which eventually stores ordered
properties.
This should not be an issue as long as iterating over a HashMap that was
filled in exactly the same way results in the same ordering. However,
HashTable utilizes kmalloc_good_size() to determine a good allocation
size - and the implementation for kmalloc_good_size() on Linux and macOS
differs, causing a different capacity and ordering on those platforms.
This was not caught by CI, because we run that with sanitizers enabled
which overrides malloc_good_size() on macOS, resulting in the same
behavior as on Linux.
Change the overload sets to be OrderedHashMaps instead and rebaseline
the failing test.
2025-08-26 10:14:22 +02:00
Jelle Raaijmakers
3522ff16c0
Meta: Reuse "define the operations" algorithm for generated namespaces
...
This is one step closer to the spec. No functional changes.
2025-08-26 10:14:22 +02:00
Tim Ledbetter
cb1a1a5cb5
LibWeb: Replace is<T>()
with as_if<T>()
where possible
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (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-08-25 18:45:00 +02:00
Andreas Kling
3d97251da3
LibWeb: Wrap out-of-flow table children in anonymous table cells
...
This fixes an issue where floating children of a table box would not get
laid out at all if they were surrounded by nothing but whitespace.
2025-08-25 14:55:19 +02:00
norbiros
92b560edce
LibWeb/CSS: Fix basic absolute positioning inside grid containers
...
Now elements with position `absolute` properly resolve their position
inside parent elements with `grid`. I also imported some WPT tests
related to that topic.
Part 2 of resolving issues on https://hack4krak.pl
2025-08-25 14:09:12 +02:00
norbiros
2ed7e0422e
LibWeb/CSS: Import absolute positioning tests inside grid containers
2025-08-25 14:09:12 +02:00
Jelle Raaijmakers
305dfe3f40
AK: Don't remove CV qualifiers from types in Optional<T>
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (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
CV qualifiers are already ignored by __is_base_of(), which is what
IsBaseOf<T,U> uses.
2025-08-25 11:02:42 +02:00
sayhan
02abd3e373
Meta: Fixed variable typo switfc -> swiftc
2025-08-25 11:02:04 +02:00
Andreas Kling
0d2800e411
LibWeb: Don't relocate fragments across atomic inline boundary
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, 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
Push notes / build (push) Waiting to run
All fragments inside an atomic inline box should stay within that box,
otherwise we'll screw up the paint order and paint them behind things
that they're supposed to be on top of.
This fixes an issue with inline-block content not appearing on sites
like Google Docs and Reddit, among others.
2025-08-24 21:00:08 +02:00
ayeteadoe
1573ca35cc
LibDNS: Enable EXPLICIT_SYMBOL_EXPORT
2025-08-24 12:58:27 -06:00
ayeteadoe
8150fb4cbb
LibMedia: Enable EXPLICIT_SYMBOL_EXPORT
2025-08-24 12:58:27 -06:00
ayeteadoe
a99c8d05b7
Utilities/image: Enable on Windows
2025-08-24 12:58:27 -06:00
ayeteadoe
7d00c43269
Utilities/dns: Enable on Windows
2025-08-24 12:58:27 -06:00
ayeteadoe
b7bc60d614
Utilities/abench: Enable on Windows
2025-08-24 12:58:27 -06:00
ayeteadoe
f4b20129d7
Utilities/xml: Enable on Windows
2025-08-24 12:58:27 -06:00
ayeteadoe
2c91014bbf
LibXML: Enable EXPLICIT_SYMBOL_EXPORT
2025-08-24 12:58:27 -06:00
ayeteadoe
a95e0d2777
Utilities/wasm: Enable on Windows
2025-08-24 12:58:27 -06:00
ayeteadoe
070392307a
LibWasm: Enable EXPLICIT_SYMBOL_EXPORT
2025-08-24 12:58:27 -06:00