Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-inline.html

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <script>
2 if (window.testRunner)
3 testRunner.waitUntilDone();
4
5 function doTest() {
6 finishTestInXFrames(2);
7 }
8
9 function finishTestInXFrames(frames) {
10 if (frames > 0) {
11 requestAnimationFrame(finishTestInXFrames.bind(null, frames - 1));
12 return;
13 }
14 finishTest();
15 }
16
17 function finishTest() {
18 for (const scroller of document.querySelectorAll('.scroller')) {
19 scroller.scrollTop = 200;
20 }
21 if (window.testRunner)
22 testRunner.notifyDone();
23 }
24
25 window.addEventListener('load', doTest, false);
26 </script>
27
28 <style>
29 body {
30 margin: 0;
31 }
32
33 .scroller {
34 will-change: transform;
35
36 overflow: hidden; /* hide scrollbars */
37 width: 200px;
38 height: 350px;
39 outline: 2px solid black;
40 }
41
42 .container {
43 width: 200px;
44 height: 700px;
45 }
46
47 .outerSticky {
48 will-change: transform;
49
50 display: inline;
51 position: sticky;
52 top: 0;
53 }
54
55 .innerSticky {
56 will-change: transform;
57
58 display: inline;
59 position: sticky;
60 top: 25px;
61 }
62 </style>
63
64 <div class="scroller">
65 <div class="container">
66 <div class="outerSticky">1<div class="innerSticky">2</div></div>
67 </div>
68 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698