зеркало из https://github.com/mozilla/pjs.git
Fix for Shockwave games not working bug 90173 r=av sr=attinasi
This commit is contained in:
Родитель
a53887f189
Коммит
6cb0b018c8
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче