From 8ce8efd86e3e0c65f7282fbb36bf2c1edd9d7dd7 Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Wed, 1 May 2002 02:54:11 +0000 Subject: [PATCH] Add command-line tool for parsing CSS files. b=139943 sr=waterson r=attinasi a=rjesup git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@120407 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/style/src/nsCSSScanner.cpp | 3 ++- mozilla/layout/html/tests/Makefile.in | 2 ++ mozilla/layout/html/tests/ParseCSS.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mozilla/content/html/style/src/nsCSSScanner.cpp b/mozilla/content/html/style/src/nsCSSScanner.cpp index cbb497d5f98..12e61f7bfa5 100644 --- a/mozilla/content/html/style/src/nsCSSScanner.cpp +++ b/mozilla/content/html/style/src/nsCSSScanner.cpp @@ -234,7 +234,8 @@ void nsCSSScanner::AddToError(const nsAString& aErrorText) mErrorColNumber = mColNumber; mError = aErrorText; } else { - mError.Append(NS_LITERAL_STRING(" ") + aErrorText); + // XXX nsAutoString is workaround for string hang bug (bug 74709)! + mError.Append(NS_LITERAL_STRING(" ") + nsAutoString(aErrorText)); } } diff --git a/mozilla/layout/html/tests/Makefile.in b/mozilla/layout/html/tests/Makefile.in index faa9fcc2b8e..457cdda635f 100644 --- a/mozilla/layout/html/tests/Makefile.in +++ b/mozilla/layout/html/tests/Makefile.in @@ -28,12 +28,14 @@ include $(DEPTH)/config/autoconf.mk REQUIRES = xpcom \ string \ + necko \ content \ $(NULL) SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX)) CPPSRCS = \ + ParseCSS.cpp \ TestCSSPropertyLookup.cpp \ $(NULL) diff --git a/mozilla/layout/html/tests/ParseCSS.cpp b/mozilla/layout/html/tests/ParseCSS.cpp index 56f810acebe..d0dd2c6bebb 100644 --- a/mozilla/layout/html/tests/ParseCSS.cpp +++ b/mozilla/layout/html/tests/ParseCSS.cpp @@ -63,7 +63,7 @@ FileToURI(const char *aFilename) { nsCOMPtr lf(do_CreateInstance(NS_LOCAL_FILE_CONTRACTID)); // XXX Handle relative paths somehow. - lf->InitWithPath(nsDependentCString(aFilename)); + lf->InitWithPath(aFilename); nsIFileURL *url; CallCreateInstance(kStandardURLCID, &url);