| 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, Arial, sans-serif; | 13 font-family: Helvetica, Arial, sans-serif; |
| 14 } | 14 } |
| 15 div#header select { | 15 div#header select { |
| 16 font-family: Helvetica, Arial, sans-serif; | 16 font-family: Helvetica, Arial, sans-serif; |
| 17 } | 17 } |
| 18 div.viewOptions input { | 18 div.viewOptions input { |
| 19 font-family: Helvetica, Arial, sans-serif; | 19 font-family: Helvetica, Arial, sans-serif; |
| 20 } | 20 } |
| 21 div.otherbrowsers { | 21 div.otherbrowsers { |
| 22 font-family: Helvetica, Arial, sans-serif; | 22 font-family: Helvetica, Arial, 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(4), | 25 table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(4), |
| 26 table.list#browserComparison tr.firstRow th:nth-child(1), | 26 table.list#browserComparison tr.firstRow th:nth-child(1), |
| 27 table.list#browserComparison tr.firstRow th:nth-child(2) { | 27 table.list#browserComparison tr.firstRow th:nth-child(2) { |
| 28 border-right: 1px solid #b5c6de; | 28 border-right: 1px solid #b5c6de; |
| 29 } | 29 } |
| 30 table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(2), | 30 table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(2), |
| 31 table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(5), | 31 table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(5), |
| 32 table.list#memoryDetails tr.firstRow th:nth-child(2), | 32 table.list#memoryDetails tr.firstRow th:nth-child(2), |
| 33 table.list#memoryDetails tr.firstRow th:nth-child(3) { | 33 table.list#memoryDetails tr.firstRow th:nth-child(3) { |
| 34 border-right: 1px solid #b5c6de; | 34 border-right: 1px solid #b5c6de; |
| 35 } | 35 } |
| 36 </style> | 36 </style> |
| 37 <script> | 37 <script src="chrome://memory-redirect/memory.js"></script> |
| 38 function reload() { | 38 <script src="chrome://memory-redirect/strings.js"></script> |
| 39 if (document.getElementById('helpTooltip')) | |
| 40 return; | |
| 41 history.go(0); | |
| 42 } | |
| 43 | |
| 44 function formatNumber(str) { | |
| 45 str += ''; | |
| 46 if (str == '0') { | |
| 47 return 'N/A '; | |
| 48 } | |
| 49 var x = str.split('.'); | |
| 50 var x1 = x[0]; | |
| 51 var x2 = x.length > 1 ? '.' + x[1] : ''; | |
| 52 var regex = /(\d+)(\d{3})/; | |
| 53 while (regex.test(x1)) { | |
| 54 x1 = x1.replace(regex, '$1' + ',' + '$2'); | |
| 55 } | |
| 56 return x1; | |
| 57 } | |
| 58 | |
| 59 function addToSum(id, value) { | |
| 60 var target = document.getElementById(id); | |
| 61 var sum = parseInt(target.innerHTML); | |
| 62 sum += parseInt(value); | |
| 63 target.innerHTML = sum; | |
| 64 } | |
| 65 | |
| 66 function handleHelpTooltipMouseOver(event) { | |
| 67 var el = document.createElement('div'); | |
| 68 el.id = 'helpTooltip'; | |
| 69 el.innerHTML = event.toElement.getElementsByTagName('div')[0].innerHTML; | |
| 70 el.style.top = 0; | |
| 71 el.style.left = 0; | |
| 72 el.style.visibility = 'hidden'; | |
| 73 document.body.appendChild(el); | |
| 74 | |
| 75 var width = el.offsetWidth; | |
| 76 var height = el.offsetHeight; | |
| 77 | |
| 78 if (event.pageX - width - 50 + document.body.scrollLeft >= 0 ) { | |
| 79 el.style.left = (event.pageX - width - 20) + 'px'; | |
| 80 } else { | |
| 81 el.style.left = (event.pageX + 20) + 'px'; | |
| 82 } | |
| 83 | |
| 84 | |
| 85 if (event.pageY - height - 50 + document.body.scrollTop >= 0) { | |
| 86 el.style.top = (event.pageY - height - 20) + 'px'; | |
| 87 } else { | |
| 88 el.style.top = (event.pageY + 20) + 'px'; | |
| 89 } | |
| 90 | |
| 91 el.style.visibility = 'visible'; | |
| 92 } | |
| 93 | |
| 94 function handleHelpTooltipMouseOut(event) { | |
| 95 var el = document.getElementById('helpTooltip'); | |
| 96 el.parentNode.removeChild(el); | |
| 97 } | |
| 98 | |
| 99 function enableHelpTooltips() { | |
| 100 var helpEls = document.getElementsByClassName('help'); | |
| 101 | |
| 102 for (var i = 0, helpEl; helpEl = helpEls[i]; i++) { | |
| 103 helpEl.onmouseover = handleHelpTooltipMouseOver; | |
| 104 helpEl.onmouseout = handleHelpTooltipMouseOut; | |
| 105 } | |
| 106 } | |
| 107 | |
| 108 //setInterval("reload()", 10000); | |
| 109 </script> | |
| 110 </head> | 39 </head> |
| 111 <body> | 40 <body> |
| 112 <div id='header'> | 41 <div id='header'> |
| 113 <h1> | 42 <h1> |
| 114 About memory | 43 About memory |
| 115 </h1> | 44 </h1> |
| 116 <p> | 45 <p> |
| 117 Measuring memory usage in a multi-process browser | 46 Measuring memory usage in a multi-process browser |
| 118 </p> | 47 </p> |
| 119 </div> | 48 </div> |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 </td> | 346 </td> |
| 418 </tr> | 347 </tr> |
| 419 | 348 |
| 420 <tr class='noResults'> | 349 <tr class='noResults'> |
| 421 <td colspan='99'> | 350 <td colspan='99'> |
| 422 No results found. | 351 No results found. |
| 423 </td> | 352 </td> |
| 424 </tr> | 353 </tr> |
| 425 </table> | 354 </table> |
| 426 </div> | 355 </div> |
| 356 <script src="chrome://resources/js/jstemplate_compiled.js"></script> |
| 427 </body> | 357 </body> |
| 428 <script> | |
| 429 enableHelpTooltips(); | |
| 430 </script> | |
| 431 </html> | 358 </html> |
| OLD | NEW |