+2011-09-18 Ilya Tikhonovsky <loislo@chromium.org>
+
+ 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 <mitz@apple.com>
Try to fix the Chromium Mac build after r95391.
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()
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()