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

Side by Side Diff: LayoutTests/fast/css/sticky/sticky-top-overflow.html

Issue 103213002: position:sticky should stick for the enclosing overflow ancestor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
3 <html>
4 <head>
5 <style>
6 .group {
7 display: inline-block;
8 position: relative;
9 width: 150px;
10 height: 500px;
11 }
12
13 #overflow {
14 width: 600px;
15 height: 550px;
16 overflow: hidden; /* Still scrollable with JS */
17 border: 1px solid black;
18 }
19
20 .spacer {
21 float: left;
22 width: 10px;
23 height: 1200px;
24 }
25 .container {
26 width: 100px;
27 height: 400px;
28 outline: 2px solid black;
29 }
30
31 .box {
32 width: 100px;
33 height: 200px;
34 }
35
36 .sticky {
37 position: -webkit-sticky;
Julien - ping for review 2014/01/06 17:22:07 This is unprefixed in Blink (how did the test pass
ostap 2014/01/08 01:46:40 Forgot to stage LayoutTests changes. Done
38 top: 100px;
39 background-color: green;
40 }
41
42 .indicator {
43 position: absolute;
44 top: 0;
45 left: 0;
46 background-color: red;
47 }
48 </style>
49 <script>
50 function doTest()
51 {
52 document.getElementById('overflow').scrollTop = 120;
53 }
54 window.addEventListener('load', doTest, false);
55 </script>
56 </head>
57 <body>
Julien - ping for review 2014/01/06 17:22:07 Usually tests should state what they expect for pa
ostap 2014/01/08 01:46:40 Done.
58 <div id="overflow">
59 <div class="spacer"></div>
60 <div class="group">
61 <div class="indicator box" style="top: 200px;"></div>
62 <div class="container">
63 <div class="sticky box"></div>
64 </div>
65 </div>
66
67 <div class="group" style="top: 100px">
68 <div class="indicator box" style="top: 120px;"></div>
69 <div class="container">
70 <div class="sticky box"></div>
71 </div>
72 </div>
73
74 <div class="group" style="top: 240px">
75 <div class="indicator box" style="top: 0;"></div>
76 <div class="container">
77 <div class="sticky box"></div>
78 </div>
79 </div>
80 </div>
81 </body>
82 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/sticky/sticky-top-overflow-expected.html » ('j') | Source/core/rendering/RenderLayer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698