Tim Ledbetter
62ecff0b40
LibWeb: Report exceptions that occur during microtask callback
2024-12-19 15:25:08 +00:00
Tim Ledbetter
7a41ab960c
LibWeb: Report exceptions when invoking intersection observer callback
2024-12-19 15:25:08 +00:00
Tim Ledbetter
7cacf5ca55
LibWeb: Report exceptions when invoking custom element reactions
2024-12-19 15:25:08 +00:00
Tim Ledbetter
d8511e39c9
LibWeb: Report exceptions that occur during mutation observer microtask
2024-12-19 15:25:08 +00:00
Tim Ledbetter
4a6e457d4b
LibWeb: Update run_timer_initialization_steps
to the latest spec
...
This fixes a number of WPT tests, which expect an error to be reported
if an exception is thrown in the timer callback.
2024-12-19 15:25:08 +00:00
Tim Ledbetter
1f57df34f1
LibWeb: Update WebIDL::invoke_callback()
to follow the latest spec
...
`WebIDL::invoke_callback()` now takes an `exception_behavior`
parameter, which can be set to `report` to report an exception before
returning. Setting `exception_behavior` to `rethrow` retains the
previous behavior.
2024-12-19 15:25:08 +00:00
Aliaksandr Kalenik
07635d4554
LibWeb/WebGL: Set INVALID_OPERATION if object does not belong to context
2024-12-19 13:38:43 +01:00
Aliaksandr Kalenik
fbae24f7a9
LibWeb/WebGL: Don't treat WebGLUniformLocation as WebGLObject
...
...in code generator. `is_webgl_object_type()` is only supposed to
return true for objects inheriting from WebGLObject.
2024-12-19 13:38:43 +01:00
Aliaksandr Kalenik
cf730870c5
LibWeb: Save WebGL context pointer in WebGLObject
...
This way we could be sure that context object won't be deallocated
before any of the objects that belong to it.
Having a context pointer is also going to be used in upcoming changes
to generate an INVALID_OPERATION error if an object does not belong to
the context it's being used in.
2024-12-19 13:38:43 +01:00
Lucien Fiorini
b909e3d587
Tests: Add screenshot test for Canvas2D fillstyle opacity
2024-12-19 13:31:12 +01:00
Lucien Fiorini
26970201bd
LibGfx: Fix color opacity regression in Canvas2D
...
The color alpha was being overwritten by the global alpha instead of
being multiplied.
2024-12-19 13:31:12 +01:00
Lucas CHOLLET
61755b29c9
Tests: Import a bunch of css-color tests from WPT
2024-12-19 09:54:14 +00:00
Lucas CHOLLET
9261688488
Tests: Import a few ICC profiles related tests
2024-12-19 09:54:14 +00:00
Lucas CHOLLET
2b56a53d41
Meta: Also download support files of WPT tests' reference pages
2024-12-19 09:54:14 +00:00
Lucas CHOLLET
cc76225c1f
Meta: Refactor map_to_path()
to use a basic loop
2024-12-19 09:54:14 +00:00
Lucas CHOLLET
ccb4c205cd
Meta: Remove one global variable in the wpt import script
2024-12-19 09:54:14 +00:00
Lucas CHOLLET
8a0c63f168
headless-browser: Stop considering support files from WPT as tests
2024-12-19 09:54:14 +00:00
Lucas CHOLLET
325d1bb853
Meta: Download support images along their respective WPT tests
2024-12-19 09:54:14 +00:00
Jelle Raaijmakers
f29457b61e
LibWeb: Resolve performance FIXME in Node::is_equal_node()
2024-12-18 23:46:22 +00:00
Jelle Raaijmakers
c357fbf036
LibWeb: Remove unused (Tree)Node::index_of_child()
2024-12-18 23:46:22 +00:00
devgianlu
637f934f69
LibWeb: Correctly normalize HashAlgorithmIdentifier
...
Make sure that `HashAlgorithmIdentifier` is passed through
`normalize_an_algorithm` to verify that the hash is valid and supported.
This is required by the spec, but we are not following it very strictly
in `normalize_an_algorithm` because it is pretty convoluted.
Fixes ~60 tests.
2024-12-18 12:45:06 -08:00
Sam Atkins
4c5a40579a
LibWeb: Match spec changes to "create an element" algorithm
...
Corresponds to https://github.com/whatwg/html/pull/10857
No code changes, only comments.
2024-12-18 19:22:44 +00:00
Sam Atkins
aa29a3ff6b
LibWeb/HTML: Update resource fetch algorithm to match current spec
...
Changes from https://github.com/whatwg/html/pull/10792
No code changes, only comments.
2024-12-18 19:22:44 +00:00
Sam Atkins
30d23ad090
LibWeb/HTML: Use camelCase for variables in adoption agency comments
...
This is a spec change but I don't know when it occurred.
Also reformat some of the spec comments for clarity.
No code changes, only comments.
2024-12-18 19:22:44 +00:00
Sam Atkins
5651c6fd9b
LibWeb: Match spec changes for "custom element registry" concept
...
Corresponds to https://github.com/whatwg/html/pull/10845 and
https://github.com/whatwg/html/pull/10865
2024-12-18 19:22:44 +00:00
Lucien Fiorini
97768d8927
LibGfx: Fix dynamic_cast undefined behavior on macOS
...
MacOS XCode 16 breaks dynamic_cast on final classes where the base
class has a has a virtual destructor defined in the header, which
creates a different virtual table per translation unit.
This is probably a regression in Apple's Clang that causes final
classes to be incorrectly aggressively optimized.
https://stackoverflow.com/questions/79192304/macos-xcode-16-breaks-dynamic-cast-for-final-types-defined-in-shared-library
2024-12-18 18:54:20 +01:00
Lucien Fiorini
d9ab68dd62
Tests: Import WPT test for canvas filter values
2024-12-18 18:54:20 +01:00
Lucien Fiorini
aea0172a44
Tests: Add screenshot test for canvas filters
2024-12-18 18:54:20 +01:00
Lucien Fiorini
a6ef6550f3
LibWeb+LibGfx: Implement Canvas2D filters
2024-12-18 18:54:20 +01:00
Lucien Fiorini
9fd1223992
LibWeb+LibGfx: Refactor CSS filters into LibGfx
...
CSS filters work similarly to canvas filters, so it makes sense to have
Gfx::Filter that can be used by both libraries in an analogous way
as Gfx::Color.
2024-12-18 18:54:20 +01:00
Sam Atkins
bc971a4ccc
UI/Headless: Clear pending data when a test completes
...
Without this, a crashing ref test is able to take down the entire
process because of the `VERIFY(!m_pending_screenshot);` in
`take_screenshot()`. The dialog/prompt fields were not causing crashes
but clearing them feels more hygienic.
2024-12-18 17:38:53 +00:00
sideshowbarker
ce65457746
LibWeb: Fix internal logic for recognizing non-abstract ARIA roles
2024-12-18 15:24:51 +00:00
Jess
af3d46dc06
Flake/devshell: Port skia skcms fix from local vcpkg overlay
...
See #4d7b717
2024-12-18 15:15:42 +00:00
Jess
61fcccb104
Flake: Add and run formatter + Rename devshell
...
Add a formatter output to the flake (`nix fmt`), along with moving +
renaming the devshell so it will work by running `nix-shell` in the root
of the project.
2024-12-18 15:15:42 +00:00
Sam Atkins
6969d1eba3
LibWeb/CSS: Parse calc() as intermediate types instead of UnparsedCN
...
Previously we created a tree of CalculationNodes with dummy
UnparsedCalculationNode children, and then swapped those with the real
children. This matched the spec closely but had the unfortunate
downside that CalculationNodes couldn't be immutable, and couldn't know
their properties at construct-time. UnparsedCalculationNode is also a
footgun, as if it gets left in the tree accidentally we would VERIFY().
So instead, let's parse the calc() tree into an intermediate format, and
then convert each node in that tree, depth-first, into its
corresponding CalculationNode. This means each CalculationNode knows
what its children are when it is constructed, and they never change.
Apart from deleting UnparsedCalculationNode, we can also get rid of the
for_each_child_node() method that was only used by this "replace the
children" code.
2024-12-18 12:21:22 +00:00
Sam Atkins
cef1cb6aa7
LibWeb/CSS: Add Parser::Dimension::to_string()
...
This will be used when printing out unsupported dimensions inside calc,
for a more useful error message.
2024-12-18 12:21:22 +00:00
devgianlu
f3a9bb0a91
LibWeb: Correct WebCryptoAPI derive length behaviour
...
Fixes multiple slightly wrong behaviours of the `deriveBits` method
across various algorithms. Some of them might be due to a spec update.
Add tests related to fixes.
2024-12-18 13:18:40 +01:00
devgianlu
4b87467fc2
LibWeb: Update SubtleCrypto IDL according to latest spec
...
I suppose the IDL definition for `deriveBits` changed to make the
last parameter optional.
2024-12-18 13:18:40 +01:00
Pavel Shliak
a95303de02
LibWeb/WebAudio: Remove copy-pasted comments in DynamicsCompressorNode
2024-12-18 10:19:46 +01:00
Pavel Shliak
9232dcbde5
LibWeb/WebAudio: Set all the params in PannerNode constructor
2024-12-18 10:19:46 +01:00
Pavel Shliak
884599f1df
LibWeb/WebAudio: Manage channelCountMode and channelCount for PannerNode
2024-12-18 10:19:46 +01:00
stasoid
15a96e841b
Meta: Make pthread and mman available for all libraries on Windows
...
by default
2024-12-18 05:55:58 +01:00
Johan Dahlin
6fd7b9b6b9
LibWeb: Render otf fonts
...
This is required by WPT tests so we can validate the OpenType/features
are properly implemented.
2024-12-17 19:07:13 +01:00
Johan Dahlin
083f4f3d08
LibWeb: Layout/Shape font-variant-* css properties
2024-12-17 19:07:13 +01:00
Johan Dahlin
1c42d6831b
LibWeb: Style font-variant-* css properties
2024-12-17 19:07:13 +01:00
Johan Dahlin
aabbe87628
LibWeb: Parse font-variant-* css properties
2024-12-17 19:07:13 +01:00
Johan Dahlin
8bd94e2593
LibWeb: Add font-variant-* css properties
2024-12-17 19:07:13 +01:00
Shannon Booth
6c691ccddc
LibWeb/HTML: Add null handling for "get noopener for window open"
...
See: https://github.com/whatwg/html/pull/10847
Which also fixes a crash when window.open is given a blob URL which is
not present in the Blob URL registry.
2024-12-17 17:06:47 +01:00
Jelle Raaijmakers
03aafda788
CI: Post comment when PR has a merge conflict
...
Switch out the action with another one that actually supports posting
comments :^)
2024-12-17 07:07:16 -08:00
Jelle Raaijmakers
25e05e76c4
CI: Remove always()
from job conditionals
...
These jobs have no dependencies on other jobs, nor should they be
uncancelable.
2024-12-17 05:20:58 -08:00