Closed Bug 392987 Opened 17 years ago Closed 8 years ago

Avoid redundant text change events


(Core :: Disability Access APIs, defect)

Not set





(Reporter: aaronlev, Unassigned)


(Blocks 2 open bugs)


(Keywords: access, Whiteboard: [auto-closed:inactivity])

This is a follow-up bug to the other text change event work happening.

1. If 2 adjacent objects are deleted or inserted next to each other at the same time, such as "c" and "d" in "abcdef", we should try to make sure only 1 text change event is fired
2. If 2 nodes are joined (JoinNodes()) we should not fire a delete and then an insert. In fact we shouldn't fire anything if the text in the hypertext did not actually change. For example, for abc<img>def, if the <img> is deleted then only a single text-change::removed event for the embedded object char should be fired.
3. If 2 nodes are split, we should also be intelligent about removing extra events from the queue.

We probably need to do several things:
1) Store oldText and newText with the actual event. This will allow us to fire all events as delayed and still report the appropriate text.
2) If all text change events are delayed then we can try to merge them in FireDelayedAccessibleEvent(). For example, if there is a delete from 1-2 and another delete from 3-4 we can make it a single delete from 1-4

#1 is difficult for because we will need to store text with the event. On Linux we can send that on event data, but on Windows we will need to be able to map back to the event. We might need a circular array of hypertexts and their oldText/newText. Or we can just keep track of the most recent one.

Maybe there is some way to do this without doing #1, but either way we should be able to solve this bug.
Putting all text change events on a delay will also help make sure that text changes from focus don't provide a confusing event order, where the text change occurs first and then the focus event (it's really the other way around).
Mass un-assigning bugs assigned to Aaron.
Assignee: aaronleventhal → nobody
Note: now we coalesce insert/remove text events for sibling embedded accessibles. We should do the same for inserted/removed characters and smart stuffs for JoinNodes() and etc.
AUTO-CLOSED. This bug untouched for over 2000 days. Please reopen if you can confirm the bug and help it progress.
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Whiteboard: [auto-closed:inactivity]
You need to log in before you can comment on or make changes to this bug.