tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit fcde285853e37a96c4a28ec3f04b805c5d0dd5a1
parent e2e9753dfae27068c73975a4078f71aa2d9e05c1
Author: Nicolas Chevobbe <nchevobbe@mozilla.com>
Date:   Fri, 17 Oct 2025 09:35:57 +0000

Bug 1994705 - [devtools] Remove devtools.inspector.inactive.css.enabled pref. r=devtools-reviewers,jdescottes.

It's been enabled by default for a while now.

Differential Revision: https://phabricator.services.mozilla.com/D268869

Diffstat:
Mdevtools/client/inspector/rules/models/element-style.js | 14+-------------
Mdevtools/client/inspector/rules/test/browser_rules_inactive_css_display-justify.js | 1-
Mdevtools/client/inspector/rules/test/browser_rules_inactive_css_flexbox.js | 2--
Mdevtools/client/inspector/rules/test/browser_rules_inactive_css_grid.js | 2--
Mdevtools/client/inspector/rules/test/browser_rules_inactive_css_inline.js | 2--
Mdevtools/client/inspector/rules/test/browser_rules_inactive_css_split-condition.js | 1-
Mdevtools/server/actors/utils/inactive-property-helper.js | 10----------
Mdevtools/server/tests/chrome/test_inspector-inactive-property-helper.html | 3---
Mmodules/libpref/init/all.js | 9+++------
9 files changed, 4 insertions(+), 40 deletions(-)

