[tools] Clean up HTML for tools

This patch ensures each HTML page has a DOCTYPE (to trigger
standards mode as opposed to quirks mode), a <meta
charset="utf-8">, and a <title>.

Additionally, it removes redundant attribute/value pairs such
as `type="text/javascript"` on <script> elements or
`type="text/css"` on <style> or <link rel="stylesheet">
elements. [1]

Finally, it removes the optional solidus for self-closing HTML
elements. [2]

[1] https://mathiasbynens.be/notes/html5-levels#type-attributes
[2] https://mathiasbynens.be/notes/html5-levels#solidus

Change-Id: I66d2700be120dc8fd52bdf38f9d34749f55e1e7f
Reviewed-on: https://chromium-review.googlesource.com/c/1396084
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58561}
This commit is contained in:
Mathias Bynens 2019-01-04 13:18:43 +01:00 committed by Commit Bot
parent 2c726dd381
commit 638d1b3137
6 changed files with 58 additions and 47 deletions

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<!--
Copyright 2016 the V8 project authors. All rights reserved. Use of this source
@ -5,7 +6,8 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
-->
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<title>V8 Runtime Stats Komparator</title>
<style>
body {
font-family: arial;
@ -228,8 +230,8 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
display: none;
}
</style>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
<script src="https://www.gstatic.com/charts/loader.js"></script>
<script>
"use strict"
google.charts.load('current', {packages: ['corechart']});
@ -957,7 +959,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
}
}
</script>
<script type="text/javascript">
<script>
"use strict"
// =========================================================================
// Helpers
@ -1058,7 +1060,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
}
</script>
<script type="text/javascript">
<script>
"use strict"
// =========================================================================
// EventHandlers
@ -1305,7 +1307,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
window.open(url,'_blank');
}
</script>
<script type="text/javascript">
<script>
"use strict"
// =========================================================================
class Versions {

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<!--
Copyright 2016 the V8 project authors. All rights reserved. Use of this source
@ -5,6 +6,8 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
-->
<head>
<meta charset="utf-8">
<title>V8 IC explorer</title>
<style>
html {
font-family: monospace;
@ -46,16 +49,16 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
padding: 0.5em 0 0.2em 0;
}
</style>
<script src="./splaytree.js" type="text/javascript"></script>
<script src="./codemap.js" type="text/javascript"></script>
<script src="./csvparser.js" type="text/javascript"></script>
<script src="./consarray.js" type="text/javascript"></script>
<script src="./profile.js" type="text/javascript"></script>
<script src="./profile_view.js" type="text/javascript"></script>
<script src="./logreader.js" type="text/javascript"></script>
<script src="./arguments.js" type="text/javascript"></script>
<script src="./ic-processor.js" type="text/javascript"></script>
<script src="./SourceMap.js" type="text/javascript"></script>
<script src="./splaytree.js"></script>
<script src="./codemap.js"></script>
<script src="./csvparser.js"></script>
<script src="./consarray.js"></script>
<script src="./profile.js"></script>
<script src="./profile_view.js"></script>
<script src="./logreader.js"></script>
<script src="./arguments.js"></script>
<script src="./ic-processor.js"></script>
<script src="./SourceMap.js"></script>
<script>
"use strict"

View File

@ -5,7 +5,7 @@
code is governed by a BSD-style license that can be found in the LICENSE file.
-->
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<style>
html, body {
font-family: sans-serif;
@ -1114,7 +1114,7 @@ class StatsView {
row.appendChild(td(""));
}
row.maps = this.timeline.filterUniqueTransitions(filter);
row.onclick =
row.onclick =
(e) => this.transitionView.showMaps(e.target.parentNode.maps);
row.appendChild(td(name));
let count = this.timeline.count(filter);
@ -1169,7 +1169,7 @@ function transitionTypeToColor(type) {
<span id="label">
Drag and drop a v8.log file into this area, or click to choose from disk.
</span>
<input id="file" type="file" name="files" />
<input id="file" type="file" name="files">
</div>
<div id="loader">
<div id="spinner"></div>
@ -1183,8 +1183,8 @@ function transitionTypeToColor(type) {
<h2>Timeline</h2>
<div id="timeline">
<div id="timelineLabel">Frequency</div>
<div id=timelineChunks></div>
<canvas id="timelineCanvas" ></canvas>
<div id="timelineChunks"></div>
<canvas id="timelineCanvas"></canvas>
</div>
<div id="timelineOverview"
onmousemove="handleTimelineIndicatorMove(event)" >
@ -1202,7 +1202,7 @@ function transitionTypeToColor(type) {
<section id="mapDetails"></section>
</div>
<h2>Instructions</h2>
<h2>Instructions</h2>
<section>
<p>Visualize Map trees that have been gathere using <code>--trace-maps</code>.</p>
</section>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<!--
Copyright 2016 the V8 project authors. All rights reserved. Use of this source
@ -5,6 +6,8 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
-->
<head>
<meta charset="utf-8">
<title>V8 Parse Processor</title>
<style>
html {
font-family: monospace;
@ -100,18 +103,18 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
text-align: right;
}
</style>
<script src="./splaytree.js" type="text/javascript"></script>
<script src="./codemap.js" type="text/javascript"></script>
<script src="./csvparser.js" type="text/javascript"></script>
<script src="./consarray.js" type="text/javascript"></script>
<script src="./profile.js" type="text/javascript"></script>
<script src="./profile_view.js" type="text/javascript"></script>
<script src="./logreader.js" type="text/javascript"></script>
<script src="./arguments.js" type="text/javascript"></script>
<script src="./parse-processor.js" type="text/javascript"></script>
<script src="./SourceMap.js" type="text/javascript"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
<script src="./splaytree.js"></script>
<script src="./codemap.js"></script>
<script src="./csvparser.js"></script>
<script src="./consarray.js"></script>
<script src="./profile.js"></script>
<script src="./profile_view.js"></script>
<script src="./logreader.js"></script>
<script src="./arguments.js"></script>
<script src="./parse-processor.js"></script>
<script src="./SourceMap.js"></script>
<script src="https://www.gstatic.com/charts/loader.js"></script>
<script>
"use strict";
google.charts.load('current', {packages: ['corechart']});

View File

@ -27,10 +27,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta charset="utf-8">
<title>V8 Tick Processor</title>
<style type="text/css">
<style>
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
<script src="arguments.js"></script>
<script src="tickprocessor.js"></script>
<script type="text/javascript">
<script>
var v8log_content;
var textout;

View File

@ -1,11 +1,15 @@
<!DOCTYPE HTML>
<!DOCTYPE html>
<html>
<!--
Copyright 2019 the V8 project authors. All rights reserved. Use of this source
code is governed by a BSD-style license that can be found in the LICENSE file.
-->
<head>
<title>Turbolizer</title>
<link rel="stylesheet" href="turbo-visualizer.css" />
<link rel="stylesheet" href="tabs.css" />
<link rel="stylesheet" href="prettify.css" />
<meta charset="utf-8">
<title>V8 Turbolizer</title>
<link rel="stylesheet" href="turbo-visualizer.css">
<link rel="stylesheet" href="tabs.css">
<link rel="stylesheet" href="prettify.css">
<link rel="icon" type="image/png" href="turbolizer.png">
</head>
@ -29,15 +33,14 @@
<input id="disassembly-expand" type="image" title="show disassembly" src="left-arrow.png" class="button-input invisible">
<input id="disassembly-shrink" type="image" title="hide disassembly" src="right-arrow.png" class="button-input">
</div>
<div id='text-placeholder' width="0px" height="0px" style="position: absolute; top:100000px;">
<div id="text-placeholder" width="0" height="0" style="position: absolute; top:100000px;">
<svg>
<text text-anchor="right">
<tspan white-space="inherit" id="text-measure" />
<tspan white-space="inherit" id="text-measure">
</text>
</svg>
</div>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script src="build/turbolizer.js"></script>
</body>
</html>
</html>