mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1862924 - Remove devtools.toolbox.force-chrome-prefs. r=devtools-reviewers,nchevobbe
Instead, use forced-color-adjust: none to disable HCM forced colors in DevTools, for now. It's a more straight-forward way of doing it. Differential Revision: https://phabricator.services.mozilla.com/D192669
This commit is contained in:
parent
0041067c1a
commit
963fd8d292
@ -13,6 +13,9 @@
|
||||
font: message-box;
|
||||
font-size: var(--theme-body-font-size);
|
||||
|
||||
/* TODO(bug 1022557): Perhaps we want to allow forced colors in devtools */
|
||||
forced-color-adjust: none;
|
||||
|
||||
--tab-line-hover-color: rgba(0,0,0,.2);
|
||||
--tab-line-selected-color: var(--blue-50);
|
||||
--toggle-thumb-color: white;
|
||||
|
@ -1326,7 +1326,6 @@ Document::Document(const char* aContentType)
|
||||
mIsBeingUsedAsImage(false),
|
||||
mChromeRulesEnabled(false),
|
||||
mInChromeDocShell(false),
|
||||
mIsDevToolsDocument(false),
|
||||
mIsSyntheticDocument(false),
|
||||
mHasLinksToUpdateRunnable(false),
|
||||
mFlushingPendingLinkUpdates(false),
|
||||
@ -2932,14 +2931,6 @@ void Document::ResetToURI(nsIURI* aURI, nsILoadGroup* aLoadGroup,
|
||||
mDocumentBaseURI = nullptr;
|
||||
mChromeXHRDocBaseURI = nullptr;
|
||||
|
||||
// Check if the current document is the top-level DevTools document.
|
||||
// For inner DevTools frames, mIsDevToolsDocument will be set when
|
||||
// calling SetDocumentParent.
|
||||
if (aURI && aURI->SchemeIs("about") &&
|
||||
aURI->GetSpecOrDefault().EqualsLiteral("about:devtools-toolbox")) {
|
||||
mIsDevToolsDocument = true;
|
||||
}
|
||||
|
||||
if (aLoadGroup) {
|
||||
mDocumentLoadGroup = do_GetWeakReference(aLoadGroup);
|
||||
// there was an assertion here that aLoadGroup was not null. This
|
||||
|
@ -1170,9 +1170,6 @@ class Document : public nsINode,
|
||||
if (aParent) {
|
||||
RecomputeResistFingerprinting();
|
||||
mIgnoreDocGroupMismatches = aParent->mIgnoreDocGroupMismatches;
|
||||
if (!mIsDevToolsDocument) {
|
||||
mIsDevToolsDocument = mParentDocument->IsDevToolsDocument();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2530,8 +2527,6 @@ class Document : public nsINode,
|
||||
return root->mInChromeDocShell;
|
||||
}
|
||||
|
||||
bool IsDevToolsDocument() const { return mIsDevToolsDocument; }
|
||||
|
||||
bool IsBeingUsedAsImage() const { return mIsBeingUsedAsImage; }
|
||||
|
||||
void SetIsBeingUsedAsImage() { mIsBeingUsedAsImage = true; }
|
||||
@ -4626,13 +4621,6 @@ class Document : public nsINode,
|
||||
// True if we're loaded in a chrome docshell.
|
||||
bool mInChromeDocShell : 1;
|
||||
|
||||
// True if our current document is a DevTools document. Either the url is
|
||||
// about:devtools-toolbox or the parent document already has
|
||||
// mIsDevToolsDocument set to true.
|
||||
// This is used to avoid applying High Contrast mode to DevTools documents.
|
||||
// See Bug 1575766.
|
||||
bool mIsDevToolsDocument : 1;
|
||||
|
||||
// True is this document is synthetic : stand alone image, video, audio
|
||||
// file, etc.
|
||||
bool mIsSyntheticDocument : 1;
|
||||
|
@ -53,14 +53,6 @@ static void GetColor(const char* aPrefName, ColorScheme aColorScheme,
|
||||
}
|
||||
|
||||
auto PreferenceSheet::PrefsKindFor(const Document& aDoc) -> PrefsKind {
|
||||
// DevTools documents run in a content frame but should temporarily use
|
||||
// chrome preferences, in particular to avoid applying High Contrast mode
|
||||
// colors. See Bug 1575766.
|
||||
if (aDoc.IsDevToolsDocument() &&
|
||||
StaticPrefs::devtools_toolbox_force_chrome_prefs()) {
|
||||
return PrefsKind::Chrome;
|
||||
}
|
||||
|
||||
if (aDoc.IsInChromeDocShell()) {
|
||||
return PrefsKind::Chrome;
|
||||
}
|
||||
@ -283,7 +275,6 @@ void PreferenceSheet::Initialize() {
|
||||
|
||||
bool PreferenceSheet::AffectedByPref(const nsACString& aPref) {
|
||||
const char* prefNames[] = {
|
||||
StaticPrefs::GetPrefName_devtools_toolbox_force_chrome_prefs(),
|
||||
StaticPrefs::GetPrefName_privacy_resistFingerprinting(),
|
||||
StaticPrefs::GetPrefName_ui_use_standins_for_native_colors(),
|
||||
"browser.anchor_color",
|
||||
|
@ -2100,11 +2100,6 @@
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
- name: devtools.toolbox.force-chrome-prefs
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "docshell."
|
||||
#---------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user