Added namespace ID to the AttributeChanged notification

Part of the fix for Bug 15153
r=troy
This commit is contained in:
peterl%netscape.com 1999-10-15 23:17:53 +00:00
parent a6adfea707
commit d168caadef
9 changed files with 16 additions and 8 deletions

View File

@ -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);
}
}

View File

@ -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--;
}

View File

@ -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);
}
}

View File

@ -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--;
}

View File

@ -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);
}
}

View File

@ -1377,6 +1377,7 @@ NS_IMETHODIMP
nsMenu::AttributeChanged(
nsIDocument * aDocument,
nsIContent * aContent,
PRInt32 aNameSpaceID,
nsIAtom * aAttribute,
PRInt32 aHint)
{

View File

@ -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,

View File

@ -2460,6 +2460,7 @@ nsWebShellWindow::ContentStatesChanged(nsIDocument *aDocument,
NS_IMETHODIMP
nsWebShellWindow::AttributeChanged(nsIDocument *aDocument,
nsIContent* aContent,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aHint)
{

View File

@ -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,