Changeset 61014 in webkit


Ignore:
Timestamp:
Jun 11, 2010 6:47:12 AM (14 years ago)
Author:
apavlov@chromium.org
Message:

2010-06-11 Alexander Pavlov <apavlov@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: Enable serialization/deserialization of the frontend state
https://bugs.webkit.org/show_bug.cgi?id=40228

WebCore:

  • inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::saveApplicationSettings): (WebCore::InspectorBackend::saveSessionSettings):
  • inspector/InspectorBackend.h:
  • inspector/InspectorBackend.idl:
  • inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::setSessionSettings): (WebCore::InspectorController::populateScriptObjects): (WebCore::InspectorController::didCommitLoad):
  • inspector/InspectorController.h:
  • inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::populateApplicationSettings): (WebCore::InspectorFrontend::populateSessionSettings):
  • inspector/InspectorFrontend.h:
  • inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._settingsLoaded): (WebInspector.ConsoleView.prototype._enterKeyPressed.printResult): (WebInspector.ConsoleView.prototype._enterKeyPressed):
  • inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype._settingsLoaded): (WebInspector.EventListenersSidebarPane.prototype): ():
  • inspector/front-end/InspectorBackendStub.js: (.WebInspector.InspectorBackendStub.prototype.saveApplicationSettings): (.WebInspector.InspectorBackendStub.prototype.saveSessionSettings):
  • inspector/front-end/ResourceView.js: (WebInspector.ResourceView.prototype._selectTab): (WebInspector.ResourceView.prototype._selectHeadersTab): (WebInspector.ResourceView.prototype.selectContentTab):
  • inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._createStatusbarButtons): (WebInspector.ResourcesPanel.prototype._settingsLoaded): (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
  • inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._showScriptOrResource): (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
  • inspector/front-end/Settings.js: (WebInspector.populateApplicationSettings): (WebInspector.populateSessionSettings): (WebInspector.Settings): (WebInspector.Settings.prototype.reset): (WebInspector.Settings.prototype._load): (WebInspector.Settings.prototype._set):
  • inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._settingsLoaded): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._changeSetting): (WebInspector.StylesSidebarPane.prototype._changeColorFormat): (WebInspector.ComputedStyleSidebarPane.settingsLoaded): (WebInspector.ComputedStyleSidebarPane.showInheritedToggleFunction): (WebInspector.ComputedStyleSidebarPane):
  • inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSidebarPane): (WebInspector.WatchExpressionsSidebarPane.prototype._settingsLoaded): (WebInspector.WatchExpressionsSection): (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
  • inspector/front-end/inspector.js: (WebInspector.loaded): (WebInspector.reset):

Webkit/chromium:

  • src/js/InspectorControllerImpl.js: (devtools.InspectorBackendImpl):
Location:
trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r61012 r61014  
     12010-06-11  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Enable serialization/deserialization of the frontend state
     6        https://bugs.webkit.org/show_bug.cgi?id=40228
     7
     8        * inspector/InspectorBackend.cpp:
     9        (WebCore::InspectorBackend::saveApplicationSettings):
     10        (WebCore::InspectorBackend::saveSessionSettings):
     11        * inspector/InspectorBackend.h:
     12        * inspector/InspectorBackend.idl:
     13        * inspector/InspectorController.cpp:
     14        (WebCore::InspectorController::InspectorController):
     15        (WebCore::InspectorController::setSessionSettings):
     16        (WebCore::InspectorController::populateScriptObjects):
     17        (WebCore::InspectorController::didCommitLoad):
     18        * inspector/InspectorController.h:
     19        * inspector/InspectorFrontend.cpp:
     20        (WebCore::InspectorFrontend::populateApplicationSettings):
     21        (WebCore::InspectorFrontend::populateSessionSettings):
     22        * inspector/InspectorFrontend.h:
     23        * inspector/front-end/ConsoleView.js:
     24        (WebInspector.ConsoleView.prototype._settingsLoaded):
     25        (WebInspector.ConsoleView.prototype._enterKeyPressed.printResult):
     26        (WebInspector.ConsoleView.prototype._enterKeyPressed):
     27        * inspector/front-end/EventListenersSidebarPane.js:
     28        (WebInspector.EventListenersSidebarPane.prototype._settingsLoaded):
     29        (WebInspector.EventListenersSidebarPane.prototype):
     30        ():
     31        * inspector/front-end/InspectorBackendStub.js:
     32        (.WebInspector.InspectorBackendStub.prototype.saveApplicationSettings):
     33        (.WebInspector.InspectorBackendStub.prototype.saveSessionSettings):
     34        * inspector/front-end/ResourceView.js:
     35        (WebInspector.ResourceView.prototype._selectTab):
     36        (WebInspector.ResourceView.prototype._selectHeadersTab):
     37        (WebInspector.ResourceView.prototype.selectContentTab):
     38        * inspector/front-end/ResourcesPanel.js:
     39        (WebInspector.ResourcesPanel.prototype._createStatusbarButtons):
     40        (WebInspector.ResourcesPanel.prototype._settingsLoaded):
     41        (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
     42        * inspector/front-end/ScriptsPanel.js:
     43        (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
     44        (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
     45        * inspector/front-end/Settings.js:
     46        (WebInspector.populateApplicationSettings):
     47        (WebInspector.populateSessionSettings):
     48        (WebInspector.Settings):
     49        (WebInspector.Settings.prototype.reset):
     50        (WebInspector.Settings.prototype._load):
     51        (WebInspector.Settings.prototype._set):
     52        * inspector/front-end/StylesSidebarPane.js:
     53        (WebInspector.StylesSidebarPane.prototype._settingsLoaded):
     54        (WebInspector.StylesSidebarPane.prototype.update):
     55        (WebInspector.StylesSidebarPane.prototype._changeSetting):
     56        (WebInspector.StylesSidebarPane.prototype._changeColorFormat):
     57        (WebInspector.ComputedStyleSidebarPane.settingsLoaded):
     58        (WebInspector.ComputedStyleSidebarPane.showInheritedToggleFunction):
     59        (WebInspector.ComputedStyleSidebarPane):
     60        * inspector/front-end/WatchExpressionsSidebarPane.js:
     61        (WebInspector.WatchExpressionsSidebarPane):
     62        (WebInspector.WatchExpressionsSidebarPane.prototype._settingsLoaded):
     63        (WebInspector.WatchExpressionsSection):
     64        (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
     65        * inspector/front-end/inspector.js:
     66        (WebInspector.loaded):
     67        (WebInspector.reset):
     68
    1692010-06-10  Pavel Feldman  <pfeldman@chromium.org>
    270
  • trunk/WebCore/inspector/InspectorBackend.cpp

    r61012 r61014  
    8080}
    8181
    82 void InspectorBackend::saveFrontendSettings(const String& settings)
     82void InspectorBackend::saveApplicationSettings(const String& settings)
    8383{
    8484    if (m_inspectorController)
    8585        m_inspectorController->setSetting(InspectorController::frontendSettingsSettingName(), settings);
     86}
     87
     88void InspectorBackend::saveSessionSettings(const String& settings)
     89{
     90    if (m_inspectorController)
     91        m_inspectorController->setSessionSettings(settings);
    8692}
    8793
  • trunk/WebCore/inspector/InspectorBackend.h

    r61012 r61014  
    5858    void disconnectController() { m_inspectorController = 0; }
    5959
    60     void saveFrontendSettings(const String&);
     60    void saveApplicationSettings(const String&);
     61    void saveSessionSettings(const String&);
    6162
    6263    void storeLastActivePanel(const String& panelName);
  • trunk/WebCore/inspector/InspectorBackend.idl

    r61012 r61014  
    3535        void storeLastActivePanel(in DOMString panelName);
    3636
    37         void saveFrontendSettings(in DOMString settings);
     37        void saveApplicationSettings(in DOMString settings);
     38        void saveSessionSettings(in DOMString settings);
    3839
    3940        void enableSearchingForNode();
  • trunk/WebCore/inspector/InspectorController.cpp

    r61011 r61014  
    149149    , m_expiredConsoleMessageCount(0)
    150150    , m_showAfterVisible(CurrentPanel)
     151    , m_sessionSettings(InspectorObject::create())
    151152    , m_groupLevel(0)
    152153    , m_searchingForNode(false)
     
    228229    m_settings.set(key, value);
    229230    m_client->storeSetting(key, value);
     231}
     232
     233void InspectorController::setSessionSettings(const String& settingsJSON)
     234{
     235    m_sessionSettings = InspectorValue::readJSON(settingsJSON);
    230236}
    231237
     
    556562        return;
    557563
    558     m_frontend->populateFrontendSettings(setting(frontendSettingsSettingName()));
     564    m_frontend->populateApplicationSettings(setting(frontendSettingsSettingName()));
    559565
    560566    if (m_resourceTrackingEnabled)
     
    603609#endif
    604610
     611    m_frontend->populateSessionSettings(m_sessionSettings->toJSONString());
    605612    m_frontend->populateInterface();
    606613
     
    680687
    681688        m_cssStore->reset();
     689        m_sessionSettings = InspectorObject::create();
    682690        if (m_frontend) {
    683691            m_frontend->reset();
  • trunk/WebCore/inspector/InspectorController.h

    r60965 r61014  
    3333#include "Cookie.h"
    3434#include "InspectorDOMAgent.h"
     35#include "InspectorValues.h"
    3536#include "PlatformString.h"
    3637#include "ScriptArray.h"
     
    127128    String setting(const String& key) const;
    128129    void setSetting(const String& key, const String& value);
     130    void setSessionSettings(const String&);
    129131
    130132    void inspect(Node*);
     
    345347    SpecialPanels m_showAfterVisible;
    346348    RefPtr<Node> m_highlightedNode;
     349    RefPtr<InspectorValue> m_sessionSettings;
    347350    unsigned m_groupLevel;
    348351    bool m_searchingForNode;
  • trunk/WebCore/inspector/InspectorFrontend.cpp

    r61012 r61014  
    8787}
    8888
    89 void InspectorFrontend::populateFrontendSettings(const String& settings)
    90 {
    91     ScriptFunctionCall function(m_webInspector, "dispatch");
    92     function.appendArgument("populateFrontendSettings");
     89void InspectorFrontend::populateApplicationSettings(const String& settings)
     90{
     91    ScriptFunctionCall function(m_webInspector, "dispatch");
     92    function.appendArgument("populateApplicationSettings");
     93    function.appendArgument(settings);
     94    function.call();
     95}
     96
     97void InspectorFrontend::populateSessionSettings(const String& settings)
     98{
     99    ScriptFunctionCall function(m_webInspector, "dispatch");
     100    function.appendArgument("populateSessionSettings");
    93101    function.appendArgument(settings);
    94102    function.call();
  • trunk/WebCore/inspector/InspectorFrontend.h

    r61012 r61014  
    6060        void didCommitLoad();
    6161
    62         void populateFrontendSettings(const String& settings);
     62        void populateApplicationSettings(const String& settings);
     63        void populateSessionSettings(const String& settings);
    6364
    6465        void updateConsoleMessageExpiredCount(unsigned count);
  • trunk/WebCore/inspector/front-end/ConsoleView.js

    r60234 r61014  
    4949    this.promptElement.addEventListener("keydown", this._promptKeyDown.bind(this), true);
    5050    this.prompt = new WebInspector.TextPrompt(this.promptElement, this.completions.bind(this), ExpressionStopCharacters + ".");
    51     WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
     51    WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
    5252
    5353    this.topGroup = new WebInspector.ConsoleGroup(null, 0);
     
    105105    _settingsLoaded: function()
    106106    {
    107         this.prompt.history = WebInspector.settings.consoleHistory;
     107        this.prompt.history = WebInspector.applicationSettings.consoleHistory;
    108108    },
    109109   
     
    537537            self.prompt.text = "";
    538538
    539             WebInspector.settings.consoleHistory = self.prompt.history.slice(-30);
     539            WebInspector.applicationSettings.consoleHistory = self.prompt.history.slice(-30);
    540540
    541541            self.addMessage(new WebInspector.ConsoleCommandResult(result, exception, commandMessage));
  • trunk/WebCore/inspector/front-end/EventListenersSidebarPane.js

    r58869 r61014  
    4747    this.settingsSelectElement.appendChild(option);
    4848
    49     WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
     49    WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
    5050    this.settingsSelectElement.addEventListener("click", function(event) { event.stopPropagation() }, false);
    5151    this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
     
    5757    _settingsLoaded: function()
    5858    {
    59         var filter = WebInspector.settings.eventListenersFilter;
     59        var filter = WebInspector.applicationSettings.eventListenersFilter;
    6060        if (filter === "all")
    6161            this.settingsSelectElement[0].selected = true;
     
    113113    {
    114114        var selectedOption = this.settingsSelectElement[this.settingsSelectElement.selectedIndex];
    115         WebInspector.settings.eventListenersFilter = selectedOption.value;
     115        WebInspector.applicationSettings.eventListenersFilter = selectedOption.value;
    116116
    117117        for (var i = 0; i < this.sections.length; ++i)
     
    143143        // A Filtered Array simplifies when to create connectors
    144144        var filteredEventListeners = this.eventListeners;
    145         if (WebInspector.settings.eventListenersFilter === "selected") {
     145        if (WebInspector.applicationSettings.eventListenersFilter === "selected") {
    146146            filteredEventListeners = [];
    147147            for (var i = 0; i < this.eventListeners.length; ++i) {
  • trunk/WebCore/inspector/front-end/InspectorBackendStub.js

    r61012 r61014  
    248248    },
    249249
    250     saveFrontendSettings: function()
     250    saveApplicationSettings: function()
     251    {
     252    },
     253
     254    saveSessionSettings: function()
    251255    {
    252256    },
  • trunk/WebCore/inspector/front-end/ResourceView.js

    r60562 r61014  
    144144    {
    145145        if (this._headersVisible) {
    146             if (!this.hasContentTab() || WebInspector.settings.resourceViewTab === "headers")
     146            if (!this.hasContentTab() || WebInspector.applicationSettings.resourceViewTab === "headers")
    147147                this._selectHeadersTab();
    148148            else
     
    155155    {
    156156        if (updatePrefs)
    157             WebInspector.settings.resourceViewTab = "headers";
     157            WebInspector.applicationSettings.resourceViewTab = "headers";
    158158        this.tabbedPane.selectTabById("headers");
    159159    },
     
    162162    {
    163163        if (updatePrefs)
    164             WebInspector.settings.resourceViewTab = "content";
     164            WebInspector.applicationSettings.resourceViewTab = "content";
    165165        this._innerSelectContentTab();
    166166    },
  • trunk/WebCore/inspector/front-end/ResourcesPanel.js

    r59688 r61014  
    152152        this.largerResourcesButton = new WebInspector.StatusBarButton(WebInspector.UIString("Use small resource rows."), "resources-larger-resources-status-bar-item");
    153153
    154         WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
     154        WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
    155155        this.largerResourcesButton.addEventListener("click", this._toggleLargerResources.bind(this), false);
    156156        this.sortingSelectElement = document.createElement("select");
     
    161161    _settingsLoaded: function()
    162162    {
    163         this.largerResourcesButton.toggled = WebInspector.settings.resourcesLargeRows;
    164         if (!WebInspector.settings.resourcesLargeRows)
    165             this._setLargerResources(WebInspector.settings.resourcesLargeRows);
     163        this.largerResourcesButton.toggled = WebInspector.applicationSettings.resourcesLargeRows;
     164        if (!WebInspector.applicationSettings.resourcesLargeRows)
     165            this._setLargerResources(WebInspector.applicationSettings.resourcesLargeRows);
    166166    },
    167167
     
    638638            return;
    639639
    640         WebInspector.settings.resourcesLargeRows = !WebInspector.settings.resourcesLargeRows;
     640        WebInspector.applicationSettings.resourcesLargeRows = !WebInspector.applicationSettings.resourcesLargeRows;
    641641        this._setLargerResources(this.itemsTreeElement.smallChildren);
    642642    },
  • trunk/WebCore/inspector/front-end/ScriptsPanel.js

    r60843 r61014  
    640640        var url = scriptOrResource.url || scriptOrResource.sourceURL;
    641641        if (url && !options.initialLoad)
    642             WebInspector.settings.lastViewedScriptFile = url;
     642            WebInspector.applicationSettings.lastViewedScriptFile = url;
    643643
    644644        if (!options.fromBackForwardAction) {
     
    741741            // if not first item, check to see if this was the last viewed
    742742            var url = option.representedObject.url || option.representedObject.sourceURL;
    743             var lastURL = WebInspector.settings.lastViewedScriptFile;
     743            var lastURL = WebInspector.applicationSettings.lastViewedScriptFile;
    744744            if (url && url === lastURL)
    745745                this._showScriptOrResource(option.representedObject, {initialLoad: true});
  • trunk/WebCore/inspector/front-end/Settings.js

    r60843 r61014  
    4646}
    4747
    48 WebInspector.populateFrontendSettings = function(settingsString)
     48WebInspector.populateApplicationSettings = function(settingsString)
    4949{
    50     WebInspector.settings._load(settingsString);
     50    WebInspector.applicationSettings._load(settingsString);
     51    WebInspector.applicationSettings._installSetting("eventListenersFilter", "event-listeners-filter", "all");
     52    WebInspector.applicationSettings._installSetting("colorFormat", "color-format", "hex");
     53    WebInspector.applicationSettings._installSetting("resourcesLargeRows", "resources-large-rows", true);
     54    WebInspector.applicationSettings._installSetting("watchExpressions", "watch-expressions", []);
     55    WebInspector.applicationSettings._installSetting("lastViewedScriptFile", "last-viewed-script-file");
     56    WebInspector.applicationSettings._installSetting("showInheritedComputedStyleProperties", "show-inherited-computed-style-properties", false);
     57    WebInspector.applicationSettings._installSetting("showUserAgentStyles", "show-user-agent-styles", true);
     58    WebInspector.applicationSettings._installSetting("resourceViewTab", "resource-view-tab", "content");
     59    WebInspector.applicationSettings._installSetting("consoleHistory", "console-history", []);
     60    WebInspector.applicationSettings.dispatchEventToListeners("loaded");
    5161}
    5262
    53 WebInspector.Settings = function()
     63WebInspector.populateSessionSettings = function(settingsString)
    5464{
     65    WebInspector.sessionSettings._load(settingsString);
     66    WebInspector.sessionSettings.dispatchEventToListeners("loaded");
     67}
     68
     69WebInspector.Settings = function(sessionScope)
     70{
     71    this._sessionScope = sessionScope;
    5572}
    5673
    5774WebInspector.Settings.prototype = {
     75    reset: function()
     76    {
     77        this._store = {};
     78        this.dispatchEventToListeners("loaded");
     79    },
     80
    5881    _load: function(settingsString)
    5982    {
     
    6487            this._store = {};
    6588        }
    66 
    67         this._installSetting("eventListenersFilter", "event-listeners-filter", "all");
    68         this._installSetting("colorFormat", "color-format", "hex");
    69         this._installSetting("resourcesLargeRows", "resources-large-rows", true);
    70         this._installSetting("watchExpressions", "watch-expressions", []);
    71         this._installSetting("lastViewedScriptFile", "last-viewed-script-file");
    72         this._installSetting("showInheritedComputedStyleProperties", "show-inherited-computed-style-properties", false);
    73         this._installSetting("showUserAgentStyles", "show-user-agent-styles", true);
    74         this._installSetting("resourceViewTab", "resource-view-tab", "content");
    75         this._installSetting("consoleHistory", "console-history", []);
    76         this.dispatchEventToListeners("loaded");
    7789    },
    7890
     
    95107        this._store[propertyName] = newValue;
    96108        try {
    97             InspectorBackend.saveFrontendSettings(JSON.stringify(this._store));
     109            var store = JSON.stringify(this._store);
     110            if (this._sessionScope)
     111                InspectorBackend.saveSessionSettings(store);
     112            else
     113                InspectorBackend.saveApplicationSettings(store);
    98114        } catch (e) {
    99115            // May fail;
  • trunk/WebCore/inspector/front-end/StylesSidebarPane.js

    r60680 r61014  
    6161    this.settingsSelectElement.addEventListener("click", function(event) { event.stopPropagation() }, false);
    6262    this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
    63     WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
     63    WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
    6464
    6565    this.titleElement.appendChild(this.settingsSelectElement);
     
    9797    _settingsLoaded: function()
    9898    {
    99         var format = WebInspector.settings.colorFormat;
     99        var format = WebInspector.applicationSettings.colorFormat;
    100100        if (format === "hex")
    101101            this.settingsSelectElement[0].selected = true;
     
    149149            WebInspector.cssModel.getComputedStyleAsync(node.id, computedStyleCallback.bind(this));
    150150        else
    151             WebInspector.cssModel.getStylesAsync(node.id, !WebInspector.settings.showUserAgentStyles, stylesCallback.bind(this));
     151            WebInspector.cssModel.getStylesAsync(node.id, !WebInspector.applicationSettings.showUserAgentStyles, stylesCallback.bind(this));
    152152    },
    153153
     
    483483        var selectedIndex = 0;
    484484        for (var i = 0; i < options.length; ++i) {
    485             if (options[i].value === WebInspector.settings.colorFormat) {
     485            if (options[i].value === WebInspector.applicationSettings.colorFormat) {
    486486                selectedIndex = i;
    487487                break;
     
    495495    {
    496496        var selectedOption = this.settingsSelectElement[this.settingsSelectElement.selectedIndex];
    497         WebInspector.settings.colorFormat = selectedOption.value;
     497        WebInspector.applicationSettings.colorFormat = selectedOption.value;
    498498
    499499        for (var pseudoId in this.sections) {
     
    582582    function settingsLoaded()
    583583    {
    584         if (WebInspector.settings.showInheritedComputedStyleProperties) {
     584        if (WebInspector.applicationSettings.showInheritedComputedStyleProperties) {
    585585            this.bodyElement.addStyleClass("show-inherited");
    586586            showInheritedCheckbox.checked = true;
     
    588588    }
    589589
    590     WebInspector.settings.addEventListener("loaded", settingsLoaded.bind(this));
     590    WebInspector.applicationSettings.addEventListener("loaded", settingsLoaded.bind(this));
    591591
    592592    function showInheritedToggleFunction(event)
    593593    {
    594         WebInspector.settings.showInheritedComputedStyleProperties = showInheritedCheckbox.checked;
    595         if (WebInspector.settings.showInheritedComputedStyleProperties)
     594        WebInspector.applicationSettings.showInheritedComputedStyleProperties = showInheritedCheckbox.checked;
     595        if (WebInspector.applicationSettings.showInheritedComputedStyleProperties)
    596596            this.bodyElement.addStyleClass("show-inherited");
    597597        else
     
    11231123                if (Preferences.showColorNicknames && color.nickname)
    11241124                    format = "nickname";
    1125                 else if (WebInspector.settings.colorFormat === "rgb")
     1125                else if (WebInspector.applicationSettings.colorFormat === "rgb")
    11261126                    format = (color.simple ? "rgb" : "rgba");
    1127                 else if (WebInspector.settings.colorFormat === "hsl")
     1127                else if (WebInspector.applicationSettings.colorFormat === "hsl")
    11281128                    format = (color.simple ? "hsl" : "hsla");
    11291129                else if (color.simple)
  • trunk/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js

    r53933 r61014  
    3232{
    3333    WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions"));
    34     WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
     34    WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
    3535}
    3636
     
    4040        this.bodyElement.removeChildren();
    4141
    42         this.expanded = WebInspector.settings.watchExpressions.length > 0;
     42        this.expanded = WebInspector.applicationSettings.watchExpressions.length > 0;
    4343        this.section = new WebInspector.WatchExpressionsSection();
    4444        this.bodyElement.appendChild(this.section.element);
     
    7878    WebInspector.ObjectPropertiesSection.call(this);
    7979
    80     this.watchExpressions = WebInspector.settings.watchExpressions;
     80    this.watchExpressions = WebInspector.applicationSettings.watchExpressions;
    8181
    8282    this.headerElement.className = "hidden";
     
    196196                toSave.push(this.watchExpressions[i]);
    197197
    198         WebInspector.settings.watchExpressions = toSave;
     198        WebInspector.applicationSettings.watchExpressions = toSave;
    199199        return toSave.length;
    200200    }
  • trunk/WebCore/inspector/front-end/inspector.js

    r60895 r61014  
    441441    document.body.addStyleClass("port-" + port);
    442442
    443     this.settings = new WebInspector.Settings();
     443    this.applicationSettings = new WebInspector.Settings(false);
     444    this.sessionSettings = new WebInspector.Settings(true);
    444445    this._registerShortcuts();
    445446
     
    13621363    }
    13631364
     1365    this.sessionSettings.reset();
    13641366    this.breakpointManager.reset();
    13651367
  • trunk/WebKit/chromium/ChangeLog

    r61013 r61014  
     12010-06-11  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Enable serialization/deserialization of the frontend state
     6        https://bugs.webkit.org/show_bug.cgi?id=40228
     7
     8        * src/js/InspectorControllerImpl.js:
     9        (devtools.InspectorBackendImpl):
     10
    1112010-06-10  Søren Gjesse  <sgjesse@chromium.org>
    212
  • trunk/WebKit/chromium/src/js/InspectorControllerImpl.js

    r61012 r61014  
    6969    this.installInspectorControllerDelegate_("removeDOMStorageItem");
    7070    this.installInspectorControllerDelegate_("removeNode");
    71     this.installInspectorControllerDelegate_("saveFrontendSettings");
     71    this.installInspectorControllerDelegate_("saveApplicationSettings");
     72    this.installInspectorControllerDelegate_("saveSessionSettings");
    7273    this.installInspectorControllerDelegate_("searchCanceled");
    7374    this.installInspectorControllerDelegate_("setAttribute");
Note: See TracChangeset for help on using the changeset viewer.