| Index: third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-bottom.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-bottom.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-bottom.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..18c5cc415c56c444fb9ba7298af1cceb1f412606
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-bottom.html
|
| @@ -0,0 +1,104 @@
|
| +<!DOCTYPE html>
|
| +<title>position:sticky elements should respect the bottom constraint</title>
|
| +<link rel="match" href="position-sticky-bottom-ref.html" />
|
| +<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
|
| +<meta name="assert" content="This test checks that position:sticky elements obey their bottom anchor after scrolling" />
|
| +
|
| +<style>
|
| +.group {
|
| + display: inline-block;
|
| + position: relative;
|
| + width: 150px;
|
| + height: 250px;
|
| +}
|
| +
|
| +.scroller {
|
| + position: relative;
|
| + width: 100px;
|
| + height: 200px;
|
| + overflow-x: hidden;
|
| + overflow-y: auto;
|
| +}
|
| +
|
| +.contents {
|
| + height: 500px;
|
| +}
|
| +
|
| +.prepadding {
|
| + height: 200px;
|
| +}
|
| +
|
| +.container {
|
| + height: 200px;
|
| +}
|
| +
|
| +.filler {
|
| + height: 100px;
|
| +}
|
| +
|
| +.indicator {
|
| + background-color: red;
|
| + position: absolute;
|
| + left: 0;
|
| +}
|
| +
|
| +.sticky {
|
| + background-color: green;
|
| + position: sticky;
|
| + bottom: 25px;
|
| +}
|
| +
|
| +.box {
|
| + width: 100%;
|
| + height: 100px;
|
| +}
|
| +</style>
|
| +
|
| +<script>
|
| +window.addEventListener('load', function() {
|
| + document.getElementById('scroller1').scrollTop = 100;
|
| + document.getElementById('scroller2').scrollTop = 175;
|
| + document.getElementById('scroller3').scrollTop = 250;
|
| +});
|
| +</script>
|
| +
|
| +<div class="group">
|
| + <div id="scroller1" class="scroller">
|
| + <div class="indicator box" style="top: 200px;"></div>
|
| + <div class="contents">
|
| + <div class="prepadding"></div>
|
| + <div class="container">
|
| + <div class="filler"></div>
|
| + <div class="sticky box"></div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| +</div>
|
| +
|
| +<div class="group">
|
| + <div id="scroller2" class="scroller">
|
| + <div class="indicator box" style="top: 250px;"></div>
|
| + <div class="contents">
|
| + <div class="prepadding"></div>
|
| + <div class="container">
|
| + <div class="filler"></div>
|
| + <div class="sticky box"></div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| +</div>
|
| +
|
| +<div class="group">
|
| + <div id="scroller3" class="scroller">
|
| + <div class="indicator box" style="top: 300px;"></div>
|
| + <div class="contents">
|
| + <div class="prepadding"></div>
|
| + <div class="container">
|
| + <div class="filler"></div>
|
| + <div class="sticky box"></div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| +</div>
|
| +
|
| +<div>You should see three green boxes above. No red should be visible.</div>
|
|
|