Bug 1222737 - Added extra line break when expanding properties in the panel and selecting all; r?pbro draft
authorMatt R <matthieu.rigolot@gmail.com>
Thu, 27 Apr 2017 23:19:52 +0100
changeset 569798 c04205e7cc9666a0738bf87ebcbe259cf368fd24
parent 569305 3c9a1af3d179561e6035e16f8fd697845a87c2b2
child 573698 812df04120334c7faec298c13c476351c828aee2
push id56283
push userbmo:matthieu.rigolot@gmail.com
push dateThu, 27 Apr 2017 22:53:52 +0000
reviewerspbro
bugs1222737
milestone55.0a1
Bug 1222737 - Added extra line break when expanding properties in the panel and selecting all; r?pbro Changed spans to divs to add the extra line break in the selection. And add display:inline to them to keep the layout intact MozReview-Commit-ID: IAUJGx2zC25
devtools/client/inspector/computed/computed.js
devtools/client/themes/computed.css
--- a/devtools/client/inspector/computed/computed.js
+++ b/devtools/client/inspector/computed/computed.js
@@ -1142,23 +1142,28 @@ PropertyView.prototype = {
         window: this.tree.styleWindow,
         target: link
       });
       shortcuts.on("Return", () => selector.openStyleEditor());
 
       let status = createChild(p, "span", {
         dir: "ltr",
         class: "rule-text theme-fg-color3 " + selector.statusClass,
-        title: selector.statusText,
+        title: selector.statusText
+      });
+
+      let keyDiv = createChild(status, "div", {
+        class: "inline",
         textContent: selector.sourceText
       });
-      let valueSpan = createChild(status, "span", {
-        class: "other-property-value theme-fg-color1"
+
+      let valueDiv = createChild(status, "div", {
+        class: "inline other-property-value theme-fg-color1"
       });
-      valueSpan.appendChild(selector.outputFragment);
+      valueDiv.appendChild(selector.outputFragment);
       promises.push(selector.ready);
     }
 
     this.matchedSelectorsContainer.innerHTML = "";
     this.matchedSelectorsContainer.appendChild(frag);
     return promise.all(promises);
   },
 
--- a/devtools/client/themes/computed.css
+++ b/devtools/client/themes/computed.css
@@ -128,16 +128,20 @@
 .theme-firebug .property-content {
   font-family: var(--proportional-font-family);
 }
 
 .theme-firebug .property-view {
   border-bottom: 1px solid rgba(0, 0, 0, 0.1);
 }
 
+.inline {
+  display: inline;
+}
+
 .visually-hidden {
   opacity: 0;
 }
 
 /* From skin */
 .expander {
   visibility: hidden;
 }