diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-23 00:27:08 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-23 00:27:08 +0000 |
commit | 7d7c8c0dbd381532d4c0137056ac2809289eac97 (patch) | |
tree | 427527a29dc4a9711fb9a0f46618f6a36c8f323a /chrome/browser/resources | |
parent | e95180db0287b6a7480edb22e28ef47e0af6af68 (diff) | |
download | chromium_src-7d7c8c0dbd381532d4c0137056ac2809289eac97.zip chromium_src-7d7c8c0dbd381532d4c0137056ac2809289eac97.tar.gz chromium_src-7d7c8c0dbd381532d4c0137056ac2809289eac97.tar.bz2 |
Some random cleanups in the HTML files.
Use HTML5 placeholder instead of js code for the text input place holders.
Use HTML5 doctype in all html files.
Skip optional type in script and style tags.
Some small optimizations in LocalStrings.
Review URL: http://codereview.chromium.org/88072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r-- | chrome/browser/resources/about_credits.html | 8 | ||||
-rw-r--r-- | chrome/browser/resources/about_memory.html | 566 | ||||
-rw-r--r-- | chrome/browser/resources/about_plugins.html | 4 | ||||
-rw-r--r-- | chrome/browser/resources/about_stats.html | 14 | ||||
-rw-r--r-- | chrome/browser/resources/about_version.html | 4 | ||||
-rw-r--r-- | chrome/browser/resources/downloads.html | 16 | ||||
-rwxr-xr-x | chrome/browser/resources/extensions_ui.html | 44 | ||||
-rw-r--r-- | chrome/browser/resources/history.html | 10 | ||||
-rw-r--r-- | chrome/browser/resources/incognito_tab.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/new_tab.html | 53 | ||||
-rw-r--r-- | chrome/browser/resources/safe_browsing_malware_block.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/safe_browsing_multiple_threat_block.html | 2 | ||||
-rw-r--r-- | chrome/browser/resources/safe_browsing_phishing_block.html | 2 |
13 files changed, 351 insertions, 376 deletions
diff --git a/chrome/browser/resources/about_credits.html b/chrome/browser/resources/about_credits.html index 508732e..9eefc99 100644 --- a/chrome/browser/resources/about_credits.html +++ b/chrome/browser/resources/about_credits.html @@ -1,9 +1,9 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!DOCTYPE HTML> <html> <head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta charset="utf-8"> <title>Credits</title> -<style type="text/css"> +<style> body { font-family:arial,sans-serif; background-color:white; @@ -51,7 +51,7 @@ body { margin-top:0px; } </style> -<script type="text/javascript"> +<script> function $(o) {return document.getElementById(o);} function toggle(o) { var licence = o.nextSibling; diff --git a/chrome/browser/resources/about_memory.html b/chrome/browser/resources/about_memory.html index ddae623..0c31cdd 100644 --- a/chrome/browser/resources/about_memory.html +++ b/chrome/browser/resources/about_memory.html @@ -1,13 +1,13 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> - +<!DOCTYPE HTML> + <!-- about:memory template page ---> -<html id="t"> - <head> - <title>About Memory</title> - -<style type="text/css"> +--> +<html id="t"> + <head> + <title>About Memory</title> + +<style> body { font-size: 84%; font-family: Arial, Helvetica, sans-serif; @@ -15,14 +15,14 @@ body { margin: 0; min-width: 45em; } - + h1 { font-size: 110%; font-weight: bold; color: #4a8ee6; letter-spacing: -1px; padding: 0; - margin: 0; + margin: 0; } h2 { font-size: 110%; @@ -35,10 +35,10 @@ h2 { color: #3a75bd; margin-left: -38px; padding-left: 38px; - + border-top: 1px solid #3a75bd; padding-top: 0.5em; - + } h2:first-child { border-top: 0; @@ -50,7 +50,7 @@ span.th { a { color: black; } - + div#header { padding: 0.75em 1em; padding-top: 0.6em; @@ -98,7 +98,7 @@ div#header select { div#header select option { padding: 0 0.2em; } - + div#sidebar { display: none; float: left; @@ -107,13 +107,13 @@ div#sidebar { min-height: 20em; padding: 0.75em; padding-top: 0; - + border-right: 1px solid #cfcfcf; } div#content { margin-left: 0px; } - + div.viewOptions { float: right; font-size: 92%; @@ -133,15 +133,15 @@ div.viewOptions input { padding: 0.3em 0.4em; } div.viewOptions input:focus { - border-color: white; + border-color: white; } - + .k { opacity: 0.4; font-weight: normal; padding-left: 0.1em; } - + .legend { font-size: 84%; padding: 0; @@ -158,7 +158,7 @@ div.viewOptions input:focus { font-weight: normal; color: black; display: inline; - font-size: 100%; + font-size: 100%; } .legend .swatch { opacity: 0.66; @@ -170,7 +170,7 @@ div.viewOptions input:focus { .legend .swatch.heavyUse { background: #cc0000; } - + table.list { width: 100%; line-height: 200%; @@ -197,7 +197,7 @@ table.list .firstRow th { line-height: 100%; } table.list .secondRow * { - text-align: left; + text-align: left; border-bottom: 1px solid #b5c6de; } table.list td { @@ -213,11 +213,11 @@ table.list tr th:nth-last-child(1) { table.list:not([class*='filtered']) .tab .name { padding-left: 1.5em; } - + table.list .name { width: 100%; } - + table.list .name div { height: 1.6em; overflow: hidden; @@ -260,19 +260,19 @@ table.list .noResults td { padding: 3em 0; color: #3f3f3f; } - + .heavyUse { color: #cc0000; font-weight: bold; } - + table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(2), table.list#memoryDetails tr:not([class*='firstRow']) > *:nth-child(5), table.list#memoryDetails tr.firstRow th:nth-child(2), table.list#memoryDetails tr.firstRow th:nth-child(3) { border-right: 1px solid #b5c6de; } - + table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(1), table.list#browserComparison tr:not([class*='firstRow']) > *:nth-child(4), table.list#browserComparison tr.firstRow th:nth-child(1), @@ -284,7 +284,7 @@ table.list#browserComparison .name { background-position: 5px center; background-repeat: no-repeat; } - + div.help { display: inline-block; width: 14px; @@ -320,11 +320,11 @@ div.otherbrowsers { width: 100%; text-align: center; } -</style> -<script> +</style> +<script> function reload() { if (document.getElementById('helpTooltip')) - return; + return; history.go(0); } @@ -339,7 +339,7 @@ function formatNumber(str) { } return x1; } - + function addToSum(id, value) { var target = document.getElementById(id); var sum = parseInt(target.innerHTML); @@ -355,21 +355,21 @@ function handleHelpTooltipMouseOver(event) { el.style.left = 0; el.style.visibility = 'hidden'; document.body.appendChild(el); - + var width = el.offsetWidth; var height = el.offsetHeight; if (event.pageX - width - 50 + document.body.scrollLeft >= 0 ) { - el.style.left = (event.pageX - width - 20) + 'px'; + el.style.left = (event.pageX - width - 20) + 'px'; } else { - el.style.left = (event.pageX + 20) + 'px'; + el.style.left = (event.pageX + 20) + 'px'; } - - - if (event.pageY - height - 50 + document.body.scrollTop >= 0) { - el.style.top = (event.pageY - height - 20) + 'px'; + + + if (event.pageY - height - 50 + document.body.scrollTop >= 0) { + el.style.top = (event.pageY - height - 20) + 'px'; } else { - el.style.top = (event.pageY + 20) + 'px'; + el.style.top = (event.pageY + 20) + 'px'; } el.style.visibility = 'visible'; @@ -382,306 +382,306 @@ function handleHelpTooltipMouseOut(event) { function enableHelpTooltips() { var helpEls = document.getElementsByClassName('help'); - + for (var i = 0, helpEl; helpEl = helpEls[i]; i++) { helpEl.onmouseover = handleHelpTooltipMouseOver; helpEl.onmouseout = handleHelpTooltipMouseOut; } } - + //setInterval("reload()", 10000); -</script> -</head> -<body> - <div id='header'> - <h1> +</script> +</head> +<body> + <div id='header'> + <h1> About memory - </h1> - <p> + </h1> + <p> Measuring memory usage in a multi-process browser - </p> - </div> - - <div id='content'> - <h2> + </p> + </div> + + <div id='content'> + <h2> Summary - <div class='help'> - <div> - <p> + <div class='help'> + <div> + <p> Summary of memory used by currently active browsers. For browsers which use multiple processes, memory reflects aggregate memory used across all browser processes.<p> For Chromium, processes used to to display diagnostics information (such as this "about:memory") are excluded. - </p> - </div> - </div> - </h2> - - <table class='list' id='browserComparison'> - <colgroup> - <col class='name' /> - <col class='number' /> - <col class='number' /> - <col class='number' /> - <col class='number' /> - <col class='number' /> - </colgroup> - <tr class='firstRow doNotFilter'> - <th> - </th> - <th colspan='3'> + </p> + </div> + </div> + </h2> + + <table class='list' id='browserComparison'> + <colgroup> + <col class='name' /> + <col class='number' /> + <col class='number' /> + <col class='number' /> + <col class='number' /> + <col class='number' /> + </colgroup> + <tr class='firstRow doNotFilter'> + <th> + </th> + <th colspan='3'> Memory - <div class='help'> - <div> - <p> - <strong>Memory</strong> - </p> - <p> - <strong>Private:</strong> - Resident memory size that is not shared with any other process. + <div class='help'> + <div> + <p> + <strong>Memory</strong> + </p> + <p> + <strong>Private:</strong> + Resident memory size that is not shared with any other process. This is the best indicator of browser memory resource usage. - </p> - <p> - <strong>Shared:</strong> - Resident memory size that is currently shared with 2 or more processes. - Note: For browsers using multiple processes, if we simply added the shared memory - of each individual process, this value would be inflated. Therefore, this value - is computed as an approximate value for shared memory in each of the browser's - processes. Note also that shared memory varies depending on what other processes + </p> + <p> + <strong>Shared:</strong> + Resident memory size that is currently shared with 2 or more processes. + Note: For browsers using multiple processes, if we simply added the shared memory + of each individual process, this value would be inflated. Therefore, this value + is computed as an approximate value for shared memory in each of the browser's + processes. Note also that shared memory varies depending on what other processes are running on the system, and may be difficult to measure reproducibly. - </p> - <p> - <strong>Total:</strong> + </p> + <p> + <strong>Total:</strong> The sum of the private + shared resident memory sizes. - </p> - </div> - </div> - </th> - <th colspan='2'> + </p> + </div> + </div> + </th> + <th colspan='2'> Virtual memory - <div class='help'> - <div> - <p> - <strong>Virtual memory</strong> - </p> - <p> - <strong>Private:</strong> + <div class='help'> + <div> + <p> + <strong>Virtual memory</strong> + </p> + <p> + <strong>Private:</strong> The resident and paged bytes committed for use by only this process. - </p> - <p> - <strong>Mapped:</strong> + </p> + <p> + <strong>Mapped:</strong> Total bytes allocated by this process that are mapped into the view of a section, backed by either system pagefile or file system. This is primarily memory-mapped files. - </p> - </div> - </div> - </th> - </tr> - <tr class='secondRow doNotFilter'> - <th class='name'> + </p> + </div> + </div> + </th> + </tr> + <tr class='secondRow doNotFilter'> + <th class='name'> Browser - </th> - <th class='name'> + </th> + <th class='name'> Private </th> - </th> - <th class='number'> + </th> + <th class='number'> Shared - </th> - <th class='number'> + </th> + <th class='number'> Total - </th> - <th class='number'> + </th> + <th class='number'> Private - </th> - <th class='number'> + </th> + <th class='number'> Mapped - </th> - </tr> - <tr jsselect="browsers"> - <td class='name'> - <div> + </th> + </tr> + <tr jsselect="browsers"> + <td class='name'> + <div> <strong jscontent="name"></strong> <span jscontent="version"></span> - </div> - </td> - <td class='number'> - <span class='th' jscontent="formatNumber(ws_priv + ws_shareable - ws_shared)"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jscontent="formatNumber(ws_shared / processes)"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jscontent="formatNumber(ws_priv + ws_shareable - ws_shared + (ws_shared / processes))"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jscontent="formatNumber(comm_priv)"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jscontent="formatNumber(comm_map)"></span><span class='k'>k</span> - </td> - </tr> - </table> + </div> + </td> + <td class='number'> + <span class='th' jscontent="formatNumber(ws_priv + ws_shareable - ws_shared)"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jscontent="formatNumber(ws_shared / processes)"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jscontent="formatNumber(ws_priv + ws_shareable - ws_shared + (ws_shared / processes))"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jscontent="formatNumber(comm_priv)"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jscontent="formatNumber(comm_map)"></span><span class='k'>k</span> + </td> + </tr> + </table> <div class=otherbrowsers jsdisplay="browsers.length == 1"> Note: If other browsers (IE, Firefox, Opera, Safari) are running, I'll show their memory details here. </div> - - <br /><br /><br /> - - <h2> + + <br /><br /><br /> + + <h2> Processes - <div class='help'> - <div> - <p> + <div class='help'> + <div> + <p> Details of memory usage for each of Chromium's processes. - </p> - </div> - </div> - </h2> - - <table class='list' id='memoryDetails'> - <colgroup> - <col class='pid' /> - <col class='name' /> - <col class='number' /> - <col class='number' /> - <col class='number' /> - <col class='number' /> - <col class='number' /> - </colgroup> - <tr class='firstRow doNotFilter'> - <th> - </th> - <th> - </th> - <th colspan='3'> + </p> + </div> + </div> + </h2> + + <table class='list' id='memoryDetails'> + <colgroup> + <col class='pid' /> + <col class='name' /> + <col class='number' /> + <col class='number' /> + <col class='number' /> + <col class='number' /> + <col class='number' /> + </colgroup> + <tr class='firstRow doNotFilter'> + <th> + </th> + <th> + </th> + <th colspan='3'> Memory </th> - <th colspan='2'> + <th colspan='2'> Virtual memory - </th> - - </tr> - <tr class='secondRow doNotFilter'> - <th class='pid'> + </th> + + </tr> + <tr class='secondRow doNotFilter'> + <th class='pid'> PID - </th> - <th class='name'> + </th> + <th class='name'> Name - </th> - <th class='number'> + </th> + <th class='number'> Private - </th> - <th class='number'> + </th> + <th class='number'> Shared - </th> - <th class='number'> + </th> + <th class='number'> Total - </th> - <th class='number'> + </th> + <th class='number'> Private - </th> - <th class='number'> + </th> + <th class='number'> Mapped - </th> - </tr> - - <tr jsselect="browzr_data"> - <td class='pid'> - <span class='th' jscontent="pid"></span> - </td> - <td class='name'> - <div> + </th> + </tr> + + <tr jsselect="browzr_data"> + <td class='pid'> + <span class='th' jscontent="pid"></span> + </td> + <td class='name'> + <div> Browser - </div> - </td> - <td class='number'> - <span class='th' jseval="addToSum('tot_ws_priv', $this.ws_priv + $this.ws_shareable - $this.ws_shared)" jscontent="ws_priv + ws_shareable - ws_shared"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jscontent="ws_shared"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jseval="addToSum('tot_ws_tot', $this.ws_priv + $this.ws_shareable)" jscontent="ws_priv + ws_shareable"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jseval="addToSum('tot_comm_priv', $this.comm_priv)" jscontent="comm_priv"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jseval="addToSum('tot_comm_map', $this.comm_map)" jscontent="comm_map"></span><span class='k'>k</span> - </td> - </tr> - <tr jsselect="child_data"> - <td class='pid'> - <span class='th' jscontent="pid"></span> - </td> - <td class='name'> + </div> + </td> + <td class='number'> + <span class='th' jseval="addToSum('tot_ws_priv', $this.ws_priv + $this.ws_shareable - $this.ws_shared)" jscontent="ws_priv + ws_shareable - ws_shared"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jscontent="ws_shared"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jseval="addToSum('tot_ws_tot', $this.ws_priv + $this.ws_shareable)" jscontent="ws_priv + ws_shareable"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jseval="addToSum('tot_comm_priv', $this.comm_priv)" jscontent="comm_priv"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jseval="addToSum('tot_comm_map', $this.comm_map)" jscontent="comm_map"></span><span class='k'>k</span> + </td> + </tr> + <tr jsselect="child_data"> + <td class='pid'> + <span class='th' jscontent="pid"></span> + </td> + <td class='name'> <div jscontent="child_name"></div> <div jsselect="titles"> <span jscontent="$this"></span><br> - </div> - </td> - <td class='number'> - <span class='th' jseval="addToSum('tot_ws_priv', $this.ws_priv + $this.ws_shareable - $this.ws_shared)" jscontent="ws_priv + ws_shareable - ws_shared"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jscontent="ws_shared"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jseval="addToSum('tot_ws_tot', $this.ws_priv + $this.ws_shareable)" jscontent="ws_priv + ws_shareable"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jseval="addToSum('tot_comm_priv', $this.comm_priv)" jscontent="comm_priv"></span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' jseval="addToSum('tot_comm_map', $this.comm_map)" jscontent="comm_map"></span><span class='k'>k</span> - </td> - </tr> - <tr class='total doNotFilter'> - <td class='pid'> - </td> - <td class='name'> + </div> + </td> + <td class='number'> + <span class='th' jseval="addToSum('tot_ws_priv', $this.ws_priv + $this.ws_shareable - $this.ws_shared)" jscontent="ws_priv + ws_shareable - ws_shared"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jscontent="ws_shared"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jseval="addToSum('tot_ws_tot', $this.ws_priv + $this.ws_shareable)" jscontent="ws_priv + ws_shareable"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jseval="addToSum('tot_comm_priv', $this.comm_priv)" jscontent="comm_priv"></span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' jseval="addToSum('tot_comm_map', $this.comm_map)" jscontent="comm_map"></span><span class='k'>k</span> + </td> + </tr> + <tr class='total doNotFilter'> + <td class='pid'> + </td> + <td class='name'> Σ - </td> - <td class='number'> - <span class='th' id="tot_ws_priv">0</span><span class='k'>k</span> - </td> - <td class='number'> - </td> - <td class='number'> - <span class='th' id="tot_ws_tot">0</span><span class='k'>k</span> - </td> - <td class='number'> - <span class='th' id="tot_comm_priv">0</span><span class='k'>k</span> - </td> + </td> + <td class='number'> + <span class='th' id="tot_ws_priv">0</span><span class='k'>k</span> + </td> <td class='number'> - <div class='help'> - <div> - <p> + </td> + <td class='number'> + <span class='th' id="tot_ws_tot">0</span><span class='k'>k</span> + </td> + <td class='number'> + <span class='th' id="tot_comm_priv">0</span><span class='k'>k</span> + </td> + <td class='number'> + <div class='help'> + <div> + <p> This is an approximation. Conceptually, this is the total amount of in-memory pages for the entire logical Chromium - application, without double counting shared pages (e.g. + application, without double counting shared pages (e.g. mapped DLLs, SharedMemory bitmaps, etc.) across the browser and renderers. - </p> - </div> - </div> - <span class='th' id="tot_comm_map">0</span><span class='k'>k</span> - </td> - </tr> - - <tr class='noResults'> - <td colspan='99'> + </p> + </div> + </div> + <span class='th' id="tot_comm_map">0</span><span class='k'>k</span> + </td> + </tr> + + <tr class='noResults'> + <td colspan='99'> No results found. - </td> - </tr> - </table> - </div> -</body> -<script> + </td> + </tr> + </table> + </div> +</body> +<script> enableHelpTooltips(); -</script> -</html> +</script> +</html> diff --git a/chrome/browser/resources/about_plugins.html b/chrome/browser/resources/about_plugins.html index eb0cad7..86bd16c 100644 --- a/chrome/browser/resources/about_plugins.html +++ b/chrome/browser/resources/about_plugins.html @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<!DOCTYPE HTML> <!-- A modified version of the about:plugins page found in Mozilla. The license of @@ -104,7 +104,7 @@ th { th + th, td + td { - border-left: 1px dotted ThreeDShadow; + border-left: 1px dotted ThreeDShadow; } td { diff --git a/chrome/browser/resources/about_stats.html b/chrome/browser/resources/about_stats.html index 8354fe5..72143e2 100644 --- a/chrome/browser/resources/about_stats.html +++ b/chrome/browser/resources/about_stats.html @@ -1,10 +1,10 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<!DOCTYPE HTML> <html id="t"> <head> <title>About Stats</title> - -<style type="text/css"> + +<style> body { border-top: 10px solid #3B85E3; color: #333; @@ -105,7 +105,7 @@ function getTimerTimeFromTimerNode(node) { /* Timer accessor for Average Time Node. */ function getTimerAvgTimeFromTimerNode(node) { return node.childNodes[7]; -} +} /* Do the filter work. Hide all nodes matching node.*/ function filterMatching(text, nodelist, functionToGetNameNode) { @@ -196,13 +196,13 @@ function onLoadWork() { function sort_table(type){ var cell = event.target; var cnum = cell.cellIndex; - + var row = cell.parentNode; var start_index = row.rowIndex + 1; - + var tbody = row.parentNode; var table = tbody.parentNode; - + var rows = new Array(); var indexes = new Array(); diff --git a/chrome/browser/resources/about_version.html b/chrome/browser/resources/about_version.html index 0b8c091..7216c48 100644 --- a/chrome/browser/resources/about_version.html +++ b/chrome/browser/resources/about_version.html @@ -1,4 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<!DOCTYPE HTML> <!-- about:version template page @@ -7,7 +7,7 @@ about:version template page <html id="t"> <head> <title jscontent="title"></title> - <style type="text/css"> + <style> body { font-family:arial; background-color:white; diff --git a/chrome/browser/resources/downloads.html b/chrome/browser/resources/downloads.html index 62ceed7..c04e899 100644 --- a/chrome/browser/resources/downloads.html +++ b/chrome/browser/resources/downloads.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title jscontent="title"></title> <link rel="icon" href="../../app/theme/downloads_favicon.png"> -<style type="text/css"> +<style> body { background-color:white; color:black; @@ -142,7 +142,7 @@ html[dir='rtl'] .name { height:24px; } </style> -<script type="text/javascript"> +<script> /////////////////////////////////////////////////////////////////////////////// // localStrings: /** @@ -154,7 +154,7 @@ html[dir='rtl'] .name { function LocalStrings(node) { this.strings_ = {}; - var children = node.childNodes; + var children = node.children; for (var i = 0, child; child = children[i]; i++) { var id = child.id; if (id) { @@ -169,7 +169,7 @@ function LocalStrings(node) { * @return {string} The localized string */ LocalStrings.prototype.getString = function(s) { - return (s in this.strings_) ? this.strings_[s] : ''; + return this.strings_[s] || ''; } /** @@ -180,7 +180,7 @@ LocalStrings.prototype.getString = function(s) { * @return {string} The formatted string. */ LocalStrings.prototype.formatString = function(s, d) { - return (s in this.strings_) ? this.strings_[s].replace(/\%s/, d) : ''; + return this.getString(s).replace(/\%s/, d); } /////////////////////////////////////////////////////////////////////////////// @@ -357,11 +357,11 @@ Downloads.prototype.clear = function() { function Download(download) { // Create DOM this.node = createElementWithClassName('div', 'download'); - + // Dates this.dateContainer_ = createElementWithClassName('div', 'date-container'); this.node.appendChild(this.dateContainer_); - + this.nodeSince_ = createElementWithClassName('div', 'since'); this.nodeDate_ = createElementWithClassName('div', 'date'); this.dateContainer_.appendChild(this.nodeSince_); @@ -486,7 +486,7 @@ Download.prototype.update = function(download) { this.fileName_ = download.file_name; this.url_ = download.url; this.state_ = download.state; - + this.since_ = download.since_string; this.date_ = download.date_string; diff --git a/chrome/browser/resources/extensions_ui.html b/chrome/browser/resources/extensions_ui.html index 14c8b9e..ecb7a8d 100755 --- a/chrome/browser/resources/extensions_ui.html +++ b/chrome/browser/resources/extensions_ui.html @@ -3,10 +3,10 @@ <head> <meta charset="utf-8"> <title jscontent="title"></title> -<script type="text/javascript"> +<script> /** * This variable structure is here to document the structure that the template - * expects to correctly populate the page. + * expects to correctly populate the page. */ var extensionDataFormat = { "extensions": [ @@ -52,7 +52,7 @@ var extensionDataFormat = { }; /** - * Takes the |extensionsData| input argument which represents data about the + * Takes the |extensionsData| input argument which represents data about the * currently installed/running extensions and populates the html jstemplate with * that data. It expects an object structure like the above. * @param {Object} extensionsData Detailed info about installed extensions @@ -65,7 +65,7 @@ function showExtensionsData(extensionsData) { } /* - * Asks the C++ ExtensionDOMHandler to inspect the installed extensions and + * Asks the C++ ExtensionDOMHandler to inspect the installed extensions and * return detailed data about the configuration. The ExtensionDOMHandler * should reply to returnExtensionsData() (below). */ @@ -74,14 +74,14 @@ function requestExtensionsData() { } function returnExtensionsData(extensionsData) { showExtensionsData(extensionsData); - - // We are currently hiding the body because the first call to jstProcess() to - // insert localized strings happens prior to this call which runs during the + + // We are currently hiding the body because the first call to jstProcess() to + // insert localized strings happens prior to this call which runs during the // body.onload event, causes a flickering. document.getElementById('body-container').style.display = "inline"; } </script> -<style type="text/css"> +<style> body { background-color: Window; color: WindowText; @@ -132,7 +132,7 @@ th { th + th, td + td { - border-left: 1px dotted ThreeDShadow; + border-left: 1px dotted ThreeDShadow; } td { @@ -157,14 +157,14 @@ th.enabled { } #error-box { - background-color:#D8D8D8; + background-color:#D8D8D8; margin-top: 8px; - padding: 8px; - width: 100%; + padding: 8px; + width: 100%; } #error-log { color: #B00000; - font-weight: bold; + font-weight: bold; } .error { font-style:italic; @@ -176,16 +176,16 @@ th.enabled { <div id="outside"> <div id="installed-extensions">Installed Extensions</div> <div id="extensionTemplate"> - + <div id="error-box" jsdisplay="errors.length > 0"> <div id="error-log">Errors</div> <div class="error" jsselect="errors" jscontent="$this"> Error Detail</div> </div> - + <div class="extension-name" jsdisplay="extensions.length === 0"> No Extensions Installed</div> - + <div jsdisplay="extensions.length > 0"> <div class="extension" jsselect="extensions"> <div class="extension-name" jscontent="name"> @@ -196,16 +196,16 @@ th.enabled { </dd> <dd>Version: <span jscontent="version">x.x.x.x</span></dd> </dl> - + <table jsselect="content_scripts"> <thead> <tr><th colspan="2">Content Script</th></tr> </thead> <tbody> - <tr> + <tr> <td>URL Match Patterns</td> <td> - <span jsselect="matches" + <span jsselect="matches" jscontent="(($index > 0) ? ', ' : '') + $this"> </span> </td> @@ -213,7 +213,7 @@ th.enabled { <tr> <td>CSS Files</td> <td> - <span jsselect="css" + <span jsselect="css" jscontent="(($index > 0) ? ', ' : '') + $this"> </span> </td> @@ -221,7 +221,7 @@ th.enabled { <tr> <td>JavaScript Files</td> <td> - <span jsselect="js" + <span jsselect="js" jscontent="(($index > 0) ? ', ' : '') + $this"> </span> </td> @@ -233,4 +233,4 @@ th.enabled { </div> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/chrome/browser/resources/history.html b/chrome/browser/resources/history.html index ff1a4d5..a33b821 100644 --- a/chrome/browser/resources/history.html +++ b/chrome/browser/resources/history.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <title jscontent="title"></title> <link rel="icon" href="../../app/theme/history_favicon.png"> -<script type="text/javascript"> +<script> /////////////////////////////////////////////////////////////////////////////// // Globals: var RESULTS_PER_PAGE = 150; @@ -48,7 +48,7 @@ var deleteInFlight = false; function LocalStrings(node) { this.strings_ = {}; - var children = node.childNodes; + var children = node.children; for (var i = 0, child; child = children[i]; i++) { var id = child.id; if (id) { @@ -63,7 +63,7 @@ function LocalStrings(node) { * @return {string} The localized string */ LocalStrings.prototype.getString = function(s) { - return (s in this.strings_) ? this.strings_[s] : ''; + return this.strings_[s] || ''; } /** @@ -74,7 +74,7 @@ LocalStrings.prototype.getString = function(s) { * @return {string} The formatted string. */ LocalStrings.prototype.formatString = function(s, d) { - return (s in this.strings_) ? this.strings_[s].replace(/\%s/, d) : ''; + return this.getString(s).replace(/\%s/, d); } /////////////////////////////////////////////////////////////////////////////// @@ -805,7 +805,7 @@ function historyDeleted() { historyView.reload(); } </script> -<style type="text/css"> +<style> body { background-color:white; color:black; diff --git a/chrome/browser/resources/incognito_tab.html b/chrome/browser/resources/incognito_tab.html index c35f351..9abb85f 100644 --- a/chrome/browser/resources/incognito_tab.html +++ b/chrome/browser/resources/incognito_tab.html @@ -1,7 +1,7 @@ <html id="t" jsvalues="dir:textdirection"> <head> <title jscontent="title"></title> -<style type="text/css"> +<style> body { margin:10px 8px 10px 8px; } diff --git a/chrome/browser/resources/new_tab.html b/chrome/browser/resources/new_tab.html index 249c002..39672e4 100644 --- a/chrome/browser/resources/new_tab.html +++ b/chrome/browser/resources/new_tab.html @@ -15,11 +15,11 @@ If the requests for content come back before the content-rendering functions are defined, the data is held until those functions are defined. --> -<script type="text/javascript"> +<script> /* Logging info for benchmarking purposes. */ var log = []; function logEvent(name) { - log.push([name, new Date().getTime()]); + log.push([name, Date.now()]); } // Basic functions to send, receive, store and process the data from our @@ -52,7 +52,7 @@ var blacklistedURLs = []; function LocalStrings(node) { this.strings_ = {}; - var children = node.childNodes; + var children = node.children; for (var i = 0, child; child = children[i]; i++) { var id = child.id; if (id) { @@ -67,7 +67,7 @@ function LocalStrings(node) { * @return {string} The localized string */ LocalStrings.prototype.getString = function(s) { - return (s in this.strings_) ? this.strings_[s] : ''; + return this.strings_[s] || ''; } /** @@ -78,7 +78,7 @@ LocalStrings.prototype.getString = function(s) { * @return {string} The formatted string. */ LocalStrings.prototype.formatString = function(s, d) { - return (s in this.strings_) ? this.strings_[s].replace(/\%s/, d) : ''; + return this.getString(s).replace(/\%s/, d); } function $(o) {return document.getElementById(o);} @@ -160,24 +160,6 @@ function handleWindowResize() { } } -function handleInputFocus() { - if (!this.deftext) { - this.deftext = this.value; - } - - if (this.value == this.deftext) { - this.className = ''; - this.value = ''; - } -} - -function handleInputBlur() { - if (!this.value) { - this.className = 'hint'; - this.value = this.deftext; - } -} - function handleDOMContentLoaded() { logEvent('domcontentloaded fired'); } @@ -187,7 +169,7 @@ logEvent('log start'); <head> <meta charset="utf-8"> <title jscontent="title"></title> -<style type="text/css"> +<style> body { background-color:white; margin:0px; @@ -384,8 +366,8 @@ html[dir='rtl'] #searches input { padding-left:0px; padding-right: 23px; } -#searches input.hint { - color:#aaa; +#searches input:-webkit-input-placeholder-mode { + color: #aaa; } .footer { border-top:1px solid #ccc; @@ -505,9 +487,7 @@ document.addEventListener('DOMContentLoaded', handleDOMContentLoaded); <input type="text" class="hint" name="search" style="background-image:url(chrome-ui://favicon/);" - jsvalues="value:searchhistory" - onfocus="handleInputFocus.apply(this);" - onblur="handleInputBlur.apply(this);" /> + jsvalues="placeholder:searchhistory"> </form> <div id='searches-entries'></div> </div> @@ -525,7 +505,7 @@ document.addEventListener('DOMContentLoaded', handleDOMContentLoaded); </tr> </table> -<script type="text/javascript"> +<script> logEvent('start of second script block'); /* Return a DOM element with tag name |elem| and attributes |attrs|. */ @@ -691,14 +671,12 @@ function makeSearchURL(url) { <form> <input type="text" class="hint" style="background-image:url(chrome-ui://favicon/"+url+");" - value="Search Wikipedia" - onfocus="handleInputFocus();" - onblur="handleInputBlur();" /> + placeholder="Search Wikipedia"> </form> */ var input = DOM('input', {type:'text', - className:'hint', - value:url.short_name}); + className: 'hint', + placeholder: url.short_name}); input.keyword = url.keyword; if (url.favIconURL) { @@ -709,9 +687,6 @@ function makeSearchURL(url) { 'url("chrome-ui://favicon/http://' + url.short_name + '")'; } - input.onfocus = handleInputFocus; - input.onblur = handleInputBlur; - var form = DOM('form'); form.onsubmit = function() { chrome.send('doSearch', [input.keyword, input.value]); @@ -1037,7 +1012,7 @@ setTimeout(function(){document.getElementById('main').className = 'visible'}, src="../../app/theme/ntp_x_icon_small.png"/> </body> -<style type="text/css"> +<style> /* This CSS code is located at the end of file so it does not slow-down the page loading, as it contains inlined images. */ diff --git a/chrome/browser/resources/safe_browsing_malware_block.html b/chrome/browser/resources/safe_browsing_malware_block.html index 304374f..24ed5f9 100644 --- a/chrome/browser/resources/safe_browsing_malware_block.html +++ b/chrome/browser/resources/safe_browsing_malware_block.html @@ -1,7 +1,7 @@ <html id="template_root" jsvalues="dir:textdirection"> <head> <title jscontent="title"></title> -<style type="text/css"> +<style> body { background-color:#500; font-family:arial; diff --git a/chrome/browser/resources/safe_browsing_multiple_threat_block.html b/chrome/browser/resources/safe_browsing_multiple_threat_block.html index 0926320..fb808da 100644 --- a/chrome/browser/resources/safe_browsing_multiple_threat_block.html +++ b/chrome/browser/resources/safe_browsing_multiple_threat_block.html @@ -2,7 +2,7 @@ <head> <title jscontent="title"></title> -<style type="text/css"> +<style> body { background-color:#500; font-family:arial; diff --git a/chrome/browser/resources/safe_browsing_phishing_block.html b/chrome/browser/resources/safe_browsing_phishing_block.html index 0269b07..dcca0d3 100644 --- a/chrome/browser/resources/safe_browsing_phishing_block.html +++ b/chrome/browser/resources/safe_browsing_phishing_block.html @@ -1,7 +1,7 @@ <html id="template_root" jsvalues="dir:textdirection"> <head> <title jscontent="title"></title> -<style type="text/css"> +<style> body { background-color:#500; font-family:arial; |