Bug 32832 - Web Inspector: add Settings.js class that would manage frontend settings.
Summary: Web Inspector: add Settings.js class that would manage frontend settings.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-21 11:17 PST by Pavel Feldman
Modified: 2009-12-24 04:34 PST (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed fix (39.96 KB, patch)
2009-12-21 11:20 PST, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2009-12-21 11:17:55 PST
This change:
- Splits preferences and settings
- Pushes settings to the frontend on load
- Stores settings on each change
- Stores showInheritedStyles as setting.
Comment 1 Pavel Feldman 2009-12-21 11:20:33 PST
Created attachment 45340 [details]
[PATCH] Proposed fix
Comment 2 WebKit Review Bot 2009-12-21 11:25:47 PST
style-queue ran check-webkit-style on attachment 45340 [details] without any errors.
Comment 3 Timothy Hatcher 2009-12-23 13:19:31 PST
Comment on attachment 45340 [details]
[PATCH] Proposed fix

> +        this._installSetting("eventListenersFilter", "event-listeners-filter", "all");
> +        this._installSetting("colorFormat", "color-format", "hex");
> +        this._installSetting("resourcesLargeRows", "resources-large-rows", true);
> +        this._installSetting("watchExpressions", "watch-expressions", []);
> +        this._installSetting("lastViewedScriptFile", "last-viewed-script-file");
> +        this._installSetting("showInheritedComputedStyleProperties", "show-inherited-computed-style-properties", false);
> +        this._installSetting("showUserAgentStyles", "show-user-agent-styles", true);

I think it is weird that this class knows all the settings. I guess these are default values and like the old Settings object on WebInspector? So I guess it is the same. Just seemed weird at first…
Comment 4 Pavel Feldman 2009-12-24 03:18:12 PST
(In reply to comment #3)
> (From update of attachment 45340 [details])
> > +        this._installSetting("eventListenersFilter", "event-listeners-filter", "all");
> > +        this._installSetting("colorFormat", "color-format", "hex");
> > +        this._installSetting("resourcesLargeRows", "resources-large-rows", true);
> > +        this._installSetting("watchExpressions", "watch-expressions", []);
> > +        this._installSetting("lastViewedScriptFile", "last-viewed-script-file");
> > +        this._installSetting("showInheritedComputedStyleProperties", "show-inherited-computed-style-properties", false);
> > +        this._installSetting("showUserAgentStyles", "show-user-agent-styles", true);
> 
> I think it is weird that this class knows all the settings. I guess these are
> default values and like the old Settings object on WebInspector? So I guess it
> is the same. Just seemed weird at first…

I just wanted them to be in single place so that we knew what is persisted. I am fine with converting _installSetting into public registerSetting in the future!
Comment 5 Pavel Feldman 2009-12-24 04:34:12 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	D	LayoutTests/inspector/settings-set-get-expected.txt
	D	LayoutTests/inspector/settings-set-get.html
	M	LayoutTests/ChangeLog
	M	WebCore/ChangeLog
	M	WebCore/WebCore.gypi
	M	WebCore/WebCore.vcproj/WebCore.vcproj
	M	WebCore/inspector/InspectorBackend.cpp
	M	WebCore/inspector/InspectorBackend.h
	M	WebCore/inspector/InspectorBackend.idl
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/InspectorController.h
	M	WebCore/inspector/InspectorFrontend.cpp
	M	WebCore/inspector/InspectorFrontend.h
	M	WebCore/inspector/InspectorFrontendHost.cpp
	M	WebCore/inspector/InspectorFrontendHost.h
	M	WebCore/inspector/InspectorFrontendHost.idl
	M	WebCore/inspector/front-end/EventListenersSidebarPane.js
	M	WebCore/inspector/front-end/InspectorBackendStub.js
	M	WebCore/inspector/front-end/InspectorFrontendHostStub.js
	M	WebCore/inspector/front-end/ResourcesPanel.js
	M	WebCore/inspector/front-end/ScriptsPanel.js
	A	WebCore/inspector/front-end/Settings.js
	M	WebCore/inspector/front-end/StylesSidebarPane.js
	M	WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
	M	WebCore/inspector/front-end/WebKit.qrc
	M	WebCore/inspector/front-end/inspector.html
	M	WebCore/inspector/front-end/inspector.js
Committed r52547