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

Side by Side Diff: LayoutTests/compositing/overflow/automatically-opt-into-composited-scrolling-after-sibling-z-index-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: patch for landing 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 function doTest() 46 function doTest()
47 { 47 {
48 if (!window.internals) 48 if (!window.internals)
49 return; 49 return;
50 50
51 var predecessor = document.getElementById('predecessor'); 51 var predecessor = document.getElementById('predecessor');
52 var container = document.getElementById('container'); 52 var container = document.getElementById('container');
53 53
54 predecessor.style.zIndex = '5'; 54 predecessor.style.zIndex = '5';
55 window.internals.forceCompositingUpdate(document);
55 56
56 var pass = true; 57 var pass = true;
57 if (!didOptIn(container)) { 58 if (!didOptIn(container)) {
58 pass = false; 59 pass = false;
59 write('FAIL - did not opt in when our children are contiguous.') ; 60 write('FAIL - did not opt in when our children are contiguous.') ;
60 } 61 }
61 62
62 predecessor.style.zIndex = ''; 63 predecessor.style.zIndex = '';
64 window.internals.forceCompositingUpdate(document);
63 65
64 if (didOptIn(container)) { 66 if (didOptIn(container)) {
65 pass = false; 67 pass = false;
66 write('FAIL - opted in when our children are not contiguous.'); 68 write('FAIL - opted in when our children are not contiguous.');
67 } 69 }
68 70
69 if (pass) 71 if (pass)
70 write('PASS'); 72 write('PASS');
71 } 73 }
72 74
73 window.addEventListener('load', doTest, false); 75 window.addEventListener('load', doTest, false);
74 </script> 76 </script>
75 </head> 77 </head>
76 78
77 <body> 79 <body>
78 <div> 80 <div>
79 <div class='positioned' id='predecessor'></div> 81 <div class='positioned' id='predecessor'></div>
80 <div id='container'> 82 <div id='container'>
81 <div class='scrolled'></div> 83 <div class='scrolled'></div>
82 </div> 84 </div>
83 </div> 85 </div>
84 <pre id='console'></pre> 86 <pre id='console'></pre>
85 </body> 87 </body>
86 </html> 88 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698