Backed out 4 changesets (bug 1485063) for failing test-oop-extensions/test_ext_webrequest_frameId.html CLOSED TREE

Backed out changeset fdd2f4fc6d5a (bug 1485063)
Backed out changeset 1edf90819cb2 (bug 1485063)
Backed out changeset f42f853c8aa7 (bug 1485063)
Backed out changeset b4e402e76ba6 (bug 1485063)
This commit is contained in:
Ciure Andrei 2018-09-11 04:49:55 +03:00
Родитель 7a6f7c263a
Коммит 3af7e2cbe0
10 изменённых файлов: 174 добавлений и 140 удалений

Просмотреть файл

@ -8,7 +8,7 @@
#include "AccessibleCaretLogger.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/Preferences.h"
#include "mozilla/ToString.h"
#include "nsCanvasFrame.h"
#include "nsCaret.h"
@ -30,6 +30,10 @@ using namespace dom;
NS_IMPL_ISUPPORTS(AccessibleCaret::DummyTouchListener, nsIDOMEventListener)
float AccessibleCaret::sWidth = 0.0f;
float AccessibleCaret::sHeight = 0.0f;
float AccessibleCaret::sMarginLeft = 0.0f;
NS_NAMED_LITERAL_STRING(AccessibleCaret::sTextOverlayElementId, "text-overlay");
NS_NAMED_LITERAL_STRING(AccessibleCaret::sCaretImageElementId, "image");
@ -74,6 +78,14 @@ AccessibleCaret::AccessibleCaret(nsIPresShell* aPresShell)
MOZ_ASSERT(mPresShell->GetDocument());
InjectCaretElement(mPresShell->GetDocument());
}
static bool prefsAdded = false;
if (!prefsAdded) {
Preferences::AddFloatVarCache(&sWidth, "layout.accessiblecaret.width");
Preferences::AddFloatVarCache(&sHeight, "layout.accessiblecaret.height");
Preferences::AddFloatVarCache(&sMarginLeft, "layout.accessiblecaret.margin-left");
prefsAdded = true;
}
}
AccessibleCaret::~AccessibleCaret()
@ -304,12 +316,11 @@ AccessibleCaret::SetCaretElementStyle(const nsRect& aRect, float aZoomLevel)
nsPresContext::AppUnitsToIntCSSPixels(position.y));
// We can't use AppendPrintf here, because it does locale-specific
// formatting of floating-point values.
styleStr.AppendFloat(StaticPrefs::layout_accessiblecaret_width() / aZoomLevel);
styleStr.AppendFloat(sWidth/aZoomLevel);
styleStr.AppendLiteral("px; height: ");
styleStr.AppendFloat(StaticPrefs::layout_accessiblecaret_height() / aZoomLevel);
styleStr.AppendFloat(sHeight/aZoomLevel);
styleStr.AppendLiteral("px; margin-left: ");
styleStr.AppendFloat(
StaticPrefs::layout_accessiblecaret_margin_left() / aZoomLevel);
styleStr.AppendFloat(sMarginLeft/aZoomLevel);
styleStr.AppendLiteral("px");
CaretElement().SetAttr(kNameSpaceID_None, nsGkAtoms::style, styleStr, true);

Просмотреть файл

@ -229,6 +229,9 @@ protected:
RefPtr<DummyTouchListener> mDummyTouchListener{new DummyTouchListener()};
// Static class variables
static float sWidth;
static float sHeight;
static float sMarginLeft;
static const nsLiteralString sTextOverlayElementId;
static const nsLiteralString sCaretImageElementId;

Просмотреть файл

