Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 728 | 728 |
| 729 /** | 729 /** |
| 730 * @param {string} url | 730 * @param {string} url |
| 731 * @return {?WebInspector.UISourceCode} | 731 * @return {?WebInspector.UISourceCode} |
| 732 */ | 732 */ |
| 733 _networkUISourceCodeForURL: function(url) | 733 _networkUISourceCodeForURL: function(url) |
| 734 { | 734 { |
| 735 var splitURL = WebInspector.ParsedURL.splitURL(url); | 735 var splitURL = WebInspector.ParsedURL.splitURL(url); |
| 736 var projectId = splitURL[0]; | 736 var projectId = splitURL[0]; |
| 737 var project = this.project(projectId); | 737 var project = this.project(projectId); |
| 738 return project ? project.uiSourceCode(splitURL.slice(1).join("/")) : nul l; | 738 var path = decodeURI(splitURL.slice(1).join("/")); |
| 739 return project ? project.uiSourceCode(path) : null; | |
| 739 }, | 740 }, |
| 740 | 741 |
| 741 /** | 742 /** |
| 742 * @param {string} url | 743 * @param {string} url |
| 743 * @return {?WebInspector.UISourceCode} | 744 * @return {?WebInspector.UISourceCode} |
| 744 */ | 745 */ |
| 745 _contentScriptUISourceCodeForURL: function(url) | 746 _contentScriptUISourceCodeForURL: function(url) |
| 746 { | 747 { |
| 747 var splitURL = WebInspector.ParsedURL.splitURL(url); | 748 var splitURL = WebInspector.ParsedURL.splitURL(url); |
| 748 var projectId = "contentscripts:" + splitURL[0]; | 749 var projectId = "contentscripts:" + splitURL[0]; |
| 749 var project = this.project(projectId); | 750 var project = this.project(projectId); |
| 750 return project ? project.uiSourceCode(splitURL.slice(1).join("/")) : nul l; | 751 var path = decodeURI(splitURL.slice(1).join("/")); |
|
vsevik
2014/10/14 07:41:04
you are doing decodeURI for the full path here whe
| |
| 752 return project ? project.uiSourceCode(path) : null; | |
| 751 }, | 753 }, |
| 752 | 754 |
| 753 /** | 755 /** |
| 754 * @param {string} url | 756 * @param {string} url |
| 755 * @return {?WebInspector.UISourceCode} | 757 * @return {?WebInspector.UISourceCode} |
| 756 */ | 758 */ |
| 757 uiSourceCodeForURL: function(url) | 759 uiSourceCodeForURL: function(url) |
| 758 { | 760 { |
| 759 var file = this._fileSystemMapping.fileForURL(url); | 761 var file = this._fileSystemMapping.fileForURL(url); |
| 760 if (!file) | 762 if (!file) |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 843 this.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, l istener, this); | 845 this.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, l istener, this); |
| 844 }, | 846 }, |
| 845 | 847 |
| 846 __proto__: WebInspector.Object.prototype | 848 __proto__: WebInspector.Object.prototype |
| 847 } | 849 } |
| 848 | 850 |
| 849 /** | 851 /** |
| 850 * @type {!WebInspector.Workspace} | 852 * @type {!WebInspector.Workspace} |
| 851 */ | 853 */ |
| 852 WebInspector.workspace; | 854 WebInspector.workspace; |
| OLD | NEW |