Bug 610305: decom nsEventStateManager r=smaug
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIEventStateManager.h"
|
||||
#include "nsEventStateManager.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsContentUtils.h"
|
||||
@@ -92,7 +92,7 @@ nsButtonBoxFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
if (NS_KEY_EVENT == aEvent->eventStructType) {
|
||||
nsKeyEvent* keyEvent = (nsKeyEvent*)aEvent;
|
||||
if (NS_VK_SPACE == keyEvent->keyCode) {
|
||||
nsIEventStateManager *esm = aPresContext->EventStateManager();
|
||||
nsEventStateManager *esm = aPresContext->EventStateManager();
|
||||
// :hover:active state
|
||||
esm->SetContentState(mContent, NS_EVENT_STATE_HOVER);
|
||||
esm->SetContentState(mContent, NS_EVENT_STATE_ACTIVE);
|
||||
@@ -121,7 +121,7 @@ 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
|
||||
nsIEventStateManager *esm = aPresContext->EventStateManager();
|
||||
nsEventStateManager *esm = aPresContext->EventStateManager();
|
||||
nsEventStates buttonState = esm->GetContentState(mContent);
|
||||
if (buttonState.HasAllStates(NS_EVENT_STATE_ACTIVE |
|
||||
NS_EVENT_STATE_HOVER)) {
|
||||
|
||||
Reference in New Issue
Block a user