Bug 1513895 - Unify PopupBlocker algorithm in 1 single file, r=smaug
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user