bug 1348148 - try and avoid firing load events on unloaded documents r=davidb

It is awkward to need to have a DocAccessibleChild to send events with before
DocAccessible::DoInitialUpdate() is called because we might not have a
TabParent for the document until then.  However we could try to fire reload
events on documents before DoInitialUpdate() was called which would require
having a DocAccessibleChild there to send the load event to the parent process.

However before DocAccessible::DoInitialUpdate() is called the document already
has a pending load event.  If a document hasn't yet been the subject of a load
event it doesn't make a lot of sense to fire a reload event for that document,
      and then the initial load event.  So it should be safe to skip firing
      reload events for documents where mLoadEvent specifies a load event to
      fire in the future.
This commit is contained in:
Trevor Saunders 2017-03-14 14:36:06 -04:00
Родитель d591d3c595
Коммит dcced28484
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1455,7 +1455,7 @@ DocAccessible::NotifyOfLoading(bool aIsReloading)
if (!IsLoadEventTarget())
return;
if (aIsReloading) {
if (aIsReloading && !mLoadEventType) {
// Fire reload and state busy events on existing document accessible while
// event from user input flag can be calculated properly and accessible
// is alive. When new document gets loaded then this one is destroyed.