Commit Graph

6293 Commits

Author SHA1 Message Date
Lorenz A
f54793315c LibWeb: Adjust buttons computed display style
Some checks failed
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (arm64, Sanitizer, false, macOS, ["macos-15", "self-hosted"], Clang) (push) Has been cancelled
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, All_Debug, false, Linux, ["blacksmith-16vcpu-ubuntu-2404"], Clang) (push) Has been cancelled
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Fuzzers, false, Linux, ["blacksmith-16vcpu-ubuntu-2404"], Clang) (push) Has been cancelled
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Sanitizer, false, Linux, ["blacksmith-16vcpu-ubuntu-2404"], GNU) (push) Has been cancelled
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Sanitizer, true, Linux, ["blacksmith-16vcpu-ubuntu-2404"], Clang) (push) Has been cancelled
Build Dev Container Image / build (push) Has been cancelled
Run test262 and test-wasm / run_and_update_results (push) Has been cancelled
Lint Code / lint (push) Has been cancelled
Label PRs with merge conflicts / auto-labeler (push) Has been cancelled
Push notes / build (push) Has been cancelled
Nightly Lagom / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (arm64, Distribution, false, Linux, ["blacksmith-8vcpu-ubuntu-2404-arm"], Clang) (push) Has been cancelled
Nightly Lagom / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (arm64, Distribution, false, macOS, ["macos-15"], Clang) (push) Has been cancelled
Nightly Lagom / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (arm64, Sanitizer, false, Linux, ["blacksmith-8vcpu-ubuntu-2404-arm"], Clang) (push) Has been cancelled
Nightly Lagom / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (arm64, Sanitizer, false, macOS, ["macos-15"], Swift) (push) Has been cancelled
Nightly Lagom / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Distribution, false, Linux, ["blacksmith-8vcpu-ubuntu-2404"], GNU) (push) Has been cancelled
Nightly Lagom / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Sanitizer, false, Linux, ["blacksmith-8vcpu-ubuntu-2404"], Swift) (push) Has been cancelled
Nightly Lagom / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Windows_Sanitizer_CI, false, Windows, ["windows-2025"], ClangCL) (push) Has been cancelled
Nightly Lagom / Flatpak ${{ matrix.arch }} (aarch64, ["ubuntu-24.04-arm"]) (push) Has been cancelled
Nightly Lagom / Flatpak ${{ matrix.arch }} (x86_64, ["ubuntu-24.04"]) (push) Has been cancelled
Nightly Android / CI (macos-14, Android) (push) Has been cancelled
2025-11-01 13:02:44 +00:00
Timothy Flynn
019c529c07 Meta: Increase the line length enforced by prettier to 120
This matches our coding style recommendation in CodingStyle.md, and
matches our python formatting.
2025-10-31 19:55:50 -04:00
ayeteadoe
30729feebb LibWeb: Prevent crash in content calculations for ListItemMarkerBox
In several content calculation methods in FormattingContext, we assumed
that if create_independent_formatting_context_if_needed() fails the
input Layout::Box is a BlockContainer; however, the web platform test
css/css-pseudo/parsing/marker-supported-properties-in-animation.html is
one scenario where the input is a Layout::ListItemMarkerBox instead and
there is no FormattingContext supported for it yet.
2025-10-30 18:21:24 +00:00
Callum Law
c2ca712406 LibWeb: Properly simplify sum nodes containing negated sum nodes
This is ad-hoc, see https://github.com/w3c/csswg-drafts/issues/13020

Gains us 5 WPT tests
2025-10-30 12:18:24 +00:00
Zaggy1024
fae2888103 Tests: Add a test for WebGL framebuffers retaining data after present 2025-10-29 22:06:31 -07:00
ayeteadoe
95f239a357 CMake: Add Windows executable helper function
The function currently has 2 purposes: (1) To copy dependent dlls for
executables to output binary directory. This ensures that these helper
processes can be ran after a build given not all DLLs from vcpkg libs
get implicitly copied to the bin folder. (2) Allow fully background
and/or GUI processes to use the Windows Subsystem. This prevents
unnecessarily launching a console for the process, as we either require
no user interaction or the user interaction is all handled in the GUI.
2025-10-29 21:07:52 -06:00
Andreas Kling
fdb85a330e LibJS: Stop tracking whether execution context is strict mode or not
This was only used for basic testing, and forced us to plumb this flag
flag in a bunch of places.
2025-10-29 21:20:10 +01:00
Andreas Kling
fb05063dde LibJS: Let bytecode instructions know whether they are in strict mode
This commits puts the strict mode flag in the header of every bytecode
instruction. This allows us to check for strict mode without looking at
the currently running execution context.
2025-10-29 21:20:10 +01:00
InvalidUsernameException
35254d17d1 LibWeb/CSS: Do not crash when parsing some multi-layer mask shorthands
This fixes a silly bug where we would crash when parsing a multi-layer
mask shorthand property that contained the no-clip keyword but no value
for mask-origin.

