Files
tubestation/layout/reftests/css-scroll-snap/scroll-padding-on-anchor.html
Hiroyuki Ikezoe 1c03fa35d0 Bug 1544060 - Use the root element's primary frame to get scroll-padding value. r=botond
Now the spec cleary says that we don't need to propagate body's
scroll-padding value to the document viewport since
https://github.com/w3c/csswg-drafts/issues/3740, so we don't need to care about
GetViewportScrollStylesOverrideElement() at all.

This change fixes the crash test case in this commit, but it's not sufficient.
In the next patch, we will fix another crash case.

Differential Revision: https://phabricator.services.mozilla.com/D27422
2019-04-15 21:15:58 +00:00

32 lines
566 B
HTML

<!--
This reftest is a test case that scroll-padding value is propery handled when
navigating an anchor node, id="target" in this case, so the content scrolls
to the target element on loading.
-->
<style>
html {
overflow: hidden;
scroll-padding: 100px;
}
body {
margin: 0px;
padding: 0px;
}
.spacer {
height: 2000px;
width: 100%;
padding: 0px;
margin: 0px;
}
#target {
background-color: blue;
width: 100%;
height: 100px;
padding: 0px;
margin: 0px;
}
</style>
<div class="spacer"></div>
<div id="target"></div>
<div class="spacer"></div>