Bug 1273624 - Really check for existence of parsed declarations in StyleRuleActor's form for compatibility; r=jryans draft
authorPatrick Brosset <pbrosset@mozilla.com>
Thu, 02 Jun 2016 18:02:11 +0200
changeset 374470 f345637ff4fa54eefec164fc1aee19a3947c8344
parent 374469 11606ef464220f73485df86a1b11662364fe6515
child 522643 f7c71841bd68b54d3dd63f970352e08695896ea8
push id20033
push userpbrosset@mozilla.com
push dateThu, 02 Jun 2016 16:02:32 +0000
reviewersjryans
bugs1273624
milestone49.0a1
Bug 1273624 - Really check for existence of parsed declarations in StyleRuleActor's form for compatibility; r=jryans MozReview-Commit-ID: 3EBW8nTzWiH
devtools/client/inspector/rules/models/rule.js
--- a/devtools/client/inspector/rules/models/rule.js
+++ b/devtools/client/inspector/rules/models/rule.js
@@ -444,17 +444,17 @@ Rule.prototype = {
    * to parse the style's authoredText.
    */
   _getTextProperties: function () {
     let textProps = [];
     let store = this.elementStyle.store;
 
     // Starting with FF49, StyleRuleActors provide parsed declarations.
     let props = this.style.declarations;
-    if (!props) {
+    if (!props.length) {
       props = parseDeclarations(this.cssProperties.isKnown,
                                 this.style.authoredText, true);
     }
 
     for (let prop of props) {
       let name = prop.name;
       // If the authored text has an invalid property, it will show up
       // as nameless.  Skip these as we don't currently have a good