stelar7
c81c17c0fb
LibWeb/IDB: Implement IDBObjectStore::get
2025-04-29 17:06:17 +02:00
stelar7
18a008d073
LibWeb/IDB: Implement retrieve_a_value_from_an_object_store
2025-04-29 17:06:17 +02:00
stelar7
d5cf2cee41
LibWeb/IDB: Implement IDBObjectStore::count
2025-04-29 17:06:17 +02:00
stelar7
694375d3ac
LibWeb/IDB: Implement count_the_records_in_a_range
2025-04-29 17:06:17 +02:00
stelar7
64d251b36c
LibWeb/IDB: Implement convert_a_value_to_a_key_range
2025-04-29 17:06:17 +02:00
Jelle Raaijmakers
6176b05ca5
LibWeb: Align editing whitespace canonicalization with other browsers
...
The spec calls for a couple of very specific whitespace padding
techniques whenever we canonicalize whitespace during the execution of
editing commands, but it seems that other browsers have a simpler
strategy - let's adopt theirs!
2025-04-29 15:30:34 +02:00
Jelle Raaijmakers
35efd4d14b
LibWeb+LibGfx: Support alpha
in CanvasRenderingContext2D
...
This is implemented by these related changes:
* The Skia alpha type 'Opaque' is selected for surfaces that were
created with the intention of not having an alpha channel.
Previously we were simply creating one with alpha.
* Clearing now happens through Skia's `clear()` which always uses the
source color's value for the result, instead of setting all values
to 0.
* CanvasRenderingContext2D selects a different clearing color based on
the `alpha` context attribute's value.
2025-04-29 13:51:23 +02:00
Jelle Raaijmakers
fac0f82031
LibWeb: Add CanvasRenderingContext2D context attribute parsing
...
Makes `context.getContextAttributes()` work.
2025-04-29 13:51:23 +02:00
Tim Ledbetter
c1a3b95176
LibWeb: Set transition property name when firing transition events
2025-04-29 12:23:31 +02:00
Gingeh
aa9f556500
LibWeb: Light dismiss dialogs on click
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-28 19:41:38 -06:00
Gingeh
1f1884da54
LibWeb: Light dismiss popovers on click
2025-04-28 19:41:38 -06:00
Hikmat Jafarli
bd9d489370
LibWeb: Re-evaluate the style block when the type attribute changes
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
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
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-29 01:01:02 +02:00
Andreas Kling
4d17707b26
LibJS: Store bytecode VM program counter in ExecutionContext
...
This way it's always automatically correct, and we don't have to
manually flush it in push_execution_context().
~7% speedup on the MicroBench/call* tests :^)
2025-04-28 21:12:48 +02:00
Tim Ledbetter
e7ae9c8ebf
LibWeb: Parse all
as keyword in transition
shorthand
...
This ensures that the parsing of the `transition` shorthand property
behaves in the same way as the `transition-property` longhand.4
2025-04-28 20:51:36 +02:00
teaalltr
a3e485e2d0
LibWeb: Add fast_is for span and div
2025-04-28 19:46:05 +01:00
Shannon Booth
8a3c66d8a6
LibWeb: Make a bunch of CSP classes not realm associated
...
These are not associated with a javascript realm, so to avoid
confusion about which realm these need to be created in, make
all of these objects a GC::Cell, and deal with the fallout.
2025-04-28 12:41:28 +02:00
Tim Ledbetter
04fde1c550
LibWeb: Ensure lang
pseudoclass matches multiple segment subcodes
2025-04-28 11:29:30 +01:00
Tim Ledbetter
74c803c87b
LibWeb: Ensure |=
value selector handles multiple segments correctly
...
Previously, the `|=` would not compare strings containing `-`
characters correctly because it would only compare the element
attribute up to the first `-` character.
2025-04-28 11:29:30 +01:00
Tim Ledbetter
f854f644a7
LibWeb: Don't crash when interpolating non <number>
scale values
2025-04-28 11:46:34 +02:00
stelar7
edf64b801c
LibWeb/IDB: Add store to the current transaction when created
2025-04-28 11:31:31 +02:00
stelar7
47d6b568fd
LibWeb/IDB: Dont keep trailing separator when splitting key paths
2025-04-28 11:31:31 +02:00
stelar7
577f799240
LibWeb/IDB: Fix a bug where the KeyGenerator was not incremented
2025-04-28 11:31:31 +02:00
stelar7
facfcd87c2
LibWeb/IDB: Introduce an Invalid KeyType
...
This cleans up the code around failure/invalid/exception a bit
2025-04-28 11:31:31 +02:00
stelar7
61384473ca
LibWeb/IDB: Implement IDBDatabase::transaction()
2025-04-28 11:31:31 +02:00
Andreas Kling
a05be67e4a
LibJS: Let invokers (callers) of [[Call]] allocate ExecutionContext
...
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
Instead of letting every [[Call]] implementation allocate an
ExecutionContext, we now make that a responsibility of the caller.
The main point of this exercise is to allow the Call instruction
to write function arguments directly into the callee ExecutionContext
instead of copying them later.
This makes function calls significantly faster:
- 10-20% faster on micro-benchmarks (depending on argument count)
- 4% speedup on Kraken
- 2% speedup on Octane
- 5% speedup on JetStream
2025-04-28 01:23:56 +02:00
Shannon Booth
420949b134
LibWeb/HTML: Make Navigation navigate event trusted
...
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
Fixes WPT test:
https://wpt.live/navigation-api/navigate-event/signal-abort-intercept.html
2025-04-27 07:54:02 -04:00
Shannon Booth
6032827fe7
LibWeb/HTML: Inform navigation API about frame container destruction
2025-04-27 07:54:02 -04:00
Tim Ledbetter
8a398e7a88
LibWeb: Parse all
transition-property value as keyword
...
We were previously parsing this value, as a custom-ident, meaning that
the code path for handling the `all` case wasn't being followed.
2025-04-27 09:49:00 +01:00
Timothy Flynn
ac1c2a956a
LibWeb: Implement caching of reflected element array attributes
...
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
For attributes like Element.ariaControlsElements, which are a reflection
of FrozenArray<Element>, we must return the same JS::Array object every
time the attribute is invoked - until its contents have changed. This
patch implements caching of the reflected array in accordance with the
spec.
2025-04-26 17:29:38 -04:00
Shannon Booth
6d622a6c04
LibWeb/DOM: Use as_if<T> in a bunch more places in DOM::Node
2025-04-26 08:45:37 -06:00
Shannon Booth
31a3bc3681
LibWeb: Implement 'State-preserving atomic move integration'
...
This was recently added to both the HTML and DOM specifications,
introducing the new moveBefore DOM API, as well as the new internal
'removing steps'.
See:
* 432e8fb
* eaf2ac7
2025-04-26 08:45:37 -06:00
Shannon Booth
a47c4dbc63
LibWeb/DOM: Factor out 'live range pre remove steps' AO
...
This was a refactoring made in the DOM spec as part of the
introduction of the move before API.
2025-04-26 08:45:37 -06:00
Timothy Flynn
0e2036d6c2
LibWeb: Temporarily disable site isolation for subframes
...
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
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
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
We don't yet support out-of-process subframes. Explicitly disable even
attempting to isolate subframes. Otherwise, navigating a subframe to a
non-same-site URL would actually cause the top-level frame to navigate
with our current implementation.
2025-04-26 10:15:47 -04:00
Timothy Flynn
e52c09ad4c
LibWeb: Avoid copying a URL needlessly during subframe navigation
...
Noticed a clangd warning for this while looking at a subframe site
isolation issue.
2025-04-26 10:15:47 -04:00
Andreas Kling
d8ea16d94e
LibWeb: Don't assume calc() simplification worked on invalid tree
...
Fixes #4469
2025-04-25 16:55:05 +02:00
Timothy Flynn
4e298db4f5
LibWeb: Update FIXMEs about FrozenArray with more up-to-date description
...
We could support FrozenArray pretty easily here, but we would regress on
SameObject handling.
2025-04-25 16:43:43 +02:00
Timothy Flynn
ad34fdad48
LibWeb: Convert trivial attributes to FrozenArray
2025-04-25 16:43:43 +02:00
Timothy Flynn
62167d923c
LibWeb: Convert ARIA attributes to FrozenArray
2025-04-25 16:43:43 +02:00
Andreas Kling
cf704cfbfc
LibWeb: Implement interpolation for CSS scale
values
...
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
And let's handle the 3rd (Z) scale parameter as well, while we're here.
At least 242 new passes on WPT.
2025-04-25 14:08:12 +02:00
Shannon Booth
a2cca59516
LibWeb+LibWebView+Services: Add IPC for starting WebWorker of a type
...
The provides some of the plumbing for a WebContent process to spin
up a WebWorker that is not just a dedicated worker.
2025-04-25 14:07:51 +02:00
Shannon Booth
041ff0c7ff
LibWeb/HTML: Hook up a WorkerAgent for web workers
2025-04-25 14:07:51 +02:00
Shannon Booth
5290ebfe19
LibJS: Switch Agent [[CanBlock]] slot to a enum member
...
It turns out it was a mistake to make this a virtual since
ServiceWorkerAgents are effectively the exact same as
DedicatedWorkerAgents and SharedWorkerAgents just with [[CanBlock]]
set to false.
2025-04-25 14:07:51 +02:00
Shannon Booth
7dd7e5b438
LibJS+LibWeb: Defer initialization of the Agent after VM constructor
...
This helps unwind a niggly depedency where the VM owns and constructs
the Heap and the Agent. But the agent wants to have customized
construction that depends on the heap. Solve this by defering
the initialization of the Agent to after we have constructed the
VM and the heap.
2025-04-25 14:07:51 +02:00
Shannon Booth
8263a9863f
LibJS+LibWeb: Do not return error from VM::create
...
This never returns an error to propogate, also allowing ErrorOr
to be removed from creating the main thread VM.
2025-04-25 14:07:51 +02:00
Shannon Booth
084cceab5c
LibWeb: Split out SimilarOriginWindowAgent from HTML::Agent
...
To allow for adding the concept of a WorkerAgent to be reused
between shared and dedicated workers. An event loop is the
commonality between the different agent types, though, there
are some differences between those event loops which we customize
on the construction of the HTML::EventLoop.
2025-04-25 14:07:51 +02:00
Shannon Booth
939bb10828
LibWeb/HTML: Rename WorkerAgent to WorkerAgentParent
...
This is to differentiate the agent representation for the parent
process for the WorkerAgent in the child process which is actually
hooked up to the javascript VM.
I am not sure if this is a good name, but I can't really think of
anything better which is consistent with the names used by the rest
of the codebase.
2025-04-25 14:07:51 +02:00
Jelle Raaijmakers
2fc1cafb8a
LibWeb: Exclude fixed positioned boxes from scrollable overflow
...
Sometimes fixed positioned boxes would extend the viewport's scrollable
overflow, which according to the spec should never happen. There are
some nuances to this, such as properly determining the fixed positioning
containing block for a fixed position box, but for now this prevents
some pages from being overly scrollable.
Fixes horizontal scrollability of https://tweakers.net .
2025-04-25 14:07:38 +02:00
stelar7
5ae069a031
LibWeb/IDB: Use correct state to check for throw condition
2025-04-25 07:23:41 -04:00
stelar7
d28a4434d0
LibWeb/IDB: Dont include databases with version 0 in databases()
2025-04-25 07:23:41 -04:00
Shannon Booth
8ac096c0e2
LibWeb/HTML: Fix parsing of protocol in Location.protocol setter
...
This never worked properly when implemented as it would always
throw an error for an invalid scheme on URL parsing.
Fixes at least some tests in:
https://wpt.live/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html
And all tests in:
https://wpt.live/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-weird.html
And maybe tests in some other places too, but these are not imported
as the tests are written with delays that makes them take a long time
to run, and some of them rely on HTTP(s).
2025-04-25 07:21:02 -04:00