Fix for bug 351823 (Consider copying more properties when changing ownerDocument). r/sr=bz.

git-svn-id: svn://10.0.0.236/trunk@211854 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%propagandism.org
2006-09-16 17:15:38 +00:00
parent 5b75c7f1d9
commit 4095896649
13 changed files with 180 additions and 152 deletions

View File

@@ -3410,7 +3410,7 @@ HTMLContentSink::AddBaseTagInfo(nsIContent* aContent)
nsresult rv;
if (mBaseHref) {
rv = aContent->SetProperty(nsHTMLAtoms::htmlBaseHref, mBaseHref,
nsPropertyTable::SupportsDtorFunc);
nsPropertyTable::SupportsDtorFunc, PR_TRUE);
if (NS_SUCCEEDED(rv)) {
// circumvent nsDerivedSafe
NS_ADDREF(NS_STATIC_CAST(nsIURI*, mBaseHref));
@@ -3418,7 +3418,7 @@ HTMLContentSink::AddBaseTagInfo(nsIContent* aContent)
}
if (mBaseTarget) {
rv = aContent->SetProperty(nsHTMLAtoms::htmlBaseTarget, mBaseTarget,
nsPropertyTable::SupportsDtorFunc);
nsPropertyTable::SupportsDtorFunc, PR_TRUE);
if (NS_SUCCEEDED(rv)) {
// circumvent nsDerivedSafe
NS_ADDREF(NS_STATIC_CAST(nsIAtom*, mBaseTarget));

View File

@@ -339,7 +339,7 @@ nsHTMLFragmentContentSink::AddBaseTagInfo(nsIContent* aContent)
nsresult rv;
if (mBaseHref) {
rv = aContent->SetProperty(nsHTMLAtoms::htmlBaseHref, mBaseHref,
nsPropertyTable::SupportsDtorFunc);
nsPropertyTable::SupportsDtorFunc, PR_TRUE);
if (NS_SUCCEEDED(rv)) {
// circumvent nsDerivedSafe
NS_ADDREF(NS_STATIC_CAST(nsIURI*, mBaseHref));
@@ -347,7 +347,7 @@ nsHTMLFragmentContentSink::AddBaseTagInfo(nsIContent* aContent)
}
if (mBaseTarget) {
rv = aContent->SetProperty(nsHTMLAtoms::htmlBaseTarget, mBaseTarget,
nsPropertyTable::SupportsDtorFunc);
nsPropertyTable::SupportsDtorFunc, PR_TRUE);
if (NS_SUCCEEDED(rv)) {
// circumvent nsDerivedSafe
NS_ADDREF(NS_STATIC_CAST(nsIAtom*, mBaseTarget));