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 Also it tests that the clipping or the transform rectangle of the box is not
affecting the shadow. | 4 Also it tests that the clipping or the transform rectangle of the box is not
affecting the shadow. |
5 There should be two boxes on the screen: left one should be green and right
one should be green, and both have the same size. | 5 There should be two boxes on the screen: left one should be green and right
one should be green, and both have the same size. |
6 No red should be visible. | 6 No red should be visible. |
7 --> | 7 --> |
8 <html> | 8 <html> |
9 <head> | 9 <head> |
10 <style> | 10 <style> |
11 .clipping_box { | 11 .clipping_box { |
12 margin: 100px; | 12 margin: 100px; |
13 width: 100px; | 13 width: 100px; |
14 height: 100px; | 14 height: 100px; |
15 overflow: hidden; | 15 overflow: hidden; |
16 background: red; | 16 background: red; |
17 } | 17 } |
18 | 18 |
19 .empty_box { | 19 .empty_box { |
20 height: 50px; | 20 height: 50px; |
21 } | 21 } |
22 | 22 |
23 .box { | 23 .box { |
24 height: 100px; | 24 height: 100px; |
25 width: 100px; | 25 width: 100px; |
26 background-color: green; | 26 background-color: green; |
27 } | 27 } |
28 | 28 |
29 .before { | 29 .before { |
30 background-color: transparent; | 30 background-color: transparent; |
31 } | 31 } |
32 | 32 |
33 .blur { | 33 .blur { |
34 -webkit-filter: drop-shadow(0px -100px 0px blue); | 34 -webkit-filter: drop-shadow(0px -100px 0px blue); |
35 -webkit-transform-origin: 50px 50px; | 35 -webkit-transform-origin: 50px 50px; |
36 -webkit-transform: rotate(90deg); | 36 -webkit-transform: rotate(90deg); |
37 } | 37 } |
38 </style> | 38 </style> |
39 | 39 |
40 <script src="../../fast/repaint/resources/repaint.js"></script> | 40 <script src="../../resources/run-after-display.js"></script> |
41 <script> | 41 <script> |
42 if (window.testRunner) | 42 if (window.testRunner) { |
43 testRunner.dumpAsTextWithPixelResults(); | 43 testRunner.dumpAsTextWithPixelResults(); |
44 | 44 testRunner.waitUntilDone(); |
| 45 } |
45 function repaintTest() | 46 function repaintTest() |
46 { | 47 { |
47 document.querySelector(".before").classList.remove("before"); | 48 runAfterDisplay(function() { |
| 49 document.querySelector(".before").classList.remove("before"); |
| 50 if (window.testRunner) |
| 51 testRunner.notifyDone(); |
| 52 }); |
48 } | 53 } |
49 </script> | 54 </script> |
50 </head> | 55 </head> |
51 | 56 <body onload="repaintTest()"> |
52 <body onload="runRepaintTest()"> | |
53 | |
54 <div class="clipping_box"> | 57 <div class="clipping_box"> |
55 <div class="blur"> | 58 <div class="blur"> |
56 <div class="empty_box"></div> | 59 <div class="empty_box"></div> |
57 <div class="box before"></div> | 60 <div class="box before"></div> |
58 </div> | 61 </div> |
59 </div> | 62 </div> |
60 </body> | 63 </body> |
61 </html> | 64 </html> |
OLD | NEW |