| Index: third_party/WebKit/LayoutTests/fast/css/sticky/nested/sticky-nested-top.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/css/sticky/nested/sticky-nested-top.html b/third_party/WebKit/LayoutTests/fast/css/sticky/nested/sticky-nested-top.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6559789a17f3eae9216bf864e4b87250a6b6cf99
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/css/sticky/nested/sticky-nested-top.html
|
| @@ -0,0 +1,107 @@
|
| +<!DOCTYPE html>
|
| +<script>
|
| +if (window.internals) {
|
| + internals.settings.setCSSStickyPositionEnabled(true);
|
| +}
|
| +</script>
|
| +
|
| +<html>
|
| +<head>
|
| +<style>
|
| + body {
|
| + margin: 0;
|
| + }
|
| +
|
| + .group {
|
| + display: inline-block;
|
| + position: relative;
|
| + width: 250px;
|
| + height: 350px;
|
| + }
|
| +
|
| + .scroller {
|
| + overflow: hidden; /* hide scrollbars */
|
| + width: 200px;
|
| + height: 350px;
|
| + outline: 2px solid black;
|
| + }
|
| +
|
| + .container {
|
| + width: 200px;
|
| + height: 700px;
|
| + }
|
| +
|
| + .outerSticky {
|
| + position: sticky;
|
| + background-color: green;
|
| + width: 200px;
|
| + height: 200px;
|
| + }
|
| +
|
| + .innerSticky {
|
| + position: sticky;
|
| + background-color: red;
|
| + width: 200px;
|
| + height: 100px;
|
| + }
|
| +</style>
|
| +<script>
|
| +if (window.testRunner)
|
| + testRunner.waitUntilDone();
|
| +
|
| +function doTest() {
|
| + finishTestInXFrames(2);
|
| +}
|
| +
|
| +function finishTestInXFrames(frames) {
|
| + if (frames > 0) {
|
| + requestAnimationFrame(finishTestInXFrames.bind(null, frames - 1));
|
| + return;
|
| + }
|
| + finishTest();
|
| +}
|
| +
|
| +function finishTest() {
|
| + for (const scroller of document.querySelectorAll('.scroller')) {
|
| + scroller.scrollTop = 200;
|
| + }
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| +}
|
| +
|
| +window.addEventListener('load', doTest, false);
|
| +</script>
|
| +</head>
|
| +<body>
|
| + <div class="group">
|
| + <div class="scroller">
|
| + <div class="container">
|
| + <div class="outerSticky" style="top: 50px;">
|
| + <div class="innerSticky" style="top: 50px;"></div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| +
|
| + <div class="group">
|
| + <div class="scroller">
|
| + <div class="container">
|
| + <div class="outerSticky" style="top: 50px;">
|
| + <div class="innerSticky" style="top: 100px;"></div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| +
|
| + <div class="group">
|
| + <div class="scroller">
|
| + <div class="container">
|
| + <div class="outerSticky" style="top: 50px;">
|
| + <div class="innerSticky" style="top: 300px;"></div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| + </div>
|
| +
|
| +</body>
|
| +</html>
|
|
|