Commit graph

272 commits

Author SHA1 Message Date
Sam Atkins
37cffba30e LibWeb/CSS: Forward-declare some calculation-related types
Saves us having to include CalculatedStyleValue.h from some headers.
2025-10-13 09:59:38 +01:00
Callum Law
814efa9809 LibWeb: Parse corner-*-shape physical longhands 2025-10-09 10:23:20 +01:00
Luke Wilde
d87c2a55b0 LibWeb/IndexedDB: Remove spin_until from checking finished transactions 2025-10-08 17:25:29 +02:00
Luke Wilde
52b53e52fb LibWeb/IndexedDB: Remove spin_until from waiting for connection closure 2025-10-08 17:25:29 +02:00
Luke Wilde
5c69784ef9 LibWeb/IndexedDB: Remove spin_until from request processing 2025-10-08 17:25:29 +02:00
Johannes Gustafsson
f04b866cb0 LibWeb: Implement stubs for XPathEvaluator 2025-10-03 13:16:11 +02:00
Sam Atkins
3af8e705c1 LibWeb/CSS: Introduce a PropertyNameAndID type
We often want to call a function with either a built-in or custom
property, and that means either passing it as a string (and converting
back and forth between strings and PropertyIDs) or using the
PropertyIDOrCustomPropertyName variant, which complicates user code.
PropertyNameAndID is intended to make that easier: Create it with a
string or PropertyID, and it can tell you either one.
2025-10-02 13:46:04 +01:00
Tim Ledbetter
a00e7cb20b LibWeb: Implement <feComposite> SVG filter 2025-09-30 22:33:12 +01:00
Sam Atkins
d5977b9f74 LibWeb/CSS: Implement CSSTransformValue
This is the final CSSStyleValue class used by the per-property test
harness, so those now actually run instead of throwing an exception on
load. 🎉

+39 WPT subtests. (Plus however many from the per-property tests finally
running.)

The two failing serialization tests are also failed by Safari in exactly
the same way, so that seems more like a spec issue. (The spec is
incomplete in quite a few places.) The failing subtest for toMatrix() is
also a spec issue: is2D is handled oddly by CSSMatrixComponent and this
subtest fails because of the `matrix` getter, which is unspecified. See
https://github.com/w3c/css-houdini-drafts/issues/1155 for details.
2025-09-24 12:27:05 +01:00
Sam Atkins
a1db5e7789 LibWeb/CSS: Implement CSSMatrixComponent
Equivalent to the matrix() and matrix3d() transform functions.

+19 WPT subtests.
2025-09-24 12:27:05 +01:00
Sam Atkins
2ffbb284f2 LibWeb/CSS: Implement CSSPerspective
Equivalent to the perspective() transform function.

+34 WPT subtests, and the transformvalue-normalization test now runs to
completion instead of throwing an error - though its cases still fail
until CSSTransformValue is implemented.
2025-09-24 12:27:05 +01:00
Sam Atkins
da883877f5 LibWeb/CSS: Implement CSSSkewY
Equivalent to the skewY() transform function.

+27 WPT subtests.
2025-09-24 12:27:05 +01:00
Sam Atkins
b0cc1c6406 LibWeb/CSS: Implement CSSSkewX
Equivalent to the skewX() transform function.

+27 WPT subtests.
2025-09-24 12:27:05 +01:00
Sam Atkins
161e384521 LibWeb/CSS: Implement CSSSkew
Equivalent to the skew() transform function.

+39 WPT subtests.
2025-09-24 12:27:05 +01:00
Sam Atkins
456946368e LibWeb/CSS: Implement CSSScale
Equivalent to the scale() transform functions.

+33 WPT subtests.
2025-09-24 12:27:05 +01:00
Sam Atkins
d348d8d9b8 LibWeb/CSS: Implement CSSRotate
Equivalent to the rotate() transform functions.

+39 WPT subtests.
2025-09-24 12:27:05 +01:00
Sam Atkins
c7d22d8cfd LibWeb/CSS: Implement CSSTranslate
Equivalent to the translate() transform functions.

+34 WPT subtests.
2025-09-24 12:27:05 +01:00
Sam Atkins
8e86bf2dd0 LibWeb/CSS: Implement CSSTransformComponent
This is a base type for the various transform functions.

CSSMatrixComponent's to_string() can throw exceptions, so to_string() is
implemented that way. https://github.com/w3c/fxtf-drafts/issues/611

+9 WPT subtests.
2025-09-24 12:27:05 +01:00
Niccolo Antonelli Dziri
a72b0c29bb LibWeb: Add a simplified Notification constructor
This allows the Notification object to be created in javascript without
any additional functionalities.

It passes two wpt tests which require a call to the notification
constructor with no arguments.

https://wpt.live/notifications/constructor-basic.https.html

