-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This includes style system and layout update. I add 3 extra reftests because the original tests use ray() function as the offset-path, but we don't support it. It'd be better to add tests using a different type of offset-path. The spec issue about the serialization: w3c/fxtf-drafts#340 Differential Revision: https://phabricator.services.mozilla.com/D32212 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1429301 gecko-commit: ae71e496d5873033d9696c54fb8b36297abbf8d0 gecko-integration-branch: autoland gecko-reviewers: emilio
- Loading branch information
1 parent
628eae4
commit 0fb89fa
Showing
8 changed files
with
150 additions
and
21 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
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,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Motion Path: offset-rotate</title> | ||
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property"> | ||
<link rel="match" href="offset-rotate-ref.html"> | ||
<meta name="assert" content="This tests offset-rotate <angle>"> | ||
<style> | ||
#target { | ||
position: absolute; | ||
left: 300px; | ||
top: 100px; | ||
width: 300px; | ||
height: 200px; | ||
background-color: lime; | ||
transform-origin: 0px 0px; | ||
offset-path: path('m 0 0 v -200 -200') ; | ||
offset-rotate: 30deg; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
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,37 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<head> | ||
<title>CSS Motion Path: offset-rotate</title> | ||
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property"> | ||
<link rel="match" href="offset-rotate-ref.html"> | ||
<meta name="assert" content="This tests offset-rotate auto with path()"> | ||
<style> | ||
#target { | ||
position: absolute; | ||
left: 300px; | ||
top: 100px; | ||
width: 300px; | ||
height: 200px; | ||
background-color: lime; | ||
transform-origin: 0px 0px; | ||
offset-rotate: auto; | ||
} | ||
</style> | ||
<script> | ||
function test() { | ||
let target = document.getElementById('target'); | ||
// Get a path which has the same direction as "ray(120deg ...)" | ||
let verticalMove = 100 * Math.tan(30 * Math.PI / 180); | ||
target.style.offsetPath = `path("m 0 0 l 100 ${verticalMove}")`; | ||
window.getComputedStyle(target).offsetPath; | ||
|
||
window.requestAnimationFrame(function() { | ||
document.documentElement.removeAttribute('class'); | ||
}); | ||
} | ||
</script> | ||
</head> | ||
<body onload='test()'> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
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,37 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<head> | ||
<title>CSS Motion Path: offset-rotate</title> | ||
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property"> | ||
<link rel="match" href="offset-rotate-ref.html"> | ||
<meta name="assert" content="This tests offset-rotate reverse <angle> with path()"> | ||
<style> | ||
#target { | ||
position: absolute; | ||
left: 300px; | ||
top: 100px; | ||
width: 300px; | ||
height: 200px; | ||
background-color: lime; | ||
transform-origin: 0px 0px; | ||
offset-rotate: reverse 60deg; | ||
} | ||
</style> | ||
<script> | ||
function test() { | ||
let target = document.getElementById('target'); | ||
// Get a path which has the same direction as "ray(-120deg ...)" | ||
let verticalMove = 100 * Math.tan(30 * Math.PI / 180); | ||
target.style.offsetPath = `path("m 0 0 l -100 ${verticalMove}")`; | ||
window.getComputedStyle(target).offsetPath; | ||
|
||
window.requestAnimationFrame(function() { | ||
document.documentElement.removeAttribute('class'); | ||
}); | ||
} | ||
</script> | ||
</head> | ||
<body onload='test()'> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
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
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
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
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