зеркало из https://github.com/mozilla/gecko-dev.git
Eliminating warning for non-compliant XBL event handlers.
This commit is contained in:
Родитель
3b60037bfe
Коммит
34afd36343
|
@ -644,10 +644,10 @@ nsXBLBinding::InstallEventHandlers(nsIContent* aBoundElement, nsIXBLBinding** aB
|
|||
mouse = key = focus = xul = scroll = form = PR_FALSE;
|
||||
|
||||
if (!special) {
|
||||
mouse = IsMouseHandler(type);
|
||||
if (!mouse) {
|
||||
key = IsKeyHandler(type);
|
||||
if (!key) {
|
||||
key = IsKeyHandler(type);
|
||||
if (!key) {
|
||||
mouse = IsMouseHandler(type);
|
||||
if (!mouse) {
|
||||
focus = IsFocusHandler(type);
|
||||
if (!focus) {
|
||||
xul = IsXULHandler(type);
|
||||
|
|
|
@ -611,18 +611,18 @@ nsXBLEventHandler::RemoveEventHandlers()
|
|||
handlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kEventAtom, type);
|
||||
|
||||
// Figure out our type.
|
||||
PRBool mouse = nsXBLBinding::IsMouseHandler(type);
|
||||
if (mouse) {
|
||||
mEventReceiver->RemoveEventListener(type, (nsIDOMMouseListener*)this, useCapture);
|
||||
return;
|
||||
}
|
||||
|
||||
PRBool key = nsXBLBinding::IsKeyHandler(type);
|
||||
if (key) {
|
||||
mEventReceiver->RemoveEventListener(type, (nsIDOMKeyListener*)this, useCapture);
|
||||
return;
|
||||
}
|
||||
|
||||
PRBool mouse = nsXBLBinding::IsMouseHandler(type);
|
||||
if (mouse) {
|
||||
mEventReceiver->RemoveEventListener(type, (nsIDOMMouseListener*)this, useCapture);
|
||||
return;
|
||||
}
|
||||
|
||||
PRBool focus = nsXBLBinding::IsFocusHandler(type);
|
||||
if (focus) {
|
||||
mEventReceiver->RemoveEventListener(type, (nsIDOMFocusListener*)this, useCapture);
|
||||
|
|
|
@ -644,10 +644,10 @@ nsXBLBinding::InstallEventHandlers(nsIContent* aBoundElement, nsIXBLBinding** aB
|
|||
mouse = key = focus = xul = scroll = form = PR_FALSE;
|
||||
|
||||
if (!special) {
|
||||
mouse = IsMouseHandler(type);
|
||||
if (!mouse) {
|
||||
key = IsKeyHandler(type);
|
||||
if (!key) {
|
||||
key = IsKeyHandler(type);
|
||||
if (!key) {
|
||||
mouse = IsMouseHandler(type);
|
||||
if (!mouse) {
|
||||
focus = IsFocusHandler(type);
|
||||
if (!focus) {
|
||||
xul = IsXULHandler(type);
|
||||
|
|
|
@ -611,18 +611,18 @@ nsXBLEventHandler::RemoveEventHandlers()
|
|||
handlerElement->GetAttribute(kNameSpaceID_None, nsXBLBinding::kEventAtom, type);
|
||||
|
||||
// Figure out our type.
|
||||
PRBool mouse = nsXBLBinding::IsMouseHandler(type);
|
||||
if (mouse) {
|
||||
mEventReceiver->RemoveEventListener(type, (nsIDOMMouseListener*)this, useCapture);
|
||||
return;
|
||||
}
|
||||
|
||||
PRBool key = nsXBLBinding::IsKeyHandler(type);
|
||||
if (key) {
|
||||
mEventReceiver->RemoveEventListener(type, (nsIDOMKeyListener*)this, useCapture);
|
||||
return;
|
||||
}
|
||||
|
||||
PRBool mouse = nsXBLBinding::IsMouseHandler(type);
|
||||
if (mouse) {
|
||||
mEventReceiver->RemoveEventListener(type, (nsIDOMMouseListener*)this, useCapture);
|
||||
return;
|
||||
}
|
||||
|
||||
PRBool focus = nsXBLBinding::IsFocusHandler(type);
|
||||
if (focus) {
|
||||
mEventReceiver->RemoveEventListener(type, (nsIDOMFocusListener*)this, useCapture);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "nsIDOMMenuListener.h"
|
||||
#include "nsIDOMFocusListener.h"
|
||||
#include "nsIDOMScrollListener.h"
|
||||
#include "nsIDOMFormListener.h"
|
||||
|
||||
class nsIXBLBinding;
|
||||
class nsIDOMEvent;
|
||||
|
@ -46,7 +47,8 @@ class nsXBLEventHandler : public nsIDOMKeyListener,
|
|||
public nsIDOMMouseListener,
|
||||
public nsIDOMMenuListener,
|
||||
public nsIDOMFocusListener,
|
||||
public nsIDOMScrollListener
|
||||
public nsIDOMScrollListener,
|
||||
public nsIDOMFormListener
|
||||
{
|
||||
public:
|
||||
nsXBLEventHandler(nsIDOMEventReceiver* aReceiver, nsIXBLPrototypeHandler* aHandler, const nsString& aEventName);
|
||||
|
@ -85,6 +87,13 @@ public:
|
|||
NS_IMETHOD Underflow(nsIDOMEvent* aEvent);
|
||||
NS_IMETHOD OverflowChanged(nsIDOMEvent* aEvent);
|
||||
|
||||
// form
|
||||
virtual nsresult Submit(nsIDOMEvent* aEvent);
|
||||
virtual nsresult Reset(nsIDOMEvent* aEvent);
|
||||
virtual nsresult Change(nsIDOMEvent* aEvent);
|
||||
virtual nsresult Select(nsIDOMEvent* aEvent);
|
||||
virtual nsresult Input(nsIDOMEvent* aEvent);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
public:
|
||||
|
|
Загрузка…
Ссылка в новой задаче