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>
Status: RESOLVED FIXED    
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   
Attachments:
Description Flags
Patch none

Brian Burg
Reported 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.
Attachments
Patch (3.21 KB, patch)
2015-02-07 21:03 PST, Brian Burg
no flags
Radar WebKit Bug Importer
Comment 1 2015-02-06 15:38:50 PST
Brian Burg
Comment 2 2015-02-07 21:03:51 PST
Brian Burg
Comment 3 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.
WebKit Commit Bot
Comment 4 2015-02-09 08:37:44 PST
Comment on attachment 246233 [details] Patch Clearing flags on attachment: 246233 Committed r179828: <http://trac.webkit.org/changeset/179828>
WebKit Commit Bot
Comment 5 2015-02-09 08:37:50 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.