Bug 578696 part 2. Make nsXMLEventsManager inherit from nsStubDocumentObserver. r=sicking

This commit is contained in:
Boris Zbarsky 2010-07-21 11:33:31 -04:00
Родитель c73bd48306
Коммит 17811f12e2
2 изменённых файлов: 10 добавлений и 32 удалений

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

@ -315,10 +315,6 @@ void nsXMLEventsManager::AddListeners(nsIDocument* aDocument)
}
}
void
nsXMLEventsManager::BeginUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType) {}
void
nsXMLEventsManager::EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType) {}
void
nsXMLEventsManager::NodeWillBeDestroyed(const nsINode* aNode)
{
@ -327,29 +323,12 @@ nsXMLEventsManager::NodeWillBeDestroyed(const nsINode* aNode)
mListeners.Clear();
}
void
nsXMLEventsManager::BeginLoad(nsIDocument* aDocument) {}
void
nsXMLEventsManager::EndLoad(nsIDocument* aDocument)
{
AddListeners(aDocument);
}
NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(nsXMLEventsManager)
void
nsXMLEventsManager::CharacterDataWillChange(nsIDocument* aDocument,
nsIContent* aContent,
CharacterDataChangeInfo* aInfo) {}
void
nsXMLEventsManager::CharacterDataChanged(nsIDocument* aDocument,
nsIContent* aContent,
CharacterDataChangeInfo* aInfo) {}
void
nsXMLEventsManager::AttributeWillChange(nsIDocument* aDocument,
nsIContent* aContent,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aModType) {}
void
nsXMLEventsManager::AttributeChanged(nsIDocument* aDocument,
nsIContent* aContent,
@ -437,11 +416,3 @@ nsXMLEventsManager::ContentRemoved(nsIDocument* aDocument,
ContentRemoved(aDocument, aChild, aChild->GetChildAt(i), i);
}
}
void
nsXMLEventsManager::ParentChainChanged(nsIContent *aContent)
{
}
NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(nsXMLEventsManager)

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

@ -46,6 +46,7 @@
#include "nsIDOMEventListener.h"
#include "nsInterfaceHashtable.h"
#include "nsIAtom.h"
#include "nsStubDocumentObserver.h"
/*
* The implementation of the XML Events Basic profile
@ -89,12 +90,18 @@ private:
};
class nsXMLEventsManager : public nsIDocumentObserver {
class nsXMLEventsManager : public nsStubDocumentObserver {
public:
nsXMLEventsManager();
~nsXMLEventsManager();
NS_DECL_ISUPPORTS
NS_DECL_NSIDOCUMENTOBSERVER
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
virtual void EndLoad(nsIDocument* aDocument);
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
void AddXMLEventsContent(nsIContent * aContent);
void RemoveXMLEventsContent(nsIContent * aContent);