Bug 1389165 - Cleanup html markup of about:telemetry r=chutten
authorflyingrub <flyinggrub@gmail.com>
Fri, 11 Aug 2017 15:06:52 +0200
changeset 374811 6e599cdfa3fbe50c2ec3f2d17e3c419f5a3eea04
parent 374810 850ff7976b8df05512722aa8942ff050cc054671
child 374812 493584127e470aac52918fbd2b55175605ca4a97
push id32339
push userkwierso@gmail.com
push dateWed, 16 Aug 2017 01:51:50 +0000
treeherdermozilla-central@6966f27380bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1389165
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1389165 - Cleanup html markup of about:telemetry r=chutten Prepare the code for the search on the home page. This will allow to display only the div with the "data" class and not have cluttered results. MozReview-Commit-ID: 5CtMPrLGJT7
toolkit/content/aboutTelemetry.js
toolkit/content/aboutTelemetry.xhtml
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -941,17 +941,17 @@ var StackRenderer = {
     let stackText = " " + aStack.join(" ");
     aDiv.appendChild(document.createTextNode(stackText));
 
     aDiv.appendChild(document.createElement("br"));
     aDiv.appendChild(document.createElement("br"));
   },
   renderStacks: function StackRenderer_renderStacks(aPrefix, aStacks,
                                                     aMemoryMap, aRenderHeader) {
-    let div = document.getElementById(aPrefix + "-data");
+    let div = document.getElementById(aPrefix);
     removeAllChildNodes(div);
 
     let fetchE = document.getElementById(aPrefix + "-fetch-symbols");
     if (fetchE) {
       fetchE.hidden = false;
     }
     let hideE = document.getElementById(aPrefix + "-hide-symbols");
     if (hideE) {
@@ -975,17 +975,17 @@ var StackRenderer = {
 
   /**
    * Renders the title of the stack: e.g. "Late Write #1" or
    * "Hang Report #1 (6 seconds)".
    *
    * @param aFormatArgs formating args to be passed to formatStringFromName.
    */
   renderHeader: function StackRenderer_renderHeader(aPrefix, aFormatArgs) {
-    let div = document.getElementById(aPrefix + "-data");
+    let div = document.getElementById(aPrefix);
 
     let titleElement = document.createElement("span");
     titleElement.className = "stack-title";
 
     let titleText = bundle.formatStringFromName(
       aPrefix + "-title", aFormatArgs, aFormatArgs.length);
     titleElement.appendChild(document.createTextNode(titleText));
 
@@ -1027,17 +1027,17 @@ SymbolicationRequest.prototype.handleSym
 function SymbolicationRequest_handleSymbolResponse() {
   if (this.symbolRequest.readyState != 4)
     return;
 
   let fetchElement = document.getElementById(this.prefix + "-fetch-symbols");
   fetchElement.hidden = true;
   let hideElement = document.getElementById(this.prefix + "-hide-symbols");
   hideElement.hidden = false;
-  let div = document.getElementById(this.prefix + "-data");
+  let div = document.getElementById(this.prefix);
   removeAllChildNodes(div);
   let errorMessage = bundle.GetStringFromName("errorFetchingSymbols");
 
   if (this.symbolRequest.status != 200) {
     div.appendChild(document.createTextNode(errorMessage));
     return;
   }
 
--- a/toolkit/content/aboutTelemetry.xhtml
+++ b/toolkit/content/aboutTelemetry.xhtml
@@ -197,52 +197,37 @@
 
       <section id="slow-sql-section">
         <div id="slow-sql-tables" class="data">
           <p id="sql-warning" class="hidden">&aboutTelemetry.fullSqlWarning;</p>
         </div>
       </section>
 
       <section id="chrome-hangs-section">
-        <div id="chrome-hangs" class="data">
-          <a id="chrome-hangs-fetch-symbols" href="">&aboutTelemetry.fetchStackSymbols;</a>
-          <a id="chrome-hangs-hide-symbols" class="hidden" href="">&aboutTelemetry.hideStackSymbols;</a>
-          <br/>
-          <br/>
-          <div id="chrome-hangs-data">
-          </div>
-        </div>
+        <a id="chrome-hangs-fetch-symbols" href="">&aboutTelemetry.fetchStackSymbols;</a>
+        <a id="chrome-hangs-hide-symbols" class="hidden" href="">&aboutTelemetry.hideStackSymbols;</a>
+        <div id="chrome-hangs" class="data"></div>
       </section>
 
       <section id="thread-hang-stats-section">
         <div id="thread-hang-stats" class="data"></div>
       </section>
 
       <section id="late-writes-section">
-        <div id="late-writes" class="data">
-          <a id="late-writes-fetch-symbols" href="">&aboutTelemetry.fetchStackSymbols;</a>
-          <a id="late-writes-hide-symbols" class="hidden" href="">&aboutTelemetry.hideStackSymbols;</a>
-          <br/>
-          <br/>
-          <div id="late-writes-data">
-          </div>
-        </div>
+        <a id="late-writes-fetch-symbols" href="">&aboutTelemetry.fetchStackSymbols;</a>
+        <a id="late-writes-hide-symbols" class="hidden" href="">&aboutTelemetry.hideStackSymbols;</a>
+        <div id="late-writes" class="data"></div>
       </section>
 
       <section id="addon-details-section">
         <div id="addon-details" class="data"></div>
       </section>
 
       <section id="captured-stacks-section">
-        <div id="captured-stacks" class="data">
-          <a id="captured-stacks-fetch-symbols" href="">&aboutTelemetry.fetchStackSymbols;</a>
-          <a id="captured-stacks-hide-symbols" class="hidden" href="">&aboutTelemetry.hideStackSymbols;</a>
-          <br/>
-          <br/>
-          <div id="captured-stacks-data">
-          </div>
-        </div>
+        <a id="captured-stacks-fetch-symbols" href="">&aboutTelemetry.fetchStackSymbols;</a>
+        <a id="captured-stacks-hide-symbols" class="hidden" href="">&aboutTelemetry.hideStackSymbols;</a>
+        <div id="captured-stacks" class="data"></div>
       </section>
     </div>
 
   </body>
 
 </html>