Skip to content

Commit

Permalink
Ignore SVG attribute animations for commitStyles
Browse files Browse the repository at this point in the history
We currently send SVG attribute interpolations to StyleResolver::
StyleForInterpolations, which cannot handle such interpolations.

Fixed by filtering out PropertyHandles which are not CSS properties.

Note that AnimationUtils::ForEachInterpolatedPropertyValue performs
the same filtering already, so this CL should have no effect on the
functionality of commitStyles.

Fixed: 1385691
Change-Id: I17bc21f0ddac25cee521404d089ba0b4b64a2a5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4040133
Reviewed-by: Kevin Ellis <[email protected]>
Commit-Queue: Anders Hartvoll Ruud <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1074213}
  • Loading branch information
andruud authored and chromium-wpt-export-bot committed Nov 21, 2022
1 parent 8bb98a4 commit 35c08ba
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions web-animations/interfaces/Animation/commitStyles-svg-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html class=test-wait>
<link rel=help href="https://crbug.com/1385691">
<svg id=svg></svg>
<script>
let anim = svg.animate({'svg-viewBox': '1 1 1 1'}, 1);
anim.ready.then(() => {
anim.commitStyles();
document.documentElement.classList.remove('test-wait');
});
</script>
</html>

0 comments on commit 35c08ba

Please sign in to comment.