Commit Graph

329 Commits

Author SHA1 Message Date
Tim Ledbetter
f05bc7c0cd LibWeb: Implement dominant-baseline for SVG text
This property determines the default baseline used to align content
within the given box.
2026-02-26 09:23:23 +01:00
Andreas Kling
90cfa2597d Tests: Import WPT tests for clientLeft and clientTop
Import several WPT tests covering client* properties:
- client-props-input.html (border offsets on input/textarea)
- client-props-root.html (root element client properties)
- client-props-zoom.html (client properties with zoom)
- client-props-inline-list-item.html (inline list-item display)
- client-props-root-display-none-crash.html (crash test)
- table-client-props.html (table element client properties)
2026-02-22 13:24:05 +01:00
Callum Law
6705bd187c LibWeb: Account for generic font families in FontFaceSet::load()
Fixes a regression in d998a0a which was crashing the imported test
2026-02-19 12:00:52 +01:00
Callum Law
f36d0407ec Tests: Import some @font-feature-values tests 2026-02-17 12:25:27 +00:00
Aliaksandr Kalenik
3c73457b26 LibWeb: Implement CSS Grid dense packing and fix span placement
Implement the `dense` keyword for `grid-auto-flow` so auto-placed items
backfill earlier gaps in the grid. The sparse/dense cursor logic is now
centralized in `place_grid_items()` step 4: dense resets the cursor to
the grid start before each search, while sparse keeps advancing forward.

Also fix a pre-existing bug where `find_unoccupied_place()` and several
placement helpers only checked if a single cell was unoccupied, ignoring
multi-cell spans. Add `OccupationGrid::is_area_occupied()` and use it
throughout to correctly verify the entire rectangular area is available.
2026-02-16 20:00:17 +01:00
Psychpsyo
a7267f711b LibWeb: Add overflow-clip-margin-* properties
The corner radius isn't quite right yet, but this gives us
another couple WPT passes for these.
2026-02-14 22:58:21 +01:00
Callum Law
9de3ddf8f9 Tests: Import some counter style tests 2026-02-12 10:33:09 +00:00
Tim Ledbetter
0b346d1952 LibWeb: Distribute colspan cell width equally when baseline is zero
This matches the behavior of other engines.
2026-02-06 11:37:14 +00:00
Sam Atkins
615e0c36a4 Tests: Import computed color-mix() test
All of this fails right now, but will gain some passes over subsequent
commits, and importing now lets us track that.
2026-02-05 13:48:10 +00:00
Callum Law
6df4fe199e Tests: Import some @counter-style parsing tests 2026-02-03 09:58:47 +00:00
Tim Ledbetter
c44b30f0f1 LibWeb: Exclude UA internal shadow root elements in elementFromPoint()
When `elementFromPoint()` or `elementsFromPoint()` returns an element
that is inside a UA internal shadow root, we now return the shadow host
for that element.
2026-02-02 20:17:03 +00:00
Tim Ledbetter
66246a0f3a LibWeb: Implement composition for grid track size lists 2026-01-26 03:20:08 +01:00
Callum Law
04885a2d41 Tests: Import some more composition and interpolation tests 2026-01-22 11:29:41 +00:00
Tim Ledbetter
115a794291 LibWeb: Implement composition of filter function lists 2026-01-16 11:29:30 +00:00
Tim Ledbetter
09290ae05f LibWeb: Ensure filter values are absolutized before interpolation 2026-01-16 11:29:30 +00:00
Gingeh
37c33c8215 LibWeb: Don't crash when clicking on display: contents element 2026-01-16 10:11:07 +01:00
Tim Ledbetter
40d217bde2 LibWeb/CSS: Serialize shorthands with var() to original value 2026-01-15 11:50:45 +00:00
Psychpsyo
fe2bc2bfe7 LibWeb: Improve scrollingElement handling
This change is currently entirely undetectable because of what the
added FIXME talks about. Currently, the HTML element's overflow is
always set to visible in both axes, so it getting set to "clip" in
the imported test ends up not mattering at all.
2026-01-13 11:47:13 +00:00
Tim Ledbetter
42292a9983 LibWeb: Import some css-transforms interpolation tests 2026-01-13 09:36:47 +01:00
Tim Ledbetter
79a427e1ef LibWeb: Implement HTMLImageElement x() and y() getters
These attributes get the image's top left border edge  relative to the
root element's origin.

These methods ignore any transforms.
2026-01-11 00:33:08 +01:00
Sam Atkins
4a4c439ffe Tests: Re-import disabled WPT crash tests in Text/ directory
We've had proper support for crash tests, so these can go where they
belong.
2026-01-09 08:11:11 +01:00
Sam Atkins
cef2591007 Tests: Reimport scrollParent test 2026-01-06 15:54:57 +00:00
Tim Ledbetter
2ff77589df LibWeb: Add FontFaceSetLoadEvent 2026-01-06 12:24:42 +01:00
Callum Law
a2b2baca7e Tests: Import some more inset() tests 2026-01-06 10:50:06 +01:00
Tim Ledbetter
3fd4eb56ee LibWeb: Implement FontFaceSet.clear() 2026-01-05 16:15:58 +00:00
Aliaksandr Kalenik
c9a1548c00 Tests: Import layout-algorithm/grid-flex-track-intrinsic-sizes-* 2026-01-03 16:41:31 +01:00
Aliaksandr Kalenik
5efa268255 LibWeb: Fix fit-content() with zero limit and auto min-width in grid
This commit includes two interdependent changes that must be applied
together:
- Treat `fit-content()` tracks as having an intrinsic min sizing
  function when the limit resolves to zero.
- When clamping growth limit to fit-content limit, use `max(base_size,
  fit_content_limit)` instead of just `fit_content_limit` to preserve
  intrinsic sizing contributions.

