[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

podivilov at chromium.org podivilov at chromium.org
Wed Dec 22 15:00:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 8c2693f0f3078f24ce229d2ab7978a97c94e1713
Author: podivilov at chromium.org <podivilov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 27 08:52:13 2010 +0000

    2010-10-27  Pavel Podivilov  <podivilov at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Web Inspector: move frontend settings to local storage
            https://bugs.webkit.org/show_bug.cgi?id=47715
    
            * inspector/Inspector.idl:
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::InspectorController):
            (WebCore::InspectorController::didCommitLoad):
            * inspector/InspectorController.h:
            * inspector/InspectorState.cpp:
            (WebCore::InspectorState::InspectorState):
            * inspector/InspectorState.h:
            * inspector/front-end/ConsoleView.js:
            * inspector/front-end/EventListenersSidebarPane.js:
            * inspector/front-end/NetworkPanel.js:
            (WebInspector.NetworkPanel.prototype._createStatusbarButtons):
            * inspector/front-end/Panel.js:
            (WebInspector.Panel):
            * inspector/front-end/ResourcesPanel.js:
            (WebInspector.ResourcesPanel.prototype._createStatusbarButtons):
            * inspector/front-end/Settings.js:
            (WebInspector.Settings):
            (WebInspector.Settings.prototype.installApplicationSetting):
            (WebInspector.Settings.prototype.installProjectSetting):
            (WebInspector.Settings.prototype._get):
            (WebInspector.Settings.prototype._set):
            (WebInspector.Settings.prototype._getProjectSetting):
            (WebInspector.Settings.prototype._setProjectSetting):
            (WebInspector.Settings.prototype._formatProjectKey):
            * inspector/front-end/StylesSidebarPane.js:
            * inspector/front-end/WatchExpressionsSidebarPane.js:
            (WebInspector.WatchExpressionsSidebarPane):
            (WebInspector.WatchExpressionsSidebarPane.prototype.reset):
            * inspector/front-end/inspector.js:
            (WebInspector.reset):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8c6bf65..d98469a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,42 @@
+2010-10-27  Pavel Podivilov  <podivilov at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: move frontend settings to local storage
+        https://bugs.webkit.org/show_bug.cgi?id=47715
+
+        * inspector/Inspector.idl:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::InspectorController):
+        (WebCore::InspectorController::didCommitLoad):
+        * inspector/InspectorController.h:
+        * inspector/InspectorState.cpp:
+        (WebCore::InspectorState::InspectorState):
+        * inspector/InspectorState.h:
+        * inspector/front-end/ConsoleView.js:
+        * inspector/front-end/EventListenersSidebarPane.js:
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkPanel.prototype._createStatusbarButtons):
+        * inspector/front-end/Panel.js:
+        (WebInspector.Panel):
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.ResourcesPanel.prototype._createStatusbarButtons):
+        * inspector/front-end/Settings.js:
+        (WebInspector.Settings):
+        (WebInspector.Settings.prototype.installApplicationSetting):
+        (WebInspector.Settings.prototype.installProjectSetting):
+        (WebInspector.Settings.prototype._get):
+        (WebInspector.Settings.prototype._set):
+        (WebInspector.Settings.prototype._getProjectSetting):
+        (WebInspector.Settings.prototype._setProjectSetting):
+        (WebInspector.Settings.prototype._formatProjectKey):
+        * inspector/front-end/StylesSidebarPane.js:
+        * inspector/front-end/WatchExpressionsSidebarPane.js:
+        (WebInspector.WatchExpressionsSidebarPane):
+        (WebInspector.WatchExpressionsSidebarPane.prototype.reset):
+        * inspector/front-end/inspector.js:
+        (WebInspector.reset):
+
 2010-10-27  Andy Estes  <aestes at apple.com>
 
         Reviewed by David Hyatt.
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index 10965da..2da0a92 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -94,13 +94,9 @@ module core {
         // This method is going to be broken down into smaller parts.
         [handler=Controller] void populateScriptObjects();
 
-        [handler=Controller] void getSettings(out Object settings);
         [handler=Controller] void getInspectorState(out Object state);
         [handler=Controller] void storeLastActivePanel(in String panelName);
 
-        [handler=Controller] void saveApplicationSettings(in String settings);
-        [handler=Controller] void saveSessionSettings(in String settings);
-
         [handler=Controller] void setSearchingForNode(in boolean enabled, out boolean newState);
 
         [handler=Controller] void setMonitoringXHREnabled(in boolean enable, out boolean newState);
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 3febf45..d62ebb6 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -144,7 +144,6 @@ InspectorController::InspectorController(Page* page, InspectorClient* client)
     , m_domContentEventTime(-1.0)
     , m_expiredConsoleMessageCount(0)
     , m_showAfterVisible(LastActivePanel)
-    , m_sessionSettings(InspectorObject::create())
     , m_groupLevel(0)
     , m_previousMessage(0)
     , m_settingsLoaded(false)
@@ -231,16 +230,6 @@ bool InspectorController::resourceTrackingEnabled() const
     return m_state->getBoolean(InspectorState::resourceTrackingEnabled);
 }
 
