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

Side by Side Diff: Source/devtools/front_end/sources/WorkspaceMappingTip.js

Issue 659403006: DevTools: do not consider ? a shortcut while editing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 1
2 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @param {!WebInspector.SourcesPanel} sourcesPanel 8 * @param {!WebInspector.SourcesPanel} sourcesPanel
9 * @param {!WebInspector.Workspace} workspace 9 * @param {!WebInspector.Workspace} workspace
10 */ 10 */
(...skipping 30 matching lines...) Expand all
41 if (!uiSourceCodeFrame.isShowing()) 41 if (!uiSourceCodeFrame.isShowing())
42 return; 42 return;
43 if (uiSourceCode[WebInspector.WorkspaceMappingTip._infobarSymbol]) 43 if (uiSourceCode[WebInspector.WorkspaceMappingTip._infobarSymbol])
44 return; 44 return;
45 45
46 // First try mapping filesystem -> network. 46 // First try mapping filesystem -> network.
47 if (uiSourceCode.project().type() === WebInspector.projectTypes.FileSyst em) { 47 if (uiSourceCode.project().type() === WebInspector.projectTypes.FileSyst em) {
48 var hasMappings = !!uiSourceCode.url; 48 var hasMappings = !!uiSourceCode.url;
49 if (hasMappings) 49 if (hasMappings)
50 return; 50 return;
51 }
52 51
53 var networkProjects = this._workspace.projectsForType(WebInspector.proje ctTypes.Network); 52 var networkProjects = this._workspace.projectsForType(WebInspector.p rojectTypes.Network);
54 networkProjects = networkProjects.concat(this._workspace.projectsForType (WebInspector.projectTypes.ContentScripts)); 53 networkProjects = networkProjects.concat(this._workspace.projectsFor Type(WebInspector.projectTypes.ContentScripts));
55 for (var i = 0; i < networkProjects.length; ++i) { 54 for (var i = 0; i < networkProjects.length; ++i) {
56 var name = uiSourceCode.name(); 55 var name = uiSourceCode.name();
57 var networkUiSourceCodes = networkProjects[i].uiSourceCodes(); 56 var networkUiSourceCodes = networkProjects[i].uiSourceCodes();
58 for (var j = 0; j < networkUiSourceCodes.length; ++j) { 57 for (var j = 0; j < networkUiSourceCodes.length; ++j) {
59 if (networkUiSourceCodes[j].name() === name) { 58 if (networkUiSourceCodes[j].name() === name) {
60 this._createMappingInfobar(uiSourceCode, false); 59 this._createMappingInfobar(uiSourceCode, false);
61 return; 60 return;
61 }
62 } 62 }
63 } 63 }
64 } 64 }
65 65
66 // Then map network -> filesystem. 66 // Then map network -> filesystem.
67 if (uiSourceCode.project().type() === WebInspector.projectTypes.Network || uiSourceCode.project().type() === WebInspector.projectTypes.ContentScripts) { 67 if (uiSourceCode.project().type() === WebInspector.projectTypes.Network || uiSourceCode.project().type() === WebInspector.projectTypes.ContentScripts) {
68 if (this._workspace.uiSourceCodeForURL(uiSourceCode.url) !== uiSourc eCode) 68 if (this._workspace.uiSourceCodeForURL(uiSourceCode.url) !== uiSourc eCode)
69 return; 69 return;
70 70
71 var filesystemProjects = this._workspace.projectsForType(WebInspecto r.projectTypes.FileSystem); 71 var filesystemProjects = this._workspace.projectsForType(WebInspecto r.projectTypes.FileSystem);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 var rowElement = infobar.createDetailsRowMessage(WebInspector.UIString(" For more information on workspaces, refer to the ")); 145 var rowElement = infobar.createDetailsRowMessage(WebInspector.UIString(" For more information on workspaces, refer to the "));
146 var a = rowElement.createChild("a"); 146 var a = rowElement.createChild("a");
147 a.textContent = "workspaces documentation"; 147 a.textContent = "workspaces documentation";
148 a.href = "https://developer.chrome.com/devtools/docs/workspaces"; 148 a.href = "https://developer.chrome.com/devtools/docs/workspaces";
149 rowElement.createTextChild("."); 149 rowElement.createTextChild(".");
150 uiSourceCode[WebInspector.WorkspaceMappingTip._infobarSymbol] = infobar; 150 uiSourceCode[WebInspector.WorkspaceMappingTip._infobarSymbol] = infobar;
151 uiSourceCodeFrame.attachInfobars([infobar]); 151 uiSourceCodeFrame.attachInfobars([infobar]);
152 WebInspector.runCSSAnimationOnce(infobar.element, "source-frame-infobar- animation"); 152 WebInspector.runCSSAnimationOnce(infobar.element, "source-frame-infobar- animation");
153 } 153 }
154 } 154 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js ('k') | Source/devtools/front_end/ui/ShortcutRegistry.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698