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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-overflowing.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 .container {
18 position: absolute;
19 width: 200px;
20 height: 400px;
21 margin: 10px;
22 left: 300px;
23 top: -200px;
24 font-family: Ahem;
25 font-size: 24px;
26 outline: 2px solid black;
27 }
28
29 .vertical.container {
30 -webkit-writing-mode: vertical-rl;
31 top: 300px;
32 left: 800px;
33 width: 400px;
34 height: 200px;
35 }
36
37 .spacer {
38 height: 350px;
39 width: 20px;
40 background-color: black;
41 }
42
43 .vertical .spacer {
44 height: 20px;
45 width: 350px;
46 }
47
48 .box {
49 width: 150px;
50 height: 150px;
51 }
52
53 .sticky {
54 position: sticky;
55 top: 200px;
56 right: 200px;
57 background-color: green;
58 opacity: 0.75;
59 }
60 </style>
61 <script>
62 function doTest()
63 {
64 window.scrollTo(100, 100);
65 }
66 window.addEventListener('load', doTest, false);
67 </script>
68 </head>
69 <body>
70 <div class="container">
71 <div class="spacer"></div>
72 <div class="sticky box"></div>
73 </div>
74
75 <div class="vertical container">
76 <div class="spacer"></div>
77 <div class="sticky box"></div>
78 </div>
79 </body>
80 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698