From 482d1c44516e6e8db1c056ac32f829cb080c5f92 Mon Sep 17 00:00:00 2001 From: kipp Date: Thu, 28 May 1998 18:40:23 +0000 Subject: [PATCH] Port to new parser API git-svn-id: svn://10.0.0.236/trunk@2520 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLContentSink.cpp | 6 ++++-- mozilla/layout/html/document/src/nsHTMLContentSink.cpp | 6 ++++-- mozilla/webshell/src/nsWebWidget.cpp | 5 +++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index f3272d39752..174baaf1a73 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -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 diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index f3272d39752..174baaf1a73 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -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 diff --git a/mozilla/webshell/src/nsWebWidget.cpp b/mozilla/webshell/src/nsWebWidget.cpp index aa9e23b99e1..afc1b307571 100644 --- a/mozilla/webshell/src/nsWebWidget.cpp +++ b/mozilla/webshell/src/nsWebWidget.cpp @@ -259,8 +259,9 @@ nsresult WebWidgetImpl::InitUAStyleSheet(void) rv = NS_NewCSSParser(&css); if (NS_OK == rv) { // Parse the input and produce a style set - mUAStyleSheet = css->Parse(&ec, uin, uaURL); - + // XXX note: we are ignoring rv until the error code stuff in the + // input routines is converted to use nsresult's + css->Parse(uin, uaURL, mUAStyleSheet); NS_RELEASE(css); } NS_RELEASE(uin);