| <!-- Based on compositing/squashing/squash-partial-repaint-inside-squashed-layer.html --> |
| <!DOCTYPE html> |
| <head> |
| <style> |
| .composited { |
| transform: translatez(0); |
| } |
| |
| .box { |
| width: 100px; |
| height: 100px; |
| } |
| |
| .behind { |
| position: absolute; |
| z-index: 1; |
| top: 100px; |
| left: 100px; |
| background-color: blue; |
| } |
| |
| .middle { |
| position: absolute; |
| z-index: 1; |
| top: 180px; |
| left: 180px; |
| background-color: lime; |
| } |
| |
| .repaintdiv { |
| position: absolute; |
| z-index: 1; |
| top: 260px; |
| left: 260px; |
| width: 182px; |
| height: 29px; |
| background-color:red; |
| } |
| |
| .top { |
| position: absolute; |
| z-index: 1; |
| top: 280px; |
| left: 340px; |
| background-color: cyan; |
| } |
| |
| div:hover { |
| background-color: green; |
| transform:translatez(0); |
| } |
| |
| </style> |
| <script src="resources/paint-invalidation-test.js"></script> |
| <script> |
| window.expectedPaintInvalidationObjects = [ |
| "LayoutImage (positioned) IMG id='repaintdiv' class='repaintdiv'", |
| ]; |
| function paintInvalidationTest() |
| { |
| document.getElementById('repaintdiv').style.background = 'salmon'; |
| } |
| runPaintInvalidationTest(); |
| </script> |
| </head> |
| <body> |
| <div class="composited box behind"></div> |
| <div class="box middle"></div> |
| <img id="repaintdiv" class="repaintdiv"></img> |
| <div class="box top"></div> |
| </body> |