Title: [111957] releases/WebKitGTK/webkit-1.8

Diff

Modified: releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog (111956 => 111957)


--- releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog	2012-03-24 01:08:17 UTC (rev 111956)
+++ releases/WebKitGTK/webkit-1.8/LayoutTests/ChangeLog	2012-03-24 01:10:45 UTC (rev 111957)
@@ -1,3 +1,16 @@
+2012-03-23  Gavin Barraclough  <[email protected]>
+
+        REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
+        https://bugs.webkit.org/show_bug.cgi?id=49989
+
+        Reviewed by Oliver Hunt.
+
+        Patch originally by chris reiss <[email protected]>,
+        allow the year to appear before the timezone in date strings.
+
+        * fast/js/date-parse-test-expected.txt:
+        * fast/js/script-tests/date-parse-test.js:
+
 2012-03-23  Andy Estes  <[email protected]>
 
         REGRESSION (r105396): Dragging an iWork document into icloud.com opens it in the Mac app instead of uploading it to icloud.com

Modified: releases/WebKitGTK/webkit-1.8/Source/_javascript_Core/ChangeLog (111956 => 111957)


--- releases/WebKitGTK/webkit-1.8/Source/_javascript_Core/ChangeLog	2012-03-24 01:08:17 UTC (rev 111956)
+++ releases/WebKitGTK/webkit-1.8/Source/_javascript_Core/ChangeLog	2012-03-24 01:10:45 UTC (rev 111957)
@@ -1,3 +1,16 @@
+2012-03-23  Gavin Barraclough  <[email protected]>
+
+        REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
+        https://bugs.webkit.org/show_bug.cgi?id=49989
+
+        Reviewed by Oliver Hunt.
+
+        Patch originally by chris reiss <[email protected]>,
+        allow the year to appear before the timezone in date strings.
+
+        * wtf/DateMath.cpp:
+        (WTF::parseDateFromNullTerminatedCharacters):
+
 2012-03-23  Mahesh Kulkarni  <[email protected]>
 
         Unreviewed. Build fix for linux-bot (qt) after r109021.

Modified: releases/WebKitGTK/webkit-1.8/Source/_javascript_Core/wtf/DateMath.cpp (111956 => 111957)


--- releases/WebKitGTK/webkit-1.8/Source/_javascript_Core/wtf/DateMath.cpp	2012-03-24 01:08:17 UTC (rev 111956)
+++ releases/WebKitGTK/webkit-1.8/Source/_javascript_Core/wtf/DateMath.cpp	2012-03-24 01:10:45 UTC (rev 111957)
@@ -935,6 +935,14 @@
             }
         }
     }
+    
+    // The year may be after the time but before the time zone.
+    if (isASCIIDigit(*dateString) && year == -1) {
+        if (!parseLong(dateString, &newPosStr, 10, &year))
+            return std::numeric_limits<double>::quiet_NaN();
+        dateString = newPosStr;
+        skipSpacesAndComments(dateString);
+    }
 
     // Don't fail if the time zone is missing. 
     // Some websites omit the time zone (4275206).
@@ -987,10 +995,9 @@
         if (!parseLong(dateString, &newPosStr, 10, &year))
             return std::numeric_limits<double>::quiet_NaN();
         dateString = newPosStr;
+        skipSpacesAndComments(dateString);
     }
 
-    skipSpacesAndComments(dateString);
-
     // Trailing garbage
     if (*dateString)
         return std::numeric_limits<double>::quiet_NaN();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to