LibWeb: Dont try to transition custom properties

Fixes a crash introduced in dd9d6d2
This commit is contained in:
Callum Law 2025-11-11 11:06:31 +13:00 committed by Tim Ledbetter
parent 8fa081cb1d
commit cfc22a4075
Notes: github-actions[bot] 2025-11-11 07:54:45 +00:00
2 changed files with 18 additions and 1 deletions

View file

@ -1322,7 +1322,7 @@ static void compute_transitioned_properties(ComputedProperties const& style, DOM
auto const append_property_mapping_logical_aliases = [&](PropertyID property_id) {
if (property_is_logical_alias(property_id))
properties_for_this_transition.append(map_logical_alias_to_physical_property(property_id, LogicalAliasMappingContext { style.writing_mode(), style.direction() }));
else
else if (property_id != PropertyID::Custom)
properties_for_this_transition.append(property_id);
};

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<style>
#foo {
--bar: 10px;
transition: --bar 1s linear;
}
</style>
<div id="foo"></div>
<script>
requestAnimationFrame(() => {
requestAnimationFrame(() => {
foo.style = "--bar: 100px";
});
});
</script>
</html>