mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1485063 Part 2 - Move preferences used in AccessibleCaretEventHub to StaticPrefList.h r=mats
"layers.async-pan-zoom.enabled" has been enabled for all platforms for a long time. I reword the comment to avoid confusion. Differential Revision: https://phabricator.services.mozilla.com/D5471 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
787b6292f5
commit
1a5f8a9601
@ -12,9 +12,9 @@
|
||||
#include "gfxPrefs.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/MouseEvents.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "mozilla/TextEvents.h"
|
||||
#include "mozilla/TouchEvents.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/MouseEventBinding.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
#include "nsCanvasFrame.h"
|
||||
@ -363,17 +363,9 @@ MOZ_IMPL_STATE_CLASS_GETTER(PressNoCaretState)
|
||||
MOZ_IMPL_STATE_CLASS_GETTER(ScrollState)
|
||||
MOZ_IMPL_STATE_CLASS_GETTER(LongTapState)
|
||||
|
||||
bool AccessibleCaretEventHub::sUseLongTapInjector = false;
|
||||
|
||||
AccessibleCaretEventHub::AccessibleCaretEventHub(nsIPresShell* aPresShell)
|
||||
: mPresShell(aPresShell)
|
||||
{
|
||||
static bool prefsAdded = false;
|
||||
if (!prefsAdded) {
|
||||
Preferences::AddBoolVarCache(
|
||||
&sUseLongTapInjector, "layout.accessiblecaret.use_long_tap_injector");
|
||||
prefsAdded = true;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -416,7 +408,7 @@ AccessibleCaretEventHub::Init()
|
||||
|
||||
mDocShell = static_cast<nsDocShell*>(docShell);
|
||||
|
||||
if (sUseLongTapInjector) {
|
||||
if (StaticPrefs::layout_accessiblecaret_use_long_tap_injector()) {
|
||||
mLongTapInjectorTimer = NS_NewTimer();
|
||||
}
|
||||
|
||||
|
@ -179,9 +179,6 @@ protected:
|
||||
// Flag to avoid calling Reflow() callback recursively.
|
||||
bool mIsInReflowCallback = false;
|
||||
|
||||
// Simulate long tap if the platform does not support eMouseLongTap events.
|
||||
static bool sUseLongTapInjector;
|
||||
|
||||
static const int32_t kMoveStartToleranceInPixel = 5;
|
||||
static const int32_t kInvalidTouchId = -1;
|
||||
static const int32_t kDefaultTouchId = 0; // For mouse event
|
||||
|
@ -477,6 +477,14 @@ VARCACHE_PREF(
|
||||
float, -18.5f
|
||||
)
|
||||
|
||||
// Simulate long tap events to select words. Mainly used in manual testing
|
||||
// with mouse.
|
||||
VARCACHE_PREF(
|
||||
"layout.accessiblecaret.use_long_tap_injector",
|
||||
layout_accessiblecaret_use_long_tap_injector,
|
||||
bool, false
|
||||
)
|
||||
|
||||
// Is parallel CSS parsing enabled?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.parsing.parallel",
|
||||
|
@ -5556,10 +5556,6 @@ pref("layout.accessiblecaret.enabled_on_touch", true);
|
||||
// Show the caret when long tapping on an empty content.
|
||||
pref("layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content", false);
|
||||
|
||||
// Simulate long tap to select words on the platforms where APZ is not enabled
|
||||
// or long tap events does not fired by APZ.
|
||||
pref("layout.accessiblecaret.use_long_tap_injector", false);
|
||||
|
||||
// By default, carets become tilt only when they are overlapping.
|
||||
pref("layout.accessiblecaret.always_tilt", false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user