Commit Graph

348 Commits

Author SHA1 Message Date
Tim Ledbetter
eb8943cd55 Tests: Remove imported WPT tests that have been deleted upstream 2026-04-04 23:36:58 +02:00
Tim Ledbetter
504a8e6d1d Tests: Resync imported WPT tests 2026-04-04 23:36:58 +02:00
Andreas Kling
17928fa13d LibWeb: Import WPT position-absolute-013 test
Import the css-flexbox abspos position-absolute-013 test from WPT so we
can track its current behavior locally.

The imported baseline currently has 432 subtests total, with 228
passing and 204 still failing.
2026-04-03 14:29:44 +02:00
Andreas Kling
a61a36b184 LibWeb: Import WPT tests for percentage size with indefinite containers
Import tests covering percentage size resolution when the containing
block has auto/indefinite size.
2026-04-03 14:29:44 +02:00
Andreas Kling
7a122c9767 LibWeb: Import WPT tests for percentage heights in flex and grid
Import flex percentage-heights-004 through -010 and -014 (ref tests),
and grid-percentage-rows-indefinite-height-001 and -002 (testharness).

The flex tests all pass. The grid indefinite-height tests have many
failures (16/120 pass and 0/4 pass respectively), reflecting known
gaps in our grid percentage row handling.
2026-04-03 14:29:44 +02:00
Jelle Raaijmakers
38342b2ad3 LibWeb: Add valid normal and none keywords for position-anchor
The WPT test was updated from upstream, but still assumes a wrong
initial value of `none`.

Co-authored-by: Rob Ryan <rob@affclicks.com>
2026-04-01 19:41:46 +01:00
Tim Ledbetter
5a05909eab LibWeb: Disallow animation properties inside keyframe declarations
We now ignore all animation properties from `css-animations-1` declared
within keyframes, except `animation-timing-function`, which is treated
specially.
2026-04-01 11:38:48 +01:00
Sam Atkins
37abfa323d Tests: Import some basic WPT @container tests 2026-03-30 14:49:24 +01:00
Callum Law
3aa71034de LibWeb: Support calc() within clip: rect() 2026-03-30 14:05:10 +01:00
Andreas Kling
7fc4571c17 Tests: Import WPT tests for CSS2 floats and floats-clear
Import ref and text tests from css/CSS2/floats,
css/CSS2/floats-clear, css/CSS2/margin-padding-clear, and
css/CSS2/visuren.

These cover float placement, clear behavior, clearance calculations,
and margin collapsing with floats.
2026-03-29 12:05:25 +02:00
Sam Atkins
ed6a5f25a0 LibWeb: Implement scoped custom element registries 2026-03-27 19:49:55 +00:00
Callum Law
fc3dc8ac8c Tests: Import some @function parsing tests 2026-03-27 11:19:28 +00:00
Jelle Raaijmakers
6241cbb56d Tests: Import WPT tests for text-decoration-skip-ink parsing 2026-03-26 12:15:36 +00:00
Callum Law
46bebf44c5 LibWeb: Ensure custom property definition is valid <declaration-value>?
Previously we assumed that consumed declarations were always valid but
that isn't the case
2026-03-26 01:11:39 +00:00
Callum Law
915fc4602b LibWeb: Implement CSS inherit() function
The remaining failing imported tests are due to wider issues which are
covered by FIXMEs (both existing and added in this commit)
2026-03-19 10:25:37 +01:00
Psychpsyo
80a0a39b79 LibWeb: Add scroll-behavior CSS property
To quote the spec:
"User agents may ignore this property."
So that is what we do.
2026-03-16 08:44:50 +00:00
Tim Ledbetter
2b8967d55f LibWeb: Distribute grid track free space among unfrozen tracks only
Previously, during grid track maximization we used the total number of
grid tracks as the denominator when distributing the available free
space. Using a larger denominator than expected meant that the
algorithm needed a larger number of iterations than necessary to
converge leading to rounding errors in the final track sizes.
2026-03-10 22:39:55 +01:00
Callum Law
c1add21be2 Tests: Import some CSS if() tests 2026-03-09 14:36:18 +00:00
Tim Ledbetter
e49b643f86 LibWeb: Allow custom properties on pseudo-elements with property lists 2026-03-04 13:36:53 +01:00
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