fixed base href for inline style sheets

set case sensativity in CSS parser
This commit is contained in:
peterl%netscape.com 1998-12-11 02:46:25 +00:00
Родитель 84fd70a5a1
Коммит d274bbc66b
2 изменённых файлов: 24 добавлений и 4 удалений

Просмотреть файл

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

Просмотреть файл

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