Bug 1157293 - Part 2: Renamed styleinspector-open class to user-open. r=bgrins
authorGabriel Luong <gabriel.luong@gmail.com>
Sat, 02 May 2015 23:40:00 +0200
changeset 274083 abe7a87f22f55825b65fc0986820435ce3c7ac0a
parent 274082 9d0bac2dcb797ca3bc752850917db54677f768ab
child 274084 5a2ffe1788ed5d3843e86ae1cc852ebf8dee6d43
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1157293
milestone40.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 1157293 - Part 2: Renamed styleinspector-open class to user-open. r=bgrins
browser/devtools/styleinspector/rule-view.js
browser/devtools/styleinspector/ruleview.css
browser/devtools/styleinspector/test/browser_ruleview_search-filter-computed-list_expander.js
--- a/browser/devtools/styleinspector/rule-view.js
+++ b/browser/devtools/styleinspector/rule-view.js
@@ -2131,17 +2131,17 @@ CssRuleView.prototype = {
 
       if (isPropertyHighlighted || isComputedHighlighted) {
         isHighlighted = true;
       }
 
       // Expand the computed list if a computed rule is highlighted and the
       // property rule is not highlighted
       if (!isPropertyHighlighted && isComputedHighlighted &&
-          !editor.computed.classList.contains("styleinspector-open")) {
+          !editor.computed.classList.contains("user-open")) {
         editor.expandForFilter();
         this._editorsExpandedForFilter.push(editor);
       }
     }
 
     return isHighlighted;
   },
 
@@ -3043,52 +3043,52 @@ TextPropertyEditor.prototype = {
     }
     this.prop.setEnabled(!checked);
     aEvent.stopPropagation();
   },
 
   /**
    * Handles clicks on the computed property expander. If the computed list is
    * open due to user expanding or style filtering, collapse the computed list
-   * and close the expander. Otherwise, add .styleinspector-open class which
-   * is used to expand the computed list and tracks whether or not the computed
-   * list is expanded by manually by the user.
+   * and close the expander. Otherwise, add .user-open class which is used to
+   * expand the computed list and tracks whether or not the computed list is
+   * expanded by manually by the user.
    */
   _onExpandClicked: function(aEvent) {
     if (this.computed.classList.contains("filter-open") ||
-        this.computed.classList.contains("styleinspector-open")) {
+        this.computed.classList.contains("user-open")) {
       this.expander.removeAttribute("open");
       this.computed.classList.remove("filter-open");
-      this.computed.classList.remove("styleinspector-open");
+      this.computed.classList.remove("user-open");
     } else {
       this.expander.setAttribute("open", "true");
-      this.computed.classList.add("styleinspector-open");
+      this.computed.classList.add("user-open");
     }
 
     aEvent.stopPropagation();
   },
 
   /**
    * Expands the computed list when a computed property is matched by the style
    * filtering. The .filter-open class is used to track whether or not the
    * computed list was toggled opened by the filter.
    */
   expandForFilter: function() {
-    if (!this.computed.classList.contains("styleinspector-open")) {
+    if (!this.computed.classList.contains("user-open")) {
       this.computed.classList.add("filter-open");
       this.expander.setAttribute("open", "true");
     }
   },
 
   /**
    * Collapses the computed list that was expanded by style filtering.
    */
   collapseForFilter: function() {
     this.computed.classList.remove("filter-open");
-    if (!this.computed.classList.contains("styleinspector-open")) {
+    if (!this.computed.classList.contains("user-open")) {
       this.expander.removeAttribute("open");
     }
   },
 
   /**
    * Called when the property name's inplace editor is closed.
    * Ignores the change if the user pressed escape, otherwise
    * commits it.
--- a/browser/devtools/styleinspector/ruleview.css
+++ b/browser/devtools/styleinspector/ruleview.css
@@ -51,17 +51,17 @@ body {
   cursor: text;
   padding-right: 15px;
 }
 
 .ruleview-propertyvaluecontainer a {
   cursor: pointer;
 }
 
-.ruleview-computedlist:not(.styleinspector-open),
+.ruleview-computedlist:not(.user-open),
 .ruleview-warning[hidden] {
   display: none;
 }
 
 .ruleview-computedlist.filter-open {
   display: block;
 }
 
--- a/browser/devtools/styleinspector/test/browser_ruleview_search-filter-computed-list_expander.js
+++ b/browser/devtools/styleinspector/test/browser_ruleview_search-filter-computed-list_expander.js
@@ -51,18 +51,18 @@ function* testOpenExpanderAndAddTextInFi
     "First rule is inline element.");
 
   is(rule.selectorText, "#testid", "Second rule is #testid.");
   ok(ruleEditor.expander.getAttribute("open"), "Expander is open.");
   ok(ruleEditor.container.classList.contains("ruleview-highlight"),
     "margin text property is correctly highlighted.");
   ok(!computed.classList.contains("filter-open"),
     "margin computed list does not contain filter-open class.");
-  ok(computed.classList.contains("styleinspector-open"),
-    "margin computed list contains styleinspector-open class.");
+  ok(computed.classList.contains("user-open"),
+    "margin computed list contains user-open class.");
 
   ok(!computed.children[0].classList.contains("ruleview-highlight"),
     "margin-top computed property is not highlighted.");
   ok(computed.children[1].classList.contains("ruleview-highlight"),
     "margin-right computed property is correctly highlighted.");
   ok(!computed.children[2].classList.contains("ruleview-highlight"),
     "margin-bottom computed property is not highlighted.");
   ok(computed.children[3].classList.contains("ruleview-highlight"),
@@ -89,11 +89,11 @@ function* testClearSearchFilter(inspecto
     "No rules are higlighted");
 
   let ruleEditor = getRuleViewRuleEditor(ruleView, 1).rule.textProps[0].editor;
   let computed = ruleEditor.computed;
 
   ok(ruleEditor.expander.getAttribute("open"), "Expander is open.");
   ok(!computed.classList.contains("filter-open"),
     "margin computed list does not contain filter-open class.");
-  ok(computed.classList.contains("styleinspector-open"),
-    "margin computed list contains styleinspector-open class.");
+  ok(computed.classList.contains("user-open"),
+    "margin computed list contains user-open class.");
 }