Bug 610305: decom nsEventStateManager r=smaug

This commit is contained in:
David Zbarsky
2011-04-21 19:35:52 +02:00
parent 3806106727
commit 36a6ae632d
95 changed files with 229 additions and 424 deletions

View File

@@ -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)) {