mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Bug 1556808. Use StaticPrefs for layout.css.prefixes.webkit in EventListenerManager. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D33685 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e590727548
commit
bf01c9bff6
@ -19,6 +19,7 @@
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/Event.h"
|
||||
@ -96,19 +97,6 @@ static uint32_t MutationBitForEventType(EventMessage aEventType) {
|
||||
|
||||
uint32_t EventListenerManager::sMainThreadCreatedCount = 0;
|
||||
|
||||
static bool IsWebkitPrefixSupportEnabled() {
|
||||
static bool sIsWebkitPrefixSupportEnabled;
|
||||
static bool sIsPrefCached = false;
|
||||
|
||||
if (!sIsPrefCached) {
|
||||
sIsPrefCached = true;
|
||||
Preferences::AddBoolVarCache(&sIsWebkitPrefixSupportEnabled,
|
||||
"layout.css.prefixes.webkit");
|
||||
}
|
||||
|
||||
return sIsWebkitPrefixSupportEnabled;
|
||||
}
|
||||
|
||||
EventListenerManagerBase::EventListenerManagerBase()
|
||||
: mNoListenerForEvent(eVoidEvent),
|
||||
mMayHavePaintEventListener(false),
|
||||
@ -1050,7 +1038,7 @@ EventMessage EventListenerManager::GetLegacyEventMessage(
|
||||
// (If we're off-main-thread, we can't check the pref; so we just behave as
|
||||
// if it's disabled.)
|
||||
if (mIsMainThreadELM) {
|
||||
if (IsWebkitPrefixSupportEnabled()) {
|
||||
if (StaticPrefs::layout_css_prefixes_webkit()) {
|
||||
// webkit-prefixed legacy events:
|
||||
if (aEventMessage == eTransitionEnd) {
|
||||
return eWebkitTransitionEnd;
|
||||
|
Loading…
Reference in New Issue
Block a user