Bug 141343

Summary: REGRESSION(r179705): 2nd-level inspector availability no longer controlled by DeveloperExtrasEnabled user default
Product: WebKit Reporter: Brian Burg <burg>
Component: Web InspectorAssignee: Brian Burg <burg>
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, kling, mattbaker, nvasilyev, sam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.10   
Description Flags
Patch none

Description Brian Burg 2015-02-06 15:38:34 PST
There might be a mismatch in prefix keys between two WebPreferences instances.

Instance (1) is made by lazy initialization of WKWebViewConfiguration's WebPreferences, using prefix of "WebKit" (WKPreferences:init)
Instance (2) is made by the inspector WKWebView's WebPageGroup, using prefix of ".WebKit2" (WebPageGroup::WebPageGroup).

Both instances appear to read from NSUserDefaults. We manually set DeveloperExtrasEnabled on instance (1) before calling WKWebView:initWithFrame and that has the intended effect, so this instance is probably the one to worry about.
When stepping through WebPreferences::platformInitialize(), it seems that the if (!m_identifier) test fails, so only the debug preferences (enumerated by FOR_EACH_WEBKIT_DEBUG_PREFERENCE) are populated from user defaults.
Comment 1 Radar WebKit Bug Importer 2015-02-06 15:38:50 PST
Comment 2 Brian Burg 2015-02-07 21:03:51 PST
Created attachment 246233 [details]
Comment 3 Brian Burg 2015-02-09 07:57:13 PST
Updated instructions at <https://trac.webkit.org/wiki/HackingWebInspector> to reflect new keys. However, we probably need to move the LogsPageMessagesToSystemConsoleEnabled key to the DEBUG group as well.
Comment 4 WebKit Commit Bot 2015-02-09 08:37:44 PST
Comment on attachment 246233 [details]

Clearing flags on attachment: 246233

Committed r179828: <http://trac.webkit.org/changeset/179828>
Comment 5 WebKit Commit Bot 2015-02-09 08:37:50 PST
All reviewed patches have been landed.  Closing bug.