Skip to content

Commit

Permalink
ensure non-scaling-stroke animates when scaling starts from 0
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D212352

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1883285
gecko-commit: b1ba7de67667d1404fabb3accf66e2c5a8e53cf8
gecko-reviewers: emilio
  • Loading branch information
longsonr authored and sadym-chromium committed Jun 3, 2024
1 parent 82de905 commit f37a819
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions svg/painting/reftests/non-scaling-stroke-002.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>non-scaling-stroke with scaling</title>
<link rel="help" href="https://svgwg.org/svg2-draft/painting.html#PaintingVectorEffects" />
<link rel="match" href="green-100x100.svg" />
<script src="/common/reftest-wait.js"></script>
<body>
<style>
body {
border: none;
margin: 0;
width: 200px;
height: 200px;
transform: scale(2);
}
svg {
width: 100px;
height: 100px;
}
rect {
fill: red;
stroke: green;
stroke-width: 50px;
transform: scale(0);
animation: reset 0.01s ease-in-out 1 both;
vector-effect: non-scaling-stroke;
}
@keyframes reset { to { transform: none; }}
</style>
<svg>
<rect width="75" height="75"/>
<script>
onload = () => {
requestAnimationFrame(() => { requestAnimationFrame(() => {
requestAnimationFrame(() => { takeScreenshot() });
})});
};
</script>
</svg>
</body>
</html>

0 comments on commit f37a819

Please sign in to comment.