Bug 1255630 - add experimental badge to wasm sources r=bgrins
authorJames Long <longster@gmail.com>
Wed, 16 Mar 2016 13:58:02 -0400
changeset 288950 7afcc6cf189d172c6c754b4a5645b9659598ebb1
parent 288949 14712d1923d4aed10b8bd23dde4f2980101d83c1
child 288951 03bf161a225ef373df1e03e76525d95522916916
push id18212
push userjlong@mozilla.com
push dateWed, 16 Mar 2016 17:58:31 +0000
treeherderfx-team@7afcc6cf189d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1255630
milestone48.0a1
Bug 1255630 - add experimental badge to wasm sources r=bgrins
devtools/client/debugger/content/views/sources-view.js
devtools/client/locales/en-US/debugger.properties
devtools/client/themes/debugger.css
--- a/devtools/client/debugger/content/views/sources-view.js
+++ b/devtools/client/debugger/content/views/sources-view.js
@@ -236,16 +236,28 @@ SourcesView.prototype = Heritage.extend(
 
     let contents = document.createElement("label");
     contents.className = "plain dbg-source-item";
     contents.setAttribute("value", label);
     contents.setAttribute("crop", "start");
     contents.setAttribute("flex", "1");
     contents.setAttribute("tooltiptext", unicodeUrl);
 
+    if (aSource.introductionType === "wasm") {
+      const wasm = document.createElement("box");
+      wasm.className = "dbg-wasm-item";
+      const icon = document.createElement("box");
+      icon.setAttribute("tooltiptext", L10N.getStr("experimental"));
+      icon.className = "icon";
+      wasm.appendChild(icon);
+      wasm.appendChild(contents);
+
+      contents = wasm;
+    }
+
     // If the source is blackboxed, apply the appropriate style.
     if (gThreadClient.source(aSource).isBlackBoxed) {
       contents.classList.add("black-boxed");
     }
 
     // Append a source item to this container.
     this.push([contents, aSource.actor], {
       staged: aOptions.staged, /* stage the item to be appended later? */
--- a/devtools/client/locales/en-US/debugger.properties
+++ b/devtools/client/locales/en-US/debugger.properties
@@ -325,8 +325,10 @@ functionSearchSeparatorLabel=←
 # resumed first.
 resumptionOrderPanelTitle=There are one or more paused debuggers. Please resume the most-recently paused debugger first at: %S
 
 variablesViewOptimizedOut=(optimized away)
 variablesViewUninitialized=(uninitialized)
 variablesViewMissingArgs=(unavailable)
 
 anonymousSourcesLabel=Anonymous Sources
+
+experimental=This is an experimental feature
\ No newline at end of file
--- a/devtools/client/themes/debugger.css
+++ b/devtools/client/themes/debugger.css
@@ -24,16 +24,30 @@
 }
 
 /* Sources and breakpoints list */
 
 .dbg-source-item {
   padding: 2px 0px;
 }
 
+.dbg-wasm-item .icon {
+  display: block;
+  background-image: url(chrome://devtools/skin/images/webconsole.svg);
+  background-repeat: no-repeat;
+  background-size: 72px 60px;
+  /* show warning icon */
+  background-position: -24px -24px;
+  width: 10px;
+  height: 10px;
+  position: absolute;
+  margin-inline-start: -15px;
+  margin-top: 3px;
+}
+
 .dbg-breakpoint-line {
   font-weight: 600;
 }
 
 .dbg-breakpoint-text {
   -moz-padding-start: 6px;
   font-style: italic;
   font-size: 90%;