Bug 192192 - REGRESSION(r?): Web Inspector: Reloading no longer picks up changes in source files
Summary: REGRESSION(r?): Web Inspector: Reloading no longer picks up changes in source...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-29 15:19 PST by Nikita Vasilyev
Modified: 2019-01-15 14:39 PST (History)
2 users (show)

See Also:


Attachments
[Screenshot] Empty Elements tab (65.42 KB, image/png)
2018-11-29 15:24 PST, Nikita Vasilyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2018-11-29 15:19:30 PST
Developing is harder now that reloading Web Inspector doesn't pick up source code changes.

Steps:
1. Open Web Inspector
2. Make some WI source files changes
3. Right-click anywhere in Web Inspector
4. Click "Reload Web Inspector"

Actual:
Web Inspector reloads with the source files *before* the changes were made.

Expected:
Web Inspector reloads with the latest sources.
Comment 1 Nikita Vasilyev 2018-11-29 15:24:01 PST
Created attachment 356074 [details]
[Screenshot] Empty Elements tab

Opening a second level inspector and pressing Command-R reloads WI [1] as expected.

However, the Elements tab is shown empty.
Comment 2 Joseph Pecoraro 2019-01-15 14:39:08 PST
The old reload would do:

    location.reload()

Which ultimately does a load ignoring the cache in WebCore:

    void FrameLoader::reload(OptionSet<ReloadOption> options)
    {
        ...
        ResourceRequest& request = loader->request();

        // FIXME: We don't have a mechanism to revalidate the main resource without reloading at the moment.
        request.setCachePolicy(ResourceRequestCachePolicy::ReloadIgnoringCacheData);
        ...
    }

The new reload of Web Inspector (for PSON) - InspectorFrontendHost.reopen, just closes and opens the Web Inspector. This does an initial WebPageProxy::loadRequest which doesn't ignore the cache.

    void WebInspectorProxy::openLocalInspectorFrontend(bool canAttach, bool underTest)
    {
        ...
        m_inspectorPage->loadRequest(URL(URL(), m_underTest ? WebInspectorProxy::inspectorTestPageURL() : WebInspectorProxy::inspectorPageURL()));
    }

If we wanted to get this working for inspector² we would need some way to open the inspector ignoring the cache.