Fixes a crash when parsing the CSS of https://www.browserbase.com/. The
site still has other, unrelated problems though.
2025-10-28 23:50:46 -07:00
Lorenz A
14dba82202 LibWeb: Allow whitespace in not after a boolean-expr-group 2025-10-28 21:54:48 -07:00
stelar7
964c0ddde9 LibWeb/IDB: Import getAllRecords test 2025-10-28 19:25:26 -04:00
Luke Wilde
d2b2d57387 LibWeb: Set attribute value directly in HTMLScriptElement::set_src
Otherwise we'll try to use the Utf16String that has already been
through Trusted Types and put it through again. That can also fail if
there's no default policy and there's a `require-trusted-types-for
'script'` directive.

Fixes Outlook failing to load.
2025-10-28 11:05:09 -07:00
Luke Wilde
498e59f71d LibWeb: Set width/height of ImageBitmap when deserializing or receiving 2025-10-28 10:05:56 -07:00
Tete17
b0e02af040 Tests: Add previously crashing TrustedTypes tests
Some of these fail, but we think it is due to a discrepancy between
what the spec says and what the WPT test.

Ref: https://github.com/w3c/trusted-types/issues/595
2025-10-28 13:46:54 +00:00
Lorenz A
ffcd3a4bb2 LibWeb: Count the width of inline-blocks in InlineNodes only once
An BlockContainer inside an InlineNode is called from the
`for each in inclusive_subtree_of_type`  but is also a fragment
 of that InlineNode. Don't count the the Node twice.
2025-10-27 21:45:33 -07:00
Zaggy1024
d9e663fc44 Tests: Add a crash test for setting HTMLMediaElement src repeatedly 2025-10-27 17:28:49 -07:00
Zaggy1024
d17e7fd921 LibMedia+Tests: Adapt TestVorbisDecode to use AudioDataProvider 2025-10-27 17:28:49 -07:00
Zaggy1024
aa8c28eb24 AK+Tests: Allow creating a Duration from 64-bit floating point seconds 2025-10-27 17:28:49 -07:00
Tim Ledbetter
9da723b5c6 LibWeb: Ensure layout is up to date before resolving canvas colors 2025-10-27 16:56:01 -07:00
Jelle Raaijmakers
4dbae64dce LibWeb: Unify objectBoundingBox and userSpaceOnUse coord transformations
There's a fairly complicated interaction between an SVG gradient's paint
transformation and the gradient coordinate transformation required to
correctly draw gradient fills. This was especially noticeable when
scaling down an SVG, resulting in broken gradient coordinates and
graphical glitches.

This changes the objectBoundingBox units to immediately map to the
bounding box's coordinate system, so we can unify the gradient paint
transformation logic and make it a lot simpler. We only need to undo the
bounding box offset and apply the paint transformation to fix a lot of
gradient fill bugs.
2025-10-27 16:42:27 -07:00
Jelle Raaijmakers
c0d08b68af LibWeb: Dump path_bounding_rect for FillPath
This makes it easier to differentiate between FillPath commands in the
display list output.
2025-10-27 16:42:27 -07:00
Tim Ledbetter
e1ff1e2095 LibWeb: Implement CanvasPattern.setTransform()
This method applies the given transformation matrix to a pattern.
2025-10-27 16:41:02 -07:00
Tete17
b77f658c83 LibWeb: Add a bunch of new passing WPT tests 2025-10-27 16:14:20 +00:00
Timothy Flynn
2a68087dfc LibWeb: Do not assume hovered URLs are valid
Let's just not display any tooltip for invalid URLs. This matches how
Firefox behaves.
2025-10-27 14:15:03 +00:00
Callum Law
76dadd45d6 LibWeb: Favour !important property values over animated values 2025-10-27 09:51:50 +00:00
Callum Law
84762021b8 LibWeb: Support triggering multiple animations per animation property
We also now use the computed (rather than cascaded) values when
triggering animations.
2025-10-27 09:48:25 +00:00
Tim Ledbetter
8854bb62c6 LibGfx: Use CSS sRGB serialization for canvas fill styles 2025-10-26 18:55:22 +01:00
Tim Ledbetter
9dceb06992 LibWeb: Don't paint canvas objects with non-visible fill styles 2025-10-26 16:45:38 +01:00
Ben Eidson
01947ded23 LibWeb/WebAudio: Implement basic startRendering
Adds passing WPT. Does not handle actually rendering audio yet.
2025-10-26 14:19:21 +01:00
ayeteadoe
5abb5d555a LibWeb: Implement createImageBitmap() with an ImageBitmap source 2025-10-26 09:01:20 +01:00
Lorenz A
fb258639d1 LibWeb: CSS selector read-write honor is_allowed_to_be_readonly 2025-10-24 19:15:58 +01:00
Tim Ledbetter
5294559f7b LibWeb: Use logical properties in UA stylesheet 2025-10-24 10:11:49 +01:00
Tim Ledbetter
1c00279488 LibWeb: Reset Painter when resetting canvas to its initial state 2025-10-23 18:52:36 +02:00
Tim Ledbetter
f34361950c Tests: Rebaseline failing IndexedDB tests 2025-10-23 15:55:17 +02:00
Tim Ledbetter
15518f119c Tests: Add some basic public suffix tests 2025-10-23 15:01:13 +02:00
Luke Wilde
85e8d2ba38 LibWeb/IndexedDB: Prevent copying and moving of RequestList
RequestList cannot be copied or moved, because m_pending_request_queue
contains lambdas that store pointers to the original RequestList and
completion steps that we don't have a reference to.

