mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 01:10:22 +00:00
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:
parent
ad2208605f
commit
f3849011fc
@ -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.
|
||||
|
@ -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:
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user