From 5c11b505d71e04dbefc96ea9e81da56d41a2231c Mon Sep 17 00:00:00 2001 From: "peterl%netscape.com" Date: Thu, 10 Jun 1999 05:27:01 +0000 Subject: [PATCH] added helper method to token --- content/html/style/src/nsCSSScanner.h | 11 +++++++---- layout/html/style/src/nsCSSScanner.h | 11 +++++++---- layout/style/nsCSSScanner.h | 11 +++++++---- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/content/html/style/src/nsCSSScanner.h b/content/html/style/src/nsCSSScanner.h index d985c9f08a5b..dfc8b7dabe99 100644 --- a/content/html/style/src/nsCSSScanner.h +++ b/content/html/style/src/nsCSSScanner.h @@ -66,10 +66,13 @@ struct nsCSSToken { nsCSSToken(); - PRBool isDimension() { - return (PRBool) - ((eCSSToken_Dimension == mType) || - ((eCSSToken_Number == mType) && (mNumber == 0.0f))); + PRBool IsDimension() { + return PRBool((eCSSToken_Dimension == mType) || + ((eCSSToken_Number == mType) && (mNumber == 0.0f))); + } + + PRBool IsSymbol(PRUnichar aSymbol) { + return PRBool((eCSSToken_Symbol == mType) && (mSymbol == aSymbol)); } void AppendToString(nsString& aBuffer); diff --git a/layout/html/style/src/nsCSSScanner.h b/layout/html/style/src/nsCSSScanner.h index d985c9f08a5b..dfc8b7dabe99 100644 --- a/layout/html/style/src/nsCSSScanner.h +++ b/layout/html/style/src/nsCSSScanner.h @@ -66,10 +66,13 @@ struct nsCSSToken { nsCSSToken(); - PRBool isDimension() { - return (PRBool) - ((eCSSToken_Dimension == mType) || - ((eCSSToken_Number == mType) && (mNumber == 0.0f))); + PRBool IsDimension() { + return PRBool((eCSSToken_Dimension == mType) || + ((eCSSToken_Number == mType) && (mNumber == 0.0f))); + } + + PRBool IsSymbol(PRUnichar aSymbol) { + return PRBool((eCSSToken_Symbol == mType) && (mSymbol == aSymbol)); } void AppendToString(nsString& aBuffer); diff --git a/layout/style/nsCSSScanner.h b/layout/style/nsCSSScanner.h index d985c9f08a5b..dfc8b7dabe99 100644 --- a/layout/style/nsCSSScanner.h +++ b/layout/style/nsCSSScanner.h @@ -66,10 +66,13 @@ struct nsCSSToken { nsCSSToken(); - PRBool isDimension() { - return (PRBool) - ((eCSSToken_Dimension == mType) || - ((eCSSToken_Number == mType) && (mNumber == 0.0f))); + PRBool IsDimension() { + return PRBool((eCSSToken_Dimension == mType) || + ((eCSSToken_Number == mType) && (mNumber == 0.0f))); + } + + PRBool IsSymbol(PRUnichar aSymbol) { + return PRBool((eCSSToken_Symbol == mType) && (mSymbol == aSymbol)); } void AppendToString(nsString& aBuffer);