Fixes a bunch of WPT regressions and imports the ones that work.
2025-10-23 14:42:45 +02:00
Luke Wilde
4ede2cdf18 LibWebView+WebContent: Allow setting the default time zone
This is used by tests to set the default time zone to UTC.

This is because certain tests create JavaScript Date objects, which are
in the current timezone.
2025-10-23 14:42:45 +02:00
Jelle Raaijmakers
62ae4e878f LibWeb: Implement support for drawing with CanvasPattern
We already had the API, but drawing to the canvas was not affected by
any created CanvasPattern. This moves CanvasPatternPaintStyle to LibGfx
so we don't have to reach into LibWeb, and implements the plumbing to
let Skia use images as a fill pattern.
2025-10-23 13:20:03 +01:00
Jelle Raaijmakers
9753b8e62c Tests: Import WPT canvas repeating pattern test 2025-10-23 13:20:03 +01:00
Pavel Shliak
5ee1031b89 LibWeb: Implement SVGFEColorMatrixElement and feColorMatrix 2025-10-23 13:36:26 +02:00
mikiubo
5b2a71a712 LibWeb: Implement XMLFragmentParser
Implement XMLFragmentParser based on the specification:
https://html.spec.whatwg.org/multipage/xhtml.html

Fixes one WPT in:
domparsing/insert_adjacent_html-xhtml.xhtml
2025-10-23 11:06:39 +01:00
Callum Law
8417d74328 LibWeb: Parse transition property as a coordinating list shorthand
We don't need all this specific logic for parsing the `transition`
property - we also now maintain `none` as such until use time which
gains us a couple extra tests
2025-10-23 10:09:11 +01:00
Callum Law
bb7d5747e7 LibWeb: Serialize transition as a coordinating list shorthand 2025-10-23 10:09:11 +01:00
Callum Law
e78cb71eb3 LibWeb: Dont skip invalid properties when coordinating transition list
Unrecognized property names should still be kept in the list to preserve
matching of indices (e.g. that the Nth property should associate with
the Nth duration)
2025-10-23 10:09:11 +01:00
Callum Law
fd2f3b1f03 Tests: Import transition parsing tests 2025-10-23 10:09:11 +01:00
Callum Law
0b45a68423 LibWeb: Avoid early conversion to CSSPixels when simplifying calculation
Converting to CSSPixels caused us to lose precision and the sign of
signed zeroes.

The values we resolve against in Length::ResolutionContext are still
themselves rounded too early but this is in the right direction.
2025-10-23 09:34:12 +01:00
Callum Law
43b06cbbdd LibWeb: Propagate NaN through CSS sign() function 2025-10-23 09:34:12 +01:00
Callum Law
d32f99b16f LibWeb: Ensure all passed arguments are used when parsing math functions
This disallows things such as `log(1, foobar)` where we would previously
just skip over `foobar` and parse this as `log(1)`
2025-10-23 09:34:12 +01:00
Callum Law
1977a976da LibWeb: Handle inaccuracies resolving transformation matrix type
Doing trigonometric calculations with floating point numbers can
introduce small inaccuracies. This meant that we would sometimes
incorrectly generate a 3d rather than 2d matrix for the resolved value
of `transform`.

Gains us 3 WPT tests.
2025-10-23 09:34:12 +01:00
Callum Law
2d331b9176 LibWeb: Don't swap atan2 arguments in with_simplified_children 2025-10-23 09:34:12 +01:00