| Index: LayoutTests/fast/css/sticky/sticky-top-margins.html
|
| diff --git a/LayoutTests/fast/css/sticky/sticky-top-margins.html b/LayoutTests/fast/css/sticky/sticky-top-margins.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..410302743495efe66df2fd80b31b13ecad564f35
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/sticky/sticky-top-margins.html
|
| @@ -0,0 +1,80 @@
|
| +<!DOCTYPE html>
|
| +<script>
|
| +if (window.internals) {
|
| + internals.settings.setCSSStickyPositionEnabled(true);
|
| +}
|
| +</script>
|
| +
|
| +<html>
|
| +<head>
|
| +<style>
|
| + body {
|
| + margin: 0;
|
| + height: 2000px;
|
| + overflow: hidden; /* hide scrollbars */
|
| + }
|
| +
|
| + .group {
|
| + display: inline-block;
|
| + position: relative;
|
| + width: 250px;
|
| + height: 500px;
|
| + }
|
| +
|
| + .container {
|
| + width: 200px;
|
| + height: 400px;
|
| + border: 12px solid black;
|
| + padding: 5px;
|
| + }
|
| +
|
| + .box {
|
| + width: 160px;
|
| + height: 160px;
|
| + }
|
| +
|
| + .sticky {
|
| + position: sticky;
|
| + top: 10px;
|
| + margin: 20px;
|
| + background-color: green;
|
| + }
|
| +
|
| + .indicator {
|
| + position: absolute;
|
| + top: 0;
|
| + left: 37px;
|
| + background-color: red;
|
| + }
|
| +</style>
|
| +<script>
|
| + function doTest()
|
| + {
|
| + window.scrollTo(0, 100);
|
| + }
|
| + window.addEventListener('load', doTest, false);
|
| +</script>
|
| +</head>
|
| +<body>
|
| + <div class="group">
|
| + <div class="indicator box" style="top: 110px;"></div>
|
| + <div class="container">
|
| + <div class="sticky box"></div>
|
| + </div>
|
| + </div>
|
| +
|
| + <div class="group" style="top: 100px">
|
| + <div class="indicator box" style="top: 37px;"></div>
|
| + <div class="container">
|
| + <div class="sticky box"></div>
|
| + </div>
|
| + </div>
|
| +
|
| + <div class="group" style="top: 200px">
|
| + <div class="indicator box" style="top: 37px;"></div>
|
| + <div class="container">
|
| + <div class="sticky box"></div>
|
| + </div>
|
| + </div>
|
| +</body>
|
| +</html>
|
|
|