diff --git a/content/xbl/src/nsXBLPrototypeHandler.cpp b/content/xbl/src/nsXBLPrototypeHandler.cpp index ffe98af41969..f32f08387c2c 100644 --- a/content/xbl/src/nsXBLPrototypeHandler.cpp +++ b/content/xbl/src/nsXBLPrototypeHandler.cpp @@ -109,13 +109,13 @@ NS_IMPL_ISUPPORTS1(nsXBLPrototypeHandler, nsIXBLPrototypeHandler) NS_IMETHODIMP nsXBLPrototypeHandler::EventMatched(nsIDOMEvent* aEvent, PRBool* aResult) { - nsCOMPtr key(do_QueryInterface(aEvent)); - if (key) - *aResult = KeyEventMatched(key); + nsCOMPtr mouse(do_QueryInterface(aEvent)); + if (mouse) + *aResult = MouseEventMatched(mouse); else { - nsCOMPtr mouse(do_QueryInterface(aEvent)); - if (mouse) - *aResult = MouseEventMatched(mouse); + nsCOMPtr key(do_QueryInterface(aEvent)); + if (key) + *aResult = KeyEventMatched(key); else *aResult = PR_TRUE; } diff --git a/layout/xbl/src/nsXBLPrototypeHandler.cpp b/layout/xbl/src/nsXBLPrototypeHandler.cpp index ffe98af41969..f32f08387c2c 100644 --- a/layout/xbl/src/nsXBLPrototypeHandler.cpp +++ b/layout/xbl/src/nsXBLPrototypeHandler.cpp @@ -109,13 +109,13 @@ NS_IMPL_ISUPPORTS1(nsXBLPrototypeHandler, nsIXBLPrototypeHandler) NS_IMETHODIMP nsXBLPrototypeHandler::EventMatched(nsIDOMEvent* aEvent, PRBool* aResult) { - nsCOMPtr key(do_QueryInterface(aEvent)); - if (key) - *aResult = KeyEventMatched(key); + nsCOMPtr mouse(do_QueryInterface(aEvent)); + if (mouse) + *aResult = MouseEventMatched(mouse); else { - nsCOMPtr mouse(do_QueryInterface(aEvent)); - if (mouse) - *aResult = MouseEventMatched(mouse); + nsCOMPtr key(do_QueryInterface(aEvent)); + if (key) + *aResult = KeyEventMatched(key); else *aResult = PR_TRUE; }