| OLD | NEW |
| (Empty) |
| 1 <!-- Based on fast/repaint/obscured-background-no-repaint.html --> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../fast/repaint/../../resources/run-after-layout-and-paint.js
"></script> | |
| 5 <script src="resources/paint-invalidation-test.js"></script> | |
| 6 <style type="text/css"> | |
| 7 #test1 div { | |
| 8 height: 100px; | |
| 9 width: 100px; | |
| 10 } | |
| 11 #test1 .parent { | |
| 12 background-image: url(../../../fast/repaint/resources/animated.gif) | |
| 13 } | |
| 14 #test1 .child { | |
| 15 background-color: green; | |
| 16 } | |
| 17 | |
| 18 #test2 .parent { | |
| 19 position: relative; | |
| 20 height: 100px; | |
| 21 width: 100px; | |
| 22 background-image: url(../../../fast/repaint/resources/animated.gif); | |
| 23 background-repeat: no-repeat; | |
| 24 background-position: center; | |
| 25 } | |
| 26 | |
| 27 #test2 .child { | |
| 28 background-color: green; | |
| 29 position: relative; | |
| 30 left: 25px; | |
| 31 top: 25px; | |
| 32 height: 50px; | |
| 33 width: 50px; | |
| 34 } | |
| 35 #test3 img { | |
| 36 background-image: url(../../../fast/repaint/resources/animated.gif) | |
| 37 } | |
| 38 #test4 .parent { | |
| 39 position: relative; | |
| 40 height: 100px; | |
| 41 width: 100px; | |
| 42 background-color: red; | |
| 43 background-repeat: no-repeat; | |
| 44 background-position: center; | |
| 45 background-image: url(../../../fast/repaint/resources/animated.gif) | |
| 46 } | |
| 47 </style> | |
| 48 <script> | |
| 49 // Test that obscured animated gif does not trigger repaints. | |
| 50 if (window.testRunner) { | |
| 51 testRunner.waitUntilDone(); | |
| 52 testRunner.dumpAsText(); | |
| 53 } | |
| 54 window.testIsAsync = true; | |
| 55 function paintInvalidationTest() | |
| 56 { | |
| 57 runAfterLayoutAndPaint(finishPaintInvalidationTest); | |
| 58 } | |
| 59 | |
| 60 function start() { | |
| 61 if (!window.testRunner || !window.internals) | |
| 62 return; | |
| 63 | |
| 64 var img = new Image(); | |
| 65 img.onload = runPaintInvalidationTest; | |
| 66 img.src = "../../../fast/repaint/resources/animated.gif"; | |
| 67 } | |
| 68 </script> | |
| 69 </head> | |
| 70 <body onload="start()"> | |
| 71 <div id="test1"> | |
| 72 <div class="parent"> | |
| 73 <div class="child"> | |
| 74 </div> | |
| 75 </div> | |
| 76 </div> | |
| 77 <div id="test2"> | |
| 78 <div class="parent"> | |
| 79 <div class="child"> | |
| 80 </div> | |
| 81 </div> | |
| 82 </div> | |
| 83 <div id="test3"> | |
| 84 <img src="../../../fast/repaint/resources/apple.jpg"> | |
| 85 </div> | |
| 86 <div id="test4"> | |
| 87 <div class="parent"> | |
| 88 <a> | |
| 89 <div></div> | |
| 90 <div> | |
| 91 <img src="../../../fast/repaint/resources/apple.jpg"> | |
| 92 </div> | |
| 93 </a> | |
| 94 </div> | |
| 95 </div> | |
| 96 </body> | |
| 97 </html> | |
| OLD | NEW |