From e8a5d2e937a43d9aaa079b3a8483502f76a8a2e9 Mon Sep 17 00:00:00 2001 From: "peterl%netscape.com" Date: Fri, 15 Oct 1999 23:17:53 +0000 Subject: [PATCH] Added namespace ID to the AttributeChanged notification Part of the fix for Bug 15153 r=troy git-svn-id: svn://10.0.0.236/trunk@50889 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/xul/content/src/nsXULElement.cpp | 4 ++-- mozilla/content/xul/document/src/nsXULDocument.cpp | 4 +++- mozilla/rdf/content/src/nsRDFElement.cpp | 4 ++-- mozilla/rdf/content/src/nsXULDocument.cpp | 4 +++- mozilla/rdf/content/src/nsXULElement.cpp | 4 ++-- mozilla/widget/src/mac/nsMenu.cpp | 1 + mozilla/widget/src/mac/nsMenu.h | 1 + mozilla/xpfe/appshell/src/nsWebShellWindow.cpp | 1 + mozilla/xpfe/appshell/src/nsWebShellWindow.h | 1 + 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/mozilla/content/xul/content/src/nsXULElement.cpp b/mozilla/content/xul/content/src/nsXULElement.cpp index f232c4fcff9..ce3d97090bb 100644 --- a/mozilla/content/xul/content/src/nsXULElement.cpp +++ b/mozilla/content/xul/content/src/nsXULElement.cpp @@ -2477,7 +2477,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID, } if (NS_SUCCEEDED(rv) && aNotify && ElementIsInDocument()) { - mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), aName, NS_STYLE_HINT_UNKNOWN); + mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), aNameSpaceID, aName, NS_STYLE_HINT_UNKNOWN); } return rv; @@ -2699,7 +2699,7 @@ RDFElementImpl::UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNot // Notify document if (NS_SUCCEEDED(rv) && aNotify && (nsnull != mDocument)) { mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), - aName, + aNameSpaceID, aName, NS_STYLE_HINT_UNKNOWN); } } diff --git a/mozilla/content/xul/document/src/nsXULDocument.cpp b/mozilla/content/xul/document/src/nsXULDocument.cpp index 1863140219a..ade0575f385 100644 --- a/mozilla/content/xul/document/src/nsXULDocument.cpp +++ b/mozilla/content/xul/document/src/nsXULDocument.cpp @@ -301,6 +301,7 @@ public: NS_IMETHOD ContentStatesChanged(nsIContent* aContent1, nsIContent* aContent2); NS_IMETHOD AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aHint); // See nsStyleConsts fot hint values @@ -1700,6 +1701,7 @@ XULDocumentImpl::ContentStatesChanged(nsIContent* aContent1, nsIContent* aConten NS_IMETHODIMP XULDocumentImpl::AttributeChanged(nsIContent* aElement, + PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aHint) { @@ -1724,7 +1726,7 @@ XULDocumentImpl::AttributeChanged(nsIContent* aElement, // Now notify external observers for (PRInt32 i = 0; i < mObservers.Count(); i++) { nsIDocumentObserver* observer = (nsIDocumentObserver*)mObservers[i]; - observer->AttributeChanged(this, aElement, aAttribute, aHint); + observer->AttributeChanged(this, aElement, aNameSpaceID, aAttribute, aHint); if (observer != (nsIDocumentObserver*)mObservers.ElementAt(i)) { i--; } diff --git a/mozilla/rdf/content/src/nsRDFElement.cpp b/mozilla/rdf/content/src/nsRDFElement.cpp index f232c4fcff9..ce3d97090bb 100644 --- a/mozilla/rdf/content/src/nsRDFElement.cpp +++ b/mozilla/rdf/content/src/nsRDFElement.cpp @@ -2477,7 +2477,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID, } if (NS_SUCCEEDED(rv) && aNotify && ElementIsInDocument()) { - mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), aName, NS_STYLE_HINT_UNKNOWN); + mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), aNameSpaceID, aName, NS_STYLE_HINT_UNKNOWN); } return rv; @@ -2699,7 +2699,7 @@ RDFElementImpl::UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNot // Notify document if (NS_SUCCEEDED(rv) && aNotify && (nsnull != mDocument)) { mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), - aName, + aNameSpaceID, aName, NS_STYLE_HINT_UNKNOWN); } } diff --git a/mozilla/rdf/content/src/nsXULDocument.cpp b/mozilla/rdf/content/src/nsXULDocument.cpp index 1863140219a..ade0575f385 100644 --- a/mozilla/rdf/content/src/nsXULDocument.cpp +++ b/mozilla/rdf/content/src/nsXULDocument.cpp @@ -301,6 +301,7 @@ public: NS_IMETHOD ContentStatesChanged(nsIContent* aContent1, nsIContent* aContent2); NS_IMETHOD AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aHint); // See nsStyleConsts fot hint values @@ -1700,6 +1701,7 @@ XULDocumentImpl::ContentStatesChanged(nsIContent* aContent1, nsIContent* aConten NS_IMETHODIMP XULDocumentImpl::AttributeChanged(nsIContent* aElement, + PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aHint) { @@ -1724,7 +1726,7 @@ XULDocumentImpl::AttributeChanged(nsIContent* aElement, // Now notify external observers for (PRInt32 i = 0; i < mObservers.Count(); i++) { nsIDocumentObserver* observer = (nsIDocumentObserver*)mObservers[i]; - observer->AttributeChanged(this, aElement, aAttribute, aHint); + observer->AttributeChanged(this, aElement, aNameSpaceID, aAttribute, aHint); if (observer != (nsIDocumentObserver*)mObservers.ElementAt(i)) { i--; } diff --git a/mozilla/rdf/content/src/nsXULElement.cpp b/mozilla/rdf/content/src/nsXULElement.cpp index f232c4fcff9..ce3d97090bb 100644 --- a/mozilla/rdf/content/src/nsXULElement.cpp +++ b/mozilla/rdf/content/src/nsXULElement.cpp @@ -2477,7 +2477,7 @@ RDFElementImpl::SetAttribute(PRInt32 aNameSpaceID, } if (NS_SUCCEEDED(rv) && aNotify && ElementIsInDocument()) { - mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), aName, NS_STYLE_HINT_UNKNOWN); + mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), aNameSpaceID, aName, NS_STYLE_HINT_UNKNOWN); } return rv; @@ -2699,7 +2699,7 @@ RDFElementImpl::UnsetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNot // Notify document if (NS_SUCCEEDED(rv) && aNotify && (nsnull != mDocument)) { mDocument->AttributeChanged(NS_STATIC_CAST(nsIStyledContent*, this), - aName, + aNameSpaceID, aName, NS_STYLE_HINT_UNKNOWN); } } diff --git a/mozilla/widget/src/mac/nsMenu.cpp b/mozilla/widget/src/mac/nsMenu.cpp index e370c4d27bd..27799f55d67 100644 --- a/mozilla/widget/src/mac/nsMenu.cpp +++ b/mozilla/widget/src/mac/nsMenu.cpp @@ -1377,6 +1377,7 @@ NS_IMETHODIMP nsMenu::AttributeChanged( nsIDocument * aDocument, nsIContent * aContent, + PRInt32 aNameSpaceID, nsIAtom * aAttribute, PRInt32 aHint) { diff --git a/mozilla/widget/src/mac/nsMenu.h b/mozilla/widget/src/mac/nsMenu.h index d5b6008c0c6..1577dacb737 100644 --- a/mozilla/widget/src/mac/nsMenu.h +++ b/mozilla/widget/src/mac/nsMenu.h @@ -106,6 +106,7 @@ public: nsIContent* aContent2); NS_IMETHOD AttributeChanged(nsIDocument *aDocument, nsIContent* aContent, + PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aHint); NS_IMETHOD ContentAppended(nsIDocument *aDocument, diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index 33f0d304cfe..d89eea84362 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -2460,6 +2460,7 @@ nsWebShellWindow::ContentStatesChanged(nsIDocument *aDocument, NS_IMETHODIMP nsWebShellWindow::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent, + PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aHint) { diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.h b/mozilla/xpfe/appshell/src/nsWebShellWindow.h index fcef6245f55..8f48b3ce026 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.h +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.h @@ -197,6 +197,7 @@ public: nsIContent* aContent2); NS_IMETHOD AttributeChanged(nsIDocument *aDocument, nsIContent* aContent, + PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aHint); NS_IMETHOD ContentAppended(nsIDocument *aDocument,