Index: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js |
index 3942369a391dd3a8caafedf3443b2cbb1603ca51..5a89227ade816600b4a7ed0b083ec9d519ce3ac1 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js |
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js |
@@ -41,10 +41,18 @@ WebInspector.UISourceCode = function(project, url, contentType) |
this._project = project; |
this._url = url; |
- var pathComponents = WebInspector.ParsedURL.splitURLIntoPathComponents(url); |
- this._origin = pathComponents[0]; |
- this._parentURL = pathComponents.slice(0, -1).join("/"); |
- this._name = pathComponents[pathComponents.length - 1]; |
+ var parsedURL = url.asParsedURL(); |
+ if (parsedURL) { |
+ this._origin = parsedURL.securityOrigin(); |
+ this._parentURL = this._origin + parsedURL.folderPathComponents; |
+ this._name = parsedURL.lastPathComponent; |
+ if (parsedURL.queryParams) |
+ this._name += "?" + parsedURL.queryParams; |
+ } else { |
+ this._origin = ""; |
+ this._parentURL = ""; |
+ this._name = url; |
+ } |
this._contentType = contentType; |
/** @type {?function(?string)} */ |