зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1569004 - convert dom.disable_open_click_delay to StaticPref. r=njn
Converts dom.disable_open_click_delay from a VarCache pref in TimeoutManager.cpp to StaticPref, removes all.js entry, and corrects a typo where the value was mentioned in nsGlobalWindowInner.cpp. Differential Revision: https://phabricator.services.mozilla.com/D39424 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3d34dc8c5b
Коммит
8e4a9f02c1
|
@ -412,15 +412,6 @@ void TimeoutManager::UpdateBudget(const TimeStamp& aNow,
|
|||
|
||||
uint32_t TimeoutManager::sNestingLevel = 0;
|
||||
|
||||
namespace {
|
||||
|
||||
// Only propagate the open window click permission if the setTimeout() is equal
|
||||
// to or less than this value.
|
||||
#define DEFAULT_DISABLE_OPEN_CLICK_DELAY 0
|
||||
int32_t gDisableOpenClickDelay;
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
TimeoutManager::TimeoutManager(nsGlobalWindowInner& aWindow,
|
||||
uint32_t aMaxIdleDeferMS)
|
||||
: mWindow(aWindow),
|
||||
|
@ -462,9 +453,6 @@ TimeoutManager::~TimeoutManager() {
|
|||
|
||||
/* static */
|
||||
void TimeoutManager::Initialize() {
|
||||
Preferences::AddIntVarCache(&gDisableOpenClickDelay,
|
||||
"dom.disable_open_click_delay",
|
||||
DEFAULT_DISABLE_OPEN_CLICK_DELAY);
|
||||
Preferences::AddIntVarCache(&gBackgroundBudgetRegenerationFactor,
|
||||
"dom.timeout.background_budget_regeneration_rate",
|
||||
DEFAULT_BACKGROUND_BUDGET_REGENERATION_FACTOR);
|
||||
|
@ -558,7 +546,7 @@ nsresult TimeoutManager::SetTimeout(TimeoutHandler* aHandler, int32_t interval,
|
|||
// This is checking |interval|, not realInterval, on purpose,
|
||||
// because our lower bound for |realInterval| could be pretty high
|
||||
// in some cases.
|
||||
if (interval <= gDisableOpenClickDelay) {
|
||||
if (interval <= StaticPrefs::dom_disable_open_click_delay()) {
|
||||
timeout->mPopupState = PopupBlocker::GetPopupControlState();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5883,7 +5883,7 @@ bool nsGlobalWindowInner::RunTimeoutHandler(Timeout* aTimeout,
|
|||
timeout->mRunning = true;
|
||||
|
||||
// Push this timeout's popup control state, which should only be
|
||||
// eabled the first time a timeout fires that was created while
|
||||
// enabled the first time a timeout fires that was created while
|
||||
// popups were enabled and with a delay less than
|
||||
// "dom.disable_open_click_delay".
|
||||
AutoPopupStatePusher popupStatePusher(timeout->mPopupState);
|
||||
|
|
|
@ -1129,6 +1129,13 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
# Only propagate the open window click permission if the setTimeout() is equal
|
||||
# to or less than this value.
|
||||
- name: dom.disable_open_click_delay
|
||||
type: int32_t
|
||||
value: 1000
|
||||
mirror: always
|
||||
|
||||
- name: dom.disable_open_during_load
|
||||
type: bool
|
||||
value: false
|
||||
|
|
|
@ -1066,7 +1066,6 @@ pref("dom.require_user_interaction_for_beforeunload", true);
|
|||
pref("dom.popup_maximum", 20);
|
||||
pref("dom.popup_allowed_events", "change click dblclick auxclick mouseup pointerup notificationclick reset submit touchend contextmenu");
|
||||
|
||||
pref("dom.disable_open_click_delay", 1000);
|
||||
pref("dom.serviceWorkers.disable_open_click_delay", 1000);
|
||||
|
||||
pref("dom.storage.enabled", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче