From 58ba5b055eaffe57ecb75d3a6775f0b414b6161b Mon Sep 17 00:00:00 2001 From: "peterlubczynski%netscape.com" Date: Wed, 20 Feb 2002 03:23:50 +0000 Subject: [PATCH] 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 --- mozilla/layout/generic/nsObjectFrame.cpp | 4 ++++ mozilla/layout/html/base/src/nsObjectFrame.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 90f2239cfc8..d54e7a46ae3 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -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) diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index 90f2239cfc8..d54e7a46ae3 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -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)