Title: [95401] trunk/Source/WebCore
Revision
95401
Author
[email protected]
Date
2011-09-18 22:34:39 -0700 (Sun, 18 Sep 2011)

Log Message

Web Inspector: chromium-win: "Save timeline data" does nothing.
https://bugs.webkit.org/show_bug.cgi?id=68313

windows shell API function GetSaveFileName doesn't accept file names with ':' symbol.

Reviewed by Pavel Feldman.

* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelineModel.prototype._saveToFile):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (95400 => 95401)


--- trunk/Source/WebCore/ChangeLog	2011-09-19 01:29:10 UTC (rev 95400)
+++ trunk/Source/WebCore/ChangeLog	2011-09-19 05:34:39 UTC (rev 95401)
@@ -1,3 +1,15 @@
+2011-09-18  Ilya Tikhonovsky  <[email protected]>
+
+        Web Inspector: chromium-win: "Save timeline data" does nothing.
+        https://bugs.webkit.org/show_bug.cgi?id=68313
+
+        windows shell API function GetSaveFileName doesn't accept file names with ':' symbol.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/TimelinePanel.js:
+        (WebInspector.TimelineModel.prototype._saveToFile):
+
 2011-09-18  Dan Bernstein  <[email protected]>
 
         Try to fix the Chromium Mac build after r95391.

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (95400 => 95401)


--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2011-09-19 01:29:10 UTC (rev 95400)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2011-09-19 05:34:39 UTC (rev 95401)
@@ -1350,7 +1350,8 @@
             records[records.length - 1] = records[records.length - 1] + "]";
 
         var now= new Date();
-        InspectorFrontendHost.saveAs("TimelineRawData-" + now.toRFC3339() + ".json", records.join(",\n"));
+        var suggestedFileName = "TimelineRawData-" + now.toISO8601Compact() + ".json";
+        InspectorFrontendHost.saveAs(suggestedFileName, records.join(",\n"));
     },
 
     _reset: function()

Modified: trunk/Source/WebCore/inspector/front-end/utilities.js (95400 => 95401)


--- trunk/Source/WebCore/inspector/front-end/utilities.js	2011-09-19 01:29:10 UTC (rev 95400)
+++ trunk/Source/WebCore/inspector/front-end/utilities.js	2011-09-19 05:34:39 UTC (rev 95401)
@@ -535,21 +535,18 @@
     return num;
 }
 
-Date.prototype.toRFC3339 = function()
+Date.prototype.toISO8601Compact = function()
 {
     function leadZero(x)
     {
         return x > 9 ? x : '0' + x
     }
-    var offset = Math.abs(this.getTimezoneOffset());
-    var offsetString = Math.floor(offset / 60) + ':' + leadZero(offset % 60);
-    return this.getFullYear() + '-' +
-           leadZero(this.getMonth() + 1) + '-' +
+    return this.getFullYear() +
+           leadZero(this.getMonth() + 1) +
            leadZero(this.getDate()) + 'T' +
-           leadZero(this.getHours()) + ':' +
-           leadZero(this.getMinutes()) + ':' +
-           leadZero(this.getSeconds()) +
-           (!offset ? "Z" : (this.getTimezoneOffset() > 0 ? '-' : '+') + offsetString);
+           leadZero(this.getHours()) +
+           leadZero(this.getMinutes()) +
+           leadZero(this.getSeconds());
 }
 
 HTMLTextAreaElement.prototype.moveCursorToEnd = function()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to