Automatic update from web-platform-tests [css-lists] Support for parsing counter-reset: reversed(counter-name) This CL introduces support for the `reversed()` function within the `counter-reset` CSS property. This allows authors to specify that a counter should be reset in a reversed order. This CL includes: - Adding `reversed` as a recognized CSS value keyword. - Adding `CSSCounterValue` class for parsing. - Modifying `CounterDirectives` to store a `is_reset_reversed_` flag. - Updating CSS parsing utilities to correctly parse new syntax. - Updating relevant WPTs to reflect the new parsing behaviour. This CL also fixes `CounterRulesEqual` by iterating over one of `CounterDirectiveMap` and do a lookup with a comparison against the other. The new behavior is behind a runtime flag, CSSCounterResetReversed. Spec: https://drafts.csswg.org/css-lists-3/#counter-reset Bug: 40760770 Change-Id: I5bf294c70ea7db67580bd4db2caf54c509a96c5d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7150339 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Daniil Sakhapov <sakhapov@chromium.org> Commit-Queue: Minseong Kim <jja08111@gmail.com> Cr-Commit-Position: refs/heads/main@{#1551991} -- wpt-commits: ee3c6083c19d22841061d808405d54f9b878dc1b wpt-pr: 56364
76 lines
1.4 KiB
HTML
76 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<link rel=author href="mailto:jarhar@chromium.org">
|
|
<link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/css/support/interpolation-testcommon.js"></script>
|
|
|
|
<body>
|
|
<script>
|
|
test_no_interpolation({
|
|
property: 'counter-increment',
|
|
from: 'initial',
|
|
to: 'add 123'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'counter-increment',
|
|
from: 'add 5',
|
|
to: 'add 123'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'counter-reset',
|
|
from: 'reversed(foo) 5',
|
|
to: 'reversed(foo) 123'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'counter-reset',
|
|
from: 'reversed(foo)',
|
|
to: 'reversed(foo) 123'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'counter-reset',
|
|
from: 'foo 123',
|
|
to: 'reversed(foo) 123'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'counter-reset',
|
|
from: 'foo',
|
|
to: 'reversed(foo)'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'counter-reset',
|
|
from: 'initial',
|
|
to: 'reversed(foo)'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'counter-reset',
|
|
from: 'initial',
|
|
to: 'add 123'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'counter-set',
|
|
from: 'initial',
|
|
to: 'add 123'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'list-style-position',
|
|
from: 'initial',
|
|
to: 'inside'
|
|
});
|
|
|
|
test_no_interpolation({
|
|
property: 'list-style-type',
|
|
from: 'initial',
|
|
to: 'square'
|
|
});
|
|
</script>
|