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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/sticky/nested/sticky-nested-top.html

Issue 2708883005: Handle nested position:sticky elements correctly (main thread) (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 <style>
2 body {
3 margin: 0;
4 }
5
6 .group {
7 display: inline-block;
8 position: relative;
9 width: 250px;
10 height: 350px;
11 }
12
13 .scroller {
14 overflow: hidden; /* hide scrollbars */
15 width: 200px;
16 height: 350px;
17 outline: 2px solid black;
18 }
19
20 .container {
21 width: 200px;
22 height: 700px;
23 }
24
25 .outerSticky {
26 position: sticky;
27 background-color: green;
28 width: 200px;
29 height: 200px;
30 }
31
32 .innerSticky {
33 position: sticky;
34 background-color: red;
35 width: 200px;
36 height: 100px;
37 }
38 </style>
39
40 <script>
41 if (window.testRunner)
42 testRunner.waitUntilDone();
43
44 function finishTest() {
45 for (const scroller of document.querySelectorAll('.scroller')) {
46 scroller.scrollTop = 200;
47 }
48 if (window.testRunner)
49 testRunner.notifyDone();
50 }
51
52 window.addEventListener('load', function() {
53 requestAnimationFrame(function() {
54 requestAnimationFrame(finishTest);
55 });
56 });
57 </script>
58
59 <div class="group">
60 <div class="scroller">
61 <div class="container">
62 <div class="outerSticky" style="top: 50px;">
63 <div class="innerSticky" style="top: 50px;"></div>
64 </div>
65 </div>
66 </div>
67 </div>
68
69 <div class="group">
70 <div class="scroller">
71 <div class="container">
72 <div class="outerSticky" style="top: 50px;">
73 <div class="innerSticky" style="top: 100px;"></div>
74 </div>
75 </div>
76 </div>
77 </div>
78
79 <div class="group">
80 <div class="scroller">
81 <div class="container">
82 <div class="outerSticky" style="top: 50px;">
83 <div class="innerSticky" style="top: 300px;"></div>
84 </div>
85 </div>
86 </div>
87 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698