mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision b'0802d8bd01e17178d9cd2355e6fbaf3c098e7953'
This commit is contained in:
parent
aa427dd412
commit
9ed042224a
254 changed files with 10823 additions and 1484 deletions
|
@ -0,0 +1,70 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<title>View transitions: element with overflow</title>
|
||||
<link rel="help" href="https://github.com/WICG/view-transitions">
|
||||
<link rel="author" href="mailto:khushalsagar@chromium.org">
|
||||
<link rel="match" href="element-with-overflow-ref.html">
|
||||
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<style>
|
||||
.hidden {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
view-transition-name: hidden;
|
||||
background: green;
|
||||
contain: layout;
|
||||
}
|
||||
|
||||
.target {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: lightblue;
|
||||
contain: layout;
|
||||
view-transition-name: target;
|
||||
}
|
||||
.inner {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: relative;
|
||||
top: 50px;
|
||||
left: 50px;
|
||||
border: 5px solid black;
|
||||
}
|
||||
|
||||
html::view-transition-group(hidden) { animation-duration: 300s; }
|
||||
html::view-transition-image-pair(hidden) { animation: unset; opacity: 0; }
|
||||
|
||||
html::view-transition-new(*), html::view-transition-old(*) {
|
||||
opacity: 1;
|
||||
animation: unset;
|
||||
}
|
||||
|
||||
html::view-transition-old(target) {
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
html::view-transition-new(target) {
|
||||
top: 200px;
|
||||
left: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="target">
|
||||
<div class="inner"></div>
|
||||
</div>
|
||||
<div class="hidden"></div>
|
||||
|
||||
<script>
|
||||
async function runTest() {
|
||||
document.startViewTransition(() => {
|
||||
document.getElementsByClassName("target")[0].style.background="lightgreen";
|
||||
document.getElementsByClassName("inner")[0].style.border="5px solid blue";
|
||||
requestAnimationFrame(() => requestAnimationFrame(() =>
|
||||
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot))
|
||||
));
|
||||
});
|
||||
}
|
||||
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
|
||||
</script>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue