зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1588720 - Part 1: Convert dom.popup_maximum to a static pref; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49275 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
025956ea72
Коммит
661494aa9a
|
@ -5698,7 +5698,7 @@ PopupBlocker::PopupControlState nsGlobalWindowOuter::RevisePopupAbuseLevel(
|
|||
// limit the number of simultaneously open popups
|
||||
if (abuse == PopupBlocker::openAbused || abuse == PopupBlocker::openBlocked ||
|
||||
abuse == PopupBlocker::openControlled) {
|
||||
int32_t popupMax = Preferences::GetInt("dom.popup_maximum", -1);
|
||||
int32_t popupMax = StaticPrefs::dom_popup_maximum();
|
||||
if (popupMax >= 0 && gOpenPopupSpamCount >= popupMax)
|
||||
abuse = PopupBlocker::openOverridden;
|
||||
}
|
||||
|
|
|
@ -1313,6 +1313,13 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# The maximum number of popup that is allowed to be opened. Set to -1 for no
|
||||
# limit.
|
||||
- name: dom.popup_maximum
|
||||
type: int32_t
|
||||
value: 20
|
||||
mirror: always
|
||||
|
||||
# Whether window.location.reload() and window.history.go(0) should be blocked
|
||||
# if called directly from a window resize event handler.
|
||||
#
|
||||
|
|
|
@ -955,7 +955,6 @@ pref("dom.allow_scripts_to_close_windows", false);
|
|||
|
||||
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.serviceWorkers.disable_open_click_delay", 1000);
|
||||
|
|
Загрузка…
Ссылка в новой задаче