| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="resources/text-based-repaint.js"></script> | 2 <script src="resources/repaint.js"></script> |
| 3 <script> | 3 <script> |
| 4 function changePositionKeepingGeometry(id, newPosition) { | 4 function changePositionKeepingGeometry(id, newPosition) { |
| 5 var target = document.getElementById(id); | 5 var target = document.getElementById(id); |
| 6 var originalTop = target.offsetTop; | 6 var originalTop = target.offsetTop; |
| 7 var originalLeft = target.offsetLeft; | 7 var originalLeft = target.offsetLeft; |
| 8 target.style.position = newPosition; | 8 target.style.position = newPosition; |
| 9 target.style.top = originalTop + 'px'; | 9 target.style.top = originalTop + 'px'; |
| 10 target.style.left = originalLeft + 'px'; | 10 target.style.left = originalLeft + 'px'; |
| 11 } | 11 } |
| 12 | 12 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 position: absolute; | 46 position: absolute; |
| 47 z-index: 0; | 47 z-index: 0; |
| 48 } | 48 } |
| 49 </style> | 49 </style> |
| 50 There should be no invalildations on change of position without actual change of
position and size. | 50 There should be no invalildations on change of position without actual change of
position and size. |
| 51 <!-- target0 ensures we don't strip anonymous wrappers (and trigger a layout) wh
en the other elements change position. --> | 51 <!-- target0 ensures we don't strip anonymous wrappers (and trigger a layout) wh
en the other elements change position. --> |
| 52 <div id="target0"></div> | 52 <div id="target0"></div> |
| 53 <div id="target1"></div> | 53 <div id="target1"></div> |
| 54 <div id="target2"></div> | 54 <div id="target2"></div> |
| 55 <div id="target3"></div> | 55 <div id="target3"></div> |
| OLD | NEW |