From b48962a2335b81ef1c9d150d8ce0c86968b2e0a6 Mon Sep 17 00:00:00 2001 From: "dbaron@dbaron.org" Date: Thu, 3 May 2007 17:05:16 -0700 Subject: [PATCH] Fix bad string comparison preventing 'none' and 'initial' values of 'counter-increment' and 'counter-reset' from being parsed correctly. b=379555 r+sr=dbaron Patch by Daniel Holbert . --- layout/style/nsCSSParser.cpp | 2 +- layout/style/test/test_inherit_computation.html | 4 ---- layout/style/test/test_value_computation.html | 4 ---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 3d0bf90f5128..09180938f3ff 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -5455,7 +5455,7 @@ PRBool CSSParserImpl::ParseCounterData(nsresult& aErrorCode, for (const SingleCounterPropValue *sv = singleValues, *sv_end = singleValues + NS_ARRAY_LENGTH(singleValues); sv != sv_end; ++sv) { - if (ident->LowerCaseEqualsLiteral(sv->str)) { + if (ident->LowerCaseEqualsASCII(sv->str)) { if (ExpectEndProperty(aErrorCode, PR_TRUE)) { nsCSSCounterData* dataHead = new nsCSSCounterData(); if (!dataHead) { diff --git a/layout/style/test/test_inherit_computation.html b/layout/style/test/test_inherit_computation.html index 722b2dbdd801..21ad2cacd994 100644 --- a/layout/style/test/test_inherit_computation.html +++ b/layout/style/test/test_inherit_computation.html @@ -75,10 +75,6 @@ var gBrokenInherit = { "-moz-border-left-colors": true, "-moz-border-right-colors": true, "-moz-border-top-colors": true, - - // Parses inherit as a counter name - "counter-increment": true, - "counter-reset": true, }; function xfail_inherit(property, matching_initial) { diff --git a/layout/style/test/test_value_computation.html b/layout/style/test/test_value_computation.html index 6b67ac43e11e..57f16b3d7f79 100644 --- a/layout/style/test/test_value_computation.html +++ b/layout/style/test/test_value_computation.html @@ -107,10 +107,6 @@ var gBadComputed = { "clip": [ "rect(auto,auto,auto,auto)" ], // This seems really broken! - "counter-increment": [ "none" ], - "counter-reset": [ "none" ], - - // So does this. "marker-offset": [ "auto" ], // No idea what's happening for these two either