When switching from a tab to another, accessibility layers needs to get
events about the tab switch before events about the newly-focused
element of the document.
This changeset does it so by first making IsUpdatePending() not only
watch for the document's pending updates, but also its parent's pending
updates, so that the document doesn't process focus events immediately,
but queue them.
Then, WillRefresh for the document should not process events until its
parent chrome has finished processing its content insertion events
(corresponding to the tab switch).
Eventually, ScheduleContentInsertion can not afford leaving an empty
array of notifications and not a schedule processing any more.
(was introduced by c2aeece5eb10 'Bug 1242989 - keep content insertions
in a hash')
This patch makes the following changes to the macros.
- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
mostly misused.
- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
universally available now anyway.
- Combines the first two string literal arguments of PROFILER_LABEL and
PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
them to be separate, and it forced a '::' in the label, which isn't always
appropriate. Also, the meaning of the "name_space" argument was interpreted
in an interesting variety of ways.
- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
it clearer they construct RAII objects rather than just being function calls.
(I myself have screwed up the scoping because of this in the past.)
- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
the caller doesn't need to. This makes a *lot* more of the uses fit onto a
single line.
The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).
- Fixes a bunch of labels that had gotten out of sync with the name of the
class and/or function that encloses them.
- Removes a useless PROFILER_LABEL use within a trivial scope in
EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
a good idea.
- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
done within them, instead of at their callsites, because that's a more
standard way of doing things.
--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
In content processes, we want to avoid a situation where a DocAccessible has lost its IPC actor (DocAccessibleChild) but finds itself processing a delayed request to take on child documents. In this case, we shut down the child documents as they are no longer valid.
The Manager is set by IPDL for remotely constructed objects but our DocAccessibleChilds are created on the child process side, so we need to assign a manager in the constructor so that we can find it when needed.
--HG--
extra : rebase_source : 8bf76534860ed73fbdc71df494130f6028400fa3
Its possible to coalesce away events such that the first two events in the
queue are reorder events where the second reorder can be coalesced with the
first. In that case there's no point in shuffling the list before removing
the second reorder event.
This puts events in the queue instead of the event tree, and then fires them
based on the queue. Some tests need to be adjusted to make sure they check
constraints on event order correctly.
Mutation events are kept in a queue before firing. The queue is only
coalesced when necessary, at present this is when queueing a hide event, or
just before firing all the events. It may be possible to do without the
former, but that is left as future work. The state of what types of events an
accessible is a target of is stored in the accessible. Combining that with a
map from accessible and type pairs to events we can quickly remove unnecessary
events from the queue when we need to coalesce.
This puts events in the queue instead of the event tree, and then fires them
based on the queue. Some tests need to be adjusted to make sure they check
constraints on event order correctly.
Mutation events are kept in a queue before firing. The queue is only
coalesced when necessary, at present this is when queueing a hide event, or
just before firing all the events. It may be possible to do without the
former, but that is left as future work. The state of what types of events an
accessible is a target of is stored in the accessible. Combining that with a
map from accessible and type pairs to events we can quickly remove unnecessary
events from the queue when we need to coalesce.