Bug 170065 - Web Inspector: Resource Details Sidebar displays previous image metrics when viewing resource where content load failed
Summary: Web Inspector: Resource Details Sidebar displays previous image metrics when ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-24 11:28 PDT by Joseph Pecoraro
Modified: 2017-03-27 16:19 PDT (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (5.01 KB, patch)
2017-03-24 11:30 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-03-24 11:28:38 PDT
Summary:
Resource Details Sidebar displays previous image metrics when viewing resource where content load failed

Steps to Reproduce:
1. Inspect https://web.whatsapp.com
2. Reload so we get all Image resources
3. Select a data:image/png image resource
  => Details Sidebar shows correct image size
4. Select a data:image/webp image resource
  => Details Sidebar shows previous image's size

Notes:
The frontend failed to load the content, so it should return a failure to the sidebar to update its display in some way (either dashes or remove the section).
Comment 1 Joseph Pecoraro 2017-03-24 11:28:52 PDT
<rdar://problem/27081591>
Comment 2 Joseph Pecoraro 2017-03-24 11:30:08 PDT
Created attachment 305306 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2017-03-24 11:30:48 PDT
Comment on attachment 305306 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=305306&action=review

> Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js:458
> +            } else
> +                hideImageSection.call(this);

An alternative would be to show the section and have emdash values. But seeing as we hide the section above if the `resource.failed` I matched that here.
Comment 4 Matt Baker 2017-03-27 15:50:07 PDT
Comment on attachment 305306 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=305306&action=review

>> Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js:458
>> +                hideImageSection.call(this);
> 
> An alternative would be to show the section and have emdash values. But seeing as we hide the section above if the `resource.failed` I matched that here.

r=me. I like this approach, rather than showing emdash values. Cuts down on clutter.
Comment 5 WebKit Commit Bot 2017-03-27 16:19:25 PDT
Comment on attachment 305306 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 305306

Committed r214436: <http://trac.webkit.org/changeset/214436>
Comment 6 WebKit Commit Bot 2017-03-27 16:19:28 PDT
All reviewed patches have been landed.  Closing bug.