Fix for Shockwave games not working bug 90173 r=av sr=attinasi

This commit is contained in:
peterlubczynski%netscape.com 2001-07-14 01:36:45 +00:00
Родитель a53887f189
Коммит 6cb0b018c8
2 изменённых файлов: 16 добавлений и 16 удалений

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

@ -2737,14 +2737,14 @@ nsresult nsPluginInstanceOwner::DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent)
nsEvent * theEvent;
privateEvent->GetInternalNSEvent(&theEvent);
if (theEvent) {
if (theEvent->eventStructType & NS_GUI_EVENT) {
nsGUIEvent* focusEvent = (nsGUIEvent *)theEvent;
nsEventStatus rv = ProcessEvent(*focusEvent);
if (nsEventStatus_eConsumeNoDefault == rv) {
aFocusEvent->PreventDefault();
aFocusEvent->PreventBubble();
return NS_ERROR_FAILURE; // means consume event
}
nsGUIEvent focusEvent;
memset(&focusEvent, 0, sizeof(focusEvent));
focusEvent.message = theEvent->message; // we only care about the message in ProcessEvent
nsEventStatus rv = ProcessEvent(focusEvent);
if (nsEventStatus_eConsumeNoDefault == rv) {
aFocusEvent->PreventDefault();
aFocusEvent->PreventBubble();
return NS_ERROR_FAILURE; // means consume event
}
}
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchFocusToPlugin failed, focusEvent null");

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

@ -2737,14 +2737,14 @@ nsresult nsPluginInstanceOwner::DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent)
nsEvent * theEvent;
privateEvent->GetInternalNSEvent(&theEvent);
if (theEvent) {
if (theEvent->eventStructType & NS_GUI_EVENT) {
nsGUIEvent* focusEvent = (nsGUIEvent *)theEvent;
nsEventStatus rv = ProcessEvent(*focusEvent);
if (nsEventStatus_eConsumeNoDefault == rv) {
aFocusEvent->PreventDefault();
aFocusEvent->PreventBubble();
return NS_ERROR_FAILURE; // means consume event
}
nsGUIEvent focusEvent;
memset(&focusEvent, 0, sizeof(focusEvent));
focusEvent.message = theEvent->message; // we only care about the message in ProcessEvent
nsEventStatus rv = ProcessEvent(focusEvent);
if (nsEventStatus_eConsumeNoDefault == rv) {
aFocusEvent->PreventDefault();
aFocusEvent->PreventBubble();
return NS_ERROR_FAILURE; // means consume event
}
}
else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchFocusToPlugin failed, focusEvent null");