Commit graph

65324 commits

Author SHA1 Message Date
sideshowbarker
8965698ce7 LibWeb: Support accessible-name computation for SVG elements
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
This change adds support for computing accessible names for SVG
elements, per the https://w3c.github.io/svg-aam/#mapping_additional_nd
spec requirements. Otherwise, without this change, accessible names for
SVG elements don’t get exposed as expected.
2024-11-23 04:34:23 +00:00
Psychpsyo
b22341fc77 LibGfx: Support AVIF images with missing pixi property 2024-11-23 03:57:54 +00:00
Shannon Booth
3fffd1129c LibWeb: Implement overload resolution for sequence types
Fixes: #2508
2024-11-23 02:38:21 +00:00
Psychpsyo
e2b2115722 LibWeb: Fix spec link in FlexFormattingContext 2024-11-23 01:37:32 +00:00
Andreas Kling
9a7c9286c4 LibWeb: Support individual scale CSS property
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
2024-11-22 20:06:44 +01:00
Andreas Kling
66a821e731 LibWeb: Support individual translate CSS property 2024-11-22 20:06:44 +01:00
Andreas Kling
6836d4edb1 LibWeb: Fix incomplete plumbing for individual rotate CSS property 2024-11-22 20:06:44 +01:00
Andreas Kling
d6f7fccf49 Tests: Import a bunch of WPT tests from /css/css-transforms 2024-11-22 20:06:44 +01:00
Timothy Flynn
b64ccb95ec LibJS: Implement Temporal.PlainYearMonth.prototype.valueOf 2024-11-22 19:55:24 +01:00
Timothy Flynn
35f22dcf79 LibJS: Implement Temporal.PlainYearMonth.prototype.add/subtract 2024-11-22 19:55:24 +01:00
Timothy Flynn
cb5d1b5086 LibJS: Implement Temporal.PlainYearMonth.prototype.until/since 2024-11-22 19:55:24 +01:00
Timothy Flynn
203269fae2 LibJS: Implement Temporal.PlainYearMonth.prototype.with/equals 2024-11-22 19:55:24 +01:00
Timothy Flynn
2da526423f LibJS: Implement stringification Temporal.PlainYearMonth prototypes 2024-11-22 19:55:24 +01:00
Timothy Flynn
b68d67693e LibJS: Implement the Temporal.PlainYearMonth constructor
And the simple Temporal.PlainYearMonth.prototype getters, so that the
constructed Temporal.PlainYearMonth may actually be validated.
2024-11-22 19:55:24 +01:00
Pavel Shliak
1c733993e0 LibGfx: Do not provide BPP
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
2024-11-22 15:05:46 +01:00
Psychpsyo
3f5fff79ae LibWeb: Update checkbox focus lost test 2024-11-22 13:58:36 +00:00
Psychpsyo
c75dda8f8b LibWeb: Stop radio buttons firing change events when losing focus 2024-11-22 13:58:36 +00:00
Shannon Booth
75b7a3e413 LibWeb: Add definitions for PointerEvent event handlers
Also removing a FIXME about not covering all of the event names as it is
not exactly clear when such a FIXME would be addressed, especially as
these come from multiple specifications.
2024-11-22 14:33:58 +01:00
Jonne Ransijn
4d38e04e48 LibMedia: Remove LibMedia::Audio::LoaderError
This class was used as little more than a wrapper around `Error`,
so we might as well use `Error` in the first place.
2024-11-22 12:43:57 +01:00
Nico Weber
f4b0d17e4b LibWeb: Plumb svg stroking state to DisplayListPlayerSkia
The state is still ignored there, so no behavior change, but this
should make it fairly easy to actually implement complete stroking
support for SVGs.
2024-11-22 12:21:29 +01:00
Borna Lang
201648485f LibGfx: Reimplement from_hsla
- Hue now wraps properly when negative or larger than 360
- The hsl to rgb conversion now closely mirrors the code example from
  the spec.

This fixes a number of WPT tests in
/css/css-color/parsing/color-computed-hsl.html
2024-11-22 12:10:30 +01:00
Timothy Flynn
bc846d933d CI: Use correct path to upload ref test dumps 2024-11-22 09:57:27 +01:00
Timothy Flynn
c6fccc04e1 LibJS: Use Temporal's ISO8601 parser to parse UTC offset strings
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
We now have the Temporal facilities to implement the Date AOs which
parse UTC offset strings using the ISO8601 parser. This patch updates
those AOs and their callers in accordance with the Temporal spec.
2024-11-21 19:24:25 -05:00
Timothy Flynn
64811ab7b6 LibJS: Implement Temporal.PlainMonthDay.prototype.valueOf 2024-11-21 19:24:25 -05:00
Timothy Flynn
5389acc231 LibJS: Implement Temporal.PlainMonthDay.prototype.with/equals 2024-11-21 19:24:25 -05:00
Timothy Flynn
5bccb36a6f LibJS: Implement stringification Temporal.PlainMonthDay prototypes 2024-11-21 19:24:25 -05:00
Timothy Flynn
1a386e78c3 LibJS: Implement the Temporal.PlainMonthDay constructor
And the simple Temporal.PlainMonthDay.prototype getters, so that the
constructed Temporal.PlainMonthDay may actually be validated.
2024-11-21 19:24:25 -05:00
Timothy Flynn
b3b968bed9 LibJS: Implement several more ISO8601 productions
This started with implementing TemporalMonthDayString. It turns out that
the facilities needed to parse that production includes nearly all the
helpers to parse each of:

    TemporalDateTimeString
    TemporalInstantString
    TemporalMonthDayString
    TemporalTimeString
    TemporalYearMonthString
    TemporalZonedDateTimeString

