Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: Source/WebCore/inspector/front-end/CallStackSidebarPane.js

Issue 9430052: Merge 107681 - Web Inspector: [REGRESSION] Copy Stack Trace is broken (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/inspector/debugger/copy-stack-trace-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 var contextMenu = new WebInspector.ContextMenu(); 120 var contextMenu = new WebInspector.ContextMenu();
121 contextMenu.appendItem(WebInspector.UIString("Copy Stack Trace"), this._ copyStackTrace.bind(this)); 121 contextMenu.appendItem(WebInspector.UIString("Copy Stack Trace"), this._ copyStackTrace.bind(this));
122 contextMenu.show(event); 122 contextMenu.show(event);
123 }, 123 },
124 124
125 _copyStackTrace: function() 125 _copyStackTrace: function()
126 { 126 {
127 var text = ""; 127 var text = "";
128 for (var i = 0; i < this.placards.length; ++i) 128 for (var i = 0; i < this.placards.length; ++i)
129 text += this.placards[i]._text + "\n"; 129 text += this.placards[i].title + " (" + this.placards[i].subtitle + ")\n";
130 InspectorFrontendHost.copyText(text); 130 InspectorFrontendHost.copyText(text);
131 }, 131 },
132 132
133 registerShortcuts: function(section, registerShortcutDelegate) 133 registerShortcuts: function(section, registerShortcutDelegate)
134 { 134 {
135 var nextCallFrame = WebInspector.KeyboardShortcut.makeDescriptor(WebInsp ector.KeyboardShortcut.Keys.Period, 135 var nextCallFrame = WebInspector.KeyboardShortcut.makeDescriptor(WebInsp ector.KeyboardShortcut.Keys.Period,
136 WebInspector.KeyboardShortcut.Modifiers.Ctrl); 136 WebInspector.KeyboardShortcut.Modifiers.Ctrl);
137 registerShortcutDelegate(nextCallFrame.key, this._selectNextCallFrameOnS tack.bind(this)); 137 registerShortcutDelegate(nextCallFrame.key, this._selectNextCallFrameOnS tack.bind(this));
138 138
139 var prevCallFrame = WebInspector.KeyboardShortcut.makeDescriptor(WebInsp ector.KeyboardShortcut.Keys.Comma, 139 var prevCallFrame = WebInspector.KeyboardShortcut.makeDescriptor(WebInsp ector.KeyboardShortcut.Keys.Comma,
140 WebInspector.KeyboardShortcut.Modifiers.Ctrl); 140 WebInspector.KeyboardShortcut.Modifiers.Ctrl);
141 registerShortcutDelegate(prevCallFrame.key, this._selectPreviousCallFram eOnStack.bind(this)); 141 registerShortcutDelegate(prevCallFrame.key, this._selectPreviousCallFram eOnStack.bind(this));
142 142
143 section.addRelatedKeys([ nextCallFrame.name, prevCallFrame.name ], WebIn spector.UIString("Next/previous call frame")); 143 section.addRelatedKeys([ nextCallFrame.name, prevCallFrame.name ], WebIn spector.UIString("Next/previous call frame"));
144 }, 144 },
145 145
146 setStatus: function(status) 146 setStatus: function(status)
147 { 147 {
148 var statusMessageElement = document.createElement("div"); 148 var statusMessageElement = document.createElement("div");
149 statusMessageElement.className = "info"; 149 statusMessageElement.className = "info";
150 if (typeof status === "string") 150 if (typeof status === "string")
151 statusMessageElement.textContent = status; 151 statusMessageElement.textContent = status;
152 else 152 else
153 statusMessageElement.appendChild(status); 153 statusMessageElement.appendChild(status);
154 this.bodyElement.appendChild(statusMessageElement); 154 this.bodyElement.appendChild(statusMessageElement);
155 } 155 }
156 } 156 }
157 157
158 WebInspector.CallStackSidebarPane.prototype.__proto__ = WebInspector.SidebarPane .prototype; 158 WebInspector.CallStackSidebarPane.prototype.__proto__ = WebInspector.SidebarPane .prototype;
OLDNEW
« no previous file with comments | « LayoutTests/inspector/debugger/copy-stack-trace-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698