|Summary:||Web Inspector: Some initiator displayName of Network Panel are not correct when reload.|
|Component:||Web Inspector (Deprecated)||Assignee:||Nobody <webkit-unassigned>|
|Severity:||Normal||CC:||apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, yurys|
|Version:||528+ (Nightly build)|
Description pdeng6 2013-02-02 00:21:20 PST
Created attachment 186217 [details] initiator displayName of Network Panel How to reproduce? step 1: load www.yahoo.com step 2: open inspector Network panel for yahoo step 3: refresh the inspected yahoo page. step 4: you can see some initiator info represent like "/:525", while some others "www.yahoo.com:525". Reason is WebInspector.displayNameForURL() is not work as expected with the parameter http://www.yahoo.com/ in the reload scenario, it was trimed to “/”in the final return. It root caused by side effect of change r127705, in which RequestUpdated event-handler was removed from ResourceTreeModel. Before the change, during the page reload, when front-end received the message of responseReceived for document http://www.yahoo.com/, the _resourcesMap in resourceTreeFrame will be updated, while after the change,it won’t be updated until document finishLoading message received. So to represent initiator of early finshloading resources, we request resource of http://www.yahoo.com/ in displayNameForURL() by function resourceForURL(), and finally found nothing in _resourcesMap of ResourceTreeFrame. To fix this, I suggest modify function displayNameForURL(), return the host name for URL which doesn’t contain path and query string, eg http://www.yahoo.com/.
Comment 2 Build Bot 2013-02-02 01:43:13 PST
Comment on attachment 186218 [details] Patch Attachment 186218 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/16331690
Comment 3 Pavel Feldman 2013-02-02 03:53:52 PST
Comment on attachment 186218 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186218&action=review > Source/WebCore/inspector/front-end/ResourceUtils.js:82 > + return parsedURL.host; This method is used in linkifier among other things. In some places, it might make more sense to render as "/" instead of "foo.com". Or at least as (parsedURL.host + "/").
Comment 4 pdeng6 2013-02-04 00:14:33 PST
(In reply to comment #3) > (From update of attachment 186218 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=186218&action=review > > > Source/WebCore/inspector/front-end/ResourceUtils.js:82 > > + return parsedURL.host; > > This method is used in linkifier among other things. In some places, it might make more sense to render as "/" instead of "foo.com". Or at least as (parsedURL.host + "/"). thanks for your timely review. Do you think this issue need a fix? I'm glad to work out a patch if true, can you assign this bug to me? :) thanks Pan
Comment 6 Vsevolod Vlasov 2013-02-11 01:26:38 PST
Comment on attachment 186746 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186746&action=review > Source/WebCore/inspector/front-end/ParsedURL.js:155 > if (!this._displayName) if (!this._displayName && this.host) this._displayName = this.host + "/"
Comment 8 pdeng6 2013-02-11 04:15:23 PST
(In reply to comment #6) > (From update of attachment 186746 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=186746&action=review > > > Source/WebCore/inspector/front-end/ParsedURL.js:155 > > if (!this._displayName) > > if (!this._displayName && this.host) > this._displayName = this.host + "/" Thanks, Done. Pan
Comment 9 WebKit Review Bot 2013-02-14 05:03:29 PST
Comment on attachment 187544 [details] Patch Clearing flags on attachment: 187544 Committed r142871: <http://trac.webkit.org/changeset/142871>
Comment 10 WebKit Review Bot 2013-02-14 05:03:34 PST
All reviewed patches have been landed. Closing bug.