From eed6fa3f03f91d4d53cd426b35825de7ef7c9f33 Mon Sep 17 00:00:00 2001 From: Nicolas Chevobbe Date: Thu, 3 Dec 2020 09:23:33 +0000 Subject: [PATCH] Bug 1680207 - [devtools] Remove backward compatibility code in devtools/client/inspector/rules/models/rule.js. r=bomsy. The code was handling < 49 servers, so we can safely remove it. Depends on D98449 Differential Revision: https://phabricator.services.mozilla.com/D98450 --- devtools/client/inspector/rules/models/rule.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/devtools/client/inspector/rules/models/rule.js b/devtools/client/inspector/rules/models/rule.js index ecf7f8d752e6..52c7a01bcee2 100644 --- a/devtools/client/inspector/rules/models/rule.js +++ b/devtools/client/inspector/rules/models/rule.js @@ -658,20 +658,7 @@ class Rule { const textProps = []; const store = this.elementStyle.store; - // @backward-compat { version 49 } StyleRuleActors now provides parsed declarations. - let props = this.domRule.declarations; - if (!props.length) { - // If the authored text has an invalid property, it will show up - // as nameless. Skip these as we don't currently have a good - // way to display them. - props = parseNamedDeclarations( - this.cssProperties.isKnown, - this.domRule.authoredText, - true - ); - } - - for (const prop of props) { + for (const prop of this.domRule.declarations) { const name = prop.name; // In an inherited rule, we only show inherited properties. // However, we must keep all properties in order for rule