Rename VARIANT_POSITIVE_LENGTH to VARIANT_POSITIVE_DIMENSION since it also applies to times and frequencies. (Bug 773102, patch 1) r=bzbarsky

This commit is contained in:
L. David Baron 2012-07-13 18:01:34 -07:00
parent 129bc726ce
commit 4e05bcf328
2 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ using namespace mozilla;
#define VARIANT_ZERO_ANGLE 0x02000000 // unitless zero for angles
#define VARIANT_CALC 0x04000000 // eCSSUnit_Calc
#define VARIANT_ELEMENT 0x08000000 // eCSSUnit_Element
#define VARIANT_POSITIVE_LENGTH 0x10000000 // Only lengths greater than 0.0
#define VARIANT_POSITIVE_DIMENSION 0x10000000 // Only lengths greater than 0.0
// Common combinations of variants
#define VARIANT_AL (VARIANT_AUTO | VARIANT_LENGTH)
@ -4477,7 +4477,7 @@ CSSParserImpl::ParseVariant(nsCSSValue& aValue,
((aVariantMask & (VARIANT_LENGTH | VARIANT_ZERO_ANGLE)) != 0 &&
eCSSToken_Number == tk->mType &&
tk->mNumber == 0.0f)) {
if ((aVariantMask & VARIANT_POSITIVE_LENGTH) != 0 &&
if ((aVariantMask & VARIANT_POSITIVE_DIMENSION) != 0 &&
tk->mNumber <= 0.0) {
UngetToken();
return false;
@ -8058,7 +8058,7 @@ static bool GetFunctionParseInformation(nsCSSKeyword aToken,
{VARIANT_ANGLE_OR_ZERO},
{VARIANT_ANGLE_OR_ZERO, VARIANT_ANGLE_OR_ZERO},
{VARIANT_NUMBER},
{VARIANT_LENGTH|VARIANT_POSITIVE_LENGTH},
{VARIANT_LENGTH|VARIANT_POSITIVE_DIMENSION},
{VARIANT_NUMBER, VARIANT_NUMBER},
{VARIANT_NUMBER, VARIANT_NUMBER, VARIANT_NUMBER},
{VARIANT_NUMBER, VARIANT_NUMBER, VARIANT_NUMBER, VARIANT_ANGLE_OR_ZERO},

View File

@ -2630,7 +2630,7 @@ CSS_PROP_DISPLAY(
Perspective,
CSS_PROPERTY_PARSE_VALUE,
"",
VARIANT_NONE | VARIANT_INHERIT | VARIANT_LENGTH | VARIANT_POSITIVE_LENGTH,
VARIANT_NONE | VARIANT_INHERIT | VARIANT_LENGTH | VARIANT_POSITIVE_DIMENSION,
nsnull,
offsetof(nsStyleDisplay, mChildPerspective),
eStyleAnimType_Coord)