RESOLVED FIXED 108746
Web Inspector: Some initiator displayName of Network Panel are not correct when reload.
https://bugs.webkit.org/show_bug.cgi?id=108746
Summary Web Inspector: Some initiator displayName of Network Panel are not correct wh...
pdeng6
Reported 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/.
Attachments
initiator displayName of Network Panel (248.91 KB, image/png)
2013-02-02 00:21 PST, pdeng6
no flags
Patch (1.66 KB, patch)
2013-02-02 00:35 PST, pdeng6
no flags
Patch (2.69 KB, patch)
2013-02-05 19:47 PST, pdeng6
no flags
Patch (2.74 KB, patch)
2013-02-11 04:14 PST, pdeng6
no flags
pdeng6
Comment 1 2013-02-02 00:35:11 PST
Build Bot
Comment 2 2013-02-02 01:43:13 PST
Pavel Feldman
Comment 3 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 + "/").
pdeng6
Comment 4 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
pdeng6
Comment 5 2013-02-05 19:47:01 PST
Vsevolod Vlasov
Comment 6 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 + "/"
pdeng6
Comment 7 2013-02-11 04:14:35 PST
pdeng6
Comment 8 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
WebKit Review Bot
Comment 9 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>
WebKit Review Bot
Comment 10 2013-02-14 05:03:34 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.