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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/compositing/non-composited-sticky-element-repaint.html

Issue 2845613002: Fix the bug that sticky element may not be correctly invalidated due to non-promotion (Closed)
Patch Set: Logic update && add layout test Created 3 years, 7 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 overflow: scroll;
5 width: 200px;
6 height: 600px;
7 }
8
9 .composited {
10 will-change: transform;
11 }
12
13 .box {
14 background: rgba(255, 0, 0, 0.5);
15 position: sticky;
16 width: 100%;
17 height: 50px;
18 top: 0px;
19 }
20
21 .container {
22 width: 100%;
23 height: 1000px;
24 background: green;
25 }
26
27 .spacer {
28 height: 300px;
29 }
30 </style>
31
32 <div id="scroller" class="scroller">
33 <div class="spacer"></div>
34 <div class="composited container">
35 <div class="box"></div>
36 </div>
37 </div>
38
39 <script src="../resources/text-based-repaint.js"></script>
40 <script>
41 // The sticky box should not be invalidated as it hasn't
42 // passed the starting constraint yet.
43 function repaintTest() {
44 let scroller = document.getElementById('scroller');
45 scroller.scrollTop = 200;
46 }
47 onload = runRepaintAndPixelTest;
48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698