зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1622111 - Convert dom.w3c_pointer_events.implicit_capture to a static pref. r=njn
Converts dom.w3c_pointer_events.implicit_capture to a static pref, removes the initializer in PointerEventHandler. Differential Revision: https://phabricator.services.mozilla.com/D67204 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
eef87691dc
Коммит
e771b4ad21
|
@ -15,8 +15,6 @@ namespace mozilla {
|
|||
|
||||
using namespace dom;
|
||||
|
||||
static bool sPointerEventImplicitCapture = false;
|
||||
|
||||
Maybe<int32_t> PointerEventHandler::sSpoofedPointerId;
|
||||
|
||||
class PointerInfo final {
|
||||
|
@ -43,17 +41,6 @@ static nsClassHashtable<nsUint32HashKey, PointerCaptureInfo>*
|
|||
// primaryState
|
||||
static nsClassHashtable<nsUint32HashKey, PointerInfo>* sActivePointersIds;
|
||||
|
||||
/* static */
|
||||
void PointerEventHandler::Initialize() {
|
||||
static bool initialized = false;
|
||||
if (initialized) {
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
Preferences::AddBoolVarCache(&sPointerEventImplicitCapture,
|
||||
"dom.w3c_pointer_events.implicit_capture", true);
|
||||
}
|
||||
|
||||
/* static */
|
||||
void PointerEventHandler::InitializeStatics() {
|
||||
MOZ_ASSERT(!sPointerCaptureList, "InitializeStatics called multiple times!");
|
||||
|
@ -74,7 +61,7 @@ void PointerEventHandler::ReleaseStatics() {
|
|||
/* static */
|
||||
bool PointerEventHandler::IsPointerEventImplicitCaptureForTouchEnabled() {
|
||||
return StaticPrefs::dom_w3c_pointer_events_enabled() &&
|
||||
sPointerEventImplicitCapture;
|
||||
StaticPrefs::dom_w3c_pointer_events_implicit_capture();
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
|
|
@ -35,10 +35,6 @@ class PointerCaptureInfo final {
|
|||
|
||||
class PointerEventHandler final {
|
||||
public:
|
||||
// Called in PresShell::Initialize to initialize pointer event related
|
||||
// preferences.
|
||||
static void Initialize();
|
||||
|
||||
// Called in nsLayoutStatics::Initialize/Shutdown to initialize pointer event
|
||||
// related static variables.
|
||||
static void InitializeStatics();
|
||||
|
|
|
@ -853,8 +853,6 @@ PresShell::PresShell(Document* aDocument)
|
|||
mReflowCountMgr->SetPresShell(this);
|
||||
#endif
|
||||
mLastOSWake = mLoadBegin = TimeStamp::Now();
|
||||
|
||||
PointerEventHandler::Initialize();
|
||||
}
|
||||
|
||||
NS_INTERFACE_TABLE_HEAD(PresShell)
|
||||
|
|
|
@ -2941,6 +2941,12 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# W3C pointer events draft.
|
||||
- name: dom.w3c_pointer_events.implicit_capture
|
||||
type: bool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
# Is support for Navigator.webdriver enabled?
|
||||
- name: dom.webdriver.enabled
|
||||
type: bool
|
||||
|
|
|
@ -4199,9 +4199,6 @@ pref("dom.push.http2.reset_retry_count_after_ms", 60000);
|
|||
pref("dom.push.http2.maxRetries", 2);
|
||||
pref("dom.push.http2.retryInterval", 5000);
|
||||
|
||||
// W3C pointer events draft
|
||||
pref("dom.w3c_pointer_events.implicit_capture", false);
|
||||
|
||||
// W3C MediaDevices devicechange fake event
|
||||
pref("media.ondevicechange.fakeDeviceChangeEvent.enabled", false);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче