RESOLVED FIXED Bug 32832
Web Inspector: add Settings.js class that would manage frontend settings.
https://bugs.webkit.org/show_bug.cgi?id=32832
Summary Web Inspector: add Settings.js class that would manage frontend settings.
Pavel Feldman
Reported 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.
Attachments
[PATCH] Proposed fix (39.96 KB, patch)
2009-12-21 11:20 PST, Pavel Feldman
timothy: review+
Pavel Feldman
Comment 1 2009-12-21 11:20:33 PST
Created attachment 45340 [details] [PATCH] Proposed fix
WebKit Review Bot
Comment 2 2009-12-21 11:25:47 PST
style-queue ran check-webkit-style on attachment 45340 [details] without any errors.
Timothy Hatcher
Comment 3 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…
Pavel Feldman
Comment 4 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!
Pavel Feldman
Comment 5 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
Note You need to log in before you can comment on or make changes to this bug.