Skip to content

Commit cfc22a4

Browse files
Calme1709tcl3
authored andcommitted
LibWeb: Dont try to transition custom properties
Fixes a crash introduced in dd9d6d2
1 parent 8fa081c commit cfc22a4

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Libraries/LibWeb/CSS/StyleComputer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ static void compute_transitioned_properties(ComputedProperties const& style, DOM
13221322
auto const append_property_mapping_logical_aliases = [&](PropertyID property_id) {
13231323
if (property_is_logical_alias(property_id))
13241324
properties_for_this_transition.append(map_logical_alias_to_physical_property(property_id, LogicalAliasMappingContext { style.writing_mode(), style.direction() }));
1325-
else
1325+
else if (property_id != PropertyID::Custom)
13261326
properties_for_this_transition.append(property_id);
13271327
};
13281328

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<style>
4+
#foo {
5+
--bar: 10px;
6+
transition: --bar 1s linear;
7+
}
8+
</style>
9+
<div id="foo"></div>
10+
<script>
11+
requestAnimationFrame(() => {
12+
requestAnimationFrame(() => {
13+
foo.style = "--bar: 100px";
14+
});
15+
});
16+
</script>
17+
</html>

0 commit comments

Comments
 (0)