Title: [106230] trunk/Source/WebCore
Revision
106230
Author
[email protected]
Date
2012-01-30 04:06:16 -0800 (Mon, 30 Jan 2012)

Log Message

Web Inspector: TimelinePanel does not respect InspectorFrontendHost.canSaveAs
https://bugs.webkit.org/show_bug.cgi?id=77301

Reviewed by Vsevolod Vlasov.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106229 => 106230)


--- trunk/Source/WebCore/ChangeLog	2012-01-30 11:39:50 UTC (rev 106229)
+++ trunk/Source/WebCore/ChangeLog	2012-01-30 12:06:16 UTC (rev 106230)
@@ -1,3 +1,13 @@
+2012-01-30  Pavel Feldman  <[email protected]>
+
+        Web Inspector: TimelinePanel does not respect InspectorFrontendHost.canSaveAs
+        https://bugs.webkit.org/show_bug.cgi?id=77301
+
+        Reviewed by Vsevolod Vlasov.
+
+        * inspector/front-end/TimelinePanel.js:
+        (WebInspector.TimelinePanel.prototype._registerShortcuts):
+
 2012-01-30  Nikolas Zimmermann  <[email protected]>
 
         Not reviewed. Fix Clang build for real after r106218.

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


--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-01-30 11:39:50 UTC (rev 106229)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-01-30 12:06:16 UTC (rev 106230)
@@ -316,8 +316,10 @@
         this._shortcuts[shortcut.makeKey("e", modifiers.CtrlOrMeta)] = this._toggleTimelineButtonClicked.bind(this);
         section.addKey(shortcut.shortcutToString("e", modifiers.CtrlOrMeta), WebInspector.UIString("Start/stop recording"));
 
-        this._shortcuts[shortcut.makeKey("s", modifiers.CtrlOrMeta)] = this._saveToFile.bind(this);
-        section.addKey(shortcut.shortcutToString("s", modifiers.CtrlOrMeta), WebInspector.UIString("Save Timeline data\u2026"));
+        if (InspectorFrontendHost.canSaveAs()) {
+            this._shortcuts[shortcut.makeKey("s", modifiers.CtrlOrMeta)] = this._saveToFile.bind(this);
+            section.addKey(shortcut.shortcutToString("s", modifiers.CtrlOrMeta), WebInspector.UIString("Save Timeline data\u2026"));
+        }
 
         this._shortcuts[shortcut.makeKey("o", modifiers.CtrlOrMeta)] = this._fileSelectorElement.click.bind(this._fileSelectorElement);
         section.addKey(shortcut.shortcutToString("o", modifiers.CtrlOrMeta), WebInspector.UIString("Load Timeline data\u2026"));
@@ -340,7 +342,8 @@
     _contextMenu: function(event)
     {
         var contextMenu = new WebInspector.ContextMenu();
-        contextMenu.appendItem(WebInspector.UIString("&Save Timeline data\u2026"), this._saveToFile.bind(this));
+        if (InspectorFrontendHost.canSaveAs())
+            contextMenu.appendItem(WebInspector.UIString("&Save Timeline data\u2026"), this._saveToFile.bind(this));
         contextMenu.appendItem(WebInspector.UIString("L&oad Timeline data\u2026"), this._fileSelectorElement.click.bind(this._fileSelectorElement));
         contextMenu.show(event);
     },
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to