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

Side by Side Diff: LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-after-sibling-display-change.html

Issue 26110004: Defer the real work in updateCompositingLayers until it's really needed. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: inspector needs fixing, otherwise good to go Created 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <style> 5 <style>
6 #container { 6 #container {
7 width: 200px; 7 width: 200px;
8 height: 200px; 8 height: 200px;
9 overflow: scroll; 9 overflow: scroll;
10 margin: 20px; 10 margin: 20px;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 window.internals.settings.setAcceleratedCompositingForOverflowScroll Enabled(true); 42 window.internals.settings.setAcceleratedCompositingForOverflowScroll Enabled(true);
43 43
44 function doTest() 44 function doTest()
45 { 45 {
46 if (!window.internals) 46 if (!window.internals)
47 return; 47 return;
48 48
49 var predecessor = document.getElementById('predecessor'); 49 var predecessor = document.getElementById('predecessor');
50 var container = document.getElementById('container'); 50 var container = document.getElementById('container');
51 predecessor.style.display = 'none'; 51 predecessor.style.display = 'none';
52 window.internals.forceCompositingUpdate(document);
52 53
53 var pass = true; 54 var pass = true;
54 if (!didOptIn(container)) { 55 if (!didOptIn(container)) {
55 pass = false; 56 pass = false;
56 write('FAIL - did not opt in when our children are contiguous.') ; 57 write('FAIL - did not opt in when our children are contiguous.') ;
57 } 58 }
58 59
59 predecessor.style.display = ''; 60 predecessor.style.display = '';
61 window.internals.forceCompositingUpdate(document);
60 62
61 if (didOptIn(container)) { 63 if (didOptIn(container)) {
62 pass = false; 64 pass = false;
63 write('FAIL - opted in when our children are not contiguous.'); 65 write('FAIL - opted in when our children are not contiguous.');
64 } 66 }
65 67
66 if (pass) 68 if (pass)
67 write('PASS'); 69 write('PASS');
68 } 70 }
69 71
70 window.addEventListener('load', doTest, false); 72 window.addEventListener('load', doTest, false);
71 </script> 73 </script>
72 </head> 74 </head>
73 75
74 <body> 76 <body>
75 <div> 77 <div>
76 <div class='positioned' id='predecessor'></div> 78 <div class='positioned' id='predecessor'></div>
77 <div id='container'> 79 <div id='container'>
78 <div class='scrolled'></div> 80 <div class='scrolled'></div>
79 </div> 81 </div>
80 </div> 82 </div>
81 <pre id='console'></pre> 83 <pre id='console'></pre>
82 </body> 84 </body>
83 </html> 85 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698