Skip to content

Commit

Permalink
Bug 1846029 [wpt PR 41228] - CSSTransitionDiscrete: Rename transition…
Browse files Browse the repository at this point in the history
…-animation-type to transition-behavior, a=testonly

Automatic update from web-platform-tests
CSSTransitionDiscrete: Rename transition-animation-type to transition-behavior

This patch also renames the "discrete" value to "allow-discrete"
This was resolved in the csswg:
w3c/csswg-drafts#8857 (comment)

Bug: 1453112
Change-Id: I9b9aad124376d5e7bf532d891b7a0e25b651ce2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4718633
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1176694}

--

wpt-commits: d4c199f7f994faa4b63c61afea89c936e770509e
wpt-pr: 41228
  • Loading branch information
josepharhar authored and moz-wptsync-bot committed Aug 10, 2023
1 parent b077fe3 commit 8d557f1
Show file tree
Hide file tree
Showing 19 changed files with 86 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

test_interpolation({
property: 'display',
animationType: 'discrete',
behavior: 'allow-discrete',
from: 'block',
to: 'none',
}, [
Expand All @@ -43,7 +43,7 @@
// can be worked around by using @initial.
test_interpolation({
property: 'display',
animationType: 'discrete',
behavior: 'allow-discrete',
from: 'none',
to: 'block',
'CSS Transitions with transition: all': alwaysBlock,
Expand All @@ -65,14 +65,14 @@

test_interpolation({
property: 'display',
animationType: 'discrete',
behavior: 'allow-discrete',
from: 'block',
to: 'block'
}, alwaysBlock);

test_interpolation({
property: 'display',
animationType: 'discrete',
behavior: 'allow-discrete',
from: 'none',
to: 'none'
}, alwaysNone);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

test_interpolation({
property: 'content-visibility',
animationType: 'discrete',
behavior: 'allow-discrete',
from: 'visible',
to: 'hidden',
}, [
Expand All @@ -40,7 +40,7 @@

test_interpolation({
property: 'content-visibility',
animationType: 'discrete',
behavior: 'allow-discrete',
from: 'hidden',
to: 'visible',
}, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
transition-delay: 2s;
transition-property: overlay;
transition-duration: 2s;
transition-animation-type: discrete;
transition-behavior: allow-discrete;
}
[popover]::backdrop {
background-color: blue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
display: block;
visibility: hidden;
transition: overlay 60s step-end;
transition-animation-type: discrete;
transition-behavior: allow-discrete;
}
[popover]::backdrop {
background-color: green;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
#transition-in {
transition: overlay 0.1s step-end;
transition-animation-type: discrete;
transition-behavior: allow-discrete;
background-color: green;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
#transition-in {
transition: overlay 60s step-end;
transition-animation-type: discrete;
transition-behavior: allow-discrete;
background-color: red;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
#green.transition-enabled {
transition: overlay 60s step-end;
transition-animation-type: discrete;
transition-behavior: allow-discrete;
}
</style>
<div id="red" popover="manual"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
.enable-transitions :is(#transition-in, #transition-out) {
transition: overlay 60s step-end;
transition-animation-type: discrete;
transition-behavior: allow-discrete;
}
</style>
<div id="container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from: "from",
to: "to",
expected: "to",
animationType: "discrete",
behavior: "allow-discrete",
}, 'A custom property of type <custom-ident> can yield a discrete CSS Transition');

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from: 'url("https://example.com/from")',
to: 'url("https://example.com/to")',
expected: 'url("https://example.com/to")',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <image> can yield a CSS Transition');

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,191 +11,191 @@
from: '100deg, 200deg',
to: '300deg',
expected: '300deg',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <angle># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<angle>+",
from: '100deg 200deg',
to: '300deg',
expected: '300deg',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <angle>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<color>#",
from: 'rgb(100, 100, 100), rgb(150, 150, 150)',
to: 'rgb(200, 200, 200)',
expected: 'rgb(200, 200, 200)',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <color># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<color>+",
from: 'rgb(100, 100, 100) rgb(150, 150, 150)',
to: 'rgb(200, 200, 200)',
expected: 'rgb(200, 200, 200)',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <color>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<custom-ident>#",
from: 'foo, bar',
to: 'baz',
expected: 'baz',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <custom-ident># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<custom-ident>+",
from: 'foo bar',
to: 'baz',
expected: 'baz',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <custom-ident>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<image>#",
from: 'url("https://example.com/foo"), url("https://example.com/bar")',
to: 'url("https://example.com/to")',
expected: 'url("https://example.com/to")',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <image># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<image>+",
from: 'url("https://example.com/foo") url("https://example.com/bar")',
to: 'url("https://example.com/to")',
expected: 'url("https://example.com/to")',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <image>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<integer>#",
from: '100, 200',
to: '300',
expected: '300',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <integer># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<integer>+",
from: '100 200',
to: '300',
expected: '300',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <integer>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<length-percentage>#",
from: '100px, 200px',
to: '300%',
expected: '300%',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <length-percentage># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<length-percentage>+",
from: '100px 200px',
to: '300%',
expected: '300%',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <length-percentage>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<length>#",
from: '100px, 200px',
to: '300px',
expected: '300px',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <length># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<length>+",
from: '100px 200px',
to: '300px',
expected: '300px',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <length>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<number>#",
from: '100, 200',
to: '300',
expected: '300',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <number># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<number>+",
from: '100 200',
to: '300',
expected: '300',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <number>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<percentage>#",
from: '100%, 200%',
to: '300%',
expected: '300%',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <percentage># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<percentage>+",
from: '100% 200%',
to: '300%',
expected: '300%',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <percentage>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<resolution>#",
from: '100dppx, 200dppx',
to: '300dppx',
expected: '300dppx',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <resolution># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<resolution>+",
from: '100dppx 200dppx',
to: '300dppx',
expected: '300dppx',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <resolution>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<time>#",
from: '100s, 200s',
to: '300s',
expected: '300s',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <time># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<time>+",
from: '100s 200s',
to: '300s',
expected: '300s',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <time>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<url>#",
from: 'url("https://example.com/foo"), url("https://example.com/bar")',
to: 'url("https://example.com/to")',
expected: 'url("https://example.com/to")',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <url># yields a discrete CSS Transition if the lists do not contain the same number of values');

transition_test({
syntax: "<url>+",
from: 'url("https://example.com/foo") url("https://example.com/bar")',
to: 'url("https://example.com/to")',
expected: 'url("https://example.com/to")',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <url>+ yields a discrete CSS Transition if the lists do not contain the same number of values');

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from: "translateX(100px)",
to: "translateX(200px)",
expected: "translateX(150px)",
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <transform-function> can yield a CSS Transition');

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from: "translateX(100px) scale(2)",
to: "translateX(200px) scale(4)",
expected: "translateX(150px) scale(3)",
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <transform-list> can yield a CSS Transition');

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from: 'url("https://example.com/from")',
to: 'url("https://example.com/to")',
expected: 'url("https://example.com/to")',
animationType: 'discrete',
behavior: 'allow-discrete',
}, 'A custom property of type <url> can yield a discrete CSS Transition');

</script>
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ function transition_test(options, description) {
});

target.style.transition = `${options.transitionProperty} 1s -500ms linear`;
if (options.animationType) {
target.style.transitionAnimationType = options.animationType;
if (options.behavior) {
target.style.transitionBehavior = options.behavior;
}
target.style.setProperty(customProperty, options.to);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
width: 100px;
height: 100px;
transition: all 1s;
transition-animation-type: discrete;
transition-behavior: allow-discrete;
}
#target.animated {
float: right;
Expand All @@ -30,5 +30,5 @@
target.classList.add('animated');
await waitForAnimationFrames(1);
assert_true(transitionstartFired);
}, 'transition:all with transition-animation-type:discrete should animate discrete properties.');
}, 'transition:all with transition-behavior:allow-discrete should animate discrete properties.');
</script>
Loading

0 comments on commit 8d557f1

Please sign in to comment.