зеркало из https://github.com/mozilla/pjs.git
Do less QIing of events in WalkHandlersInternal. Bug 237453, r=sicking,
sr=peterv
This commit is contained in:
Родитель
6ce4fac4be
Коммит
5685596b84
|
@ -277,10 +277,11 @@ nsXBLWindowHandler::WalkHandlersInternal(nsIDOMEvent* aEvent,
|
|||
{
|
||||
nsresult rv;
|
||||
nsXBLPrototypeHandler* currHandler = aHandler;
|
||||
nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(aEvent));
|
||||
|
||||
while (currHandler) {
|
||||
|
||||
PRBool stopped;
|
||||
nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(aEvent));
|
||||
privateEvent->IsDispatchStopped(&stopped);
|
||||
if (stopped)
|
||||
return NS_OK;
|
||||
|
@ -291,7 +292,7 @@ nsXBLWindowHandler::WalkHandlersInternal(nsIDOMEvent* aEvent,
|
|||
nsAutoString disabled;
|
||||
|
||||
nsCOMPtr<nsIContent> elt = currHandler->GetHandlerElement();
|
||||
nsCOMPtr<nsIDOMElement> commandElt(do_QueryInterface(elt));
|
||||
nsCOMPtr<nsIDOMElement> commandElt;
|
||||
|
||||
// See if we're in a XUL doc.
|
||||
if (mElement) {
|
||||
|
@ -305,12 +306,16 @@ nsXBLWindowHandler::WalkHandlersInternal(nsIDOMEvent* aEvent,
|
|||
domDoc->GetElementById(command, getter_AddRefs(commandElt));
|
||||
|
||||
if (!commandElt) {
|
||||
NS_ASSERTION(PR_FALSE, "A XUL <key> is observing a command that doesn't exist. Unable to execute key binding!\n");
|
||||
NS_ERROR("A XUL <key> is observing a command that doesn't exist. Unable to execute key binding!\n");
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!commandElt) {
|
||||
commandElt = do_QueryInterface(elt);
|
||||
}
|
||||
|
||||
if (commandElt)
|
||||
commandElt->GetAttribute(NS_LITERAL_STRING("disabled"), disabled);
|
||||
if (!disabled.Equals(NS_LITERAL_STRING("true"))) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче