bug 1316163 - remove eCoalesceMutationTextChange event rule r=davidb

The only difference between it and eCoalesceReorder is that for
eCoalesceReorder we assert the target is one of a outer doc, application
accessible or xul tree.  However we never put events that have
eCoalesceMutationTextChange as there event rule in the queue, so there is no
reason for separate event rules, and we can remove eCoalesceMutationTextChange
and check that queued eCoalesceReorder events are in fact reorder events.
This commit is contained in:
Trevor Saunders 2016-09-02 15:19:04 -04:00
parent ad2208605f
commit f3849011fc
2 changed files with 8 additions and 8 deletions

View File

@ -51,10 +51,6 @@ public:
// node, only the umbrella event on the ancestor will be emitted.
eCoalesceReorder,
// eCoalesceMutationTextChange : coalesce text change events caused by
// tree mutations of the same tree level.
eCoalesceMutationTextChange,
// eCoalesceOfSameType : For events of the same type, only the newest event
// will be processed.
eCoalesceOfSameType,
@ -214,7 +210,7 @@ class AccMutationEvent: public AccEvent
{
public:
AccMutationEvent(uint32_t aEventType, Accessible* aTarget) :
AccEvent(aEventType, aTarget, eAutoDetect, eCoalesceMutationTextChange)
AccEvent(aEventType, aTarget, eAutoDetect, eCoalesceReorder)
{
// Don't coalesce these since they are coalesced by reorder event. Coalesce
// contained text change events.

View File

@ -90,11 +90,15 @@ EventQueue::CoalesceEvents()
switch(tailEvent->mEventRule) {
case AccEvent::eCoalesceReorder:
MOZ_ASSERT(tailEvent->mAccessible->IsApplication() ||
tailEvent->mAccessible->IsOuterDoc() ||
tailEvent->mAccessible->IsXULTree(),
{
DebugOnly<Accessible*> target = tailEvent->mAccessible.get();
MOZ_ASSERT(target->IsApplication() ||
target->IsOuterDoc() ||
target->IsXULTree(),
"Only app or outerdoc accessible reorder events are in the queue");
MOZ_ASSERT(tailEvent->GetEventType() == nsIAccessibleEvent::EVENT_REORDER, "only reorder events should be queued");
break; // case eCoalesceReorder
}
case AccEvent::eCoalesceOfSameType:
{