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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-margin-changed-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
(Empty)
1 <!DOCTYPE html>
2 <style>
3 .scroller {
4 background-color: red;
5 border: 1px solid black;
6 width: 200px;
7 height: 200px;
8 margin-top: 10px;
9 outline: 2px solid black;
10 overflow: hidden; /* hide scrollbars */
11 }
12
13 .sticky {
14 background-color: green;
15 display: inline-block;
16 margin-top: 200px;
17 position: relative;
18 top: 0px;
19 width: 200px;
20 height: 200px;
21 }
22
23 </style>
24 <script>
25 function doTest()
26 {
27 var stickyObjects = document.querySelectorAll('.sticky');
28 for (var i = 0; i < stickyObjects.length; i++) {
29 stickyObjects[i].style.marginTop = '0';
30 }
31 }
32 window.addEventListener('load', doTest, false);
33 </script>
34 <div class="scroller">
35 <div class="sticky"></div>
36 </div>
37 <div class="scroller">
38 <div>
39 <div class="sticky"></div>
40 </div>
41 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698