From 796fc1aa09f93aae5fae7ec8a875ef237f68a09c Mon Sep 17 00:00:00 2001 From: "heikki%netscape.com" Date: Tue, 24 Jul 2001 18:08:52 +0000 Subject: [PATCH] Bug 82022, xml-stylesheet PI in XUL without href stopped layout. r=harishd, sr=vidur. git-svn-id: svn://10.0.0.236/trunk@99802 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xul/document/src/nsXULContentSink.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mozilla/content/xul/document/src/nsXULContentSink.cpp b/mozilla/content/xul/document/src/nsXULContentSink.cpp index 11dfae87824..aea53c87e84 100644 --- a/mozilla/content/xul/document/src/nsXULContentSink.cpp +++ b/mozilla/content/xul/document/src/nsXULContentSink.cpp @@ -883,7 +883,6 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode) static const char kStyleSheetPI[] = " url; - rv = NS_NewURI(getter_AddRefs(url), href, mDocumentURL); + nsresult rv = NS_NewURI(getter_AddRefs(url), href, mDocumentURL); if (NS_FAILED(rv)) { - return NS_OK; // The URL is bad, move along. Don't propogate for now. + // XXX This is wrong, the error message could be out of memory + // or something else equally bad, which we should propagate. + // Bad URL should probably be "success with info" value. + return NS_OK; // The URL is bad, move along. Don't propagate for now. } rv = mPrototype->AddOverlayReference(url); @@ -914,10 +915,9 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode) // If it's a stylesheet PI... else if (text.Find(kStyleSheetPI) == 0) { nsAutoString href; - rv = nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); - if (NS_FAILED(rv)) return rv; + nsParserUtils::GetQuotedAttributeValue(text, NS_ConvertASCIItoUCS2("href"), href); - // If there was an error or there's no href, we can't do + // If there was no href, we can't do // anything with this PI if (0 == href.Length()) return NS_OK;