Bug 1183792 - [Rule View] Newly added rule should keep a reference to the RuleEditor r=mratcliffe
authorGabriel Luong <gabriel.luong@gmail.com>
Thu, 16 Jul 2015 00:37:49 -0700
changeset 253389 fb6791d69bf933c33a0109d63b7cfd6cc7d0a916
parent 253388 a3c62a3b9d61e7e256fe1281007f7be9d3fa5624
child 253390 62c9203666d6091de8ad0150d6fd1d5a2b67b45e
push id62438
push userryanvm@gmail.com
push dateFri, 17 Jul 2015 14:27:33 +0000
treeherdermozilla-inbound@ea2b6887033b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmratcliffe
bugs1183792
milestone42.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 1183792 - [Rule View] Newly added rule should keep a reference to the RuleEditor r=mratcliffe
browser/devtools/styleinspector/rule-view.js
--- a/browser/devtools/styleinspector/rule-view.js
+++ b/browser/devtools/styleinspector/rule-view.js
@@ -1858,16 +1858,17 @@ CssRuleView.prototype = {
     if (!client.traits.addNewRule) {
       return;
     }
 
     this.pageStyle.addNewRule(element, pseudoClasses).then(options => {
       let newRule = new Rule(elementStyle, options);
       rules.push(newRule);
       let editor = new RuleEditor(this, newRule);
+      newRule.editor = editor;
 
       // Insert the new rule editor after the inline element rule
       if (rules.length <= 1) {
         this.element.appendChild(editor.element);
       } else {
         for (let rule of rules) {
           if (rule.domRule.type === ELEMENT_STYLE) {
             let referenceElement = rule.editor.element.nextSibling;