mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision b'0e0fe1b20da0d80eacadc326dec726138fd5aa83'
This commit is contained in:
parent
57897e196c
commit
728707a192
70 changed files with 2786 additions and 976 deletions
|
@ -0,0 +1,26 @@
|
|||
<!doctype html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<title>scrollIntoView uses the element's bounding rect rather than line box</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom-view/#scroll-an-element-into-view">
|
||||
<style>
|
||||
img {
|
||||
height: 100vh;
|
||||
width: 100px;
|
||||
}
|
||||
body {
|
||||
margin-bottom: 100vh;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<a id="scrollto">To be scrolled into view</a><img src="/images/blue.png">
|
||||
</body>
|
||||
<script>
|
||||
|
||||
test(t => {
|
||||
window.scrollTo(0, 0);
|
||||
const target = document.getElementById("scrollto");
|
||||
target.scrollIntoView();
|
||||
assert_approx_equals(window.scrollY, target.offsetTop, 1);
|
||||
}, "Scrolling an inline element with a large line height uses the bounding rect");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue