From 53583a3df9a429a7c30415d37aae8e8ddbb7f625 Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Fri, 2 Mar 2001 18:39:22 +0000 Subject: [PATCH] Fix smoketest blocker bug 70683 by making some changes blake missed with his fix for bug 60703. r=mao sr=alecf a=kysmith git-svn-id: svn://10.0.0.236/trunk@88406 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsFileControlFrame.cpp | 2 +- mozilla/layout/forms/nsListControlFrame.cpp | 2 +- .../html/forms/src/nsFileControlFrame.cpp | 2 +- .../html/forms/src/nsGfxListControlFrame.cpp | 2 +- .../html/forms/src/nsGfxTextControlFrame.cpp | 24 +++++++++---------- .../html/forms/src/nsListControlFrame.cpp | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index c050d389a06..43e6d225e11 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -253,7 +253,7 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent) if (mouseEvent) { PRUint16 whichButton; if (NS_SUCCEEDED(mouseEvent->GetButton(&whichButton))) { - if (whichButton != 1) { + if (whichButton != 0) { return NS_OK; } } diff --git a/mozilla/layout/forms/nsListControlFrame.cpp b/mozilla/layout/forms/nsListControlFrame.cpp index 49bfabad14e..cd0919334fc 100644 --- a/mozilla/layout/forms/nsListControlFrame.cpp +++ b/mozilla/layout/forms/nsListControlFrame.cpp @@ -3051,7 +3051,7 @@ nsListControlFrame::IsLeftButton(nsIDOMEvent* aMouseEvent) if (mouseEvent) { PRUint16 whichButton; if (NS_SUCCEEDED(mouseEvent->GetButton(&whichButton))) { - return whichButton != 1?PR_FALSE:PR_TRUE; + return whichButton != 0?PR_FALSE:PR_TRUE; } } return PR_FALSE; diff --git a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp index c050d389a06..43e6d225e11 100644 --- a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp @@ -253,7 +253,7 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent) if (mouseEvent) { PRUint16 whichButton; if (NS_SUCCEEDED(mouseEvent->GetButton(&whichButton))) { - if (whichButton != 1) { + if (whichButton != 0) { return NS_OK; } } diff --git a/mozilla/layout/html/forms/src/nsGfxListControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxListControlFrame.cpp index f411b67b25c..b547f683a05 100644 --- a/mozilla/layout/html/forms/src/nsGfxListControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxListControlFrame.cpp @@ -3016,7 +3016,7 @@ nsGfxListControlFrame::IsLeftButton(nsIDOMEvent* aMouseEvent) if (mouseEvent) { PRUint16 whichButton; if (NS_SUCCEEDED(mouseEvent->GetButton(&whichButton))) { - return whichButton != 1?PR_FALSE:PR_TRUE; + return whichButton != 0?PR_FALSE:PR_TRUE; } } return PR_FALSE; diff --git a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp index 2c7c5298367..84617b44d3f 100644 --- a/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp @@ -4271,10 +4271,10 @@ nsEnderEventListener::MouseDown(nsIDOMEvent* aEvent) PRInt32 eventType; switch(button) { - case 1: //XXX: I can't believe there isn't a symbol for this! + case 0: //XXX: I can't believe there isn't a symbol for this! eventType = NS_MOUSE_LEFT_BUTTON_DOWN; break; - case 2: //XXX: I can't believe there isn't a symbol for this! + case 1: //XXX: I can't believe there isn't a symbol for this! eventType = NS_MOUSE_MIDDLE_BUTTON_DOWN; // XXX See bug 23336: the ender event listener is superfluous, // causing double mouse click events to get through. @@ -4282,7 +4282,7 @@ nsEnderEventListener::MouseDown(nsIDOMEvent* aEvent) // Arguably, the whole event listener should be disabled, // or at least rewritten; we'll look into that post-M14. return NS_OK; - case 3: //XXX: I can't believe there isn't a symbol for this! + case 2: //XXX: I can't believe there isn't a symbol for this! // XXX See bug 27827 -- we need to disable right clicks // just like we disabled middle clicks. eventType = NS_MOUSE_RIGHT_BUTTON_DOWN; @@ -4315,13 +4315,13 @@ nsEnderEventListener::MouseUp(nsIDOMEvent* aEvent) PRInt32 eventType; switch(button) { - case 1: + case 0: eventType = NS_MOUSE_LEFT_BUTTON_UP; break; - case 2: + case 1: eventType = NS_MOUSE_MIDDLE_BUTTON_UP; break; - case 3: + case 2: eventType = NS_MOUSE_RIGHT_BUTTON_UP; break; default: @@ -4352,13 +4352,13 @@ nsEnderEventListener::MouseClick(nsIDOMEvent* aEvent) PRInt32 eventType; switch(button) { - case 1: + case 0: eventType = NS_MOUSE_LEFT_CLICK; break; - case 2: + case 1: eventType = NS_MOUSE_MIDDLE_CLICK; break; - case 3: + case 2: eventType = NS_MOUSE_RIGHT_CLICK; break; default: @@ -4389,13 +4389,13 @@ nsEnderEventListener::MouseDblClick(nsIDOMEvent* aEvent) PRInt32 eventType; switch(button) { - case 1: + case 0: eventType = NS_MOUSE_LEFT_DOUBLECLICK; break; - case 2: + case 1: eventType = NS_MOUSE_MIDDLE_DOUBLECLICK; break; - case 3: + case 2: eventType = NS_MOUSE_RIGHT_DOUBLECLICK; break; default: diff --git a/mozilla/layout/html/forms/src/nsListControlFrame.cpp b/mozilla/layout/html/forms/src/nsListControlFrame.cpp index 49bfabad14e..cd0919334fc 100644 --- a/mozilla/layout/html/forms/src/nsListControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsListControlFrame.cpp @@ -3051,7 +3051,7 @@ nsListControlFrame::IsLeftButton(nsIDOMEvent* aMouseEvent) if (mouseEvent) { PRUint16 whichButton; if (NS_SUCCEEDED(mouseEvent->GetButton(&whichButton))) { - return whichButton != 1?PR_FALSE:PR_TRUE; + return whichButton != 0?PR_FALSE:PR_TRUE; } } return PR_FALSE;