diff --git a/widget/src/cocoa/nsMenuBarX.cpp b/widget/src/cocoa/nsMenuBarX.cpp index a89502ab63a3..05295b0148e1 100644 --- a/widget/src/cocoa/nsMenuBarX.cpp +++ b/widget/src/cocoa/nsMenuBarX.cpp @@ -726,6 +726,10 @@ NS_METHOD nsMenuBarX::Paint() // this is needed for menubar changes // +NS_IMPL_NSIDOCUMENTOBSERVER_LOAD_STUB(nsMenuBarX) +NS_IMPL_NSIDOCUMENTOBSERVER_REFLOW_STUB(nsMenuBarX) +NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(nsMenuBarX) +NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(nsMenuBarX) NS_IMETHODIMP nsMenuBarX::BeginUpdate( nsIDocument * aDocument ) @@ -739,43 +743,12 @@ nsMenuBarX::EndUpdate( nsIDocument * aDocument ) return NS_OK; } -NS_IMETHODIMP -nsMenuBarX::BeginLoad( nsIDocument * aDocument ) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsMenuBarX::EndLoad( nsIDocument * aDocument ) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsMenuBarX::BeginReflow( nsIDocument * aDocument, nsIPresShell * aShell) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsMenuBarX::EndReflow( nsIDocument * aDocument, nsIPresShell * aShell) -{ - return NS_OK; -} - NS_IMETHODIMP nsMenuBarX::ContentChanged( nsIDocument * aDocument, nsIContent * aContent, nsISupports * aSubContent) { return NS_OK; } -NS_IMETHODIMP -nsMenuBarX::ContentStatesChanged( nsIDocument * aDocument, nsIContent * aContent1, - nsIContent * aContent2, PRInt32 aStateMask) -{ - return NS_OK; -} - NS_IMETHODIMP nsMenuBarX::ContentAppended( nsIDocument * aDocument, nsIContent * aContainer, PRInt32 aNewIndexInContainer) @@ -809,46 +782,6 @@ nsMenuBarX::ContentReplaced( nsIDocument * aDocument, nsIContent * aContainer, n return NS_OK; } -NS_IMETHODIMP -nsMenuBarX::StyleSheetAdded( nsIDocument * aDocument, nsIStyleSheet * aStyleSheet) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsMenuBarX::StyleSheetRemoved(nsIDocument * aDocument, nsIStyleSheet * aStyleSheet) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsMenuBarX::StyleSheetDisabledStateChanged(nsIDocument * aDocument, nsIStyleSheet * aStyleSheet, - PRBool aDisabled) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsMenuBarX::StyleRuleChanged( nsIDocument * aDocument, nsIStyleSheet * aStyleSheet, - nsIStyleRule * aStyleRule, nsChangeHint aHint) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsMenuBarX::StyleRuleAdded( nsIDocument * aDocument, nsIStyleSheet * aStyleSheet, - nsIStyleRule * aStyleRule) -{ - return NS_OK; -} - -NS_IMETHODIMP -nsMenuBarX::StyleRuleRemoved(nsIDocument * aDocument, nsIStyleSheet * aStyleSheet, - nsIStyleRule * aStyleRule) -{ - return NS_OK; -} - NS_IMETHODIMP nsMenuBarX::DocumentWillBeDestroyed( nsIDocument * aDocument ) { diff --git a/widget/src/cocoa/nsMenuBarX.h b/widget/src/cocoa/nsMenuBarX.h index 6bf919208d2e..dbd21e787ded 100644 --- a/widget/src/cocoa/nsMenuBarX.h +++ b/widget/src/cocoa/nsMenuBarX.h @@ -101,59 +101,7 @@ public: nsEventStatus SetRebuild(PRBool aMenuEvent); // nsIDocumentObserver - NS_IMETHOD BeginUpdate(nsIDocument *aDocument); - NS_IMETHOD EndUpdate(nsIDocument *aDocument); - NS_IMETHOD BeginLoad(nsIDocument *aDocument); - NS_IMETHOD EndLoad(nsIDocument *aDocument); - NS_IMETHOD BeginReflow(nsIDocument *aDocument, nsIPresShell* aShell); - NS_IMETHOD EndReflow(nsIDocument *aDocument, nsIPresShell* aShell); - NS_IMETHOD ContentChanged(nsIDocument *aDocument, - nsIContent* aContent, - nsISupports* aSubContent); - NS_IMETHOD ContentStatesChanged(nsIDocument *aDocument, - nsIContent* aContent1, - nsIContent* aContent2, - PRInt32 aStateMask); - NS_IMETHOD AttributeChanged(nsIDocument *aDocument, - nsIContent* aContent, - PRInt32 aNameSpaceID, - nsIAtom* aAttribute, - PRInt32 aModType, - nsChangeHint aHint); - NS_IMETHOD ContentAppended(nsIDocument *aDocument, - nsIContent* aContainer, - PRInt32 aNewIndexInContainer); - NS_IMETHOD ContentInserted(nsIDocument *aDocument, - nsIContent* aContainer, - nsIContent* aChild, - PRInt32 aIndexInContainer); - NS_IMETHOD ContentReplaced(nsIDocument *aDocument, - nsIContent* aContainer, - nsIContent* aOldChild, - nsIContent* aNewChild, - PRInt32 aIndexInContainer); - NS_IMETHOD ContentRemoved(nsIDocument *aDocument, - nsIContent* aContainer, - nsIContent* aChild, - PRInt32 aIndexInContainer); - NS_IMETHOD StyleSheetAdded(nsIDocument *aDocument, - nsIStyleSheet* aStyleSheet); - NS_IMETHOD StyleSheetRemoved(nsIDocument *aDocument, - nsIStyleSheet* aStyleSheet); - NS_IMETHOD StyleSheetDisabledStateChanged(nsIDocument *aDocument, - nsIStyleSheet* aStyleSheet, - PRBool aDisabled); - NS_IMETHOD StyleRuleChanged(nsIDocument *aDocument, - nsIStyleSheet* aStyleSheet, - nsIStyleRule* aStyleRule, - nsChangeHint aHint); - NS_IMETHOD StyleRuleAdded(nsIDocument *aDocument, - nsIStyleSheet* aStyleSheet, - nsIStyleRule* aStyleRule); - NS_IMETHOD StyleRuleRemoved(nsIDocument *aDocument, - nsIStyleSheet* aStyleSheet, - nsIStyleRule* aStyleRule); - NS_IMETHOD DocumentWillBeDestroyed(nsIDocument *aDocument); + NS_DECL_NSIDOCUMENTOBSERVER NS_IMETHOD Create(nsIWidget * aParent);