diff --git a/devtools/client/inspector/rules/models/element-style.js b/devtools/client/inspector/rules/models/element-style.js @@ -29,8 +29,6 @@ loader.lazyRequireGetter( true ); -const PREF_INACTIVE_CSS_ENABLED = "devtools.inspector.inactive.css.enabled"; - /** * ElementStyle is responsible for the following: * Keeps track of which properties are overridden. @@ -75,16 +73,6 @@ class ElementStyle { } } - get unusedCssEnabled() { - if (!this._unusedCssEnabled) { - this._unusedCssEnabled = Services.prefs.getBoolPref( - PREF_INACTIVE_CSS_ENABLED, - false - ); - } - return this._unusedCssEnabled; - } - destroy() { if (this.destroyed) { return; @@ -488,7 +476,7 @@ class ElementStyle { } // For each editor show or hide the inactive CSS icon as needed. - if (textProp.editor && this.unusedCssEnabled) { + if (textProp.editor) { textProp.editor.updateUI(); } } diff --git a/devtools/client/inspector/rules/test/browser_rules_inactive_css_display-justify.js b/devtools/client/inspector/rules/test/browser_rules_inactive_css_display-justify.js @@ -17,7 +17,6 @@ const TEST_URI = ` <div>`; add_task(async function () { - await pushPref("devtools.inspector.inactive.css.enabled", true); await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)); const { inspector, view } = await openRuleView(); diff --git a/devtools/client/inspector/rules/test/browser_rules_inactive_css_flexbox.js b/devtools/client/inspector/rules/test/browser_rules_inactive_css_flexbox.js @@ -146,8 +146,6 @@ const AFTER = [ ]; add_task(async function () { - await pushPref("devtools.inspector.inactive.css.enabled", true); - await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)); const { inspector, view } = await openRuleView(); diff --git a/devtools/client/inspector/rules/test/browser_rules_inactive_css_grid.js b/devtools/client/inspector/rules/test/browser_rules_inactive_css_grid.js @@ -195,8 +195,6 @@ const AFTER = [ ]; add_task(async function () { - await pushPref("devtools.inspector.inactive.css.enabled", true); - await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)); const { inspector, view } = await openRuleView(); diff --git a/devtools/client/inspector/rules/test/browser_rules_inactive_css_inline.js b/devtools/client/inspector/rules/test/browser_rules_inactive_css_inline.js @@ -120,7 +120,6 @@ const TEST_DATA = [ ]; add_task(async function () { - await pushPref("devtools.inspector.inactive.css.enabled", true); await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)); const { inspector, view } = await openRuleView(); @@ -128,7 +127,6 @@ add_task(async function () { }); add_task(async function () { - await pushPref("devtools.inspector.inactive.css.enabled", true); await addTab( "data:text/html;charset=utf-8," + encodeURIComponent(` diff --git a/devtools/client/inspector/rules/test/browser_rules_inactive_css_split-condition.js b/devtools/client/inspector/rules/test/browser_rules_inactive_css_split-condition.js @@ -19,7 +19,6 @@ const TEST_URI = ` <div class="display gap">`; add_task(async function () { - await pushPref("devtools.inspector.inactive.css.enabled", true); await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)); const { inspector, view } = await openRuleView(); diff --git a/devtools/server/actors/utils/inactive-property-helper.js b/devtools/server/actors/utils/inactive-property-helper.js @@ -11,11 +11,6 @@ loader.lazyRequireGetter( true ); -const INACTIVE_CSS_ENABLED = Services.prefs.getBoolPref( - "devtools.inspector.inactive.css.enabled", - false -); - const TEXT_WRAP_BALANCE_LIMIT = Services.prefs.getIntPref( "layout.css.text-wrap-balance.limit", 10 @@ -832,11 +827,6 @@ class InactivePropertyHelper { * the default MDN property one. */ getInactiveCssDataForProperty(el, elStyle, cssRule, property) { - // Assume the property is used when the Inactive CSS pref is not enabled - if (!INACTIVE_CSS_ENABLED) { - return null; - } - let fixId = ""; let msgId = ""; let learnMoreURL = null; diff --git a/devtools/server/tests/chrome/test_inspector-inactive-property-helper.html b/devtools/server/tests/chrome/test_inspector-inactive-property-helper.html @@ -14,16 +14,13 @@ SimpleTest.waitForExplicitFinish(); const { getInactiveCssDataForProperty } = require("devtools/server/actors/utils/inactive-property-helper"); const { DocumentWalker } = require("devtools/server/actors/inspector/document-walker"); - const INACTIVE_CSS_PREF = "devtools.inspector.inactive.css.enabled"; const CUSTOM_HIGHLIGHT_API = "dom.customHighlightAPI.enabled"; const TEXT_FRAGMENTS = "dom.text_fragments.enabled"; - Services.prefs.setBoolPref(INACTIVE_CSS_PREF, true); Services.prefs.setBoolPref(CUSTOM_HIGHLIGHT_API, true); Services.prefs.setBoolPref(TEXT_FRAGMENTS, true); SimpleTest.registerCleanupFunction(() => { - Services.prefs.clearUserPref(INACTIVE_CSS_PREF); Services.prefs.clearUserPref(CUSTOM_HIGHLIGHT_API); Services.prefs.clearUserPref(TEXT_FRAGMENTS); }); diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js @@ -319,7 +319,7 @@ pref("media.videocontrols.keyboard-tab-to-all-controls", true); // 770 = DTLS 1.0, 771 = DTLS 1.2, 772 = DTLS 1.3 pref("media.peerconnection.dtls.version.min", 771); pref("media.peerconnection.dtls.version.max", 772); - + pref("media.peerconnection.sctp.default_max_streams", 2048); #if defined(XP_MACOSX) @@ -3339,8 +3339,8 @@ pref("privacy.trackingprotection.emailtracking.webapp.domains", "mail.163.com,ma // and baseline) for users in ETP "strict" and "custom" mode. pref("privacy.trackingprotection.allow_list.hasMigratedCategoryPrefs", false); -// Indicates if the user has interacted with the ETP category, tracking protection baseline exceptions, -// or convenience exceptions by changing them in the prefs or in the UI. This is used to determine +// Indicates if the user has interacted with the ETP category, tracking protection baseline exceptions, +// or convenience exceptions by changing them in the prefs or in the UI. This is used to determine // if we should show the ETP Strict exceptions onboarding message again. pref("privacy.trackingprotection.allow_list.hasUserInteractedWithETPSettings", false); @@ -3995,9 +3995,6 @@ pref("devtools.remote.adb.extensionID", "adb@mozilla.org"); // path). pref("devtools.remote.adb.extensionURL", "https://ftp.mozilla.org/pub/labs/devtools/adb-extension/#OS#/adb-extension-latest-#OS#.xpi"); -// Enable Inactive CSS detection; used both by the client and the server. -pref("devtools.inspector.inactive.css.enabled", true); - // Should F12 open the Developer Tools toolbox. pref("devtools.f12_enabled", true);