mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 0f0b7a7e353421b600ee555bf354d3a98bb603ae
This commit is contained in:
parent
363073568e
commit
71dcf37d55
175 changed files with 2749 additions and 678 deletions
|
@ -106,6 +106,24 @@ test_interpolation(
|
|||
'Match on rotation due to 0deg angle'
|
||||
);
|
||||
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'rotate3d(1, 1, 1, -60deg) translateX(100px)',
|
||||
to: 'rotate3d(2, 2, 2, 60deg) translateY(200px)',
|
||||
}, [{ at: 0.25, expect: 'rotate3d(1, 1, 1, -30deg) translate(75px, 50px)' }],
|
||||
'Match on rotation using collinear rotation axes'
|
||||
);
|
||||
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'rotate3d(1, 0, 0, 360deg) translateX(100px)',
|
||||
to: 'rotate3d(0, 1, 0, -720deg) translateY(200px)',
|
||||
}, [{ at: 0.25, expect: 'rotate3d(0, 0, 1, 0deg) translate(75px, 50px)' }],
|
||||
'Match on rotation with spherical interpolation'
|
||||
);
|
||||
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
|
|
|
@ -63,7 +63,15 @@
|
|||
<div id="matrix" class="block"></div>
|
||||
<script type="text/javascript">
|
||||
function getTransformFor(id) {
|
||||
return window.getComputedStyle(document.getElementById(id)).getPropertyValue("transform");
|
||||
let transform =
|
||||
window.getComputedStyle(document.getElementById(id)).getPropertyValue("transform");
|
||||
// Round matrix arguments to allow for small errors in numerical precision.
|
||||
transform = transform.replace(/matrix\(([^\)]*)\)/g, function(match, arguments) {
|
||||
let parts = arguments.split(",");
|
||||
parts = parts.map(str => parseFloat(parseFloat(str).toFixed(6)));
|
||||
return 'matrix(' + parts.join(", ") + ')';
|
||||
});
|
||||
return transform;
|
||||
}
|
||||
function clear(id) {
|
||||
document.getElementById(id).style.display = 'none';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue