fixed base href for inline style sheets

set case sensativity in CSS parser


git-svn-id: svn://10.0.0.236/trunk@16213 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterl%netscape.com
1998-12-11 02:46:25 +00:00
parent 6280234f0b
commit fed2ce07ee
2 changed files with 24 additions and 4 deletions

View File

@@ -2411,8 +2411,17 @@ HTMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode)
}
// Use the document's url since the style data came from there
url = mDocumentURL;
NS_IF_ADDREF(url);
if (0 < mBaseHREF.Length()) { // use base URL
rv = NS_NewURL(&url, mBaseHREF);
if (NS_FAILED(rv)) {
url = mDocumentURL;
NS_IF_ADDREF(url);
}
}
else {
url = mDocumentURL;
NS_IF_ADDREF(url);
}
} else {
// src with immediate style data doesn't add up
// XXX what does nav do?
@@ -2540,6 +2549,7 @@ HTMLContentSink::LoadStyleSheet(nsIURL* aURL,
nsICSSStyleSheet* sheet = nsnull;
// XXX note: we are ignoring rv until the error code stuff in the
// input routines is converted to use nsresult's
parser->SetCaseSensative(PR_FALSE);
parser->Parse(aUIN, aURL, sheet);
if (nsnull != sheet) {
sheet->SetTitle(aTitle);

View File

@@ -2411,8 +2411,17 @@ HTMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode)
}
// Use the document's url since the style data came from there
url = mDocumentURL;
NS_IF_ADDREF(url);
if (0 < mBaseHREF.Length()) { // use base URL
rv = NS_NewURL(&url, mBaseHREF);
if (NS_FAILED(rv)) {
url = mDocumentURL;
NS_IF_ADDREF(url);
}
}
else {
url = mDocumentURL;
NS_IF_ADDREF(url);
}
} else {
// src with immediate style data doesn't add up
// XXX what does nav do?
@@ -2540,6 +2549,7 @@ HTMLContentSink::LoadStyleSheet(nsIURL* aURL,
nsICSSStyleSheet* sheet = nsnull;
// XXX note: we are ignoring rv until the error code stuff in the
// input routines is converted to use nsresult's
parser->SetCaseSensative(PR_FALSE);
parser->Parse(aUIN, aURL, sheet);
if (nsnull != sheet) {
sheet->SetTitle(aTitle);