-void InspectorController::saveApplicationSettings(const String& settings)
-{
-    m_state->setString(InspectorState::frontendSettings, settings);
-}
-
-void InspectorController::saveSessionSettings(const String& settingsJSON)
-{
-    m_sessionSettings = InspectorValue::parseJSON(settingsJSON);
-}
-
 void InspectorController::getInspectorState(RefPtr<InspectorObject>* state)
 {
 #if ENABLE(JAVASCRIPT_DEBUGGER)
@@ -257,13 +246,6 @@ void InspectorController::restoreInspectorStateFromCookie(const String& inspecto
         startTimelineProfiler();
 }
 
-void InspectorController::getSettings(RefPtr<InspectorObject>* settings)
-{
-    *settings = InspectorObject::create();
-    (*settings)->setString("application", m_state->getString(InspectorState::frontendSettings));
-    (*settings)->setString("session", m_sessionSettings->toJSONString());
-}
-
 void InspectorController::inspect(Node* node)
 {
     if (!enabled())
@@ -785,7 +767,6 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
         unbindAllResources();
 
         m_cssStore->reset();
-        m_sessionSettings = InspectorObject::create();
         if (m_frontend) {
             m_frontend->reset();
             m_domAgent->reset();
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index 6d4d9e0..18db07f 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -124,10 +124,6 @@ public:
     Page* inspectedPage() const { return m_inspectedPage; }
     void reloadPage();
 
-    void saveApplicationSettings(const String& settings);
-    void saveSessionSettings(const String&);
-    void getSettings(RefPtr<InspectorObject>*);
-
     void restoreInspectorStateFromCookie(const String& inspectorCookie);
 
     void inspect(Node*);
@@ -374,9 +370,6 @@ private:
 #endif
     String m_showAfterVisible;
     RefPtr<Node> m_highlightedNode;
-#if ENABLE(INSPECTOR)
-    RefPtr<InspectorValue> m_sessionSettings;
-#endif
     unsigned m_groupLevel;
     ConsoleMessage* m_previousMessage;
     bool m_settingsLoaded;
diff --git a/WebCore/inspector/InspectorState.cpp b/WebCore/inspector/InspectorState.cpp
index 44065c0..6a504c6 100644
--- a/WebCore/inspector/InspectorState.cpp
+++ b/WebCore/inspector/InspectorState.cpp
@@ -45,7 +45,6 @@ InspectorState::InspectorState(InspectorClient* client)
     registerBoolean(timelineProfilerEnabled, false, "timelineProfilerEnabled", (const char*)0);
     registerBoolean(searchingForNode, false, "searchingForNodeEnabled", (const char*)0);
     registerBoolean(profilerAlwaysEnabled, false, (const char*)0, "profilerEnabled");
-    registerString(frontendSettings, "", (const char*)0, "frontendSettings");
     registerBoolean(debuggerAlwaysEnabled, false, (const char*)0, "debuggerEnabled");
     registerString(lastActivePanel, InspectorController::LastActivePanel, (const char*)0, "lastActivePanel");
     registerBoolean(inspectorStartsAttached, true, (const char*)0, "InspectorStartsAttached");
diff --git a/WebCore/inspector/InspectorState.h b/WebCore/inspector/InspectorState.h
index 5707600..560c081 100644
--- a/WebCore/inspector/InspectorState.h
+++ b/WebCore/inspector/InspectorState.h
@@ -50,7 +50,6 @@ public:
         timelineProfilerEnabled,
         searchingForNode,
         profilerAlwaysEnabled,
-        frontendSettings,
         debuggerAlwaysEnabled,
         lastActivePanel,
         inspectorStartsAttached,
diff --git a/WebCore/inspector/front-end/ConsoleView.js b/WebCore/inspector/front-end/ConsoleView.js
index 3b3b971..deca21c 100644
--- a/WebCore/inspector/front-end/ConsoleView.js
+++ b/WebCore/inspector/front-end/ConsoleView.js
@@ -48,7 +48,7 @@ WebInspector.ConsoleView = function(drawer)
     this.promptElement.className = "source-code";
     this.promptElement.addEventListener("keydown", this._promptKeyDown.bind(this), true);
     this.prompt = new WebInspector.TextPrompt(this.promptElement, this.completions.bind(this), ExpressionStopCharacters + ".");
-    WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
+    this.prompt.history = WebInspector.applicationSettings.consoleHistory;
 
     this.topGroup = new WebInspector.ConsoleGroup(null, 0);
     this.messagesElement.insertBefore(this.topGroup.element, this.promptElement);
@@ -102,11 +102,6 @@ WebInspector.ConsoleView = function(drawer)
 }
 
 WebInspector.ConsoleView.prototype = {
-    _settingsLoaded: function()
-    {
-        this.prompt.history = WebInspector.applicationSettings.consoleHistory;
-    },
-    
     _updateFilter: function(e)
     {
         var isMac = WebInspector.isMac();
diff --git a/WebCore/inspector/front-end/EventListenersSidebarPane.js b/WebCore/inspector/front-end/EventListenersSidebarPane.js
index e2ad259..3354191 100644
--- a/WebCore/inspector/front-end/EventListenersSidebarPane.js
+++ b/WebCore/inspector/front-end/EventListenersSidebarPane.js
@@ -46,7 +46,11 @@ WebInspector.EventListenersSidebarPane = function()
     option.label = WebInspector.UIString("Selected Node Only");
     this.settingsSelectElement.appendChild(option);
 
-    WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
+    var filter = WebInspector.applicationSettings.eventListenersFilter;
+    if (filter === "all")
+        this.settingsSelectElement[0].selected = true;
+    else if (filter === "selected")
+        this.settingsSelectElement[1].selected = true;
     this.settingsSelectElement.addEventListener("click", function(event) { event.stopPropagation() }, false);
     this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
 
@@ -54,15 +58,6 @@ WebInspector.EventListenersSidebarPane = function()
 }
 
 WebInspector.EventListenersSidebarPane.prototype = {
-    _settingsLoaded: function()
-    {
-        var filter = WebInspector.applicationSettings.eventListenersFilter;
-        if (filter === "all")
-            this.settingsSelectElement[0].selected = true;
-        if (filter === "selected")
-            this.settingsSelectElement[1].selected = true;
-    },
-
     update: function(node)
     {
         var body = this.bodyElement;
diff --git a/WebCore/inspector/front-end/NetworkPanel.js b/WebCore/inspector/front-end/NetworkPanel.js
index bec6056..80456ba 100644
--- a/WebCore/inspector/front-end/NetworkPanel.js
+++ b/WebCore/inspector/front-end/NetworkPanel.js
@@ -611,15 +611,10 @@ WebInspector.NetworkPanel.prototype = {
         this._clearButton.addEventListener("click", this._reset.bind(this), false);
 
         this._largerResourcesButton = new WebInspector.StatusBarButton(WebInspector.UIString("Use small resource rows."), "network-larger-resources-status-bar-item");
-        WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
-        this._largerResourcesButton.addEventListener("click", this._toggleLargerResources.bind(this), false);
-    },
-
-    _settingsLoaded: function()
-    {
         this._largerResourcesButton.toggled = WebInspector.applicationSettings.resourcesLargeRows;
         if (!WebInspector.applicationSettings.resourcesLargeRows)
             this._setLargerResources(WebInspector.applicationSettings.resourcesLargeRows);
+        this._largerResourcesButton.addEventListener("click", this._toggleLargerResources.bind(this), false);
     },
 
     set mainResourceLoadTime(x)
diff --git a/WebCore/inspector/front-end/Panel.js b/WebCore/inspector/front-end/Panel.js
index 2a4104f..ec9250c 100644
--- a/WebCore/inspector/front-end/Panel.js
+++ b/WebCore/inspector/front-end/Panel.js
@@ -34,7 +34,7 @@ WebInspector.Panel = function(name)
     this.element.addStyleClass(name);
     this._panelName = name;
 
-    WebInspector.applicationSettings.installSetting(this._sidebarWidthSettingName(), this._panelName + "-sidebar-width", undefined);
+    WebInspector.applicationSettings.installApplicationSetting(this._sidebarWidthSettingName(), undefined);
 }
 
 // Should by in sync with style declarations.
diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js
index 48c49dd..56458b0 100644
--- a/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/WebCore/inspector/front-end/ResourcesPanel.js
@@ -446,19 +446,15 @@ WebInspector.ResourcesPanel.prototype = {
     {
         this.largerResourcesButton = new WebInspector.StatusBarButton(WebInspector.UIString("Use small resource rows."), "resources-larger-resources-status-bar-item");
 
-        WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
-        this.largerResourcesButton.addEventListener("click", this._toggleLargerResources.bind(this), false);
-        this.sortingSelectElement = document.createElement("select");
-        this.sortingSelectElement.className = "status-bar-item";
-        this.sortingSelectElement.addEventListener("change", this._changeSortingFunction.bind(this), false);
-    },
-
-    _settingsLoaded: function()
-    {
         this.largerResourcesButton.toggled = WebInspector.applicationSettings.resourcesLargeRows;
         if (!WebInspector.applicationSettings.resourcesLargeRows)
             this._setLargerResources(WebInspector.applicationSettings.resourcesLargeRows);
         this._loadSortOptions();
+
+        this.largerResourcesButton.addEventListener("click", this._toggleLargerResources.bind(this), false);
+        this.sortingSelectElement = document.createElement("select");
+        this.sortingSelectElement.className = "status-bar-item";
+        this.sortingSelectElement.addEventListener("change", this._changeSortingFunction.bind(this), false);
     },
 
     _loadSortOptions: function()
diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js
index c22cf71..2805bc5 100644
--- a/WebCore/inspector/front-end/Settings.js
+++ b/WebCore/inspector/front-end/Settings.js
@@ -49,93 +49,69 @@ var Preferences = {
     useDataURLForResourceImageIcons: true
 }
 
-WebInspector.Settings = function(sessionScope)
+WebInspector.Settings = function()
 {
-    this._sessionScope = sessionScope;
-    this._store = {};
-}
+    this.installApplicationSetting("colorFormat", "hex");
+    this.installApplicationSetting("consoleHistory", []);
+    this.installApplicationSetting("eventListenersFilter", "all");
+    this.installApplicationSetting("lastViewedScriptFile", "application");
+    this.installApplicationSetting("resourcesLargeRows", true);
+    this.installApplicationSetting("resourcesSortOptions", {timeOption: "responseTime", sizeOption: "transferSize"});
+    this.installApplicationSetting("resourceViewTab", "content");
+    this.installApplicationSetting("showInheritedComputedStyleProperties", false);
+    this.installApplicationSetting("showUserAgentStyles", true);
+    this.installApplicationSetting("watchExpressions", []);
 
-WebInspector.Settings.initialize = function()
-{
-    WebInspector.applicationSettings = new WebInspector.Settings(false);
-    WebInspector.sessionSettings = new WebInspector.Settings(true);
+    this.installProjectSetting("breakpoints", {});
+}
 
-    function populateApplicationSettings(settingsString)
+WebInspector.Settings.prototype = {
+    installApplicationSetting: function(key, defaultValue)
     {
-        WebInspector.applicationSettings._load(settingsString);
-        WebInspector.applicationSettings.installSetting("eventListenersFilter", "event-listeners-filter", "all");
-        WebInspector.applicationSettings.installSetting("colorFormat", "color-format", "hex");
-        WebInspector.applicationSettings.installSetting("resourcesLargeRows", "resources-large-rows", true);
-        WebInspector.applicationSettings.installSetting("watchExpressions", "watch-expressions", []);
-        WebInspector.applicationSettings.installSetting("lastViewedScriptFile", "last-viewed-script-file");
-        WebInspector.applicationSettings.installSetting("showInheritedComputedStyleProperties", "show-inherited-computed-style-properties", false);
-        WebInspector.applicationSettings.installSetting("showUserAgentStyles", "show-user-agent-styles", true);
-        WebInspector.applicationSettings.installSetting("resourceViewTab", "resource-view-tab", "content");
-        WebInspector.applicationSettings.installSetting("consoleHistory", "console-history", []);
-        WebInspector.applicationSettings.installSetting("resourcesSortOptions", "resources-sort-options", {timeOption: "responseTime", sizeOption: "transferSize"});
-
-        WebInspector.applicationSettings.dispatchEventToListeners("loaded");
-    }
+        this.__defineGetter__(key, this._get.bind(this, key, defaultValue));
+        this.__defineSetter__(key, this._set.bind(this, key));
+    },
 
-    function populateSessionSettings(settingsString)
+    installProjectSetting: function(key, defaultValue)
     {
-        WebInspector.sessionSettings._load(settingsString);
-        WebInspector.sessionSettings.dispatchEventToListeners("loaded");
-    }
-
-    InspectorBackend.getSettings(function(settings) {
-        populateApplicationSettings(settings.application);
-        populateSessionSettings(settings.session);
-    });
-}
+        this.__defineGetter__(key, this._getProjectSetting.bind(this, key, defaultValue));
+        this.__defineSetter__(key, this._setProjectSetting.bind(this, key));
+    },
 
-WebInspector.Settings.prototype = {
-    reset: function()
+    _get: function(key, defaultValue)
     {
-        this._store = {};
-        // FIXME: restore default values (bug 42820)
-        this.dispatchEventToListeners("loaded");
+        if (key in window.localStorage) {
+            try {
+                return JSON.parse(window.localStorage[key]);
+            } catch(e) {
+                window.localStorage.removeItem(key);
+            }
+        }
+        return defaultValue;
     },
 
-    _load: function(settingsString)
+    _set: function(key, value)
     {
-        try {
-            var loadedStore = JSON.parse(settingsString);
-        } catch (e) {
-            // May fail;
-            loadedStore = {};
-        }
-        if (!loadedStore)
-            return;
-        for (var propertyName in loadedStore)
-            this._store[propertyName] = loadedStore[propertyName];
+        window.localStorage[key] = JSON.stringify(value);
     },
 
-    installSetting: function(name, propertyName, defaultValue)
+    _getProjectSetting: function(key, defaultValue)
     {
-        this.__defineGetter__(name, this._get.bind(this, propertyName));
-        this.__defineSetter__(name, this._set.bind(this, propertyName));
-        if (!(propertyName in this._store))
-            this._store[propertyName] = defaultValue;
+        return this._get(this._formatProjectKey(key), defaultValue);
     },
 
-    _get: function(propertyName)
+    _setProjectSetting: function(key, value)
     {
-        return this._store[propertyName];
+        return this._set(this._formatProjectKey(key), value);
     },
 
-    _set: function(propertyName, newValue)
+    _formatProjectKey: function(key)
     {
-        this._store[propertyName] = newValue;
-        try {
-            var store = JSON.stringify(this._store);
-            if (this._sessionScope)
-                InspectorBackend.saveSessionSettings(store);
-            else
-                InspectorBackend.saveApplicationSettings(store);
-        } catch (e) {
-            // May fail;
-        }
+        var url = this._mainResourceURL;
+        var fragmentIndex = url.indexOf("#");
+        if (fragmentIndex !== -1)
+            url = url.substring(0, fragmentIndex);
+        return key + "." + url;
     }
 }
 
diff --git a/WebCore/inspector/front-end/StylesSidebarPane.js b/WebCore/inspector/front-end/StylesSidebarPane.js
index 138fbfc..d556e68 100644
--- a/WebCore/inspector/front-end/StylesSidebarPane.js
+++ b/WebCore/inspector/front-end/StylesSidebarPane.js
@@ -60,7 +60,13 @@ WebInspector.StylesSidebarPane = function(computedStylePane)
 
     this.settingsSelectElement.addEventListener("click", function(event) { event.stopPropagation() }, false);
     this.settingsSelectElement.addEventListener("change", this._changeSetting.bind(this), false);
-    WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
+    var format = WebInspector.applicationSettings.colorFormat;
+    if (format === "hex")
+        this.settingsSelectElement[0].selected = true;
+    else if (format === "rgb")
+        this.settingsSelectElement[1].selected = true;
+    else if (format === "hsl")
+        this.settingsSelectElement[2].selected = true;
 
     this.titleElement.appendChild(this.settingsSelectElement);
     this._computedStylePane = computedStylePane;
@@ -95,17 +101,6 @@ WebInspector.StylesSidebarPane.PseudoIdNames = [
 ];
 
 WebInspector.StylesSidebarPane.prototype = {
-    _settingsLoaded: function()
-    {
-        var format = WebInspector.applicationSettings.colorFormat;
-        if (format === "hex")
-            this.settingsSelectElement[0].selected = true;
-        if (format === "rgb")
-            this.settingsSelectElement[1].selected = true;
-        if (format === "hsl")
-            this.settingsSelectElement[2].selected = true;
-    },
-
     _contextMenuEventFired: function(event)
     {
         var href = event.target.enclosingNodeOrSelfWithClass("webkit-html-resource-link") || event.target.enclosingNodeOrSelfWithClass("webkit-html-external-link");
@@ -590,16 +585,11 @@ WebInspector.ComputedStyleSidebarPane = function()
     var showInheritedCheckbox = new WebInspector.Checkbox(WebInspector.UIString("Show inherited"), "sidebar-pane-subtitle");
     this.titleElement.appendChild(showInheritedCheckbox.element);
 
-    function settingsLoaded()
-    {
-        if (WebInspector.applicationSettings.showInheritedComputedStyleProperties) {
-            this.bodyElement.addStyleClass("show-inherited");
-            showInheritedCheckbox.checked = true;
-        }
+    if (WebInspector.applicationSettings.showInheritedComputedStyleProperties) {
+        this.bodyElement.addStyleClass("show-inherited");
+        showInheritedCheckbox.checked = true;
     }
 
-    WebInspector.applicationSettings.addEventListener("loaded", settingsLoaded.bind(this));
-
     function showInheritedToggleFunction(event)
     {
         WebInspector.applicationSettings.showInheritedComputedStyleProperties = showInheritedCheckbox.checked;
diff --git a/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js b/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
index 28dad23..11b0e03 100644
--- a/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
+++ b/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
@@ -31,11 +31,11 @@
 WebInspector.WatchExpressionsSidebarPane = function()
 {
     WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions"));
-    WebInspector.applicationSettings.addEventListener("loaded", this._settingsLoaded, this);
+    this.reset();
 }
 
 WebInspector.WatchExpressionsSidebarPane.prototype = {
-    _settingsLoaded: function()
+    reset: function()
     {
         this.bodyElement.removeChildren();
 
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index cc950cf..85ca3f6 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -530,8 +530,8 @@ WebInspector.doLoadedDone = function()
     document.body.addStyleClass("port-" + port);
 
     InspectorFrontendHost.loaded();
-    WebInspector.Settings.initialize();
-    
+    WebInspector.applicationSettings = new WebInspector.Settings();
+
     this._registerShortcuts();
 
     // set order of some sections explicitly
@@ -1505,8 +1505,6 @@ WebInspector.reset = function()
             panel.reset();
     }
 
-    this.sessionSettings.reset();
-
     this.resources = {};
     this.cookieDomains = {};
     this.applicationCacheDomains = {};

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list