Port to new parser API

git-svn-id: svn://10.0.0.236/trunk@2520 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp
1998-05-28 18:40:23 +00:00
parent ea98683ca1
commit 482d1c4451
3 changed files with 11 additions and 6 deletions

View File

@@ -1067,13 +1067,15 @@ nsresult HTMLContentSink::LoadStyleSheet(nsIURL* aURL,
nsICSSParser* parser;
nsresult rv = NS_NewCSSParser(&parser);
if (NS_OK == rv) {
PRInt32 ec;
if (nsnull != mStyleSheet) {
parser->SetStyleSheet(mStyleSheet);
// XXX we do probably need to trigger a style change reflow
// when we are finished if this is adding data to the same sheet
}
nsIStyleSheet* sheet = parser->Parse(&ec, aUIN, mDocumentURL);
nsIStyleSheet* sheet = nsnull;
// XXX note: we are ignoring rv until the error code stuff in the
// input routines is converted to use nsresult's
parser->Parse(aUIN, mDocumentURL, sheet);
if (nsnull != sheet) {
if (nsnull == mStyleSheet) {
// Add in the sheet the first time; if we update the sheet