@ -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,9 +363,17 @@ 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
@ -408,7 +416,7 @@ AccessibleCaretEventHub::Init()
mDocShell = static_cast<nsDocShell*>(docShell);
if (StaticPrefs::layout_accessiblecaret_use_long_tap_injector()) {
if (sUseLongTapInjector) {
mLongTapInjectorTimer = NS_NewTimer();
}

Просмотреть файл

@ -179,6 +179,9 @@ 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

Просмотреть файл

@ -18,7 +18,7 @@
#include "mozilla/dom/TreeWalker.h"
#include "mozilla/IMEStateManager.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/Preferences.h"
#include "nsCaret.h"
#include "nsContainerFrame.h"
#include "nsContentUtils.h"
@ -72,6 +72,22 @@ std::ostream& operator<<(std::ostream& aStream,
}
#undef AC_PROCESS_ENUM_TO_STREAM
/* static */ bool
AccessibleCaretManager::sCaretShownWhenLongTappingOnEmptyContent = false;
/* static */ bool
AccessibleCaretManager::sCaretsAlwaysTilt = false;
/* static */ int32_t
AccessibleCaretManager::sCaretsScriptUpdates =
AccessibleCaretManager::kScriptAlwaysHide;
/* static */ bool
AccessibleCaretManager::sCaretsAllowDraggingAcrossOtherCaret = true;
/* static */ bool
AccessibleCaretManager::sHapticFeedback = false;
/* static */ bool
AccessibleCaretManager::sExtendSelectionForPhoneNumber = false;
/* static */ bool
AccessibleCaretManager::sHideCaretsForMouseInput = true;
AccessibleCaretManager::AccessibleCaretManager(nsIPresShell* aPresShell)
: mPresShell(aPresShell)
{
@ -81,6 +97,25 @@ AccessibleCaretManager::AccessibleCaretManager(nsIPresShell* aPresShell)
mFirstCaret = MakeUnique<AccessibleCaret>(mPresShell);
mSecondCaret = MakeUnique<AccessibleCaret>(mPresShell);
static bool addedPrefs = false;
if (!addedPrefs) {
Preferences::AddBoolVarCache(&sCaretShownWhenLongTappingOnEmptyContent,
"layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content");
Preferences::AddBoolVarCache(&sCaretsAlwaysTilt,
"layout.accessiblecaret.always_tilt");
Preferences::AddIntVarCache(&sCaretsScriptUpdates,
"layout.accessiblecaret.script_change_update_mode");
Preferences::AddBoolVarCache(&sCaretsAllowDraggingAcrossOtherCaret,
"layout.accessiblecaret.allow_dragging_across_other_caret", true);
Preferences::AddBoolVarCache(&sHapticFeedback,
"layout.accessiblecaret.hapticfeedback");
Preferences::AddBoolVarCache(&sExtendSelectionForPhoneNumber,
"layout.accessiblecaret.extend_selection_for_phone_number");
Preferences::AddBoolVarCache(&sHideCaretsForMouseInput,
"layout.accessiblecaret.hide_carets_for_mouse_input");
addedPrefs = true;
}
}
AccessibleCaretManager::~AccessibleCaretManager()
@ -118,10 +153,8 @@ AccessibleCaretManager::OnSelectionChanged(nsIDocument* aDoc,
// Move the cursor by JavaScript or unknown internal call.
if (aReason == nsISelectionListener::NO_REASON) {
auto mode = static_cast<ScriptUpdateMode>(
StaticPrefs::layout_accessiblecaret_script_change_update_mode());
if (mode == kScriptAlwaysShow ||
(mode == kScriptUpdateVisible &&
if (sCaretsScriptUpdates == kScriptAlwaysShow ||
(sCaretsScriptUpdates == kScriptUpdateVisible &&
(mFirstCaret->IsLogicallyVisible() ||
mSecondCaret->IsLogicallyVisible()))) {
UpdateCarets();
@ -153,7 +186,7 @@ AccessibleCaretManager::OnSelectionChanged(nsIDocument* aDoc,
}
// For mouse input we don't want to show the carets.
if (StaticPrefs::layout_accessiblecaret_hide_carets_for_mouse_input() &&
if (sHideCaretsForMouseInput &&
mLastInputSource == MouseEvent_Binding::MOZ_SOURCE_MOUSE) {
HideCarets();
return NS_OK;
@ -161,7 +194,7 @@ AccessibleCaretManager::OnSelectionChanged(nsIDocument* aDoc,
// When we want to hide the carets for mouse input, hide them for select
// all action fired by keyboard as well.
if (StaticPrefs::layout_accessiblecaret_hide_carets_for_mouse_input() &&
if (sHideCaretsForMouseInput &&
mLastInputSource == MouseEvent_Binding::MOZ_SOURCE_KEYBOARD &&
(aReason & nsISelectionListener::SELECTALL_REASON)) {
HideCarets();
@ -263,7 +296,7 @@ AccessibleCaretManager::UpdateCaretsForCursorMode(const UpdateCaretsHintSet& aHi
if (aHints == UpdateCaretsHint::Default) {
if (HasNonEmptyTextContent(GetEditingHostForFrame(frame))) {
mFirstCaret->SetAppearance(Appearance::Normal);
} else if (StaticPrefs::layout_accessiblecaret_caret_shown_when_long_tapping_on_empty_content()) {
} else if (sCaretShownWhenLongTappingOnEmptyContent) {
if (mFirstCaret->IsLogicallyVisible()) {
// Possible cases are: 1) SelectWordOrShortcut() sets the
// appearance to Normal. 2) When the caret is out of viewport and
@ -359,7 +392,7 @@ AccessibleCaretManager::UpdateCaretsForSelectionMode(const UpdateCaretsHintSet&
if (aHints == UpdateCaretsHint::Default) {
// Only check for tilt carets with default update hint. Otherwise we might
// override the appearance set by the caller.
if (StaticPrefs::layout_accessiblecaret_always_tilt()) {
if (sCaretsAlwaysTilt) {
UpdateCaretsForAlwaysTilt(startFrame, endFrame);
} else {
UpdateCaretsForOverlappingTilt();
@ -422,7 +455,7 @@ AccessibleCaretManager::UpdateCaretsForAlwaysTilt(nsIFrame* aStartFrame,
void
AccessibleCaretManager::ProvideHapticFeedback()
{
if (StaticPrefs::layout_accessiblecaret_hapticfeedback()) {
if (sHapticFeedback) {
nsCOMPtr<nsIHapticFeedback> haptic =
do_GetService("@mozilla.org/widget/hapticfeedback;1");
haptic->PerformSimpleAction(haptic->LongPress);
@ -559,7 +592,7 @@ AccessibleCaretManager::SelectWordOrShortcut(const nsPoint& aPoint)
!HasNonEmptyTextContent(newFocusEditingHost)) {
ChangeFocusToOrClearOldFocus(focusableFrame);
if (StaticPrefs::layout_accessiblecaret_caret_shown_when_long_tapping_on_empty_content()) {
if (sCaretShownWhenLongTappingOnEmptyContent) {
mFirstCaret->SetAppearance(Appearance::Normal);
}
// We need to update carets to get correct information before dispatching
@ -637,7 +670,7 @@ AccessibleCaretManager::OnScrollEnd()
}
// For mouse input we don't want to show the carets.
if (StaticPrefs::layout_accessiblecaret_hide_carets_for_mouse_input() &&
if (sHideCaretsForMouseInput &&
mLastInputSource == MouseEvent_Binding::MOZ_SOURCE_MOUSE) {
AC_LOG("%s: HideCarets()", __FUNCTION__);
HideCarets();
@ -847,7 +880,7 @@ AccessibleCaretManager::SelectWord(nsIFrame* aFrame, const nsPoint& aPoint) cons
ClearMaintainedSelection();
// Smart-select phone numbers if possible.
if (StaticPrefs::layout_accessiblecaret_extend_selection_for_phone_number()) {
if (sExtendSelectionForPhoneNumber) {
SelectMoreIfPhoneNumber();
}
@ -1124,7 +1157,7 @@ AccessibleCaretManager::RestrictCaretDraggingOffsets(
aOffsets.secondaryOffset = limit.mContentOffset;
};
if (!StaticPrefs::layout_accessiblecaret_allow_dragging_across_other_caret()) {
if (!sCaretsAllowDraggingAcrossOtherCaret) {
if ((mActiveCaret == mFirstCaret.get() && cmpToLimit == 1) ||
(mActiveCaret == mSecondCaret.get() && cmpToLimit == -1)) {
// The active caret's position is past the limit, which we don't allow
@ -1290,7 +1323,7 @@ AccessibleCaretManager::AdjustDragBoundary(const nsPoint& aPoint) const
}
if (GetCaretMode() == CaretMode::Selection &&
!StaticPrefs::layout_accessiblecaret_allow_dragging_across_other_caret()) {
!sCaretsAllowDraggingAcrossOtherCaret) {
// Bug 1068474: Adjust the Y-coordinate so that the carets won't be in tilt
// mode when a caret is being dragged surpass the other caret.
//

Просмотреть файл

@ -331,6 +331,20 @@ protected:
// AppUnit.h.
static const int32_t kBoundaryAppUnits = 61;
// Preference to allow smarter selection of phone numbers,
// when user long presses text to start.
static bool sExtendSelectionForPhoneNumber;
// Preference to show caret in cursor mode when long tapping on an empty
// content. This also changes the default update behavior in cursor mode,
// which is based on the emptiness of the content, into something more
// heuristic. See UpdateCaretsForCursorMode() for the details.
static bool sCaretShownWhenLongTappingOnEmptyContent;
// Preference to make carets always tilt in selection mode. By default, the
// carets become tilt only when they are overlapping.
static bool sCaretsAlwaysTilt;
enum ScriptUpdateMode : int32_t {
// By default, always hide carets for selection changes due to JS calls.
kScriptAlwaysHide,
@ -340,6 +354,22 @@ protected:
// Always show carets for selection changes due to JS calls.
kScriptAlwaysShow
};
// Preference to indicate how to update carets for selection changes due to
// JS calls, as one of the ScriptUpdateMode constants.
static int32_t sCaretsScriptUpdates;
// Preference to allow one caret to be dragged across the other caret without
// any limitation. When set to false, one caret cannot be dragged across the
// other one.
static bool sCaretsAllowDraggingAcrossOtherCaret;
// AccessibleCaret pref for haptic feedback behaviour on longPress.
static bool sHapticFeedback;
// Preference to keep carets hidden when the selection is being manipulated
// by mouse input (as opposed to touch/pen/etc.).
static bool sHideCaretsForMouseInput;
};
std::ostream& operator<<(std::ostream& aStream,

Просмотреть файл

@ -23,7 +23,6 @@
#include "mozilla/Logging.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/Sprintf.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/TextEvents.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/TouchEvents.h"
@ -726,18 +725,25 @@ nsIPresShell::FrameSelection()
static bool sSynthMouseMove = true;
static uint32_t sNextPresShellId;
static bool sAccessibleCaretEnabled = false;
static bool sAccessibleCaretOnTouch = false;
/* static */ bool
PresShell::AccessibleCaretEnabled(nsIDocShell* aDocShell)
{
static bool initialized = false;
if (!initialized) {
Preferences::AddBoolVarCache(&sAccessibleCaretEnabled, "layout.accessiblecaret.enabled");
Preferences::AddBoolVarCache(&sAccessibleCaretOnTouch, "layout.accessiblecaret.enabled_on_touch");
initialized = true;
}
// If the pref forces it on, then enable it.
if (StaticPrefs::layout_accessiblecaret_enabled()) {
if (sAccessibleCaretEnabled) {
return true;
}
// If the touch pref is on, and touch events are enabled (this depends
// on the specific device running), then enable it.
if (StaticPrefs::layout_accessiblecaret_enabled_on_touch() &&
dom::TouchEvent::PrefEnabled(aDocShell)) {
if (sAccessibleCaretOnTouch && dom::TouchEvent::PrefEnabled(aDocShell)) {
return true;
}
// Otherwise, disabled.

Просмотреть файл

@ -11,8 +11,7 @@
#include "AccessibleCaret.h"
#include "AccessibleCaretManager.h"
#include "mozilla/Preferences.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/AutoRestore.h"
using ::testing::DefaultValue;
using ::testing::Eq;
@ -54,6 +53,8 @@ public:
using CaretMode = AccessibleCaretManager::CaretMode;
using AccessibleCaretManager::UpdateCarets;
using AccessibleCaretManager::HideCarets;
using AccessibleCaretManager::sCaretShownWhenLongTappingOnEmptyContent;
using AccessibleCaretManager::sCaretsAlwaysTilt;
MockAccessibleCaretManager()
: AccessibleCaretManager(nullptr)
@ -433,8 +434,9 @@ TEST_F(AccessibleCaretManagerTester,
MOZ_CAN_RUN_SCRIPT
{
// Simulate Firefox Android preference.
bool oldPref = StaticPrefs::layout_accessiblecaret_always_tilt();
Preferences::SetBool("layout.accessiblecaret.always_tilt", true);
AutoRestore<bool> saveCaretsAlwaysTilt(
MockAccessibleCaretManager::sCaretsAlwaysTilt);
MockAccessibleCaretManager::sCaretsAlwaysTilt = true;
EXPECT_CALL(mManager, GetCaretMode())
.WillRepeatedly(Return(CaretMode::Selection));
@ -532,8 +534,6 @@ MOZ_CAN_RUN_SCRIPT
EXPECT_EQ(FirstCaretAppearance(), Appearance::Left);
EXPECT_EQ(SecondCaretAppearance(), Appearance::Right);
check.Call("scrollend2");
Preferences::SetBool("layout.accessiblecaret.always_tilt", oldPref);
}
TEST_F(AccessibleCaretManagerTester, TestScrollInCursorModeWhenLogicallyVisible)
@ -728,8 +728,9 @@ TEST_F(AccessibleCaretManagerTester,
MOZ_CAN_RUN_SCRIPT
{
// Simulate Firefox Android preference.
bool oldPref = StaticPrefs::layout_accessiblecaret_caret_shown_when_long_tapping_on_empty_content();
Preferences::SetBool("layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content", true);
AutoRestore<bool> savesCaretShownWhenLongTappingOnEmptyContent(
MockAccessibleCaretManager::sCaretShownWhenLongTappingOnEmptyContent);
MockAccessibleCaretManager::sCaretShownWhenLongTappingOnEmptyContent = true;
EXPECT_CALL(mManager, GetCaretMode())
.WillRepeatedly(Return(CaretMode::Cursor));
@ -815,8 +816,6 @@ MOZ_CAN_RUN_SCRIPT
mManager.OnScrollEnd();
EXPECT_EQ(FirstCaretAppearance(), Appearance::Normal);
check.Call("longtap scrollend3");
Preferences::SetBool("layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content", oldPref);
}
} // namespace mozilla

Просмотреть файл

@ -446,110 +446,6 @@ VARCACHE_PREF(
// Layout prefs
//---------------------------------------------------------------------------
// Debug-only pref to force enable the AccessibleCaret. If you want to
// control AccessibleCaret by mouse, you'll need to set
// "layout.accessiblecaret.hide_carets_for_mouse_input" to false.
VARCACHE_PREF(
"layout.accessiblecaret.enabled",
layout_accessiblecaret_enabled,
bool, false
)
// Enable the accessible caret on platforms/devices
// that we detect have touch support. Note that this pref is an
// additional way to enable the accessible carets, rather than
// overriding the layout.accessiblecaret.enabled pref.
VARCACHE_PREF(
"layout.accessiblecaret.enabled_on_touch",
layout_accessiblecaret_enabled_on_touch,
bool, false
)
// By default, carets become tilt only when they are overlapping.
VARCACHE_PREF(
"layout.accessiblecaret.always_tilt",
layout_accessiblecaret_always_tilt,
bool, false
)
// Show caret in cursor mode when long tapping on an empty content. This
// also changes the default update behavior in cursor mode, which is based
// on the emptiness of the content, into something more heuristic. See
// AccessibleCaretManager::UpdateCaretsForCursorMode() for the details.
VARCACHE_PREF(
"layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content",
layout_accessiblecaret_caret_shown_when_long_tapping_on_empty_content,
bool, false
)
// 0 = by default, always hide carets for selection changes due to JS calls.
// 1 = update any visible carets for selection changes due to JS calls,
// but don't show carets if carets are hidden.
// 2 = always show carets for selection changes due to JS calls.
VARCACHE_PREF(
"layout.accessiblecaret.script_change_update_mode",
layout_accessiblecaret_script_change_update_mode,
int32_t, 0
)
// Allow one caret to be dragged across the other caret without any limitation.
// This matches the built-in convention for all desktop platforms.
VARCACHE_PREF(
"layout.accessiblecaret.allow_dragging_across_other_caret",
layout_accessiblecaret_allow_dragging_across_other_caret,
bool, true
)
// Optionally provide haptic feedback on long-press selection events.
VARCACHE_PREF(
"layout.accessiblecaret.hapticfeedback",
layout_accessiblecaret_hapticfeedback,
bool, false
)
// Smart phone-number selection on long-press is not enabled by default.
VARCACHE_PREF(
"layout.accessiblecaret.extend_selection_for_phone_number",
layout_accessiblecaret_extend_selection_for_phone_number,
bool, false
)
// Keep the accessible carets hidden when the user is using mouse input (as
// opposed to touch/pen/etc.).
VARCACHE_PREF(
"layout.accessiblecaret.hide_carets_for_mouse_input",
layout_accessiblecaret_hide_carets_for_mouse_input,
bool, true
)
// CSS attributes (width, height, margin-left) of the AccessibleCaret in CSS
// pixels.
VARCACHE_PREF(
"layout.accessiblecaret.width",
layout_accessiblecaret_width,
float, 34.0f
)
VARCACHE_PREF(
"layout.accessiblecaret.height",
layout_accessiblecaret_height,
float, 36.0f
)
VARCACHE_PREF(
"layout.accessiblecaret.margin-left",
layout_accessiblecaret_margin_left,
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",

Просмотреть файл

@ -5514,6 +5514,51 @@ pref("plugins.flashBlock.enabled", false);
// Turn off Spatial navigation by default.
pref("snav.enabled", false);
// Debug-only pref to force enable the AccessibleCaret. If you want to
// control AccessibleCaret by mouse, you'll need to set
// "layout.accessiblecaret.hide_carets_for_mouse_input" to false.
pref("layout.accessiblecaret.enabled", false);
// Enable the accessible caret on platforms/devices
// that we detect have touch support. Note that this pref is an
// additional way to enable the accessible carets, rather than
// overriding the layout.accessiblecaret.enabled pref.
pref("layout.accessiblecaret.enabled_on_touch", true);
// CSS attributes of the AccessibleCaret in CSS pixels.
pref("layout.accessiblecaret.width", "34.0");
pref("layout.accessiblecaret.height", "36.0");
pref("layout.accessiblecaret.margin-left", "-18.5");
// 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);
// 0 = by default, always hide carets for selection changes due to JS calls.
// 1 = update any visible carets for selection changes due to JS calls,
// but don't show carets if carets are hidden.
// 2 = always show carets for selection changes due to JS calls.
pref("layout.accessiblecaret.script_change_update_mode", 0);
// Allow one caret to be dragged across the other caret without any limitation.
// This matches the built-in convention for all desktop platforms.
pref("layout.accessiblecaret.allow_dragging_across_other_caret", true);
// Optionally provide haptic feedback on longPress selection events.
pref("layout.accessiblecaret.hapticfeedback", false);
// Smart phone-number selection on long-press is not enabled by default.
pref("layout.accessiblecaret.extend_selection_for_phone_number", false);
// Keep the accessible carets hidden when the user is using mouse input.
pref("layout.accessiblecaret.hide_carets_for_mouse_input", true);
// Wakelock is disabled by default.
pref("dom.wakelock.enabled", false);