These changes are coupled because the first change causes
`fit-content(0)` tracks to participate in intrinsic sizing, while the
second ensures the base size from that sizing is not discarded during
clamping.
2026-01-03 16:41:31 +01:00
Aliaksandr Kalenik
c9b6c121d7 Tests: Import layout-algorithm/grid-flex-track-intrinsic-sizes-002.html 2026-01-03 16:41:31 +01:00
Callum Law
9c93fdbd9a Tests: Import some WPT background position parsing tests 2026-01-02 11:43:10 +01:00
Callum Law
16d1498bb0 Tests: Import some more animation tests 2025-12-23 14:54:22 +01:00
Sam Atkins
cae526286a Tests: Import CSSOM-View IDL harness test 2025-12-23 14:24:28 +01:00
Sam Atkins
c9f7e0d88c Tests: Reimport attr-all-types WPT test
This has changed quite a bit since we imported it.
2025-12-17 11:53:08 +00:00
Sam Atkins
40b25f631b Tests: Re-import some border- and outline-width tests
Some subtests changed in response to this CSSWG resolution:
https://github.com/w3c/csswg-drafts/issues/11494#issuecomment-2675800489

Basically, `border-style: none` now affects the used value of
`border-width`, not the computed value. (And the same for `outline`
properties.)

This affects way more tests than I expected because
interpolation-testcommon.js now adds tests for composition.
2025-12-15 21:28:19 +01:00
Sam Atkins
53609c49ce Tests: Import some ::part() tests 2025-12-15 14:12:39 +00:00
Callum Law
f751e59c88 LibWeb: Import some circle() and ellipse() tests 2025-12-12 12:20:16 +00:00
Lorenz A
0313b2d97e LibWeb: Produce containing absolute boxes with will-change properties 2025-12-11 09:59:52 +00:00
Sam Atkins
8d404c58ec Tests: Import a ::part() serialization test 2025-12-08 17:28:09 +01:00
Sam Atkins
fb8575a57e Tests: Import some @import layer tests 2025-12-08 13:30:53 +00:00
Callum Law
68d07355ed LibWeb: Coordinate border-* longhands at compute time
Updates the `position-serialization.html` test to be 2-valued so that
all cases are covered.
2025-12-08 11:46:50 +00:00
Sam Atkins
72cea01e3b Tests: Import some WPT tests for the part attribute 2025-12-08 09:44:32 +00:00
Sam Atkins
ed7a86b8cc LibWeb/DOM: Set the pseudo_element on created Animation/TransitionEvents
Also import a couple of WPT tests that now pass.
2025-12-03 13:29:51 +01:00
Sam Atkins
d9abfdf2ab LibWeb/CSS: Allow non-StyleValueLists in animation properties
Reverts 51f694c6af and
b52beb5105.

The animation-* properties are in an awkward place currently, where
they *should* be lists, and a lot of our code acts as if they are, but
actually we parse them as single values. The above commits caused a few
WPT tests to crash - see link below. I've imported one of them to
prevent future regressions.
https://wpt.fyi/results/css/css-typed-om/the-stylepropertymap/properties?diff&filter=ADC&run_id=6293362870321152&run_id=5123272984494080
2025-12-02 09:48:32 +00:00
Sam Atkins
71397c876c Tests: Import gradient interpolation test
Importing separately to make progress easier to see.
2025-12-01 11:01:06 +00:00
Callum Law
65512f5403 LibWeb: Import CSS random function tests 2025-12-01 11:00:33 +00:00
Callum Law
63538c8a75 LibWeb: Prefer transitioned property values over important
CSS transitions have a higher precedence in the cascade than important
properties
2025-11-28 16:15:49 +00:00
Callum Law
b2b889e1da LibWeb: Ensure registered transitions are reflective of properties
Previously we would only update these if:
a) We had a cascaded value for `transition-property`
b) The source of that cascaded value had changed since we last
   registered transitions

This meant that there were a lot of changes we didn't apply:
 - Changes exclusively to properties other than `transition-property`
   (e.g. `transition-duration`, `transition-behavior`, etc)
 - Removing the `transition-property` property
 - Updating the `transition-property` property in a way that didn't
   change it's source (e.g. setting it within inline-style)

Unfortunately this does mean that we now register transitions for all
properties on most elements since "all" is the initial value for
"transition-property" which isn't great for performance, but that can be
looked at in later commits.
2025-11-23 09:43:24 +01:00
Psychpsyo
f0e6bfbc9f LibWeb: Reimport transitioncancel-003.html to make it less flaky 2025-11-21 18:42:36 +01:00
Jelle Raaijmakers
674e1a5c47 LibWeb: Support transitions between 3D and non-derivative 2D functions
If either of the two transform functions during interpolation is a 3D
function, both of them get coerced to a 3D function before deciding what
to do next. However, we only supported converting 2D functions to 3D if
they had a 2D primitive they could be converted to first.

Change our behavior to default to converting to matrix3d() if there is
no explicit conversion path. Fixes a crash in
`css/css-transforms/animation/transform-interpolation-004.html`.
2025-11-19 10:08:11 +01:00
Jelle Raaijmakers
e4dc2663ba LibWeb: Reimplement transform interpolation according to spec
We had a partial implementation of transformation function interpolation
that did not support numerical interpolation of simple functions (e.g.
`scale(0)` -> `scale(1)`). This refactors the interpolation to follow
the spec more closely.

Gains us 267 WPT subtest passes in `css/css-transforms`.

Fixes #6774.
2025-11-18 14:36:26 +01:00
Psychpsyo
edccb92da7 LibWeb: Make CSSPerspective correctly clamp its input for toMatrix() 2025-11-13 15:47:00 +01:00