https://bugs.webkit.org/show_bug.cgi?id=68657
Reviewed by Yury Semikhatsky.
* English.lproj/localizedStrings.js:
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype.showAnchorLocation):
(WebInspector.NetworkPanel.prototype.revealAndHighlightResource):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
(WebInspector.FrameResourceTreeElement.prototype._appendOpenInNetworkPanelAction):
* inspector/front-end/inspector.js:
(WebInspector.openInNetworkPanelLabel):
(WebInspector.openRequestInNetworkPanel):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95801
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-09-23 Vsevolod Vlasov <vsevik@chromium.org>
+
+ Web Inspector: Add context menu action to navigate from resources panel resource to network panel.
+ https://bugs.webkit.org/show_bug.cgi?id=68657
+
+ Reviewed by Yury Semikhatsky.
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/NetworkPanel.js:
+ (WebInspector.NetworkPanel.prototype.showAnchorLocation):
+ (WebInspector.NetworkPanel.prototype.revealAndHighlightResource):
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
+ (WebInspector.FrameResourceTreeElement.prototype._appendOpenInNetworkPanelAction):
+ * inspector/front-end/inspector.js:
+ (WebInspector.openInNetworkPanelLabel):
+ (WebInspector.openRequestInNetworkPanel):
+
2011-09-23 Deepak Sherveghar <bpwv64@motorola.com>
[Gtk] Title attribute is not respected on option elements.
showAnchorLocation: function(anchor)
{
var resource = this._resourceByAnchor(anchor);
+ this.revealAndHighlightResource(resource)
+ },
+ revealAndHighlightResource: function(resource)
+ {
this._toggleGridMode();
if (resource)
this._networkLogView.revealAndHighlightResource(resource);
{
var contextMenu = new WebInspector.ContextMenu();
contextMenu.appendItem(WebInspector.openLinkExternallyLabel(), WebInspector.openResource.bind(WebInspector, this._resource.url, false));
+ this._appendOpenInNetworkPanelAction(contextMenu, event);
this._appendSaveAsAction(contextMenu, event);
contextMenu.show(event);
},
+ _appendOpenInNetworkPanelAction: function(contextMenu, event)
+ {
+ if (!this._resource.requestId)
+ return;
+
+ contextMenu.appendItem(WebInspector.openInNetworkPanelLabel(), WebInspector.openRequestInNetworkPanel.bind(WebInspector, this._resource));
+ },
+
_appendSaveAsAction: function(contextMenu, event)
{
if (!Preferences.saveAsAvailable)
return WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Open link in new tab" : "Open Link in New Tab");
},
+ openInNetworkPanelLabel: function()
+ {
+ return WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Open in network panel" : "Open in Network Panel");
+ },
+
copyLinkAddressLabel: function()
{
return WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Copy link address" : "Copy Link Address");
PageAgent.open(resourceURL, true);
}
+WebInspector.openRequestInNetworkPanel = function(resource)
+{
+ WebInspector.showPanel("network");
+ WebInspector.panels.network.revealAndHighlightResource(resource);
+}
+
WebInspector._registerShortcuts = function()
{
var shortcut = WebInspector.KeyboardShortcut;