Bug 922144 - Part 2: Actions first option for Variables View. r=vporof
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 24 Oct 2013 13:03:17 -0500
changeset 166045 71ecbc0583e2206edbdb6de381289a97864242fc
parent 166044 34f1f5b52bb75107e2ef25c3ec485f05b76f3713
child 166046 d76790460c797a7a6e38cf92322ffaa9c6c3e4b4
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof
bugs922144
milestone27.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 922144 - Part 2: Actions first option for Variables View. r=vporof
browser/devtools/shared/widgets/VariablesView.jsm
browser/themes/linux/devtools/widgets.css
browser/themes/osx/devtools/widgets.css
browser/themes/windows/devtools/widgets.css
--- a/browser/devtools/shared/widgets/VariablesView.jsm
+++ b/browser/devtools/shared/widgets/VariablesView.jsm
@@ -909,16 +909,29 @@ VariablesView.prototype = {
     if (aFlag) {
       this._parent.setAttribute("aligned-values", "");
     } else {
       this._parent.removeAttribute("aligned-values");
     }
   },
 
   /**
+   * Sets if action buttons (like delete) should be placed at the beginning or
+   * end of a line.
+   * @param boolean aFlag
+   */
+  set actionsFirst(aFlag) {
+    if (aFlag) {
+      this._parent.setAttribute("actions-first", "");
+    } else {
+      this._parent.removeAttribute("actions-first");
+    }
+  },
+
+  /**
    * Gets the parent node holding this view.
    * @return nsIDOMNode
    */
   get parentNode() this._parent,
 
   /**
    * Gets the owner document holding this view.
    * @return nsIHTMLDocument
@@ -2402,17 +2415,16 @@ Variable.prototype = Heritage.extend(Sco
       let editNode = this._editNode = this.document.createElement("toolbarbutton");
       editNode.className = "plain variables-view-edit";
       editNode.addEventListener("mousedown", this._onEdit.bind(this), false);
       this._title.insertBefore(editNode, this._spacer);
     }
     if (ownerView.delete) {
       let deleteNode = this._deleteNode = this.document.createElement("toolbarbutton");
       deleteNode.className = "plain variables-view-delete";
-      deleteNode.setAttribute("ordinal", 2);
       deleteNode.addEventListener("click", this._onDelete.bind(this), false);
       this._title.appendChild(deleteNode);
     }
     if (ownerView.contextMenuId) {
       this._title.setAttribute("context", ownerView.contextMenuId);
     }
 
     if (ownerView.preventDescriptorModifiers) {
--- a/browser/themes/linux/devtools/widgets.css
+++ b/browser/themes/linux/devtools/widgets.css
@@ -574,16 +574,22 @@
 .variables-view-container[aligned-values] .title > .value {
   width: 70vw;
 }
 
 .variables-view-container[aligned-values] .title > .element-value-input {
   width: calc(70vw - 10px);
 }
 
+/* Actions first */
+
+.variables-view-container[actions-first] .variables-view-delete {
+  -moz-box-ordinal-group: 0;
+}
+
 /* Variables and properties tooltips */
 
 .variable-or-property > tooltip > label {
   margin: 0 2px 0 2px;
 }
 
 .variable-or-property[non-enumerable] > tooltip > label[value=enumerable],
 .variable-or-property[non-configurable] > tooltip > label[value=configurable],
--- a/browser/themes/osx/devtools/widgets.css
+++ b/browser/themes/osx/devtools/widgets.css
@@ -574,16 +574,22 @@
 .variables-view-container[aligned-values] .title > .value {
   width: 70vw;
 }
 
 .variables-view-container[aligned-values] .title > .element-value-input {
   width: calc(70vw - 10px);
 }
 
+/* Actions first */
+
+.variables-view-container[actions-first] .variables-view-delete {
+  -moz-box-ordinal-group: 0;
+}
+
 /* Variables and properties tooltips */
 
 .variable-or-property > tooltip > label {
   margin: 0 2px 0 2px;
 }
 
 .variable-or-property[non-enumerable] > tooltip > label[value=enumerable],
 .variable-or-property[non-configurable] > tooltip > label[value=configurable],
--- a/browser/themes/windows/devtools/widgets.css
+++ b/browser/themes/windows/devtools/widgets.css
@@ -577,16 +577,22 @@
 .variables-view-container[aligned-values] .title > .value {
   width: 70vw;
 }
 
 .variables-view-container[aligned-values] .title > .element-value-input {
   width: calc(70vw - 10px);
 }
 
+/* Actions first */
+
+.variables-view-container[actions-first] .variables-view-delete {
+  -moz-box-ordinal-group: 0;
+}
+
 /* Variables and properties tooltips */
 
 .variable-or-property > tooltip > label {
   margin: 0 2px 0 2px;
 }
 
 .variable-or-property[non-enumerable] > tooltip > label[value=enumerable],
 .variable-or-property[non-configurable] > tooltip > label[value=configurable],