Bug 125126 - Web Inspector: save view state when reloading main resources without provisional loads
Summary: Web Inspector: save view state when reloading main resources without provisio...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-12-02 17:53 PST by Brian Burg
Modified: 2016-12-13 15:40 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2013-12-02 17:53:03 PST
The code to restore inspector view state on page reload (in https://webkit.org/b/122125/) saves view state on the Frame.Event.ProvisionalLoadCommitted event, and then tries to restore it on Frame.Event.MainResourceDidChange. However, these events are not one-to-one for things that do not generate provisional loads.

Instead, we should add a symmetric MainResourceWillChange event that is 1:1 with MainResourceDidChange. It needs to be called from Frame.commitProvisionalLoad() and Frame.initialize() when Frame._mainResource is being set. The order should be:

MainResourceWillChange -> (maybe) ProvisionalLoadCommitted -> MainResourceDidChange.

Then, the view state serialization should happen on the first event.

NB. Code in FrameResourceManager.frameDidNavigate is responsible for deciding whether there is a provisional load or not.
Comment 1 Radar WebKit Bug Importer 2014-02-14 09:52:27 PST
<rdar://problem/16070884>