Bug 1866401 - [devtools] Remove 120 backward compatibility code. r=devtools-reviewers,ochameau.

Differential Revision: https://phabricator.services.mozilla.com/D194588
This commit is contained in:
Nicolas Chevobbe 2023-11-28 14:14:03 +00:00
parent bc41495782
commit e68f0eb925

View file

@ -558,25 +558,9 @@ RuleEditor.prototype = {
const sourceLabel = this.element.querySelector(
".ruleview-rule-source-label"
);
const title = this.rule.title;
const sourceHref = this.rule.sheet?.href || title;
const uaLabel = STYLE_INSPECTOR_L10N.getStr("rule.userAgentStyles");
sourceLabel.textContent = uaLabel + " " + title;
sourceLabel.textContent = uaLabel + " " + this.rule.title;
sourceLabel.setAttribute("data-url", this.rule.sheet?.href);
// Special case about:PreferenceStyleSheet, as it is generated on the
// fly and the URI is not registered with the about: handler.
// https://bugzilla.mozilla.org/show_bug.cgi?id=935803#c37
//
// @backward-compat { version 120 } about:preferenceStyleSheet was
// removed in bug 1857915, so we can remove this whole block when 120
// hits release.
if (sourceHref === "about:PreferenceStyleSheet") {
this.source.setAttribute("unselectable", "permanent");
sourceLabel.textContent = uaLabel;
sourceLabel.removeAttribute("title");
}
} else {
this._updateLocation(null);
}