Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <head> | |
| 3 <title>{{ test_name }}</title> | |
| 4 <script> | |
| 5 function toggleZoom() { | |
| 6 var imgs = document.getElementsByTagName("img"); | |
| 7 for (i = 0; i < imgs.length; i++) { | |
|
Bernhard Bauer
2017/05/12 10:55:28
Can you use for-of iteration (https://developer.mo
PEConn
2017/05/12 13:47:23
Done.
| |
| 8 if (imgs[i].hasAttribute('style')) { | |
| 9 imgs[i].removeAttribute('style'); | |
| 10 } else { | |
| 11 imgs[i].style.width = '100%'; | |
| 12 } | |
| 13 } | |
| 14 } | |
| 15 </script> | |
| 16 </head> | |
| 17 <body> | |
| 2 <table> | 18 <table> |
| 3 <tr> | 19 <tr> |
| 4 <th>Failure</th> | 20 <th>Failure</th> |
| 5 <th>Golden</th> | 21 <th>Golden</th> |
| 6 <th>Diff</th> | 22 <th>Diff</th> |
| 7 </tr> | 23 </tr> |
| 8 <tr> | 24 <tr onclick="toggleZoom()"> |
| 9 <td><img src="{{ failure_link }}" width="100%"/></td> | 25 <td><img src="{{ failure_link }}" style="width: 100%" /></td> |
| 10 <td><img src="{{ golden_link }}" width="100%"/></td> | 26 <td><img src="{{ golden_link }}" style="width: 100%" /></td> |
| 11 <td><img src="{{ diff_link }}" width="100%"/></td> | 27 <td><img src="{{ diff_link }}" style="width: 100%" /></td> |
| 12 </tr> | 28 </tr> |
| 13 </table> | 29 </table> |
| 30 </body> | |
| 14 </html> | 31 </html> |
| OLD | NEW |