Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 #container { | |
| 4 width: 100px; | |
| 5 height: 100px; | |
| 6 } | |
| 7 | |
| 8 #child { | |
| 9 position: fixed; | |
| 10 right: 0; | |
| 11 bottom: 0; | |
| 12 width: 100px; | |
| 13 height: 100px; | |
| 14 background: green; | |
| 15 } | |
| 16 </style> | |
| 17 <div id="container"> | |
| 18 <div id="child"> | |
| 19 </div> | |
| 20 </div> | |
| 21 This test verifies changing CSS containment correctly invalidates layout. | |
| 22 <script> | |
| 23 var container = document.getElementById("container"); | |
| 24 container.offsetTop; // forces layout | |
| 25 container.style.contain = "paint"; | |
| 26 </script> | |
| OLD | NEW |