bug 1172525 - rework forwarding events to the parent process r=davidb, lsocks
The set of events fired to platform accessibility is not the same as the set in the event queue. Therefore we should forward events to the parent process someplace where they are the same so the same events can be emitted for child processes.
This commit is contained in:
@@ -480,44 +480,6 @@ EventQueue::CreateTextChangeEventFor(AccMutationEvent* aEvent)
|
||||
aEvent->mIsFromUserInput ? eFromUserInput : eNoUserInput);
|
||||
}
|
||||
|
||||
void
|
||||
EventQueue::SendIPCEvent(AccEvent* aEvent) const
|
||||
{
|
||||
DocAccessibleChild* ipcDoc = mDocument->IPCDoc();
|
||||
uint64_t id = aEvent->GetAccessible()->IsDoc() ? 0 :
|
||||
reinterpret_cast<uintptr_t>(aEvent->GetAccessible());
|
||||
|
||||
switch(aEvent->GetEventType()) {
|
||||
case nsIAccessibleEvent::EVENT_SHOW:
|
||||
ipcDoc->ShowEvent(downcast_accEvent(aEvent));
|
||||
break;
|
||||
|
||||
case nsIAccessibleEvent::EVENT_HIDE:
|
||||
ipcDoc->SendHideEvent(id);
|
||||
break;
|
||||
|
||||
case nsIAccessibleEvent::EVENT_REORDER:
|
||||
// reorder events on the application acc aren't necessary to tell the parent
|
||||
// about new top level documents.
|
||||
if (!aEvent->GetAccessible()->IsApplication())
|
||||
ipcDoc->SendEvent(id, aEvent->GetEventType());
|
||||
break;
|
||||
case nsIAccessibleEvent::EVENT_STATE_CHANGE: {
|
||||
AccStateChangeEvent* event = downcast_accEvent(aEvent);
|
||||
ipcDoc->SendStateChangeEvent(id, event->GetState(),
|
||||
event->IsStateEnabled());
|
||||
break;
|
||||
}
|
||||
case nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED: {
|
||||
AccCaretMoveEvent* event = downcast_accEvent(aEvent);
|
||||
ipcDoc->SendEvent(id, event->GetCaretOffset());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ipcDoc->SendEvent(id, aEvent->GetEventType());
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// EventQueue: event queue
|
||||
|
||||
@@ -594,8 +556,5 @@ EventQueue::ProcessEventQueue()
|
||||
|
||||
if (!mDocument)
|
||||
return;
|
||||
|
||||
if (IPCAccessibilityActive())
|
||||
SendIPCEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user