Another build fix for viewport tests
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 03:46:48 +0000 (03:46 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 03:46:48 +0000 (03:46 +0000)
No new tests.

* dom/ViewportArguments.cpp:
(WebCore::numericPrefix): We now return NaN instead of 0 when we fail to
parse a number using charactersToFloatIgnoringJunk, so we need to assert that
we have NaN rather than 0.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/ViewportArguments.cpp

index 54677ca..a684fe4 100644 (file)
@@ -1,3 +1,14 @@
+2012-02-16  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        Another build fix for viewport tests
+
+        No new tests.
+
+        * dom/ViewportArguments.cpp:
+        (WebCore::numericPrefix): We now return NaN instead of 0 when we fail to 
+        parse a number using charactersToFloatIgnoringJunk, so we need to assert that 
+        we have NaN rather than 0.
+
 2012-02-15  Michael Nordman  <michaeln@google.com>
 
         [chromium] Fix bugs in the implementation of WebDatabase::closeDatabaseImmediately.
index 9c82e88..5f79d03 100644 (file)
@@ -219,7 +219,7 @@ static float numericPrefix(const String& keyString, const String& valueString, D
         value = WTF::charactersToFloatIgnoringJunk(valueString.characters16(), valueString.length(), ok, &didReadNumber);
     if (!*ok) {
         if (!didReadNumber) {
-            ASSERT(!value);
+            ASSERT(isnan(value));
             reportViewportWarning(document, UnrecognizedViewportArgumentValueError, valueString, keyString);
             return value;
         }