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

Side by Side Diff: LayoutTests/compositing/background-color/background-color-change-to-text.html

Issue 63943006: Re-enable solid background color optimization for composited layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add window.internals.forceCompositingUpdate(document) to webgl test to avoid flaky Created 7 years 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 <!DOCTYPE> 1 <!DOCTYPE>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style type="text/css" media="screen"> 4 <style type="text/css" media="screen">
5 #background { 5 #background {
6 width: 200px; 6 width: 200px;
7 height: 200px; 7 height: 200px;
8 display: block; 8 display: block;
9 background-color: green; 9 background-color: green;
10 } 10 }
11 .blue {
12 width: 50px;
13 height: 50px;
14 background-color: blue;
15 display: block;
16 }
11 17
12 .composited { 18 .composited {
13 -webkit-transform: translateZ(0); 19 -webkit-transform: translateZ(0);
14 } 20 }
15 </style> 21 </style>
16 <script type="text/javascript" charset="utf-8"> 22 <script type="text/javascript" charset="utf-8">
17 if (window.testRunner) { 23 if (window.testRunner) {
18 testRunner.waitUntilDone(); 24 testRunner.waitUntilDone();
19 testRunner.dumpAsTextWithPixelResults(); 25 testRunner.dumpAsTextWithPixelResults();
20 } 26 }
21 function doTest() 27 function doTest()
22 { 28 {
23 var bg = document.getElementById("background"); 29 var bg = document.getElementById("background");
24 30
25 window.setTimeout(function() { 31 window.setTimeout(function() {
26 // Change the layer to become background only. 32 // Change the layer not to be background color layer.
27 bg.innerHTML = "text"; 33 bg.innerHTML = "text" + bg.innerHTML;
34 bg.style.backgroundColor = "red";
28 if (window.testRunner) { 35 if (window.testRunner) {
29 window.setTimeout(function() { 36 window.setTimeout(function() {
30 testRunner.notifyDone(); 37 testRunner.notifyDone();
31 }, 0); 38 }, 0);
32 } 39 }
33 }, 0); 40 }, 0);
34 } 41 }
35 42
36 window.addEventListener('load', doTest, false); 43 window.addEventListener('load', doTest, false);
37 </script> 44 </script>
38 </head> 45 </head>
39 <body> 46 <body>
40 <!-- When the test is done, there should only be a green square on the page --> 47 <div id="background" class="composited">
41 <div id="background" class="composited"></div> 48 <div class="blue composited">
49 </div>
50 </div>
42 </body> 51 </body>
43 </html> 52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698