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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-local-background.html

Issue 2068723002: Paint local attachment backgrounds into composited scrolling contents layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add/update tests and simplify added code. Created 4 years, 4 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
1 <script> 1 <script>
2 if (window.testRunner) 2 if (window.testRunner)
3 testRunner.waitUntilDone(); 3 testRunner.waitUntilDone();
4 onload = function() { 4 onload = function() {
5 // Double rAF to ensure content is painted before scroll. 5 // Double rAF to ensure content is painted before scroll.
chrishtr 2016/08/12 17:03:00 Add another test rather than modifying this one.
flackr 2016/08/16 17:52:51 Done.
6 requestAnimationFrame(function() { 6 requestAnimationFrame(function() {
7 requestAnimationFrame(function() { 7 requestAnimationFrame(function() {
8 document.getElementById('scroller').scrollTo(0, 200); 8 document.getElementById('scroller1').scrollTop = 200;
9 document.getElementById('scroller2').scrollTop = 200;
9 if (window.testRunner) 10 if (window.testRunner)
10 window.testRunner.notifyDone(); 11 window.testRunner.notifyDone();
11 }) 12 })
12 }); 13 });
13 } 14 }
14 </script> 15 </script>
15 <style> 16 <style>
16 #scroller { 17 .scroller {
17 background: gray local content-box;
18 border: 10px solid rgba(0, 255, 0, 0.5); 18 border: 10px solid rgba(0, 255, 0, 0.5);
19 overflow: scroll; 19 overflow: scroll;
20 padding: 10px; 20 padding: 10px;
21 width: 200px; 21 width: 200px;
22 height: 200px; 22 height: 200px;
23 will-change: transform; 23 will-change: transform;
24 } 24 }
25 25
26 #scroller1 {
27 background: gray local content-box;
28 }
29
30 #scroller2 {
31 background: url('../resources/apple.jpg') local;
32 }
33
26 .spacer { 34 .spacer {
27 height: 300px; 35 height: 300px;
28 } 36 }
29 </style> 37 </style>
30 <!-- #scroller has a locally attached background with padding so when it is 38 <!-- #scroller has a locally attached background with padding so when it is
31 scrolled we can see the background slide up. Doing this on a composited 39 scrolled we can see the background slide up. Doing this on a composited
32 element without repainting requires the background to be painted into 40 element without repainting requires the background to be painted into
33 the scrolling contents layer and correctly account for that layer not 41 the scrolling contents layer and correctly account for that layer not
34 including the border in its bounds. --> 42 including the border in its bounds. -->
35 <div id="scroller"> 43 <div id="scroller1" class="scroller">
36 <div class="spacer"></div> 44 <div class="spacer"></div>
37 </div> 45 </div>
46 <!-- This scroller has a locally attached background image which should
47 scroll with the content. -->
48 <div id="scroller2" class="scroller">
49 <div class="spacer"></div>
50 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698