зеркало из https://github.com/mozilla/gecko-dev.git
Only let left btn clicks through for popping up the dialog
b=49904 r=kmcclusk
This commit is contained in:
Родитель
18d89a1b76
Коммит
412b9b55f7
|
@ -53,6 +53,7 @@
|
||||||
#include "nsIComponentManager.h"
|
#include "nsIComponentManager.h"
|
||||||
#include "nsIDOMWindow.h"
|
#include "nsIDOMWindow.h"
|
||||||
#include "nsIFilePicker.h"
|
#include "nsIFilePicker.h"
|
||||||
|
#include "nsIDOMMouseEvent.h"
|
||||||
|
|
||||||
|
|
||||||
static NS_DEFINE_IID(kIFormControlFrameIID, NS_IFORMCONTROLFRAME_IID);
|
static NS_DEFINE_IID(kIFormControlFrameIID, NS_IFORMCONTROLFRAME_IID);
|
||||||
|
@ -236,6 +237,18 @@ nsFileControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
||||||
nsresult
|
nsresult
|
||||||
nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
|
nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||||
{
|
{
|
||||||
|
// only allow the left button
|
||||||
|
nsCOMPtr<nsIDOMMouseEvent> mouseEvent = do_QueryInterface(aMouseEvent);
|
||||||
|
if (mouseEvent) {
|
||||||
|
PRUint16 whichButton;
|
||||||
|
if (NS_SUCCEEDED(mouseEvent->GetButton(&whichButton))) {
|
||||||
|
if (whichButton != 1) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
nsresult result;
|
nsresult result;
|
||||||
|
|
||||||
// Get parent nsIDOMWindow object.
|
// Get parent nsIDOMWindow object.
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
#include "nsIComponentManager.h"
|
#include "nsIComponentManager.h"
|
||||||
#include "nsIDOMWindow.h"
|
#include "nsIDOMWindow.h"
|
||||||
#include "nsIFilePicker.h"
|
#include "nsIFilePicker.h"
|
||||||
|
#include "nsIDOMMouseEvent.h"
|
||||||
|
|
||||||
|
|
||||||
static NS_DEFINE_IID(kIFormControlFrameIID, NS_IFORMCONTROLFRAME_IID);
|
static NS_DEFINE_IID(kIFormControlFrameIID, NS_IFORMCONTROLFRAME_IID);
|
||||||
|
@ -236,6 +237,18 @@ nsFileControlFrame::ScrollIntoView(nsIPresContext* aPresContext)
|
||||||
nsresult
|
nsresult
|
||||||
nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
|
nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||||
{
|
{
|
||||||
|
// only allow the left button
|
||||||
|
nsCOMPtr<nsIDOMMouseEvent> mouseEvent = do_QueryInterface(aMouseEvent);
|
||||||
|
if (mouseEvent) {
|
||||||
|
PRUint16 whichButton;
|
||||||
|
if (NS_SUCCEEDED(mouseEvent->GetButton(&whichButton))) {
|
||||||
|
if (whichButton != 1) {
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
nsresult result;
|
nsresult result;
|
||||||
|
|
||||||
// Get parent nsIDOMWindow object.
|
// Get parent nsIDOMWindow object.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче