Summary: | Web Inspector: after inspecting an image, selecting the main resource should show an image preview | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | BJ Burg <bburg> | ||||||
Component: | Web Inspector | Assignee: | Matt Baker <mattbaker> | ||||||
Status: | NEW --- | ||||||||
Severity: | Normal | CC: | inspector-bugzilla-changes, joepeck, mattbaker, timothy, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Created attachment 306591 [details]
Patch
Comment on attachment 306591 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306591&action=review > Source/WebCore/inspector/InspectorNetworkAgent.cpp:383 > + if (type != newType && (type != InspectorPageAgent::OtherResource && newType != InspectorPageAgent::DocumentResource) && newType != InspectorPageAgent::XHRResource && newType != InspectorPageAgent::OtherResource) This feels wrong. I'm not sure what type transitions are allowed here. Will investigate. Comment on attachment 306591 [details]
Patch
Does this fix the double resource in the sidebar?
(In reply to Timothy Hatcher from comment #4) > Comment on attachment 306591 [details] > Patch > > Does this fix the double resource in the sidebar? The change to FrameResourceManager.js:683 prevents a child from being added that duplicates the parent frame main resource. Comment on attachment 306591 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306591&action=review I'm going to r- because this patch probably no longer applies. >> Source/WebCore/inspector/InspectorNetworkAgent.cpp:383 >> + if (type != newType && (type != InspectorPageAgent::OtherResource && newType != InspectorPageAgent::DocumentResource) && newType != InspectorPageAgent::XHRResource && newType != InspectorPageAgent::OtherResource) > > This feels wrong. I'm not sure what type transitions are allowed here. Will investigate. I agree, this is confusing. It needs some kind of justification / explanation. Perhaps writings the condition differently would make it clearer? I think there are other places in the code that say "If this is a MainResource assume its a DocumentResource". Maybe that is the ultimate problem that should be addressed? |
Created attachment 297755 [details] [SCREENSHOT] STEPS TO REPRODUCE: 1. Drag an image into a tab 2. Open Web Inspector 3. Go to resources tab 4. Click on main resource => Shows a source code text editor, not the image