Bug 144512 - Web Inspector: REGRESSION: Resources section doesn't update after changes are made to a local file
Summary: Web Inspector: REGRESSION: Resources section doesn't update after changes are...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks: 144513
  Show dependency treegraph
 
Reported: 2015-05-01 17:49 PDT by Timothy Hatcher
Modified: 2015-05-02 02:37 PDT (History)
8 users (show)

See Also:


Attachments
Patch (11.08 KB, patch)
2015-05-01 17:54 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2015-05-01 17:49:33 PDT
If you create a local html file, load it in Safari, enable the Web Inspector and move to the Resrouce view, update the local html file, refersh the page, and view the code in the Resources view, it doesn't change. Essentially, the update code does not appear.

* STEPS TO REPRODUCE
1. Launch WebKit nightly
2. Open the attached sample HTML file in Safari
3. Enable the "Develop" menu via the Safari Advanced preferences
4. Via the Develop menu, enable the Web Inspector
5. Switch to the Resrouces view inside the Web Inspector and view the code
6. Open the HTML file from its location on disk an modify it; for example, just below line 5 (which includes "console.log('page loaded');"), add "document.getElementById('target_div');"
7. Swich back to Safari, refresh the page, and view the code in the Resources view

* CURRENT RESULT
The code in the Resources section of the Web Inspector aren't updated; the original code is still visible (see the attached screen recording).

* INTENDED RESULT
If chages are made to the local file, its associated code should always update the Resources section of the Web Inspector upon refresh.

rdar://problem/20755411
Comment 1 Timothy Hatcher 2015-05-01 17:54:59 PDT
Created attachment 252207 [details]
Patch
Comment 2 Joseph Pecoraro 2015-05-01 21:56:02 PDT
Comment on attachment 252207 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js:-167
> -        // The navigation path needs update when the main frame changes, since all resources are under the main frame.
> -        this.contentBrowser.updateHierarchicalPathForCurrentContentView();

Is this updateHierarchicalPathForCurrentContentView call still needed?

If not, we should get rid of it, because this is was the only caller!

> Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js:183
> +        // Cookie restoration will attempt to re-select the resource we were showing.

Nit: "State restoration" instead of "Cookie restoration"?
Comment 3 Timothy Hatcher 2015-05-02 01:49:54 PDT
Comment on attachment 252207 [details]
Patch

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

>> Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js:-167
>> -        this.contentBrowser.updateHierarchicalPathForCurrentContentView();
> 
> Is this updateHierarchicalPathForCurrentContentView call still needed?
> 
> If not, we should get rid of it, because this is was the only caller!

Stand by, I have a new use for it in a coming patch.
Comment 4 WebKit Commit Bot 2015-05-02 02:37:30 PDT
Comment on attachment 252207 [details]
Patch

Clearing flags on attachment: 252207

Committed r183713: <http://trac.webkit.org/changeset/183713>
Comment 5 WebKit Commit Bot 2015-05-02 02:37:35 PDT
All reviewed patches have been landed.  Closing bug.