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

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

Issue 11413082: Merge 134944 - Web Inspector: Workaround to show shortcuts for panels that hasn't been loaded. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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 | « no previous file | Source/WebCore/inspector/front-end/inspector.js » ('j') | 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 */ 33 */
34 WebInspector.ShortcutsScreen = function() 34 WebInspector.ShortcutsScreen = function(finishShortcutsRegistrationCallback)
35 { 35 {
36 this._sections = {}; 36 this._sections = {};
37 this._finishShortcutsRegistrationCallback = finishShortcutsRegistrationCallb ack;
37 } 38 }
38 39
39 WebInspector.ShortcutsScreen.prototype = { 40 WebInspector.ShortcutsScreen.prototype = {
40 section: function(name) 41 section: function(name)
41 { 42 {
42 var section = this._sections[name]; 43 var section = this._sections[name];
43 if (!section) 44 if (!section)
44 this._sections[name] = section = new WebInspector.ShortcutsSection(n ame); 45 this._sections[name] = section = new WebInspector.ShortcutsSection(n ame);
45 return section; 46 return section;
46 }, 47 },
47 48
48 createShortcutsTabView: function() 49 createShortcutsTabView: function()
49 { 50 {
51 if (this._finishShortcutsRegistrationCallback)
52 this._finishShortcutsRegistrationCallback();
53 delete this._finishShortcutsRegistrationCallback;
54
50 var orderedSections = []; 55 var orderedSections = [];
51 for (var section in this._sections) 56 for (var section in this._sections)
52 orderedSections.push(this._sections[section]); 57 orderedSections.push(this._sections[section]);
53 function compareSections(a, b) 58 function compareSections(a, b)
54 { 59 {
55 return a.order - b.order; 60 return a.order - b.order;
56 } 61 }
57 orderedSections.sort(compareSections); 62 orderedSections.sort(compareSections);
58 63
59 var view = new WebInspector.View(); 64 var view = new WebInspector.View();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 { 155 {
151 var result = document.createDocumentFragment(); 156 var result = document.createDocumentFragment();
152 for (var i = 0; i < nodes.length; ++i) { 157 for (var i = 0; i < nodes.length; ++i) {
153 if (i > 0) 158 if (i > 0)
154 result.appendChild(delimiter.cloneNode(true)); 159 result.appendChild(delimiter.cloneNode(true));
155 result.appendChild(nodes[i]); 160 result.appendChild(nodes[i]);
156 } 161 }
157 return result; 162 return result;
158 } 163 }
159 } 164 }
OLDNEW
« no previous file with comments | « no previous file | Source/WebCore/inspector/front-end/inspector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698