Bug 1513895 - Unify PopupBlocker algorithm in 1 single file, r=smaug

This commit is contained in:
Andrea Marchesini
2018-12-16 10:21:16 +01:00
parent e14a575f16
commit ab2f923d5e
35 changed files with 620 additions and 586 deletions

View File

@@ -654,12 +654,11 @@ bool HTMLInputElement::IsPopupBlocked() const {
}
// Check if page can open a popup without abuse regardless of allowed events
if (win->GetPopupControlState() <= openBlocked) {
return !nsContentUtils::TryUsePopupOpeningToken();
if (PopupBlocker::GetPopupControlState() <= PopupBlocker::openBlocked) {
return !PopupBlocker::TryUsePopupOpeningToken();
}
return !nsContentUtils::CanShowPopupByPermission(
OwnerDoc()->NodePrincipal());
return !PopupBlocker::CanShowPopupByPermission(OwnerDoc()->NodePrincipal());
}
nsresult HTMLInputElement::InitColorPicker() {