that doesn't seem to be the problem. restoring over last revision.

This commit is contained in:
danm-moz%comcast.net 2004-02-03 20:07:39 +00:00
Родитель f0b20d4f3c
Коммит e5582e74d7
3 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -2450,6 +2450,7 @@ nsEventStateManager::DispatchMouseEvent(nsIPresContext* aPresContext,
mCurrentRelatedContent = aRelatedContent;
BeforeDispatchEvent();
CurrentEventShepherd shepherd(this, &event);
if (aTargetContent) {
aTargetContent->HandleDOMEvent(aPresContext, &event, nsnull,
NS_EVENT_FLAG_INIT, &status);
@ -2501,6 +2502,7 @@ nsEventStateManager::MaybeDispatchMouseEventToIframe(
event.isMeta = ((nsMouseEvent*)aEvent)->isMeta;
event.nativeMsg = ((nsMouseEvent*)aEvent)->nativeMsg;
CurrentEventShepherd shepherd(this, &event);
parentShell->HandleDOMEventWithTarget(docContent, &event, &status);
}
}
@ -4036,6 +4038,8 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext,
if (previousFocus && !previousFocus->GetDocument())
previousFocus = nsnull;
CurrentEventShepherd shepherd(this);
if (nsnull != gLastFocusedPresContext) {
nsCOMPtr<nsIContent> focusAfterBlur;
@ -4069,6 +4073,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext,
//fire blur
nsEventStatus status = nsEventStatus_eIgnore;
nsEvent event(NS_BLUR_CONTENT);
shepherd.SetCurrentEvent(&event);
EnsureDocument(presShell);
@ -4125,6 +4130,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext,
if (gLastFocusedDocument && (gLastFocusedDocument != mDocument) && globalObject) {
nsEventStatus status = nsEventStatus_eIgnore;
nsEvent event(NS_BLUR_CONTENT);
shepherd.SetCurrentEvent(&event);
// Make sure we're not switching command dispatchers, if so, surpress the blurred one
if (mDocument) {
@ -4211,6 +4217,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext,
//fire focus
nsEventStatus status = nsEventStatus_eIgnore;
nsEvent event(NS_FOCUS_CONTENT);
shepherd.SetCurrentEvent(&event);
if (nsnull != mPresContext) {
nsCxPusher pusher(aContent);
@ -4232,6 +4239,7 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext,
//see bugzilla bug 93521
nsEventStatus status = nsEventStatus_eIgnore;
nsEvent event(NS_FOCUS_CONTENT);
shepherd.SetCurrentEvent(&event);
if (nsnull != mPresContext && mDocument) {
nsCxPusher pusher(mDocument);

Просмотреть файл

@ -6083,6 +6083,9 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView,
// 1. Give event to event manager for pre event state changes and
// generation of synthetic events.
nsEvent *managerOldEvent;
manager->GetCurrentEvent(&managerOldEvent);
manager->SetCurrentEvent(aEvent); // don't fail to restore this later
rv = manager->PreHandleEvent(mPresContext, aEvent, mCurrentEventFrame,
aStatus, aView);
@ -6145,6 +6148,7 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView,
aStatus, aView);
}
}
manager->SetCurrentEvent(managerOldEvent);
}
return rv;
}

Просмотреть файл

@ -6083,6 +6083,9 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView,
// 1. Give event to event manager for pre event state changes and
// generation of synthetic events.
nsEvent *managerOldEvent;
manager->GetCurrentEvent(&managerOldEvent);
manager->SetCurrentEvent(aEvent); // don't fail to restore this later
rv = manager->PreHandleEvent(mPresContext, aEvent, mCurrentEventFrame,
aStatus, aView);
@ -6145,6 +6148,7 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView,
aStatus, aView);
}
}
manager->SetCurrentEvent(managerOldEvent);
}
return rv;
}