mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 931399 - shutdown DocAccessibles in nsDocumentViewer::Destroy r=bz
This commit is contained in:
parent
1dfe0d31a7
commit
504c05cb4a
@ -9,6 +9,7 @@
|
||||
#define mozilla_a11y_IUnknownImpl_h_
|
||||
|
||||
#include <windows.h>
|
||||
#undef CreateEvent // thank you windows you're such a helper
|
||||
#include "nsError.h"
|
||||
|
||||
// Avoid warning C4509 like "nonstandard extension used:
|
||||
|
@ -33,6 +33,9 @@
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsLayoutStylesheetCache.h"
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "mozilla/a11y/DocAccessible.h"
|
||||
#endif
|
||||
#include "mozilla/BasicEvents.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/EncodingUtils.h"
|
||||
@ -1565,6 +1568,16 @@ nsDocumentViewer::Destroy()
|
||||
// cache ourselves.
|
||||
shEntry->SyncPresentationState();
|
||||
|
||||
// Shut down accessibility for the document before we start to tear it down.
|
||||
#ifdef ACCESSIBILITY
|
||||
if (mPresShell) {
|
||||
a11y::DocAccessible* docAcc = mPresShell->GetDocAccessible();
|
||||
if (docAcc) {
|
||||
docAcc->Shutdown();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Break the link from the document/presentation to the docshell, so that
|
||||
// link traversals cannot affect the currently-loaded document.
|
||||
// When the presentation is restored, Open() and InitInternal() will reset
|
||||
|
Loading…
Reference in New Issue
Block a user