2006-05-13 Rob Buis <buis@kde.org>
[WebKit-https.git] / WebCore / css / cssparser.cpp
index 6858c72df76e08faa8d8cb9fd6d956e6fd0858df..fb4e466cb091b83de9104cf54dcb92fb1c1d3bea 100644 (file)
@@ -325,8 +325,7 @@ bool CSSParser::validUnit(Value* value, Units unitflags, bool strict)
             value->unit = CSSPrimitiveValue::CSS_PX;
             b = true;
         }
-        if (!b && (unitflags & FInteger) &&
-             (value->fValue - (int)value->fValue) < 0.001)
+        if (!b && (unitflags & FInteger) && value->isInt)
             b = true;
         break;
     case CSSPrimitiveValue::CSS_PERCENTAGE:
@@ -2638,7 +2637,8 @@ int CSSParser::lex(void* yylvalWithoutType)
     case SECS:
     case PERCENTAGE:
         length--;
-    case NUMBER:
+    case FLOAT:
+    case INTEGER:
         yylval->val = DeprecatedString((QChar *)t, length).toDouble();
         break;