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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/overflow/composited-nested-sticky-table.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 document.querySelector('.scroller').scrollTop = 200;
19 if (window.testRunner)
20 testRunner.notifyDone();
21 }
22
23 window.addEventListener('load', doTest, false);
24 </script>
25
26 <style>
27 body {
28 margin: 0;
29 }
30
31 table {
32 will-change: transform;
33
34 background: red;
35 border-collapse: collapse;
36 }
37
38 td, th {
39 height: 50px;
40 width: 50px;
41 padding: 0;
42 }
43
44 th {
45 background: green;
46 }
47
48 .scroller {
49 will-change: transform;
50
51 overflow: hidden; /* hide scrollbars */
52 width: 100px;
53 height: 200px;
54 outline: 2px solid black;
55 }
56
57 .sticky {
58 position: sticky;
59 top: 25px;
60 }
61 </style>
62
63 <div class="scroller">
64 <table>
65 <thead class="sticky">
66 <tr class="sticky">
67 <th class="sticky"></th>
68 </tr>
69 </thead>
70 <tbody>
71 <tr><td></td></tr>
72 <tr><td></td></tr>
73 <tr><td></td></tr>
74 <tr><td></td></tr>
75 <tr><td></td></tr>
76 <tr><td></td></tr>
77 <tr><td></td></tr>
78 <tr><td></td></tr>
79 <tr><td></td></tr>
80 </tbody>
81 </table>
82 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698