Bug 505115 - Part 18 - Make the perspective() transform function fail with numbers <= 0. r=dbaron
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 27 Sep 2011 10:53:39 +1300
changeset 77619 29b915205135330ae63bdd200f87eec9182fce42
parent 77618 97983a84f0c3b972986e7d7c992f02b804f9dae6
child 77620 f1af522b8b471fb22e3d9808f792d0c7fd8bebfe
push id21221
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 07:08:27 +0000
treeherdermozilla-central@d305835a6726 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs505115
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 505115 - Part 18 - Make the perspective() transform function fail with numbers <= 0. r=dbaron
layout/style/nsCSSParser.cpp
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -4540,17 +4540,16 @@ CSSParserImpl::ParseVariant(nsCSSValue& 
   }
   if (((aVariantMask & (VARIANT_LENGTH | VARIANT_ANGLE |
                         VARIANT_FREQUENCY | VARIANT_TIME)) != 0 &&
        eCSSToken_Dimension == tk->mType) ||
       ((aVariantMask & (VARIANT_LENGTH | VARIANT_ZERO_ANGLE)) != 0 &&
        eCSSToken_Number == tk->mType &&
        tk->mNumber == 0.0f)) {
     if ((aVariantMask & VARIANT_POSITIVE_LENGTH) != 0 && 
-        eCSSToken_Number == tk->mType &&
         tk->mNumber <= 0.0) {
         UngetToken();
         return PR_FALSE;
     }
     if (TranslateDimension(aValue, aVariantMask, tk->mNumber, tk->mIdent)) {
       return PR_TRUE;
     }
     // Put the token back; we didn't parse it, so we shouldn't consume it