-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure non-scaling-stroke animates when scaling starts from 0
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
1 parent
82de905
commit f37a819
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |