Bug 1455052 part 3. Change GetEventPopupControlState to work with Event. r=masayuki

MozReview-Commit-ID: ArEfBOa7Pha
This commit is contained in:
Boris Zbarsky 2018-04-20 12:53:17 -04:00
Родитель d7e78873a0
Коммит 0ba5797320
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -658,13 +658,13 @@ PopupAllowedForEvent(const char *eventName)
// static
PopupControlState
Event::GetEventPopupControlState(WidgetEvent* aEvent, nsIDOMEvent* aDOMEvent)
Event::GetEventPopupControlState(WidgetEvent* aEvent, Event* aDOMEvent)
{
// generally if an event handler is running, new windows are disallowed.
// check for exceptions:
PopupControlState abuse = openAbused;
if (aDOMEvent && aDOMEvent->InternalDOMEvent()->GetWantsPopupControlCheck()) {
if (aDOMEvent && aDOMEvent->GetWantsPopupControlCheck()) {
nsAutoString type;
aDOMEvent->GetType(type);
if (PopupAllowedForEvent(NS_ConvertUTF16toUTF8(type).get())) {

Просмотреть файл

@ -163,7 +163,7 @@ public:
bool Init(EventTarget* aGlobal);
static PopupControlState GetEventPopupControlState(WidgetEvent* aEvent,
nsIDOMEvent* aDOMEvent = nullptr);
Event* aDOMEvent = nullptr);
static void PopupAllowedEventsChanged();