Bug 1459264 - Allow just 1 FilePicker per event, r=smaug

This commit is contained in:
Andrea Marchesini
2018-12-12 01:00:05 +01:00
parent fac22bc424
commit b8e53cf46b
4 changed files with 54 additions and 8 deletions

View File

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