Title: [130261] trunk/Source/WebCore
- Revision
- 130261
- Author
- [email protected]
- Date
- 2012-10-03 01:33:59 -0700 (Wed, 03 Oct 2012)
Log Message
Web Inspector: "Load profile..." context menu item has to be shown only for left column with the list of profiles.
https://bugs.webkit.org/show_bug.cgi?id=98163
Reviewed by Yury Semikhatsky.
The text was changed to "Load Heap Snapshot..."
Also I changed "Save profile..." to "Save Heap Snapshot..." because other profiles don't support Save/Load operations yet.
The Load context menu item will appear only when the user clicked in sidebar the tree empty space or a profile.
* English.lproj/localizedStrings.js:
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
(WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (130260 => 130261)
--- trunk/Source/WebCore/ChangeLog 2012-10-03 08:01:25 UTC (rev 130260)
+++ trunk/Source/WebCore/ChangeLog 2012-10-03 08:33:59 UTC (rev 130261)
@@ -1,3 +1,19 @@
+2012-10-02 Ilya Tikhonovsky <[email protected]>
+
+ Web Inspector: "Load profile..." context menu item has to be shown only for left column with the list of profiles.
+ https://bugs.webkit.org/show_bug.cgi?id=98163
+
+ Reviewed by Yury Semikhatsky.
+
+ The text was changed to "Load Heap Snapshot..."
+ Also I changed "Save profile..." to "Save Heap Snapshot..." because other profiles don't support Save/Load operations yet.
+ The Load context menu item will appear only when the user clicked in sidebar the tree empty space or a profile.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ProfilesPanel.js:
+ (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
+ (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
+
2012-10-03 Harald Alvestrand <[email protected]>
Add data passing to the GetStats interface of RTCPeerConnection
Modified: trunk/Source/WebCore/English.lproj/localizedStrings.js (130260 => 130261)
--- trunk/Source/WebCore/English.lproj/localizedStrings.js 2012-10-03 08:01:25 UTC (rev 130260)
+++ trunk/Source/WebCore/English.lproj/localizedStrings.js 2012-10-03 08:33:59 UTC (rev 130261)
@@ -712,8 +712,9 @@
localizedStrings["'%s' not found."] = "'%s' not found.";
localizedStrings["'%s' is not readable"] = "'%s' is not readable";
localizedStrings["'%s' error %d"] = "'%s' error %d";
-localizedStrings["Load profile\u2026"] = "Load profile\u2026";
-localizedStrings["Save profile\u2026"] = "Save profile\u2026";
+localizedStrings["Load Heap Snapshot\u2026"] = "Load Heap Snapshot\u2026";
+localizedStrings["Save Heap Snapshot\u2026"] = "Save Heap Snapshot\u2026";
+localizedStrings["Delete Heap Snapshot"] = "Delete Heap Snapshot";
localizedStrings["Show debugger"] = "Show debugger";
localizedStrings["Hide debugger"] = "Hide debugger";
localizedStrings["Clipboard access is denied"] = "Clipboard access is denied";
Modified: trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js (130260 => 130261)
--- trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js 2012-10-03 08:01:25 UTC (rev 130260)
+++ trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js 2012-10-03 08:33:59 UTC (rev 130261)
@@ -428,11 +428,14 @@
element.treeElement.handleContextMenuEvent(event);
return;
}
- var contextMenu = new WebInspector.ContextMenu();
- if (this.visibleView instanceof WebInspector.HeapSnapshotView)
- this.visibleView.populateContextMenu(contextMenu, event);
- contextMenu.appendItem(WebInspector.UIString("Load profile\u2026"), this._fileSelectorElement.click.bind(this._fileSelectorElement));
- contextMenu.show(event);
+ if (element !== this.element || event.srcElement === this.sidebarElement) {
+ var contextMenu = new WebInspector.ContextMenu();
+ if (this.visibleView instanceof WebInspector.HeapSnapshotView)
+ this.visibleView.populateContextMenu(contextMenu, event);
+ contextMenu.appendItem(WebInspector.UIString("Load Heap Snapshot\u2026"), this._fileSelectorElement.click.bind(this._fileSelectorElement));
+ contextMenu.show(event);
+ }
+
},
/**
@@ -1246,12 +1249,16 @@
{
var profile = ""
var contextMenu = new WebInspector.ContextMenu();
- if (profile.canSaveToFile())
- contextMenu.appendItem(WebInspector.UIString("Save profile\u2026"), profile.saveToFile.bind(profile));
+ var profilesPanel = WebInspector.ProfilesPanel._instance;
// FIXME: use context menu provider
- var profilesPanel = WebInspector.ProfilesPanel._instance;
- contextMenu.appendItem(WebInspector.UIString("Load profile\u2026"), profilesPanel._fileSelectorElement.click.bind(profilesPanel._fileSelectorElement));
- contextMenu.appendItem(WebInspector.UIString("Delete profile"), this.ondelete.bind(this));
+ if (profile.canSaveToFile()) {
+ contextMenu.appendItem(WebInspector.UIString("Save Heap Snapshot\u2026"), profile.saveToFile.bind(profile));
+ contextMenu.appendItem(WebInspector.UIString("Load Heap Snapshot\u2026"), profilesPanel._fileSelectorElement.click.bind(profilesPanel._fileSelectorElement));
+ contextMenu.appendItem(WebInspector.UIString("Delete Heap Snapshot"), this.ondelete.bind(this));
+ } else {
+ contextMenu.appendItem(WebInspector.UIString("Load Heap Snapshot\u2026"), profilesPanel._fileSelectorElement.click.bind(profilesPanel._fileSelectorElement));
+ contextMenu.appendItem(WebInspector.UIString("Delete profile"), this.ondelete.bind(this));
+ }
contextMenu.show(event);
},
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes