mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 85ffed21f7a96f6d67a5a0110459d67f50cff624
This commit is contained in:
parent
bdfa6b0751
commit
ab5c81c0bb
240 changed files with 2991 additions and 918 deletions
|
@ -0,0 +1,54 @@
|
|||
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
body {
|
||||
margin: 0px;
|
||||
height: 2000px;
|
||||
width: 2000px;
|
||||
}
|
||||
|
||||
#first {
|
||||
height: 1000px;
|
||||
background-color: #FFA5D2;
|
||||
}
|
||||
|
||||
#anchor {
|
||||
position: absolute;
|
||||
background-color: #84BE6A;
|
||||
height: 600px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#fragment {
|
||||
position: relative;
|
||||
background-color: orange;
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="first"></div>
|
||||
<div id="changer"></div>
|
||||
<div id="anchor">
|
||||
<div id="fragment" name="fragment"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
test(function(t) {
|
||||
// Note that this test passes even without scroll anchoring because of
|
||||
// fragment anchoring.
|
||||
window.location.hash = 'fragment';
|
||||
// Height of first + fragment margin-top.
|
||||
assert_equals(window.scrollY, 1010);
|
||||
|
||||
// Change height of content above fragment.
|
||||
var ch = document.getElementById('changer');
|
||||
ch.style.height = 100;
|
||||
|
||||
// Height of first + height changer + fragment margin-top.
|
||||
assert_equals(window.scrollY, 1110);
|
||||
}, 'Verify scroll anchoring interaction with fragment scrolls');
|
||||
</script>
|
|
@ -0,0 +1,50 @@
|
|||
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
body {
|
||||
margin: 0px;
|
||||
height: 2000px;
|
||||
width: 2000px;
|
||||
}
|
||||
|
||||
#first {
|
||||
height: 1000px;
|
||||
background-color: #FFA5D2;
|
||||
}
|
||||
|
||||
#anchor {
|
||||
position: absolute;
|
||||
background-color: #84BE6A;
|
||||
height: 600px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="first"></div>
|
||||
<div id="changer"></div>
|
||||
<div id="anchor"></div>
|
||||
|
||||
<script>
|
||||
// Navigation steps:
|
||||
// 1- page gets loaded and anchor element gets scrolled into view.
|
||||
// 2- loaded page refreshed.
|
||||
async_test(function(t) {
|
||||
if (window.name == 'second/load') {
|
||||
assert_equals(window.scrollY, 1000);
|
||||
// Change height of content above anchor.
|
||||
var ch = document.getElementById('changer');
|
||||
ch.style.height = 100;
|
||||
// Height of first + height changer.
|
||||
assert_equals(window.scrollY, 1100)
|
||||
t.done();
|
||||
} else {
|
||||
var anchor = document.getElementById('anchor');
|
||||
anchor.scrollIntoView();
|
||||
assert_equals(window.scrollY, 1000);
|
||||
window.name = "second/load";
|
||||
window.location.reload();
|
||||
}
|
||||
}, 'Verify scroll anchoring interaction with history restoration');
|
||||
</script>
|
|
@ -0,0 +1,25 @@
|
|||
<!doctype html>
|
||||
<html class="test-wait">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/">
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=746570">
|
||||
<meta name="assert" content="No crash when a table with dirty internal layout is the scroll anchor."/>
|
||||
<style>
|
||||
body {
|
||||
height:200vh;
|
||||
}
|
||||
table {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
background-color: lime;
|
||||
border-collapse: collapse; /* triggers problematic border calculation */
|
||||
}
|
||||
</style>
|
||||
|
||||
<table id=table1></table>
|
||||
|
||||
<script>
|
||||
window.scrollBy(0, 10);
|
||||
table1.innerHTML = "<tr><td style='background-color:lightblue'></td></tr>";
|
||||
document.documentElement.classList.remove('test-wait');
|
||||
</script>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue