зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1573992 - Convert findbar.modalHighlight to static pref. r=njn
Converts findbar.modalHighlight to a static pref and updates its usages. Differential Revision: https://phabricator.services.mozilla.com/D43522 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f25c87b636
Коммит
8d6b5f31a4
|
@ -2638,6 +2638,15 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "findbar."
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
- name: findbar.modalHighlight
|
||||
type: bool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "fission."
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
|
@ -1016,7 +1016,6 @@ pref("accessibility.typeaheadfind.enablesound", true);
|
|||
#endif
|
||||
pref("accessibility.typeaheadfind.matchesCountLimit", 1000);
|
||||
pref("findbar.highlightAll", false);
|
||||
pref("findbar.modalHighlight", false);
|
||||
pref("findbar.entireword", false);
|
||||
pref("findbar.iteratorTimeout", 100);
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ pref_groups = [
|
|||
'dom',
|
||||
'editor',
|
||||
'extensions',
|
||||
'findbar',
|
||||
'fission',
|
||||
'font',
|
||||
'full_screen_api',
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "mozilla/StaticPrefs_editor.h"
|
||||
#include "mozilla/StaticPrefs_findbar.h"
|
||||
#include "mozilla/StaticPrefs_ui.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/widget/WidgetMessageUtils.h"
|
||||
|
@ -216,7 +217,6 @@ int32_t nsXPLookAndFeel::sCachedColors[size_t(LookAndFeel::ColorID::End)] = {0};
|
|||
int32_t nsXPLookAndFeel::sCachedColorBits[COLOR_CACHE_SIZE] = {0};
|
||||
|
||||
bool nsXPLookAndFeel::sInitialized = false;
|
||||
bool nsXPLookAndFeel::sFindbarModalHighlight = false;
|
||||
bool nsXPLookAndFeel::sIsInPrefersReducedMotionForTest = false;
|
||||
bool nsXPLookAndFeel::sPrefersReducedMotionForTest = false;
|
||||
|
||||
|
@ -420,10 +420,6 @@ void nsXPLookAndFeel::Init() {
|
|||
InitColorFromPref(i);
|
||||
}
|
||||
|
||||
Preferences::AddBoolVarCache(&sFindbarModalHighlight,
|
||||
"findbar.modalHighlight",
|
||||
sFindbarModalHighlight);
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
mozilla::dom::ContentChild* cc = mozilla::dom::ContentChild::GetSingleton();
|
||||
|
||||
|
@ -851,7 +847,7 @@ nsresult nsXPLookAndFeel::GetColorImpl(ColorID aID,
|
|||
#endif
|
||||
|
||||
if (aID == ColorID::TextSelectBackgroundAttention) {
|
||||
if (sFindbarModalHighlight) {
|
||||
if (StaticPrefs::findbar_modalHighlight()) {
|
||||
aResult = NS_RGBA(0, 0, 0, 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -115,7 +115,6 @@ class nsXPLookAndFeel : public mozilla::LookAndFeel {
|
|||
static const char sColorPrefs[][41];
|
||||
static int32_t sCachedColors[size_t(LookAndFeel::ColorID::End)];
|
||||
static int32_t sCachedColorBits[COLOR_CACHE_SIZE];
|
||||
static bool sFindbarModalHighlight;
|
||||
|
||||
static nsXPLookAndFeel* sInstance;
|
||||
static bool sShutdown;
|
||||
|
|
Загрузка…
Ссылка в новой задаче