As most of these invoke the same helpers with different options. So,
all 6 of those productions are implemented here.
2024-11-21 19:24:25 -05:00
Aliaksandr Kalenik
8614e0f856 LibWeb: Dispatch pointer events in EventHandler
Now, along with the mouse events we also dispatch pointerup, pointerdown
and pointermove.

With this change shape painting works on https://excalidraw.com/
2024-11-22 00:32:58 +01:00
rmg-x
e4dc758343 LibWeb/CSS: Check for matching custom properties on parent elements
Previously, we were only checking the current element and not the
parents in `ResolvedCSSStyleDeclaration::custom_property()` which wasn't
correct.
2024-11-22 00:32:19 +01:00
Tim Ledbetter
00f6a2b744 LibWeb: Use ByteString arguments for XMLHttpRequest.setRequestHeader()
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
2024-11-21 15:49:48 -05:00
Tim Ledbetter
2aee5d7f62 headless-browser: Treat files ending in '.htm' as valid tests 2024-11-21 15:49:48 -05:00
Tim Ledbetter
5d71da1d73 Tests: Skip CSS flexbox test that currently times out
This change disables the `css-flexbox/order-001.htm` test. Previously,
this test wasn't being run because the filename ends with '.htm'.
2024-11-21 15:49:48 -05:00
Tim Ledbetter
19a5780f0c IDLGenerators: Throw TypeError if IDL ByteString contains element > 255 2024-11-21 15:49:48 -05:00
Andreas Kling
6dc61f895d LibWeb: Make getComputedStyle(e).getPropertyValue() see custom props
A lot of WPT tests rely on this mechanism to test unrelated things.
2024-11-21 21:16:03 +01:00
Tim Ledbetter
ea0e434d1d LibWeb: Allow FormData entry list to be mutated within a FormDataEvent
Previously, the list was copied when constructing the FormData object,
then the original list was passed to the event, meaning any changes to
the list that happened within the event would not be reflected outside
of it.
2024-11-21 20:25:26 +01:00
Andrew Kaster
4cb19c65b4 CMake: Check for Swift-aware C++ compiler more robustly
Instead of looking for "AppleClang", we can just check whether the
CMAKE_CXX_COMPILER understands swift_attr and swift_name.
2024-11-21 12:17:44 -07:00
Andreas Kling
fbe9395928 LibWeb: Stop treating intrinsic size keywords as auto in CSS heights
This commit introduces proper handling of three intrinsic size keywords
when used for CSS heights:

- min-content
- max-content
- fit-content

This necessitated a few plumbing changes, since we can't resolve these
values without having access to containing block widths.

This fixes some visual glitches on https://www.supabase.com/ as well
as a number of WPT tests. It also improves the appearance of dialogs.
2024-11-21 19:21:51 +01:00
Jonne Ransijn
f093a8af67 LibWeb: Copy m_resize_observers before iterating
An inopportune garbage collection may cause collected `ResizeObserver`s
to unregister themselves from `m_resize_observers` while we are
iterating over it, resulting in a use-after-free.
2024-11-21 19:18:26 +01:00
Nico Weber
94b97aa365 LibWeb: Plumbing for svg stroke-dasharray 2024-11-21 18:56:45 +01:00
Aliaksandr Kalenik
c0e90a2a68 LibWeb: Dispatch "click" event on input control associated with <label>
For example, in the following HTML:
```html
<label>
    <input type="radio" name="fruit" value="apple" id="radio1">
    <span class="box"></span>
</label>
```

When any descendant of a <label> element is clicked, a "click" event
must be dispatched on the <input> element nested within the <label>, in
addition to the "click" event dispatched on the clicked descendant.

Previously, this behavior was implemented only for text node descendants
by "overriding" the mouse event target using `mouse_event_target()` in
the TextPaintable. This approach was incorrect because it was limited to
text nodes, whereas the behavior should apply to any box. Moreover, the
"click" event for the input control must be dispatched *in addition* to
the event on the clicked element, rather than redirecting it.
2024-11-21 16:11:03 +01:00
Pavel Shliak
001df24935 LibWebSocket: Clean up #include directives
Some checks are pending
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (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
Push notes / build (push) Waiting to run
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Pavel Shliak
b60cb699a9 LibMedia: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Pavel Shliak
8d13115d9a LibCrypto: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Pavel Shliak
cd14b215d1 LibDNS: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Pavel Shliak
35764db0b7 LibWasm: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Pavel Shliak
caf7983039 LibHTTP: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Pavel Shliak
cdb54fe504 LibRegex: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Psychpsyo
7f989765f5 LibWeb: Fix MouseEvent position values
The clientX and clientY values are, as per the spec, the offset from
the viewport.
This makes them actually be that and also fixes up the calculations
for offsetX, offsetY, pageX and pageY.
I assume all of these got messed up in some sort of refactor in the
past.

The spec comment from the now-removed
compute_mouse_event_client_offset() function sadly has no convenient
place to be anymore so, for now, it is just gone as well.
Personally, I think it'd make sense to refactor a lot of this file so
that not every mouse event repeats a large chunk of (almost) identical
code. That way there'd be a nice place to put the comment without
repeating it all over the file.
But that is out of the scope of this PR.

Also: I know, offsetX and Y are not fully fixed yet, they still
don't ignore the element's CSS transforms but I am working on that
in a new PR.
2024-11-21 13:22:22 +01:00
Aliaksandr Kalenik
41c172c663 LibWeb: Allow custom properties in getPropertyPriority() 2024-11-21 13:16:08 +01:00