[Webkit-unassigned] [Bug 113239] Web Inspector: REGRESSION: Standalone image documents fail to return resource content

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 1 01:07:10 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=113239





--- Comment #6 from pdeng6 <pan.deng at intel.com>  2013-04-01 01:05:21 PST ---
(From update of attachment 195530)
View in context: https://bugs.webkit.org/attachment.cgi?id=195530&action=review

>> Source/WebCore/inspector/InspectorPageAgent.cpp:326
>> +        return MIMETypeRegistry::isSupportedImageMIMEType(cachedResource.response().mimeType()) ? InspectorPageAgent::ImageResource : InspectorPageAgent::DocumentResource;
> 
> Why not to check cached resource's type instead?

Currently, besides document resource, standalone image/script/css... will also be requested as cachedResource::MainResource in loader, so only cachedResource::MainResource type is not enough to understand the inspector type.

>> Source/WebCore/inspector/InspectorResourceAgent.cpp:273
>> +    else if (equalIgnoringFragmentIdentifier(response.url(), loader->url()) && !loader->isCommitted() && type == InspectorPageAgent::OtherResource)
> 
> Why would other result in document?

"&& type == InspectorPageAgent::OtherResource" is there before https://trac.webkit.org/changeset/107672.
I think without this condition, the rule is too strong, for example, http://daringfireball.net/misc/2013/03/newyorker-infographic.jpg was request alone, its documentloader url and response url will be the same, then its type will be forcefully set to DocumentResource for inspector without considering any previous prediction.

thanks for your review :)
Pan

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list