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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-style-change-ref.html

Issue 2907243002: Sticky position should be observable by getBoundingClientRect (Closed)
Patch Set: nit Created 3 years, 6 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 <title>Sticky positioned element should behave correctly when style changes
3 </title>
4
5 <style>
6 html {
7 overflow: hidden; /* hide scrollbars */
8 }
9
10 body {
11 margin: 0;
12 }
13
14 .container {
15 width: 200px;
16 height: 200px;
17 }
18
19 .spacer {
20 height: 2000px;
21 }
22
23 .box {
24 width: 100px;
25 height: 100px;
26 background-color: green;
27 }
28
29 .relative {
30 top: 50px;
31 position: relative;
32 }
33
34 .absolute {
35 top: 200px;
36 position: absolute;
37 }
38
39 </style>
40
41 <script>
42 window.addEventListener('load', function() {
43 document.getElementById('scroller1').scrollTop = 100;
44 document.getElementById('scroller2').scrollTop = 100;
45 });
46 </script>
47
48 <div id="scroller1" class="container">
49 <div class="relative box"></div>
50 <div class="spacer"></div>
51 </div>
52 <div id="scroller2" class="container">
53 <div class="absolute box"></div>
54 <div class="spacer"></div>
55 </div>
56
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698