ladybird/Tests/LibWeb/Text/input/css/transition-properties-updated-on-property-name-changed-in-same-css-style-properties.html
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

15 lines
490 B
HTML

<!DOCTYPE html>
<div id="foo" style="transition: none 1s; top: 0px"></div>
<script src="../include.js"></script>
<script>
test(() => {
// Transitions aren't registered until the second computation as a performance optimization so
// force a recomputation
foo.style.left = "0px";
getComputedStyle(foo).left;
foo.style.transitionProperty = "top";
foo.style.top = "10px";
println(document.getAnimations().length);
});
</script>