Skip to content
Permalink
Browse files
2011-03-09 Pavel Podivilov <podivilov@chromium.org>
        Reviewed by Pavel Feldman.

        Web Inspector: it should be possible to copy stack trace from call stack sidebar pane.
        https://bugs.webkit.org/show_bug.cgi?id=56024

        * English.lproj/localizedStrings.js:
        * inspector/front-end/CallStackSidebarPane.js:
        (WebInspector.CallStackSidebarPane):
        (WebInspector.CallStackSidebarPane.prototype.update):
        (WebInspector.CallStackSidebarPane.prototype._contextMenu):

Canonical link: https://commits.webkit.org/70546@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Pavel Podivilov committed Mar 9, 2011
1 parent b135eea commit 84467fa295013c26646e68107c71dc3c7b89a2af
Showing 3 changed files with 28 additions and 0 deletions.
@@ -1,3 +1,16 @@
2011-03-09 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: it should be possible to copy stack trace from call stack sidebar pane.
https://bugs.webkit.org/show_bug.cgi?id=56024

* English.lproj/localizedStrings.js:
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane):
(WebInspector.CallStackSidebarPane.prototype.update):
(WebInspector.CallStackSidebarPane.prototype._contextMenu):

2011-03-09 David Hyatt <hyatt@apple.com>

Reviewed by Darin Adler.
Binary file not shown.
@@ -27,6 +27,8 @@ WebInspector.CallStackSidebarPane = function(model)
{
WebInspector.SidebarPane.call(this, WebInspector.UIString("Call Stack"));
this._model = model;

this.bodyElement.addEventListener("contextmenu", this._contextMenu.bind(this), true);
}

WebInspector.CallStackSidebarPane.prototype = {
@@ -35,6 +37,7 @@ WebInspector.CallStackSidebarPane.prototype = {
this.bodyElement.removeChildren();

this.placards = [];
this._text = "";

if (!details) {
var infoElement = document.createElement("div");
@@ -78,6 +81,8 @@ WebInspector.CallStackSidebarPane.prototype = {

this.placards.push(placard);
this.bodyElement.appendChild(placard.element);

this._text += WebInspector.UIString("%s() at %s", i + 1, title, subtitle) + "\n";
}

if (details.breakpoint)
@@ -148,6 +153,16 @@ WebInspector.CallStackSidebarPane.prototype = {
this.selectedCallFrame = placardElement.placard.callFrame;
},

_contextMenu: function(event)
{
if (!this._text)
return;

var contextMenu = new WebInspector.ContextMenu();
contextMenu.appendItem(WebInspector.UIString("Copy Stack Trace"), InspectorFrontendHost.copyText.bind(InspectorFrontendHost, this._text));
contextMenu.show(event);
},

registerShortcuts: function(section)
{
this._shortcuts = {};

0 comments on commit 84467fa

Please sign in to comment.