https://wpt.live/notifications/constructor-invalid.https.html
2025-09-24 11:53:14 +01:00
Callum Law
b0e3af7d10 LibWeb: Parse text-underline-position property
This introduces the `TextUnderlinePositionStyleValue` class, it is
possible to represent `text-underline-position` as a `StyleValueList`
but would have required ugly workarounds for either serialization or in
`ComputedProperties::text_underline_position`
2025-09-15 15:24:20 +01:00
Sam Atkins
5904694844 LibWeb/CSS: Implement CSSImageValue and reify images as it
This is specced to be opaque, so there's not much to it.
2025-09-15 08:47:10 +01:00
Psychpsyo
56739b4b16 LibWeb: Implement plumbing for view transitions
This implements large parts of the CSS view-transitions-1 spec.
2025-09-07 13:58:05 +01:00
Sam Atkins
f57ffc3655 LibWeb/CSS: Introduce a LengthPercentageOrAuto type 2025-09-04 13:31:24 +01:00
Sam Atkins
577564a1a2 LibWeb/CSS: Add LengthOrAutoOrCalculated
It's `LengthOrCalculated` for places that want `<length> | auto`.
2025-09-04 13:31:24 +01:00
Sam Atkins
f663c0a72d LibWeb/CSS: Introduce a LengthOrAuto type
`clip: rect()` in particular wants this for its parameters.
2025-09-04 13:31:24 +01:00
Luke Wilde
9adf27f009 LibWeb: Add tests for Gamepad API by utilising virtual SDL3 joysticks 2025-09-01 21:10:47 +02:00
Luke Wilde
74e0483ea5 LibWeb: Implement the Gamepad API with SDL3 2025-09-01 21:10:47 +02:00
Sam Atkins
177395155a LibWeb/CSS: Implement CSSMathClamp
As the final CSSMathFoo class, this makes the serialization test finally
run instead of crashing.
2025-08-29 11:57:10 +02:00
Sam Atkins
dd3007dcd7 LibWeb/CSS: Implement CSSMathMax
Basically the same as CSSMathMin.
2025-08-29 11:57:10 +02:00
Sam Atkins
1a35795f47 LibWeb/CSS: Implement CSSMathMin 2025-08-29 11:57:10 +02:00
Sam Atkins
8efd0639cd LibWeb/CSS: Implement CSSMathInvert
This is almost identical to CSSMathNegate.
2025-08-29 11:57:10 +02:00
Sam Atkins
f2ec04d20d LibWeb/CSS: Implement CSSMathNegate 2025-08-29 11:57:10 +02:00
Sam Atkins
e21610180f LibWeb/CSS: Implement CSSMathProduct
This is almost identical to CSSMathSum.
2025-08-29 11:57:10 +02:00
Sam Atkins
e17052a343 LibWeb/CSS: Implement CSSMathSum 2025-08-29 11:57:10 +02:00
Sam Atkins
a46c980629 LibWeb/CSS: Implement CSSNumericArray 2025-08-29 11:57:10 +02:00
Sam Atkins
6c8876cdb8 LibWeb/CSS: Implement CSSMathValue
This is a base class for the various math functions, so it's not used
directly anywhere.
2025-08-29 11:57:10 +02:00
Tim Ledbetter
d4f05bc4ef LibWeb: Implement <feImage> SVG filter 2025-08-29 10:15:24 +01:00
Tim Ledbetter
ea41aba6c7 LibWeb: Move common SVGViewport code into an SVGFitToViewBox class
Special handling for SVGClipPathElement and SVGMaskElement, which use a
a ViewBox and PreserveAspectRatio value internally, has been moved to
`SVGFormattingContext`.
2025-08-28 15:42:56 +02:00
stelar7
752210aec1 LibWeb/IDB: Implement IDBRecord 2025-08-27 16:13:25 +02:00
stelar7
b1c1e33bae LibWeb/EME: Implement MediaKeySystemAccess 2025-08-27 09:58:00 +02:00
ayeteadoe
3df8e00d91 LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Sam Atkins
5384338788 LibWeb/CSS: Implement CSSUnitValue 2025-08-22 09:48:30 +01:00
Sam Atkins
6cb8e92bd4 LibWeb/CSS: Stub out CSSNumericValue
Most of the methods on this rely on its subclasses existing, so for now
it's very basic.
2025-08-22 09:48:30 +01:00
Sam Atkins
5bdc2981e3 LibWeb/CSS: Rename CSSNumericType to NumericType
The CSSNumericType defined in the spec is a simple dictionary which is
only used for OM purposes. This NumericType class is used internally
and matches the more abstract definition of a "type".
2025-08-22 09:48:30 +01:00
Sam Atkins
6428c9990d LibWeb/CSS: Implement CSSUnparsedValue and CSSVariableReferenceValue
We don't serialize these the way WPT expects, because we don't implement
the comment-insertion rules from CSS-Syntax. We don't implement that
for regular serialization either, so it's something we can worry about
later.
2025-08-21 10:21:54 +01:00
Sam Atkins
a93c6a347f LibWeb/CSS: Implement CSSKeywordValue
CSSStyleValue is adjusted to allow for subclasses. Serialization for
CSSKeywordValue is implemented differently than the spec says because
of a spec bug: https://github.com/w3c/csswg-drafts/issues/12545
2025-08-21 10:21:54 +01:00
Jelle Raaijmakers
715de4693c LibGC+LibWeb: Remove unused include and class 2025-08-19 11:12:23 +02:00
Tim Ledbetter
cfc6439c12 LibWeb: Use shape-rendering to control anti aliasing for SVG paths
Anti-aliasing is disabled if `shape-rendering` is set to
`optimizeSpeed` or `crispEdges`.
2025-08-19 09:47:28 +01:00
Sam Atkins
3bb54ffd59 LibWeb/CSS: Stub out StylePropertyMap 2025-08-13 09:47:50 +01:00
Sam Atkins
1620fc5bf6 LibWeb/CSS: Stub out StylePropertyMapReadOnly
Nothing yet produces this, and the useful parts of get() and get_all()
will have to wait until type reification is implemented.
2025-08-13 09:47:50 +01:00