mirror of
https://github.com/servo/servo.git
synced 2025-08-25 07:08:21 +01:00
Update web-platform-tests to revision b'45fdf45f79582953fb3aa708566cd2c0707cb222'
This commit is contained in:
parent
f7e88665c6
commit
812c6de70b
125 changed files with 1400 additions and 1046 deletions
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.container {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
overflow-y: scroll;
|
||||
background: lightgreen;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div style="height: calc(300px + 50px + 10.10px);"></div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div style="height: calc(300px + 50px + 10.25px);"></div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div style="height: calc(300px + 50px + 10.50px);"></div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div style="height: calc(300px + 50px + 10.75px);"></div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div style="height: calc(300px + 50px + 10.90px);"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var containers = document.getElementsByClassName('container');
|
||||
for (let i = 0; i < containers.length; i++) {
|
||||
containers[i].scrollTo(0, 20);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,80 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
|
||||
<meta name="assert" content="Position sticky with a fractional offset should not show a gap" />
|
||||
<link rel="match" href="position-sticky-fractional-offset-ref.html" />
|
||||
|
||||
<style>
|
||||
.sticky-container {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
overflow-y: scroll;
|
||||
background: red;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 50px;
|
||||
background: lightgreen;
|
||||
}
|
||||
|
||||
.force-scroll {
|
||||
height: 300px;
|
||||
background: lightgreen;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="sticky-container">
|
||||
<div style="height: 10.10px;"></div>
|
||||
<div class="sticky"></div>
|
||||
<div class="force-scroll"></div>
|
||||
</div>
|
||||
|
||||
<div class="sticky-container">
|
||||
<div style="height: 10.25px;"></div>
|
||||
<div class="sticky"></div>
|
||||
<div class="force-scroll"></div>
|
||||
</div>
|
||||
|
||||
<div class="sticky-container">
|
||||
<div style="height: 10.50px;"></div>
|
||||
<div class="sticky"></div>
|
||||
<div class="force-scroll"></div>
|
||||
</div>
|
||||
|
||||
<div class="sticky-container">
|
||||
<div style="height: 10.75px;"></div>
|
||||
<div class="sticky"></div>
|
||||
<div class="force-scroll"></div>
|
||||
</div>
|
||||
|
||||
<div class="sticky-container">
|
||||
<div style="height: 10.90px;"></div>
|
||||
<div class="sticky"></div>
|
||||
<div class="force-scroll"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.onload = function() {
|
||||
// Start with all containers scrolled to the top.
|
||||
var containers = document.getElementsByClassName('sticky-container');
|
||||
for (let i = 0; i < containers.length; i++) {
|
||||
containers[i].scrollTo(0, 0);
|
||||
}
|
||||
|
||||
// Wait for a full frame, then scroll all containers down so the sticky
|
||||
// elements are stuck to the container. There should be no visible gap
|
||||
// where the container's red background color is visible.
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
for (let i = 0; i < containers.length; i++) {
|
||||
containers[i].scrollTo(0, 20);
|
||||
}
|
||||
document.documentElement.classList.remove('reftest-wait');
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue