Fixing keyboard event bustage for Mac plugins bug 110190 r=sdagley sr=beard

git-svn-id: svn://10.0.0.236/trunk@115020 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterlubczynski%netscape.com
2002-02-20 03:23:50 +00:00
parent e51968e5eb
commit 58ba5b055e
2 changed files with 8 additions and 0 deletions

View File

@@ -3177,6 +3177,9 @@ nsresult nsPluginInstanceOwner::KeyUp(nsIDOMEvent* aKeyEvent)
nsresult nsPluginInstanceOwner::KeyPress(nsIDOMEvent* aKeyEvent)
{
#ifdef XP_MAC // send KeyPress events only on Mac
return DispatchKeyToPlugin(aKeyEvent);
#else
if (mInstance) {
// If this event is going to the plugin, we want to kill it.
// Not actually sending keypress to the plugin, since we didn't before.
@@ -3188,6 +3191,7 @@ nsresult nsPluginInstanceOwner::KeyPress(nsIDOMEvent* aKeyEvent)
return NS_ERROR_FAILURE; // means consume event
}
return NS_OK;
#endif
}
nsresult nsPluginInstanceOwner::DispatchKeyToPlugin(nsIDOMEvent* aKeyEvent)

View File

@@ -3177,6 +3177,9 @@ nsresult nsPluginInstanceOwner::KeyUp(nsIDOMEvent* aKeyEvent)
nsresult nsPluginInstanceOwner::KeyPress(nsIDOMEvent* aKeyEvent)
{
#ifdef XP_MAC // send KeyPress events only on Mac
return DispatchKeyToPlugin(aKeyEvent);
#else
if (mInstance) {
// If this event is going to the plugin, we want to kill it.
// Not actually sending keypress to the plugin, since we didn't before.
@@ -3188,6 +3191,7 @@ nsresult nsPluginInstanceOwner::KeyPress(nsIDOMEvent* aKeyEvent)
return NS_ERROR_FAILURE; // means consume event
}
return NS_OK;
#endif
}
nsresult nsPluginInstanceOwner::DispatchKeyToPlugin(nsIDOMEvent* aKeyEvent)