mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 05:30:29 +00:00
Bug 1561825 - Make sundry static prefs follow the naming convention. r=KrisWright
That includes changing privacy.resistFingerprinting to a non-VarCache pref, because it doesn't need to be a VarCache. Differential Revision: https://phabricator.services.mozilla.com/D36162 --HG-- extra : rebase_source : 6d742e6ff2a4b786cb21f6e8874d1fd4bbde1857
This commit is contained in:
parent
cc534d2bb6
commit
28ae1cbb46
@ -389,7 +389,7 @@ nsresult TextInputProcessor::BeginInputTransactionInternal(
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
if (aForTests) {
|
||||
bool isAPZAware = StaticPrefs::TestEventsAsyncEnabled();
|
||||
bool isAPZAware = StaticPrefs::test_events_async_enabled();
|
||||
rv = dispatcher->BeginTestInputTransaction(this, isAPZAware);
|
||||
} else {
|
||||
rv = dispatcher->BeginInputTransaction(this);
|
||||
|
@ -7861,7 +7861,7 @@ nsresult nsContentUtils::SendMouseEvent(
|
||||
}
|
||||
return presShell->HandleEvent(view->GetFrame(), &event, false, &status);
|
||||
}
|
||||
if (StaticPrefs::TestEventsAsyncEnabled()) {
|
||||
if (StaticPrefs::test_events_async_enabled()) {
|
||||
status = widget->DispatchInputEvent(&event);
|
||||
} else {
|
||||
nsresult rv = widget->DispatchEvent(&event, status);
|
||||
|
@ -1309,7 +1309,7 @@ void DrawTargetCairo::FillGlyphs(ScaledFont* aFont, const GlyphBuffer& aBuffer,
|
||||
}
|
||||
|
||||
if (!SupportsVariationSettings(mSurface) && aFont->HasVariationSettings() &&
|
||||
StaticPrefs::PrintFontVariationsAsPaths()) {
|
||||
StaticPrefs::print_font_variations_as_paths()) {
|
||||
cairo_set_fill_rule(mContext, CAIRO_FILL_RULE_WINDING);
|
||||
cairo_new_path(mContext);
|
||||
cairo_glyph_path(mContext, &glyphs[0], aBuffer.mNumGlyphs);
|
||||
|
@ -22,7 +22,7 @@ namespace layers {
|
||||
static bool WillHandleMouseEvent(const WidgetMouseEventBase& aEvent) {
|
||||
return aEvent.mMessage == eMouseMove || aEvent.mMessage == eMouseDown ||
|
||||
aEvent.mMessage == eMouseUp || aEvent.mMessage == eDragEnd ||
|
||||
(StaticPrefs::TestEventsAsyncEnabled() &&
|
||||
(StaticPrefs::test_events_async_enabled() &&
|
||||
aEvent.mMessage == eMouseHitTest);
|
||||
}
|
||||
|
||||
|
@ -1054,7 +1054,7 @@ nsEventStatus AsyncPanZoomController::HandleDragEvent(
|
||||
ScrollDirection direction = *scrollbarData.mDirection;
|
||||
|
||||
bool isMouseAwayFromThumb = false;
|
||||
if (int snapMultiplier = StaticPrefs::SliderSnapMultiplier()) {
|
||||
if (int snapMultiplier = StaticPrefs::slider_snapMultiplier()) {
|
||||
// It's fine to ignore the async component of the thumb's transform,
|
||||
// because any async transform of the thumb will be in the direction of
|
||||
// scrolling, but here we're interested in the other direction.
|
||||
@ -2113,7 +2113,8 @@ CSSPoint AsyncPanZoomController::GetKeyboardDestination(
|
||||
|
||||
switch (aAction.mType) {
|
||||
case KeyboardScrollAction::eScrollCharacter: {
|
||||
int32_t scrollDistance = StaticPrefs::ToolkitHorizontalScrollDistance();
|
||||
int32_t scrollDistance =
|
||||
StaticPrefs::toolkit_scrollbox_horizontalScrollDistance();
|
||||
|
||||
if (aAction.mForward) {
|
||||
scrollDestination.x += scrollDistance * lineScrollSize.width;
|
||||
@ -2123,7 +2124,8 @@ CSSPoint AsyncPanZoomController::GetKeyboardDestination(
|
||||
break;
|
||||
}
|
||||
case KeyboardScrollAction::eScrollLine: {
|
||||
int32_t scrollDistance = StaticPrefs::ToolkitVerticalScrollDistance();
|
||||
int32_t scrollDistance =
|
||||
StaticPrefs::toolkit_scrollbox_verticalScrollDistance();
|
||||
|
||||
if (aAction.mForward) {
|
||||
scrollDestination.y += scrollDistance * lineScrollSize.height;
|
||||
@ -2343,7 +2345,7 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(
|
||||
} else if ((delta.x || delta.y) && !CanScrollWithWheel(delta)) {
|
||||
// We can't scroll this apz anymore, so we simply drop the event.
|
||||
if (mInputQueue->GetActiveWheelTransaction() &&
|
||||
StaticPrefs::MouseScrollTestingEnabled()) {
|
||||
StaticPrefs::test_mousescroll()) {
|
||||
if (RefPtr<GeckoContentController> controller =
|
||||
GetGeckoContentController()) {
|
||||
controller->NotifyMozMouseScrollEvent(
|
||||
|
@ -601,7 +601,7 @@ void GestureEventListener::CreateLongTapTimeoutTask() {
|
||||
|
||||
mLongTapTimeoutTask = task;
|
||||
mAsyncPanZoomController->PostDelayedTask(
|
||||
task.forget(), StaticPrefs::UiClickHoldContextMenusDelay());
|
||||
task.forget(), StaticPrefs::ui_click_hold_context_menus_delay());
|
||||
}
|
||||
|
||||
void GestureEventListener::CancelMaxTapTimeoutTask() {
|
||||
|
@ -84,7 +84,7 @@ class GestureEventListener final {
|
||||
|
||||
// A touch start with a single touch point has just happened.
|
||||
// After having gotten into this state we start timers for MAX_TAP_TIME and
|
||||
// StaticPrefs::UiClickHoldContextMenusDelay().
|
||||
// StaticPrefs::ui_click_hold_context_menus_delay().
|
||||
// Allowed next states: GESTURE_MULTI_TOUCH_DOWN, GESTURE_NONE,
|
||||
// GESTURE_FIRST_SINGLE_TOUCH_UP,
|
||||
// GESTURE_LONG_TOUCH_DOWN,
|
||||
@ -93,7 +93,7 @@ class GestureEventListener final {
|
||||
|
||||
// While in GESTURE_FIRST_SINGLE_TOUCH_DOWN state a MAX_TAP_TIME timer got
|
||||
// triggered. Now we'll trigger either a single tap if a user lifts her
|
||||
// finger or a long tap if StaticPrefs::UiClickHoldContextMenusDelay()
|
||||
// finger or a long tap if StaticPrefs::ui_click_hold_context_menus_delay()
|
||||
// happens first.
|
||||
// Allowed next states: GESTURE_MULTI_TOUCH_DOWN, GESTURE_NONE,
|
||||
// GESTURE_LONG_TOUCH_DOWN.
|
||||
|
@ -429,7 +429,7 @@ bool WheelBlockState::MaybeTimeout(const TimeStamp& aTimeStamp) {
|
||||
|
||||
TBS_LOG("%p wheel transaction timed out\n", this);
|
||||
|
||||
if (StaticPrefs::MouseScrollTestingEnabled()) {
|
||||
if (StaticPrefs::test_mousescroll()) {
|
||||
RefPtr<AsyncPanZoomController> apzc = GetTargetApzc();
|
||||
apzc->NotifyMozMouseScrollEvent(
|
||||
NS_LITERAL_STRING("MozMouseScrollTransactionTimeout"));
|
||||
|
@ -1023,7 +1023,7 @@ void BasicCompositor::EndFrame() {
|
||||
// Pop aClipRectIn/bounds rect
|
||||
mRenderTarget->mDrawTarget->PopClip();
|
||||
|
||||
if (StaticPrefs::WidgetUpdateFlashing()) {
|
||||
if (StaticPrefs::nglayout_debug_widget_update_flashing()) {
|
||||
float r = float(rand()) / RAND_MAX;
|
||||
float g = float(rand()) / RAND_MAX;
|
||||
float b = float(rand()) / RAND_MAX;
|
||||
|
@ -661,7 +661,7 @@ bool BasicLayerManager::EndTransactionInternal(
|
||||
}
|
||||
|
||||
void BasicLayerManager::FlashWidgetUpdateArea(gfxContext* aContext) {
|
||||
if (StaticPrefs::WidgetUpdateFlashing()) {
|
||||
if (StaticPrefs::nglayout_debug_widget_update_flashing()) {
|
||||
float r = float(rand()) / RAND_MAX;
|
||||
float g = float(rand()) / RAND_MAX;
|
||||
float b = float(rand()) / RAND_MAX;
|
||||
|
@ -563,7 +563,7 @@ void AccessibleCaretEventHub::LaunchLongTapInjector() {
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t longTapDelay = StaticPrefs::UiClickHoldContextMenusDelay();
|
||||
int32_t longTapDelay = StaticPrefs::ui_click_hold_context_menus_delay();
|
||||
mLongTapInjectorTimer->InitWithNamedFuncCallback(
|
||||
FireLongTap, this, longTapDelay, nsITimer::TYPE_ONE_SHOT,
|
||||
"AccessibleCaretEventHub::LaunchLongTapInjector");
|
||||
|
@ -6841,7 +6841,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"nglayout.debug.widget_update_flashing",
|
||||
WidgetUpdateFlashing,
|
||||
nglayout_debug_widget_update_flashing,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
@ -6898,7 +6898,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"print.font-variations-as-paths",
|
||||
PrintFontVariationsAsPaths,
|
||||
print_font_variations_as_paths,
|
||||
RelaxedAtomicBool, true
|
||||
)
|
||||
|
||||
@ -7020,12 +7020,7 @@ VARCACHE_PREF(
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"privacy.resistFingerprinting",
|
||||
ResistFingerprinting,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
PREF("privacy.resistFingerprinting", bool, false)
|
||||
|
||||
// Anti-tracking permission expiration
|
||||
VARCACHE_PREF(
|
||||
@ -7166,7 +7161,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Once,
|
||||
"slider.snapMultiplier",
|
||||
SliderSnapMultiplier,
|
||||
slider_snapMultiplier,
|
||||
int32_t, 6
|
||||
)
|
||||
|
||||
@ -7203,14 +7198,14 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"test.events.async.enabled",
|
||||
TestEventsAsyncEnabled,
|
||||
test_events_async_enabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"test.mousescroll",
|
||||
MouseScrollTestingEnabled,
|
||||
test_mousescroll,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
@ -7232,14 +7227,14 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"toolkit.scrollbox.horizontalScrollDistance",
|
||||
ToolkitHorizontalScrollDistance,
|
||||
toolkit_scrollbox_horizontalScrollDistance,
|
||||
RelaxedAtomicInt32, 5
|
||||
)
|
||||
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"toolkit.scrollbox.verticalScrollDistance",
|
||||
ToolkitVerticalScrollDistance,
|
||||
toolkit_scrollbox_verticalScrollDistance,
|
||||
RelaxedAtomicInt32, 3
|
||||
)
|
||||
|
||||
@ -7266,7 +7261,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"ui.click_hold_context_menus.delay",
|
||||
UiClickHoldContextMenusDelay,
|
||||
ui_click_hold_context_menus_delay,
|
||||
RelaxedAtomicInt32, 500
|
||||
)
|
||||
|
||||
@ -7560,7 +7555,7 @@ VARCACHE_PREF(
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"widget.window-transforms.disabled",
|
||||
WindowTransformsDisabled,
|
||||
widget_window_transforms_disabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
|
@ -2007,7 +2007,7 @@ void nsCocoaWindow::SetWindowTransform(const gfx::Matrix& aTransform) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (StaticPrefs::WindowTransformsDisabled()) {
|
||||
if (StaticPrefs::widget_window_transforms_disabled()) {
|
||||
// CGSSetWindowTransform is a private API. In case calling it causes
|
||||
// problems either now or in the future, we'll want to have an easy kill
|
||||
// switch. So we allow disabling it with a pref.
|
||||
|
Loading…
x
Reference in New Issue
Block a user