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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-overflow-changed.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
(Empty)
1 <!DOCTYPE html>
2 <script>
3 if (window.internals) {
4 internals.settings.setCSSStickyPositionEnabled(true);
5 }
6 </script>
7
8 <style>
9 body {
10 margin: 0;
11 height: 2000px;
12 overflow: hidden; /* hide scrollbars */
13 }
14
15 #container {
16 background-color: green;
17 width: 200px;
18 height: 400px;
19 outline: 2px solid black;
20 }
21
22 .box {
23 width: 200px;
24 height: 200px;
25 }
26
27 .sticky {
28 position: sticky;
29 top: 0px;
30 background-color: red;
31 }
32
33 </style>
34 <script>
35 function doTest()
36 {
37 window.scrollTo(0, 200);
38 // When the spacer's height is changed the sticky container moves up which s hould now
39 // require sliding the sticky box down.
40 document.getElementById('container').style.overflow = 'hidden';
41 }
42 window.addEventListener('load', doTest, false);
43 </script>
44 <div id="container">
45 <div class="sticky box"></div>
46 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698