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

Side by Side Diff: third_party/WebKit/Source/web/tests/data/sticky-position.html

Issue 2401903002: Compute and include the offset of the sticky box to its enclosing composited layer. (Closed)
Patch Set: Merge with master and fix long line. Created 4 years, 2 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 <html>
3 <head>
4 <style>
5 html, body {
6 margin: 0;
7 }
8 .sticky {
9 position: sticky;
10 width: 10px;
11 height: 10px;
12 }
13 .top {
14 top: 1px;
15 }
16 .bottom {
17 bottom: 1px;
18 }
19 .left {
20 left: 1px;
21 }
22 .right {
23 right: 1px;
24 }
25 .container {
26 position: absolute;
27 top: 100px;
28 left: 100px;
29 width: 200px;
30 height: 200px;
31 }
32 .composited {
33 will-change: transform;
34 }
35 .spacer {
36 height: 10px;
37 }
38 </style>
39 </head>
40
41 <!-- Fixed position elements may skip compositing without a scrollable
42 ancestor. To make sure this test covers the intended scenario, we force the
43 body element to be tall, so that the FrameView is scrolling. -->
44 <body style="height: 4000px">
45 <div class="container">
46 <div id="div-tl" class="sticky top left">X</div>
47 <div id="div-tr" class="sticky top right">X</div>
48 <div id="div-bl" class="sticky bottom left">X</div>
49 <div id="div-br" class="sticky bottom right">X</div>
50 <span id="span-tl" class="sticky top left">X</span>
51 <span id="span-tlbr" class="sticky top left bottom right">X</span>
52 </div>
53 <div class="composited container">
54 <div class="spacer"></div>
55 <div id="composited-top" class="sticky top">X</div>
56 </div>
57 </body>
58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698