Changeset 80655 in webkit


Ignore:
Timestamp:
Mar 9, 2011 11:21:30 AM (13 years ago)
Author:
podivilov@chromium.org
Message:

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):
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r80654 r80655  
     12011-03-09  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: it should be possible to copy stack trace from call stack sidebar pane.
     6        https://bugs.webkit.org/show_bug.cgi?id=56024
     7
     8        * English.lproj/localizedStrings.js:
     9        * inspector/front-end/CallStackSidebarPane.js:
     10        (WebInspector.CallStackSidebarPane):
     11        (WebInspector.CallStackSidebarPane.prototype.update):
     12        (WebInspector.CallStackSidebarPane.prototype._contextMenu):
     13
    1142011-03-09  David Hyatt  <hyatt@apple.com>
    215
  • trunk/Source/WebCore/inspector/front-end/CallStackSidebarPane.js

    r80228 r80655  
    2828    WebInspector.SidebarPane.call(this, WebInspector.UIString("Call Stack"));
    2929    this._model = model;
     30
     31    this.bodyElement.addEventListener("contextmenu", this._contextMenu.bind(this), true);
    3032}
    3133
     
    3638
    3739        this.placards = [];
     40        this._text = "";
    3841
    3942        if (!details) {
     
    7982            this.placards.push(placard);
    8083            this.bodyElement.appendChild(placard.element);
     84
     85            this._text += WebInspector.UIString("%s() at %s", i + 1, title, subtitle) + "\n";
    8186        }
    8287
     
    149154    },
    150155
     156    _contextMenu: function(event)
     157    {
     158        if (!this._text)
     159            return;
     160
     161        var contextMenu = new WebInspector.ContextMenu();
     162        contextMenu.appendItem(WebInspector.UIString("Copy Stack Trace"), InspectorFrontendHost.copyText.bind(InspectorFrontendHost, this._text));
     163        contextMenu.show(event);
     164    },
     165
    151166    registerShortcuts: function(section)
    152167    {
Note: See TracChangeset for help on using the changeset viewer.