From e2e9b68edd4e3079c213019ec5dfa2ec94df4942 Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Tue, 28 Jun 2005 15:42:22 +0000 Subject: [PATCH] Backing out bug 298894 git-svn-id: svn://10.0.0.236/trunk@175221 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp | 5 ----- mozilla/toolkit/content/widgets/button.xml | 3 +++ mozilla/toolkit/content/widgets/dialog.xml | 9 ++++++++- .../xpfe/global/resources/content/bindings/button.xml | 3 +++ .../xpfe/global/resources/content/bindings/dialog.xml | 3 ++- .../xpfe/global/resources/content/mac/platformDialog.xml | 4 ++++ 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp b/mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp index 23f43d73216..27a148557e2 100644 --- a/mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsButtonBoxFrame.cpp @@ -48,7 +48,6 @@ #include "nsPresContext.h" #include "nsIPresShell.h" #include "nsGUIEvent.h" -#include "nsIDOMEvent.h" #include "nsIEventStateManager.h" #include "nsXULAtoms.h" #include "nsIDOMElement.h" @@ -113,8 +112,6 @@ nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext, } break; -// On mac, Return fires the defualt button, not the focused one. -#ifndef XP_MACOSX case NS_KEY_PRESS: if (NS_KEY_EVENT == aEvent->eventStructType) { nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent; @@ -122,12 +119,10 @@ nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext, nsCOMPtr buttonEl(do_QueryInterface(mContent)); if (buttonEl) { MouseClicked(aPresContext, aEvent); - aEvent->PreventDefault(); } } } break; -#endif case NS_KEY_UP: if (NS_KEY_EVENT == aEvent->eventStructType) { diff --git a/mozilla/toolkit/content/widgets/button.xml b/mozilla/toolkit/content/widgets/button.xml index 05128bc53f9..681dd07e202 100644 --- a/mozilla/toolkit/content/widgets/button.xml +++ b/mozilla/toolkit/content/widgets/button.xml @@ -170,6 +170,9 @@ this.fireAccessKeyButton(buttonBox, charPressedLower); ]]> + + + diff --git a/mozilla/toolkit/content/widgets/dialog.xml b/mozilla/toolkit/content/widgets/dialog.xml index c557628debf..07dac14a55f 100644 --- a/mozilla/toolkit/content/widgets/dialog.xml +++ b/mozilla/toolkit/content/widgets/dialog.xml @@ -47,6 +47,13 @@ if (!document.documentElement.cancelDialog()) event.preventDefault(); }) + +#ifdef XP_MACOSX + true +#else + false +#endif + + + + diff --git a/mozilla/xpfe/global/resources/content/bindings/dialog.xml b/mozilla/xpfe/global/resources/content/bindings/dialog.xml index 31752390dfc..29c999d29e2 100644 --- a/mozilla/xpfe/global/resources/content/bindings/dialog.xml +++ b/mozilla/xpfe/global/resources/content/bindings/dialog.xml @@ -35,6 +35,7 @@ if (!document.documentElement.cancelDialog()) event.preventDefault(); }) + false + + true + +