Bug 195306 - Web Inspector: Reload actions from second level inspector should properly reload the inspected inspector
Summary: Web Inspector: Reload actions from second level inspector should properly rel...
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: 2019-03-04 19:41 PST by Joseph Pecoraro
Modified: 2019-03-07 12:45 PST (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.42 KB, patch)
2019-03-04 19:42 PST, 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 2019-03-04 19:41:02 PST
Reload actions from second level inspector should properly reload the inspected inspector

Can't use PageAgent.reload, need to InspectorFrontendHost.reopen.
Comment 1 Joseph Pecoraro 2019-03-04 19:42:03 PST
Created attachment 363583 [details]
[PATCH] Proposed Fix
Comment 2 Matt Baker 2019-03-04 20:02:16 PST
Comment on attachment 363583 [details]
[PATCH] Proposed Fix

r=me
Comment 3 WebKit Commit Bot 2019-03-04 20:28:05 PST
Comment on attachment 363583 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 363583

Committed r242410: <https://trac.webkit.org/changeset/242410>
Comment 4 WebKit Commit Bot 2019-03-04 20:28:06 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-03-04 20:29:18 PST
<rdar://problem/48588528>
Comment 6 Nikita Vasilyev 2019-03-06 15:59:39 PST
Now there's no way to reload Web Inspector so it picks up changes from the filesystem.

With this patch, pressing Command-R in 2nd level inspector doesn't pick up changes from the FS.

"Reload Inspector" context menu stopped doing it a few months ago.

😭
Comment 7 Joseph Pecoraro 2019-03-06 21:02:12 PST
(In reply to Nikita Vasilyev from comment #6)
> Now there's no way to reload Web Inspector so it picks up changes from the
> filesystem.
> 
> With this patch, pressing Command-R in 2nd level inspector doesn't pick up
> changes from the FS.
> 
> "Reload Inspector" context menu stopped doing it a few months ago.
> 
> 😭

Reloading from the file system never actually worked properly =(. It may have been a quick hack usable for development but it never re-initialized things properly. If we want to add something like that back we should make sure it works properly.
Comment 8 Nikita Vasilyev 2019-03-07 12:45:21 PST
(In reply to Joseph Pecoraro from comment #7)
> (In reply to Nikita Vasilyev from comment #6)
> > Now there's no way to reload Web Inspector so it picks up changes from the
> > filesystem.
> > 
> > With this patch, pressing Command-R in 2nd level inspector doesn't pick up
> > changes from the FS.
> > 
> > "Reload Inspector" context menu stopped doing it a few months ago.
> > 
> > 😭
> 
> Reloading from the file system never actually worked properly =(. It may
> have been a quick hack usable for development but it never re-initialized
> things properly. If we want to add something like that back we should make
> sure it works properly.

What do you mean by properly? I used it for development hundreds of times a day and now I can't.

How often do you need to reload 1st level Inspector from the 2nd level Inspector but not load the latest files from the filesystem?

This actually reads changes from the FS:

WI._reloadInspectedInspector = function()
{
    PageAgent.reload.invoke({ignoreCache: true}, function() {
        const options = {};
        WI.runtimeManager.evaluateInInspectedWindow(`InspectorFrontendHost.reopen()`, options, function(){});
    });
};

It reloads Inspector twice, essentially, but it actually works.