mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision b'8ff38c54ff3fab31f862570a38e73755785ba7ee'
This commit is contained in:
parent
9a03911abf
commit
fb586f68cc
161 changed files with 3786 additions and 736 deletions
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="test-wait">
|
||||
<title>Tests that anchor-scroll doesn't crash renderer when scroller's content no longer overflows</title>
|
||||
<link rel="author" href="mailto:xiaochengh@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
|
||||
|
||||
<style>
|
||||
#scroller {
|
||||
margin-top: 200px;
|
||||
height: 200px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#anchor {
|
||||
anchor-name: --a;
|
||||
}
|
||||
|
||||
#spacer {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
#target {
|
||||
position: fixed;
|
||||
top: anchor(--a bottom);
|
||||
left: anchor(--a left);
|
||||
anchor-scroll: --a;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="scroller">
|
||||
<div id="spacer"></div>
|
||||
<div id="anchor">anchor</div>
|
||||
</div>
|
||||
<div id="target">target</div>
|
||||
|
||||
<script type="module">
|
||||
const raf = () => new Promise(resolve => requestAnimationFrame(resolve));
|
||||
|
||||
await raf();
|
||||
await raf();
|
||||
|
||||
spacer.style.height = '0';
|
||||
|
||||
// Force paint property update on target in the same frame
|
||||
target.style.transform = 'scale(1)';
|
||||
|
||||
document.documentElement.classList.remove('test-wait');
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="test-wait">
|
||||
<title>Tests that anchor-scroll doesn't crash renderer when scroller becomes non-scroller</title>
|
||||
<link rel="author" href="mailto:xiaochengh@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
|
||||
|
||||
<style>
|
||||
#scroller {
|
||||
margin-top: 200px;
|
||||
height: 200px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#anchor {
|
||||
anchor-name: --a;
|
||||
}
|
||||
|
||||
#spacer {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
#target {
|
||||
position: fixed;
|
||||
top: anchor(--a bottom);
|
||||
left: anchor(--a left);
|
||||
anchor-scroll: --a;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="scroller">
|
||||
<div id="spacer"></div>
|
||||
<div id="anchor">anchor</div>
|
||||
</div>
|
||||
<div id="target">target</div>
|
||||
|
||||
<script type="module">
|
||||
const raf = () => new Promise(resolve => requestAnimationFrame(resolve));
|
||||
|
||||
await raf();
|
||||
await raf();
|
||||
|
||||
scroller.style.overflowY = 'visible';
|
||||
|
||||
// Force paint property update on target in the same frame
|
||||
target.style.transform = 'scale(1)';
|
||||
|
||||
document.documentElement.classList.remove('test-wait');
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="test-wait">
|
||||
<title>Tests that anchor-scroll doesn't crash renderer when scroller's content no longer overflows, and target precedes scroller in DOM</title>
|
||||
<link rel="author" href="mailto:xiaochengh@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
|
||||
|
||||
<style>
|
||||
#scroller {
|
||||
margin-top: 200px;
|
||||
height: 200px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
#anchor {
|
||||
anchor-name: --a;
|
||||
}
|
||||
|
||||
#spacer {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
#target {
|
||||
position: fixed;
|
||||
top: anchor(--a bottom);
|
||||
left: anchor(--a left);
|
||||
anchor-scroll: --a;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="target">target</div>
|
||||
<div id="scroller">
|
||||
<div id="spacer"></div>
|
||||
<div id="anchor">anchor</div>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
const raf = () => new Promise(resolve => requestAnimationFrame(resolve));
|
||||
|
||||
await raf();
|
||||
await raf();
|
||||
|
||||
spacer.style.height = '0';
|
||||
|
||||
document.documentElement.classList.remove('test-wait');
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="test-wait">
|
||||
<title>Tests that anchor-scroll doesn't crash renderer with `overflow: hidden` scroller</title>
|
||||
<link rel="author" href="mailto:xiaochengh@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
|
||||
|
||||
<style>
|
||||
#scroller {
|
||||
margin-top: 200px;
|
||||
height: 200px;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
#anchor {
|
||||
anchor-name: --a;
|
||||
}
|
||||
|
||||
#spacer {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
#target {
|
||||
position: fixed;
|
||||
top: anchor(--a bottom);
|
||||
left: anchor(--a left);
|
||||
anchor-scroll: --a;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="scroller">
|
||||
<div id="spacer"></div>
|
||||
<div id="anchor">anchor</div>
|
||||
</div>
|
||||
<div id="target">target</div>
|
||||
|
||||
<script type="module">
|
||||
const raf = () => new Promise(resolve => requestAnimationFrame(resolve));
|
||||
|
||||
scroller.scrollTop = 100;
|
||||
|
||||
await raf();
|
||||
await raf();
|
||||
|
||||
scroller.scrollTop = 0;
|
||||
|
||||
// Force paint property update on target in the same frame
|
||||
target.style.transform = 'scale(1)';
|
||||
|
||||
document.documentElement.classList.remove('test-wait');
|
||||
</script>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue