| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
| 4 | 4 |
| 5 <style> | 5 <style> |
| 6 #target { | 6 #target { |
| 7 top: 40px; | 7 top: 40px; |
| 8 width: 150px; | 8 width: 150px; |
| 9 height: 75px; | 9 height: 75px; |
| 10 background-color: yellow; | 10 background-color: yellow; |
| 11 transform: translateZ(0); | 11 transform: translateZ(0); |
| 12 opacity: 0; | 12 opacity: 0; |
| 13 } | 13 } |
| 14 </style> | 14 </style> |
| 15 | 15 |
| 16 <div id="target"></div> | 16 <div id="target"></div> |
| 17 | 17 |
| 18 <script> | 18 <script> |
| 19 description("Test that opacity changes from less than 1 to 1 don't cause layout
if the layer remains a stacking context"); | 19 description("Test that opacity changes from less than 1 to 1 don't cause layout
if the layer remains a stacking context"); |
| 20 var div = document.getElementById('target'); | 20 var div = document.getElementById('target'); |
| 21 div.offsetTop; | 21 div.offsetTop; |
| 22 div.style.opacity = 1; | 22 div.style.opacity = 1; |
| 23 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 23 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "1"); |
| 24 shouldBe("internals.needsLayoutCount()", "0"); | 24 shouldBe("internals.needsLayoutCount()", "0"); |
| 25 </script> | 25 </script> |
| OLD | NEW |