Bug 595036 (2/2) - Introduce nsEventStates class to represent event states. r+a=bz
This commit is contained in:
@@ -121,10 +121,10 @@ nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent;
|
||||
if (NS_VK_SPACE == keyEvent->keyCode) {
|
||||
// only activate on keyup if we're already in the :hover:active state
|
||||
const PRInt32 activeHover = NS_EVENT_STATE_ACTIVE | NS_EVENT_STATE_HOVER;
|
||||
const nsEventStates activeHover = NS_EVENT_STATE_ACTIVE | NS_EVENT_STATE_HOVER;
|
||||
nsIEventStateManager *esm = aPresContext->EventStateManager();
|
||||
PRInt32 buttonState = esm->GetContentState(mContent);
|
||||
if ((buttonState & activeHover) == activeHover) {
|
||||
nsEventStates buttonState = esm->GetContentState(mContent);
|
||||
if (buttonState.HasAllStates(activeHover)) {
|
||||
esm->SetContentState(nsnull, activeHover); // return to normal state
|
||||
MouseClicked(aPresContext, aEvent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user