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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-stacking-context-expected.html

Issue 1870663002: Reland main thread position sticky implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only descend into children which have an ancestor overflow layer. 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style type="text/css"> 2 <script>
3 div { 3 if (window.internals) {
4 height: 100px; 4 internals.settings.setCSSStickyPositionEnabled(true);
5 width: 100px; 5 }
6 } 6 </script>
7 .sticky { 7
8 background-color: green; 8 <html>
9 position: relative; 9 <head>
10 } 10 <style>
11 .red { 11 body {
12 background-color: red; 12 margin: 0;
13 margin-top: -100px; 13 }
14 } 14
15 .container {
16 width: 200px;
17 height: 400px;
18 outline: 2px solid black;
19 }
20
21 .box {
22 width: 200px;
23 height: 200px;
24 }
25
26 .sticky {
27 position: sticky;
28 }
29
30 .child {
31 position: relative;
32 background-color: green;
33 z-index: 2;
34 }
15 </style> 35 </style>
16 <!-- 36 </head>
17 Tests that the sticky node will be popped out into a stacking context on top of the node which follows it. You should 37 <body>
18 see no red boxes as the green sticky div should pop on top of the red div placed under it. 38 <div class="group">
19 --> 39 <div class="container">
20 <div class="sticky"></div> 40 <div class="sticky box">
21 <div class="red"></div> 41 <div class="child box"></div>
42 </div>
43 </div>
44 </div>
45
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698