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

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: Update tests 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(0, 255, 0, 0.9);
15 position: sticky;
16 width: 100%;
17 height: 50px;
18 top: 0px;
19 }
20
21 .container {
22 width: 100%;
23 height: 1000px;
24 background: grey;
25 }
26
27 .spacer {
28 background: white;
29 height: 300px;
30 }
31 </style>
32
33 <div id="scroller" class="scroller">
34 <div class="composited container">
35 <div id="box-need-invalidation" class="box"></div>
36 <div class="spacer"></div>
yigu 2017/04/27 15:20:10 If this spacer is not composited, e.g. we move it
37 <div id="box-not-need-invalidation" class="box"></div>
38 </div>
39 </div>
40
41 <script src="../resources/text-based-repaint.js"></script>
42 <script>
43 // The first box needs to be invalidated but the second sticky box
44 // does not as it hasn't passed the starting constraint yet.
45 function repaintTest() {
46 let scroller = document.getElementById('scroller');
47 scroller.scrollTop = 200;
48 }
49 onload = runRepaintAndPixelTest;
50 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698