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

Side by Side Diff: Source/devtools/front_end/StylesSidebarPane.js

Issue 23484056: [DevTools] Renaming Scripts panel to Sources panel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified missed files Created 7 years, 3 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 | « Source/devtools/front_end/SourcesSearchScope.js ('k') | Source/devtools/front_end/Tests.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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 } 987 }
988 } 988 }
989 989
990 var anchor; 990 var anchor;
991 if (rawLocation) 991 if (rawLocation)
992 anchor = this._parentPane._linkifier.linkifyCSSLocation(medi aHeader.id, rawLocation); 992 anchor = this._parentPane._linkifier.linkifyCSSLocation(medi aHeader.id, rawLocation);
993 else { 993 else {
994 // The "linkedStylesheet" case. 994 // The "linkedStylesheet" case.
995 anchor = WebInspector.linkifyResourceAsNode(media.sourceURL, undefined, "subtitle", media.sourceURL); 995 anchor = WebInspector.linkifyResourceAsNode(media.sourceURL, undefined, "subtitle", media.sourceURL);
996 } 996 }
997 anchor.preferredPanel = "scripts"; 997 anchor.preferredPanel = "sources";
998 anchor.style.float = "right"; 998 anchor.style.float = "right";
999 refElement.appendChild(anchor); 999 refElement.appendChild(anchor);
1000 } 1000 }
1001 1001
1002 var mediaTextElement = mediaDataElement.createChild("span"); 1002 var mediaTextElement = mediaDataElement.createChild("span");
1003 mediaTextElement.textContent = mediaText; 1003 mediaTextElement.textContent = mediaText;
1004 mediaTextElement.title = media.text; 1004 mediaTextElement.title = media.text;
1005 } 1005 }
1006 } 1006 }
1007 1007
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 1300
1301 _createRuleOriginNode: function() 1301 _createRuleOriginNode: function()
1302 { 1302 {
1303 /** 1303 /**
1304 * @param {string} url 1304 * @param {string} url
1305 * @param {number} line 1305 * @param {number} line
1306 */ 1306 */
1307 function linkifyUncopyable(url, line) 1307 function linkifyUncopyable(url, line)
1308 { 1308 {
1309 var link = WebInspector.linkifyResourceAsNode(url, line, "", url + " :" + (line + 1)); 1309 var link = WebInspector.linkifyResourceAsNode(url, line, "", url + " :" + (line + 1));
1310 link.preferredPanel = "scripts"; 1310 link.preferredPanel = "sources";
1311 link.classList.add("webkit-html-resource-link"); 1311 link.classList.add("webkit-html-resource-link");
1312 link.setAttribute("data-uncopyable", link.textContent); 1312 link.setAttribute("data-uncopyable", link.textContent);
1313 link.textContent = ""; 1313 link.textContent = "";
1314 return link; 1314 return link;
1315 } 1315 }
1316 1316
1317 if (this.styleRule.sourceURL) 1317 if (this.styleRule.sourceURL)
1318 return this._parentPane._linkifier.linkifyCSSLocation(this.rule.id.s tyleSheetId, this.rule.rawLocation) || linkifyUncopyable(this.styleRule.sourceUR L, this.rule.lineNumberInSource()); 1318 return this._parentPane._linkifier.linkifyCSSLocation(this.rule.id.s tyleSheetId, this.rule.rawLocation) || linkifyUncopyable(this.styleRule.sourceUR L, this.rule.lineNumberInSource());
1319 1319
1320 if (!this.rule) 1320 if (!this.rule)
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 /** 2269 /**
2270 * @param {Element} element 2270 * @param {Element} element
2271 */ 2271 */
2272 _navigateToSource: function(element) 2272 _navigateToSource: function(element)
2273 { 2273 {
2274 console.assert(this.section().navigable); 2274 console.assert(this.section().navigable);
2275 var propertyNameClicked = element === this.nameElement; 2275 var propertyNameClicked = element === this.nameElement;
2276 var uiLocation = this.property.uiLocation(propertyNameClicked); 2276 var uiLocation = this.property.uiLocation(propertyNameClicked);
2277 if (!uiLocation) 2277 if (!uiLocation)
2278 return; 2278 return;
2279 WebInspector.showPanel("scripts").showUILocation(uiLocation); 2279 WebInspector.showPanel("sources").showUILocation(uiLocation);
2280 }, 2280 },
2281 2281
2282 /** 2282 /**
2283 * @param {Element} element 2283 * @param {Element} element
2284 */ 2284 */
2285 _isNameElement: function(element) 2285 _isNameElement: function(element)
2286 { 2286 {
2287 return element.enclosingNodeOrSelfWithClass("webkit-css-property") === t his.nameElement; 2287 return element.enclosingNodeOrSelfWithClass("webkit-css-property") === t his.nameElement;
2288 }, 2288 },
2289 2289
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
2872 return; 2872 return;
2873 } 2873 }
2874 2874
2875 var results = this._cssCompletions.startsWith(prefix); 2875 var results = this._cssCompletions.startsWith(prefix);
2876 var selectedIndex = this._cssCompletions.mostUsedOf(results); 2876 var selectedIndex = this._cssCompletions.mostUsedOf(results);
2877 completionsReadyCallback(results, selectedIndex); 2877 completionsReadyCallback(results, selectedIndex);
2878 }, 2878 },
2879 2879
2880 __proto__: WebInspector.TextPrompt.prototype 2880 __proto__: WebInspector.TextPrompt.prototype
2881 } 2881 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/SourcesSearchScope.js ('k') | Source/devtools/front_end/Tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698