| OLD | NEW |
| (Empty) |
| 1 <!-- Based on compositing/squashing/squash-partial-repaint-inside-squashed-layer
.html --> | |
| 2 <!DOCTYPE html> | |
| 3 <head> | |
| 4 <style> | |
| 5 .composited { | |
| 6 transform: translatez(0); | |
| 7 } | |
| 8 | |
| 9 .box { | |
| 10 width: 100px; | |
| 11 height: 100px; | |
| 12 } | |
| 13 | |
| 14 .behind { | |
| 15 position: absolute; | |
| 16 z-index: 1; | |
| 17 top: 100px; | |
| 18 left: 100px; | |
| 19 background-color: blue; | |
| 20 } | |
| 21 | |
| 22 .middle { | |
| 23 position: absolute; | |
| 24 z-index: 1; | |
| 25 top: 180px; | |
| 26 left: 180px; | |
| 27 background-color: lime; | |
| 28 } | |
| 29 | |
| 30 .repaintdiv { | |
| 31 position: absolute; | |
| 32 z-index: 1; | |
| 33 top: 260px; | |
| 34 left: 260px; | |
| 35 width: 182px; | |
| 36 height: 29px; | |
| 37 background-color:red; | |
| 38 } | |
| 39 | |
| 40 .top { | |
| 41 position: absolute; | |
| 42 z-index: 1; | |
| 43 top: 280px; | |
| 44 left: 340px; | |
| 45 background-color: cyan; | |
| 46 } | |
| 47 | |
| 48 div:hover { | |
| 49 background-color: green; | |
| 50 transform:translatez(0); | |
| 51 } | |
| 52 | |
| 53 </style> | |
| 54 <script src="resources/paint-invalidation-test.js"></script> | |
| 55 <script> | |
| 56 function paintInvalidationTest() | |
| 57 { | |
| 58 document.getElementById('repaintdiv').style.background = 'salmon'; | |
| 59 } | |
| 60 runPaintInvalidationTest(); | |
| 61 </script> | |
| 62 </head> | |
| 63 <body> | |
| 64 <div class="composited box behind"></div> | |
| 65 <div class="box middle"></div> | |
| 66 <img id="repaintdiv" class="repaintdiv"></img> | |
| 67 <div class="box top"></div> | |
| 68 </body> | |
| OLD | NEW |