+2013-02-14 Pan Deng <pan.deng@intel.com>
+
+ [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.
+ https://bugs.webkit.org/show_bug.cgi?id=108746.
+
+ Reviewed by Vsevolod Vlasov.
+
+ WebInspector.displayNameForURL() does not work as expected in the reload scenario,
+ for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another,
+ the full host name will be displayed.
+ This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL.
+
+ No new tests.
+
+ * inspector/front-end/ParsedURL.js:
+ (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario.
+ * inspector/front-end/ResourceUtils.js:
+ (WebInspector.displayNameForURL): add host in the head if url trimed as a "/".
+
2013-02-14 Alexei Filippov <alph@chromium.org>
Web Inspector: fix to record button remaining red after heap snapshot is taken
return this.url;
this._displayName = this.lastPathComponent;
- if (!this._displayName)
- this._displayName = this.host;
+ if (!this._displayName && this.host)
+ this._displayName = this.host + "/";
if (!this._displayName && this.url)
this._displayName = this.url.trimURL(WebInspector.inspectedPageDomain ? WebInspector.inspectedPageDomain : "");
if (this._displayName === "/")
return url.substring(index);
}
- return parsedURL ? url.trimURL(parsedURL.host) : url;
+ if (!parsedURL)
+ return url;
+
+ var displayName = url.trimURL(parsedURL.host);
+ return displayName === "/" ? parsedURL.host + "/" : displayName;
}
/**