| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 | 2 |
| 3 <!-- | 3 <!-- |
| 4 about:memory template page | 4 about:memory template page |
| 5 --> | 5 --> |
| 6 <html id="t"> | 6 <html id="t"> |
| 7 <head> | 7 <head> |
| 8 <title>About Memory</title> | 8 <title>About Memory</title> |
| 9 <meta http-equiv="X-WebKit-CSP" content="object-src 'none'; script-src chrome:
//resources 'self' 'unsafe-eval'"> |
| 9 <link rel="stylesheet" href="shared/css/about_memory.css"> | 10 <link rel="stylesheet" href="shared/css/about_memory.css"> |
| 10 | |
| 11 <style> | 11 <style> |
| 12 body { | 12 body { |
| 13 font-family: Helvetica, sans-serif; | 13 font-family: Helvetica, sans-serif; |
| 14 } | 14 } |
| 15 div#header select { | 15 div#header select { |
| 16 font-family: Helvetica, sans-serif; | 16 font-family: Helvetica, sans-serif; |
| 17 } | 17 } |
| 18 div.viewOptions input { | 18 div.viewOptions input { |
| 19 font-family: Helvetica, sans-serif; | 19 font-family: Helvetica, sans-serif; |
| 20 } | 20 } |
| 21 div.otherbrowsers { | 21 div.otherbrowsers { |
| 22 font-family: Helvetica, sans-serif; | 22 font-family: Helvetica, sans-serif; |
| 23 } | 23 } |
| 24 table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(1), | 24 table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(1), |
| 25 table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(6), | 25 table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(6), |
| 26 table.list#browserComparison tr.firstRow th:nth-child(1) { | 26 table.list#browserComparison tr.firstRow th:nth-child(1) { |
| 27 border-right: 1px solid #b5c6de; | 27 border-right: 1px solid #b5c6de; |
| 28 } | 28 } |
| 29 table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(2), | 29 table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(2), |
| 30 table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(7), | 30 table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(7), |
| 31 table.list#memoryDetails tr.firstRow th:nth-child(2) { | 31 table.list#memoryDetails tr.firstRow th:nth-child(2) { |
| 32 border-right: 1px solid #b5c6de; | 32 border-right: 1px solid #b5c6de; |
| 33 } | 33 } |
| 34 </style> | 34 </style> |
| 35 <script> | 35 <script src="chrome://memory-redirect/memory.js"></script> |
| 36 function reload() { | 36 <script src="chrome://memory-redirect/strings.js"></script> |
| 37 if (document.getElementById('helpTooltip')) | |
| 38 return; | |
| 39 history.go(0); | |
| 40 } | |
| 41 | |
| 42 function formatNumber(str) { | |
| 43 str += ''; | |
| 44 if (str == '0') { | |
| 45 return 'N/A '; | |
| 46 } | |
| 47 var x = str.split('.'); | |
| 48 var x1 = x[0]; | |
| 49 var x2 = x.length > 1 ? '.' + x[1] : ''; | |
| 50 var regex = /(\d+)(\d{3})/; | |
| 51 while (regex.test(x1)) { | |
| 52 x1 = x1.replace(regex, '$1' + ',' + '$2'); | |
| 53 } | |
| 54 return x1; | |
| 55 } | |
| 56 | |
| 57 function addToSum(id, value) { | |
| 58 var target = document.getElementById(id); | |
| 59 var sum = parseInt(target.innerHTML); | |
| 60 sum += parseInt(value); | |
| 61 target.innerHTML = sum; | |
| 62 } | |
| 63 | |
| 64 function handleHelpTooltipMouseOver(event) { | |
| 65 var el = document.createElement('div'); | |
| 66 el.id = 'helpTooltip'; | |
| 67 el.innerHTML = event.toElement.getElementsByTagName('div')[0].innerHTML; | |
| 68 el.style.top = 0; | |
| 69 el.style.left = 0; | |
| 70 el.style.visibility = 'hidden'; | |
| 71 document.body.appendChild(el); | |
| 72 | |
| 73 var width = el.offsetWidth; | |
| 74 var height = el.offsetHeight; | |
| 75 | |
| 76 if (event.pageX - width - 50 + document.body.scrollLeft >= 0 ) { | |
| 77 el.style.left = (event.pageX - width - 20) + 'px'; | |
| 78 } else { | |
| 79 el.style.left = (event.pageX + 20) + 'px'; | |
| 80 } | |
| 81 | |
| 82 | |
| 83 if (event.pageY - height - 50 + document.body.scrollTop >= 0) { | |
| 84 el.style.top = (event.pageY - height - 20) + 'px'; | |
| 85 } else { | |
| 86 el.style.top = (event.pageY + 20) + 'px'; | |
| 87 } | |
| 88 | |
| 89 el.style.visibility = 'visible'; | |
| 90 } | |
| 91 | |
| 92 function handleHelpTooltipMouseOut(event) { | |
| 93 var el = document.getElementById('helpTooltip'); | |
| 94 el.parentNode.removeChild(el); | |
| 95 } | |
| 96 | |
| 97 function enableHelpTooltips() { | |
| 98 var helpEls = document.getElementsByClassName('help'); | |
| 99 | |
| 100 for (var i = 0, helpEl; helpEl = helpEls[i]; i++) { | |
| 101 helpEl.onmouseover = handleHelpTooltipMouseOver; | |
| 102 helpEl.onmouseout = handleHelpTooltipMouseOut; | |
| 103 } | |
| 104 } | |
| 105 | |
| 106 //setInterval("reload()", 10000); | |
| 107 </script> | |
| 108 </head> | 37 </head> |
| 109 <body> | 38 <body> |
| 110 <div id='header'> | 39 <div id='header'> |
| 111 <h1> | 40 <h1> |
| 112 About memory | 41 About memory |
| 113 </h1> | 42 </h1> |
| 114 <p> | 43 <p> |
| 115 Measuring memory usage in a multi-process browser | 44 Measuring memory usage in a multi-process browser |
| 116 </p> | 45 </p> |
| 117 </div> | 46 </div> |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 <tr class='noResults'> | 249 <tr class='noResults'> |
| 321 <td colspan='99'> | 250 <td colspan='99'> |
| 322 No results found. | 251 No results found. |
| 323 </td> | 252 </td> |
| 324 </tr> | 253 </tr> |
| 325 </table> | 254 </table> |
| 326 <div class="otherbrowsers"> | 255 <div class="otherbrowsers"> |
| 327 (Note: Due to memory sharing between processes, summing memory usage doe
s not give total memory usage.) | 256 (Note: Due to memory sharing between processes, summing memory usage doe
s not give total memory usage.) |
| 328 </div> | 257 </div> |
| 329 </div> | 258 </div> |
| 259 <script src="chrome://resources/js/jstemplate_compiled.js"></script> |
| 330 </body> | 260 </body> |
| 331 <script> | |
| 332 enableHelpTooltips(); | |
| 333 </script> | |
| 334 </html> | 261 </html> |
| OLD | NEW |