From c75df5584bd1376315b1b0622f1663cfbde28b50 Mon Sep 17 00:00:00 2001 From: "peterl%netscape.com" Date: Sat, 27 Feb 1999 07:13:48 +0000 Subject: [PATCH] set document before adding attributes git-svn-id: svn://10.0.0.236/trunk@22330 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLContentSink.cpp | 3 +++ mozilla/layout/html/document/src/nsHTMLContentSink.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index e3e530be1c2..54208fd12f3 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -2516,6 +2516,7 @@ HTMLContentSink::ProcessLINKTag(const nsIParserNode& aNode) if (NS_SUCCEEDED(result)) { // Add in the attributes and add the style content object to the // head container. + element->SetDocument(mDocument, PR_FALSE); result = AddAttributes(aNode, element, sco); if (NS_FAILED(result)) { NS_RELEASE(element); @@ -2554,6 +2555,7 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) // Add in the attributes and add the meta content object to the // head container. nsIScriptContextOwner* sco = mDocument->GetScriptContextOwner(); + it->SetDocument(mDocument, PR_FALSE); rv = AddAttributes(aNode, it, sco); NS_IF_RELEASE(sco); if (NS_OK != rv) { @@ -2843,6 +2845,7 @@ HTMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode) if (NS_SUCCEEDED(rv)) { // Add in the attributes and add the style content object to the // head container. + element->SetDocument(mDocument, PR_FALSE); rv = AddAttributes(aNode, element, sco); if (NS_FAILED(rv)) { NS_RELEASE(element); diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index e3e530be1c2..54208fd12f3 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -2516,6 +2516,7 @@ HTMLContentSink::ProcessLINKTag(const nsIParserNode& aNode) if (NS_SUCCEEDED(result)) { // Add in the attributes and add the style content object to the // head container. + element->SetDocument(mDocument, PR_FALSE); result = AddAttributes(aNode, element, sco); if (NS_FAILED(result)) { NS_RELEASE(element); @@ -2554,6 +2555,7 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) // Add in the attributes and add the meta content object to the // head container. nsIScriptContextOwner* sco = mDocument->GetScriptContextOwner(); + it->SetDocument(mDocument, PR_FALSE); rv = AddAttributes(aNode, it, sco); NS_IF_RELEASE(sco); if (NS_OK != rv) { @@ -2843,6 +2845,7 @@ HTMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode) if (NS_SUCCEEDED(rv)) { // Add in the attributes and add the style content object to the // head container. + element->SetDocument(mDocument, PR_FALSE); rv = AddAttributes(aNode, element, sco); if (NS_FAILED(rv)) { NS_RELEASE(element);