fixed processing of font face (preserve original quotes)

git-svn-id: svn://10.0.0.236/trunk@7513 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterl%netscape.com
1998-08-07 02:17:56 +00:00
parent 289d347c74
commit 3fc016f2ac
3 changed files with 6 additions and 12 deletions

View File

@@ -2215,7 +2215,6 @@ PRBool CSSParserImpl::ParseFontFamily(PRInt32* aErrorCode, nsICSSDeclaration* aD
if (!firstOne) {
family.Append(PRUnichar(','));
}
family.Append(PRUnichar('"'));
family.Append(tk->mIdent);
for (;;) {
if (!GetToken(aErrorCode, PR_FALSE)) {
@@ -2240,15 +2239,14 @@ PRBool CSSParserImpl::ParseFontFamily(PRInt32* aErrorCode, nsICSSDeclaration* aD
break;
}
}
family.Append(PRUnichar('"'));
firstOne = PR_FALSE;
} else if (eCSSToken_String == tk->mType) {
if (!firstOne) {
family.Append(PRUnichar(','));
}
family.Append(PRUnichar('"'));
family.Append(tk->mSymbol); // replace the quotes
family.Append(tk->mIdent);
family.Append(PRUnichar('"'));
family.Append(tk->mSymbol);
firstOne = PR_FALSE;
} else if (eCSSToken_Symbol == tk->mType) {
if (',' != tk->mSymbol) {

View File

@@ -2215,7 +2215,6 @@ PRBool CSSParserImpl::ParseFontFamily(PRInt32* aErrorCode, nsICSSDeclaration* aD
if (!firstOne) {
family.Append(PRUnichar(','));
}
family.Append(PRUnichar('"'));
family.Append(tk->mIdent);
for (;;) {
if (!GetToken(aErrorCode, PR_FALSE)) {
@@ -2240,15 +2239,14 @@ PRBool CSSParserImpl::ParseFontFamily(PRInt32* aErrorCode, nsICSSDeclaration* aD
break;
}
}
family.Append(PRUnichar('"'));
firstOne = PR_FALSE;
} else if (eCSSToken_String == tk->mType) {
if (!firstOne) {
family.Append(PRUnichar(','));
}
family.Append(PRUnichar('"'));
family.Append(tk->mSymbol); // replace the quotes
family.Append(tk->mIdent);
family.Append(PRUnichar('"'));
family.Append(tk->mSymbol);
firstOne = PR_FALSE;
} else if (eCSSToken_Symbol == tk->mType) {
if (',' != tk->mSymbol) {

View File

@@ -2215,7 +2215,6 @@ PRBool CSSParserImpl::ParseFontFamily(PRInt32* aErrorCode, nsICSSDeclaration* aD
if (!firstOne) {
family.Append(PRUnichar(','));
}
family.Append(PRUnichar('"'));
family.Append(tk->mIdent);
for (;;) {
if (!GetToken(aErrorCode, PR_FALSE)) {
@@ -2240,15 +2239,14 @@ PRBool CSSParserImpl::ParseFontFamily(PRInt32* aErrorCode, nsICSSDeclaration* aD
break;
}
}
family.Append(PRUnichar('"'));
firstOne = PR_FALSE;
} else if (eCSSToken_String == tk->mType) {
if (!firstOne) {
family.Append(PRUnichar(','));
}
family.Append(PRUnichar('"'));
family.Append(tk->mSymbol); // replace the quotes
family.Append(tk->mIdent);
family.Append(PRUnichar('"'));
family.Append(tk->mSymbol);
firstOne = PR_FALSE;
} else if (eCSSToken_Symbol == tk->mType) {
if (',' != tk->mSymbol) {