OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 This tests verifies that blur is repainted using the full source image of th
e element instead of just the dirty area. | 3 This tests verifies that blur is repainted using the full source image of th
e element instead of just the dirty area. |
4 There should be 3 blurry green boxes on the page, all the same size and colo
r. | 4 There should be 3 blurry green boxes on the page, all the same size and colo
r. |
5 --> | 5 --> |
6 <html> | 6 <html> |
7 <head> | 7 <head> |
8 <style> | 8 <style> |
9 .box { | 9 .box { |
10 margin: 10px; | 10 margin: 10px; |
11 height: 50px; | 11 height: 50px; |
12 width: 50px; | 12 width: 50px; |
13 background-color: green; | 13 background-color: green; |
14 } | 14 } |
15 | 15 |
16 .before { | 16 .before { |
17 background-color: red; | 17 background-color: red; |
18 } | 18 } |
19 | 19 |
20 .blur { | 20 .blur { |
21 margin: 50px; | 21 margin: 50px; |
22 -webkit-filter: blur(10px); | 22 filter: blur(10px); |
23 } | 23 } |
24 </style> | 24 </style> |
25 | 25 |
26 <script src="../../resources/run-after-layout-and-paint.js"></script> | 26 <script src="../../resources/run-after-layout-and-paint.js"></script> |
27 <script> | 27 <script> |
28 if (window.testRunner) { | 28 if (window.testRunner) { |
29 testRunner.dumpAsTextWithPixelResults(); | 29 testRunner.dumpAsTextWithPixelResults(); |
30 testRunner.waitUntilDone(); | 30 testRunner.waitUntilDone(); |
31 } | 31 } |
32 | 32 |
33 function repaintTest() | 33 function repaintTest() |
34 { | 34 { |
35 runAfterLayoutAndPaint(function() { | 35 runAfterLayoutAndPaint(function() { |
36 document.querySelector(".before").classList.remove("before"); | 36 document.querySelector(".before").classList.remove("before"); |
37 if (window.testRunner) | 37 if (window.testRunner) |
38 testRunner.notifyDone(); | 38 testRunner.notifyDone(); |
39 }); | 39 }); |
40 } | 40 } |
41 </script> | 41 </script> |
42 </head> | 42 </head> |
43 | 43 |
44 <body onload="repaintTest()"> | 44 <body onload="repaintTest()"> |
45 <div class="blur"> | 45 <div class="blur"> |
46 <div class="box"></div> | 46 <div class="box"></div> |
47 <div class="box before"></div> | 47 <div class="box before"></div> |
48 <div class="box"></div> | 48 <div class="box"></div> |
49 </div> | 49 </div> |
50 </body> | 50 </body> |
51 </html> | 51 </html> |
OLD | NEW |