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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make sticky vertical ref tests expectations not dependent on font size. Created 4 years, 8 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 <!DOCTYPE html>
2 <script>
3 if (window.internals) {
4 internals.settings.setCSSStickyPositionEnabled(true);
5 }
6 </script>
7
8 <html>
9 <head>
10 <style>
11 body {
12 margin: 0;
13 height: 2000px;
14 overflow: hidden; /* hide scrollbars */
15 }
16
17 .group {
18 display: inline-block;
19 position: relative;
20 width: 250px;
21 height: 500px;
22 }
23
24 .container {
25 width: 200px;
26 height: 400px;
27 outline: 2px solid black;
28 border: hidden;
29 border-width: 0px;
30 border-spacing: 0px !important;
31 border-collapse:collapse;
32 cellspacing: 0;
33 cellpadding: 0;
34 padding: 0;
35 }
36
37 .box {
38 width: 200px;
39 height: 198px;
40 }
41
42 .sticky {
43 position: sticky;
44 top: 100px;
45 background-color: green;
46 }
47
48 .indicator {
49 position: absolute;
50 top: 0;
51 left: 0;
52 background-color: red;
53 }
54 </style>
55 <script>
56 function doTest()
57 {
58 window.scrollTo(0, 100);
59 }
60 window.addEventListener('load', doTest, false);
61 </script>
62 </head>
63 <body>
64 <div class="group">
65 <div class="indicator box" style="top: 200px;"></div>
66 <table class="container">
67 <tbody>
68 <tr class="sticky">
69 <td class="box"></td>
70 </tr>
71 <tr>
72 <td></td>
73 </tr>
74 </tbody>
75 </table>
76 </div>
77
78 <div class="group" style="top: 100px">
79 <div class="indicator box" style="top: 100px;"></div>
80 <table class="container" style="">
81 <tbody>
82 <tr class="sticky">
83 <td class="box"></td>
84 </tr>
85 <tr>
86 <td></td>
87 </tr>
88 </tbody>
89 </table>
90 </div>
91
92 <div class="group" style="top: 200px">
93 <div class="indicator box" style="top: 0;"></div>
94 <table class="container" style="">
95 <tbody>
96 <tr class="sticky">
97 <td class="box"></td>
98 </tr>
99 <tr>
100 <td></td>
101 </tr>
102 </tbody>
103 </table>
104 </div>
105 <div style="position: absolute; top: 620px;">
106 This test checks that sticky positioned table rows are contained by their ta ble.
107 There should be no red.
108 </div>
109 </body>
110 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698