зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
48f3c37147
Коммит
246b1b3bf4
|
@ -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",
|
||||
|
|
Загрузка…
Ссылка в новой задаче