Bug 151151 - Web Inspector: inspector settings should not be shared between different inspection levels
Summary: Web Inspector: inspector settings should not be shared between different insp...
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: BJ Burg
URL:
Keywords: InRadar
Depends on: 151573
Blocks: InspectorDebug
  Show dependency treegraph
 
Reported: 2015-11-11 13:14 PST by BJ Burg
Modified: 2015-11-23 18:50 PST (History)
8 users (show)

See Also:


Attachments
WIP (15.09 KB, patch)
2015-11-23 09:46 PST, BJ Burg
no flags Details | Formatted Diff | Diff
How WK1 inspection levels are computed (767.99 KB, image/jpeg)
2015-11-23 14:55 PST, BJ Burg
no flags Details
Proposed Fix (22.94 KB, patch)
2015-11-23 15:34 PST, BJ Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2015-11-11 13:14:37 PST
SUMMARY:

AFAIK, local storage settings (WebInspector.Setting) are only saved to local storage when the inspector closes.
It's really easy to blow away your breakpoints if the inspector crashes. We should save this more often. Perhaps we can coalesce to do this every few seconds after a setting change.
Comment 1 Radar WebKit Bug Importer 2015-11-11 13:14:48 PST
<rdar://problem/23504865>
Comment 2 BJ Burg 2015-11-22 22:30:25 PST
On investigation, settings are set to local storage immediately, but there is no namespacing for different inspection levels. Retitling to fix this bug first.

There seems to be a separate bug about breakpoints not being saved to persistent storage in many cases (especially Inspector^2 when using Cmd-Q). I'll investigate that further after we use separate settings per inspection level.
Comment 3 BJ Burg 2015-11-23 09:46:57 PST
Created attachment 266090 [details]
WIP
Comment 4 BJ Burg 2015-11-23 14:55:57 PST
Created attachment 266100 [details]
How WK1 inspection levels are computed

I attached a drawing that shows how InspectorFrontendClientLocal computes inspection levels. The WK2 case is, surprisingly, much simpler to reason about.
Comment 5 BJ Burg 2015-11-23 15:34:47 PST
Created attachment 266102 [details]
Proposed Fix
Comment 6 WebKit Commit Bot 2015-11-23 18:49:59 PST
Comment on attachment 266102 [details]
Proposed Fix

Clearing flags on attachment: 266102

Committed r192756: <http://trac.webkit.org/changeset/192756>
Comment 7 WebKit Commit Bot 2015-11-23 18:50:02 PST
All reviewed patches have been landed.  Closing bug.