temporary patch to the forms controls to ignore mouse events when in

printpreview until Bug 124990 gets fixed (radio and checkbox doesn't need the fix)
this code will be removed via bug 146399
Bug 129002 r=dcone sr=attinasi
This commit is contained in:
rods%netscape.com 2002-05-23 11:25:58 +00:00
Родитель 48f3c37147
Коммит 246b1b3bf4
8 изменённых файлов: 66 добавлений и 0 удалений

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

@ -2091,6 +2091,13 @@ nsComboboxControlFrame::HandleEvent(nsIPresContext* aPresContext,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
// temp fix until Bug 124990 gets fixed
PRBool isPaginated = PR_FALSE;
aPresContext->IsPaginated(&isPaginated);
if (isPaginated && NS_IS_MOUSE_EVENT(aEvent)) {
return NS_OK;
}
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
return NS_OK;
}

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

@ -49,6 +49,8 @@
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
#include "nsLayoutAtoms.h"
// MouseEvent suppression in PP
#include "nsGUIEvent.h"
static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID);
@ -628,6 +630,12 @@ nsGfxButtonControlFrame::HandleEvent(nsIPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
// temp fix until Bug 124990 gets fixed
PRBool isPaginated = PR_FALSE;
aPresContext->IsPaginated(&isPaginated);
if (isPaginated && NS_IS_MOUSE_EVENT(aEvent)) {
return NS_OK;
}
// Override the HandleEvent to prevent the nsFrame::HandleEvent
// from being called. The nsFrame::HandleEvent causes the button label
// to be selected (Drawn with an XOR rectangle over the label)

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

@ -1562,6 +1562,12 @@ nsListControlFrame::HandleEvent(nsIPresContext* aPresContext,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
// temp fix until Bug 124990 gets fixed
PRBool isPaginated = PR_FALSE;
aPresContext->IsPaginated(&isPaginated);
if (isPaginated && NS_IS_MOUSE_EVENT(aEvent)) {
return NS_OK;
}
/*const char * desc[] = {"NS_MOUSE_MOVE",
"NS_MOUSE_LEFT_BUTTON_UP",

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

@ -2091,6 +2091,13 @@ nsComboboxControlFrame::HandleEvent(nsIPresContext* aPresContext,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
// temp fix until Bug 124990 gets fixed
PRBool isPaginated = PR_FALSE;
aPresContext->IsPaginated(&isPaginated);
if (isPaginated && NS_IS_MOUSE_EVENT(aEvent)) {
return NS_OK;
}
if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
return NS_OK;
}

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

@ -49,6 +49,8 @@
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
#include "nsLayoutAtoms.h"
// MouseEvent suppression in PP
#include "nsGUIEvent.h"
static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID);
@ -628,6 +630,12 @@ nsGfxButtonControlFrame::HandleEvent(nsIPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
// temp fix until Bug 124990 gets fixed
PRBool isPaginated = PR_FALSE;
aPresContext->IsPaginated(&isPaginated);
if (isPaginated && NS_IS_MOUSE_EVENT(aEvent)) {
return NS_OK;
}
// Override the HandleEvent to prevent the nsFrame::HandleEvent
// from being called. The nsFrame::HandleEvent causes the button label
// to be selected (Drawn with an XOR rectangle over the label)

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

@ -3517,3 +3517,23 @@ nsGfxTextControlFrame2::SetValueChanged(PRBool aValueChanged)
elem->SetValueChanged(aValueChanged);
}
}
NS_IMETHODIMP
nsGfxTextControlFrame2::HandleEvent(nsIPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
// temp fix until Bug 124990 gets fixed
PRBool isPaginated = PR_FALSE;
aPresContext->IsPaginated(&isPaginated);
if (isPaginated && NS_IS_MOUSE_EVENT(aEvent)) {
return NS_OK;
}
return nsStackFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
}

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

@ -96,6 +96,10 @@ public:
nsFramePaintLayer aWhichLayer,
nsIFrame** aFrame);
NS_IMETHOD HandleEvent(nsIPresContext* aPresContext,
nsGUIEvent* aEvent,
nsEventStatus* aEventStatus);
NS_IMETHOD GetPrefSize(nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);
NS_IMETHOD GetMinSize(nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);
NS_IMETHOD GetMaxSize(nsBoxLayoutState& aBoxLayoutState, nsSize& aSize);

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

@ -1562,6 +1562,12 @@ nsListControlFrame::HandleEvent(nsIPresContext* aPresContext,
nsEventStatus* aEventStatus)
{
NS_ENSURE_ARG_POINTER(aEventStatus);
// temp fix until Bug 124990 gets fixed
PRBool isPaginated = PR_FALSE;
aPresContext->IsPaginated(&isPaginated);
if (isPaginated && NS_IS_MOUSE_EVENT(aEvent)) {
return NS_OK;
}
/*const char * desc[] = {"NS_MOUSE_MOVE",
"NS_MOUSE_LEFT_BUTTON_UP",