Bug 1516366 - Move NS_DOCUMENT_NOTIFY_OBSERVERS to nsIDocument.h. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D15364
This commit is contained in:
Emilio Cobos Álvarez 2018-12-26 03:35:04 +01:00
parent 1165f7d4ed
commit e3568cb8ad
2 changed files with 11 additions and 11 deletions

View File

@ -113,17 +113,6 @@ class nsDocument : public nsIDocument {
protected:
friend class nsNodeUtils;
#define NS_DOCUMENT_NOTIFY_OBSERVERS(func_, params_) \
do { \
NS_OBSERVER_ARRAY_NOTIFY_XPCOM_OBSERVERS(mObservers, nsIDocumentObserver, \
func_, params_); \
/* FIXME(emilio): Apparently we can keep observing from the BFCache? That \
looks bogus. */ \
if (nsIPresShell* shell = GetObservingShell()) { \
shell->func_ params_; \
} \
} while (0)
explicit nsDocument(const char* aContentType);
virtual ~nsDocument();

View File

@ -463,6 +463,17 @@ class nsIDocument : public nsINode,
NS_DECL_ADDSIZEOFEXCLUDINGTHIS
#define NS_DOCUMENT_NOTIFY_OBSERVERS(func_, params_) \
do { \
NS_OBSERVER_ARRAY_NOTIFY_XPCOM_OBSERVERS(mObservers, nsIDocumentObserver, \
func_, params_); \
/* FIXME(emilio): Apparently we can keep observing from the BFCache? That \
looks bogus. */ \
if (nsIPresShell* shell = GetObservingShell()) { \
shell->func_ params_; \
} \
} while (0)
#ifdef MOZILLA_INTERNAL_API
nsIDocument();
#endif