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

Side by Side Diff: Source/devtools/front_end/common/ParsedURL.js

Issue 656453002: DevTools: [SSP] show links for matched styles with spaces in source URL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline 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
OLDNEW
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 this.folderPathComponents = path.substring(0, lastSlashIndex); 83 this.folderPathComponents = path.substring(0, lastSlashIndex);
84 this.lastPathComponent = path.substring(lastSlashIndex + 1); 84 this.lastPathComponent = path.substring(lastSlashIndex + 1);
85 } else 85 } else
86 this.lastPathComponent = path; 86 this.lastPathComponent = path;
87 } 87 }
88 88
89 /** 89 /**
90 * @param {string} url 90 * @param {string} url
91 * @return {!Array.<string>} 91 * @return {!Array.<string>}
92 */ 92 */
93 WebInspector.ParsedURL.splitURL = function(url) 93 WebInspector.ParsedURL.splitURLIntoPathComponents = function(url)
94 { 94 {
95 var parsedURL = new WebInspector.ParsedURL(url); 95 var parsedURL = new WebInspector.ParsedURL(decodeURI(url));
96 var origin; 96 var origin;
97 var folderPath; 97 var folderPath;
98 var name; 98 var name;
99 if (parsedURL.isValid) { 99 if (parsedURL.isValid) {
100 origin = parsedURL.scheme + "://" + parsedURL.host; 100 origin = parsedURL.scheme + "://" + parsedURL.host;
101 if (parsedURL.port) 101 if (parsedURL.port)
102 origin += ":" + parsedURL.port; 102 origin += ":" + parsedURL.port;
103 folderPath = parsedURL.folderPathComponents; 103 folderPath = parsedURL.folderPathComponents;
104 name = parsedURL.lastPathComponent; 104 name = parsedURL.lastPathComponent;
105 if (parsedURL.queryParams) 105 if (parsedURL.queryParams)
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 /** 238 /**
239 * @return {?WebInspector.ParsedURL} 239 * @return {?WebInspector.ParsedURL}
240 */ 240 */
241 String.prototype.asParsedURL = function() 241 String.prototype.asParsedURL = function()
242 { 242 {
243 var parsedURL = new WebInspector.ParsedURL(this.toString()); 243 var parsedURL = new WebInspector.ParsedURL(this.toString());
244 if (parsedURL.isValid) 244 if (parsedURL.isValid)
245 return parsedURL; 245 return parsedURL;
246 return null; 246 return null;
247 } 247 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/bindings/NetworkWorkspaceBinding.js ('k') | Source/devtools/front_end/workspace/Workspace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698