key event support in handledomevent
This commit is contained in:
Родитель
ec018a769f
Коммит
48e4ccfaa9
|
@ -2153,14 +2153,14 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
nsString tagName;
|
||||
GetTagName(tagName);
|
||||
if (tagName == "menu" || tagName == "menuitem" ||
|
||||
tagName == "menubar") {
|
||||
tagName == "menubar" || tagName == "key" || tagName == "keyset") {
|
||||
nsCOMPtr<nsIEventListenerManager> listenerManager;
|
||||
if (NS_FAILED(ret = GetListenerManager(getter_AddRefs(listenerManager)))) {
|
||||
NS_ERROR("Unable to instantiate a listener manager on a menu event.");
|
||||
NS_ERROR("Unable to instantiate a listener manager on a menu/key event.");
|
||||
return ret;
|
||||
}
|
||||
if (NS_FAILED(ret = listenerManager->CreateEvent(aPresContext, aEvent, aDOMEvent))) {
|
||||
NS_ERROR("Menu event will fail without the ability to create the event early.");
|
||||
NS_ERROR("Menu/key event will fail without the ability to create the event early.");
|
||||
return ret;
|
||||
}
|
||||
domEvent->SetTarget(this);
|
||||
|
|
|
@ -2153,14 +2153,14 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
nsString tagName;
|
||||
GetTagName(tagName);
|
||||
if (tagName == "menu" || tagName == "menuitem" ||
|
||||
tagName == "menubar") {
|
||||
tagName == "menubar" || tagName == "key" || tagName == "keyset") {
|
||||
nsCOMPtr<nsIEventListenerManager> listenerManager;
|
||||
if (NS_FAILED(ret = GetListenerManager(getter_AddRefs(listenerManager)))) {
|
||||
NS_ERROR("Unable to instantiate a listener manager on a menu event.");
|
||||
NS_ERROR("Unable to instantiate a listener manager on a menu/key event.");
|
||||
return ret;
|
||||
}
|
||||
if (NS_FAILED(ret = listenerManager->CreateEvent(aPresContext, aEvent, aDOMEvent))) {
|
||||
NS_ERROR("Menu event will fail without the ability to create the event early.");
|
||||
NS_ERROR("Menu/key event will fail without the ability to create the event early.");
|
||||
return ret;
|
||||
}
|
||||
domEvent->SetTarget(this);
|
||||
|
|
|
@ -2153,14 +2153,14 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
|
|||
nsString tagName;
|
||||
GetTagName(tagName);
|
||||
if (tagName == "menu" || tagName == "menuitem" ||
|
||||
tagName == "menubar") {
|
||||
tagName == "menubar" || tagName == "key" || tagName == "keyset") {
|
||||
nsCOMPtr<nsIEventListenerManager> listenerManager;
|
||||
if (NS_FAILED(ret = GetListenerManager(getter_AddRefs(listenerManager)))) {
|
||||
NS_ERROR("Unable to instantiate a listener manager on a menu event.");
|
||||
NS_ERROR("Unable to instantiate a listener manager on a menu/key event.");
|
||||
return ret;
|
||||
}
|
||||
if (NS_FAILED(ret = listenerManager->CreateEvent(aPresContext, aEvent, aDOMEvent))) {
|
||||
NS_ERROR("Menu event will fail without the ability to create the event early.");
|
||||
NS_ERROR("Menu/key event will fail without the ability to create the event early.");
|
||||
return ret;
|
||||
}
|
||||
domEvent->SetTarget(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче