Add a mechanism to store and retrieve preferences for the Web Inspector.

WebCore:

2008-10-24  Timothy Hatcher  <timothy@apple.com>

        Add a mechanism to ask the InspectorClient for key/value setting pairs.
        These settings can be strings, numbers, booleans or string vectors. The
        settings are also bridged to and from JavaScript.

        https://bugs.webkit.org/show_bug.cgi?id=21856

        Reviewed by Darin Adler.

        * WebCore.base.exp: Expose the String CFStringRef constructor.
        * inspector/InspectorClient.h:
        (WebCore::InspectorClient::populateSetting): Added, pure virtual.
        (WebCore::InspectorClient::storeSetting): Ditto.
        (WebCore::InspectorClient::removeSetting): Ditto.
        * inspector/InspectorController.cpp:
        (WebCore::setting): Calls InspectorController::setting and wraps the result in script types.
        (WebCore::setSetting): Calls InspectorController::setSetting after converting from script types.
        (WebCore::InspectorController::InspectorController): Increment a global static
        to track the number of live InspectorControllers.
        (WebCore::InspectorController::~InspectorController): Decrement the global static
        that tracks the number of live InspectorControllers. Delete the setting cache if there
        are no more live controllers.
        (WebCore::InspectorController::setting): Check the cache and return the setting from there,
        otherwise make a new Setting and ask the client to populate it.
        (WebCore::InspectorController::setSetting): Change the cache and ask the client to store it.
        (WebCore::InspectorController::windowScriptObjectAvailable): Add setting and setSetting
        to the InspectorController script class.
        * inspector/InspectorController.h:
        (WebCore::InspectorController::Setting::Setting):
        (WebCore::InspectorController::Setting::operator=):
        (WebCore::InspectorController::Setting::type): Return m_type.
        (WebCore::InspectorController::Setting::string): Return m_string. Assert the type is correct.
        (WebCore::InspectorController::Setting::stringVector): Return m_stringVector.
        Assert the type is correct.
        (WebCore::InspectorController::Setting::doubleValue): Return m_simpleContent.m_double.
        Assert the type is correct.
        (WebCore::InspectorController::Setting::integerValue): Return m_simpleContent.m_integer.
        Assert the type is correct.
        (WebCore::InspectorController::Setting::booleanValue): Return m_simpleContent.m_boolean.
        Assert the type is correct.
        (WebCore::InspectorController::Setting::set): Overloaded for each data type, sets the right
        field and the type.
        * loader/EmptyClients.h:
        (WebCore::EmptyInspectorClient::populateSetting): Added, empty method.
        (WebCore::EmptyInspectorClient::storeSetting): Ditto.
        (WebCore::EmptyInspectorClient::removeSetting): Ditto.

WebKit:

2008-10-24  Timothy Hatcher  <timothy@apple.com>

        Implement new InspectorClient methods to work with Settings.

        https://bugs.webkit.org/show_bug.cgi?id=21856

        Reviewed by Darin Adler.

        * WebKit.xcodeproj/project.pbxproj: Add the new InspectorClientCF.cpp file.

WebKit/gtk:

2008-10-24  Timothy Hatcher  <timothy@apple.com>

        Stub out new InspectorClient methods.

        https://bugs.webkit.org/show_bug.cgi?id=21856

        Reviewed by Darin Adler.

        * WebCoreSupport/InspectorClientGtk.cpp:
        (WebKit::InspectorClient::populateSetting): Not implemented.
        (WebKit::InspectorClient::storeSetting): Ditto.
        (WebKit::InspectorClient::removeSetting): Ditto.
        * WebCoreSupport/InspectorClientGtk.h:

WebKit/mac:

2008-10-24  Timothy Hatcher  <timothy@apple.com>

        Implement new InspectorClient methods to work with Settings.

        https://bugs.webkit.org/show_bug.cgi?id=21856

        Reviewed by Darin Adler.

        * WebCoreSupport/WebInspectorClient.h: Add the new methods and
        guard the ObjC parts of the header.

WebKit/qt:

2008-10-24  Timothy Hatcher  <timothy@apple.com>

        Stub out new InspectorClient methods.

        https://bugs.webkit.org/show_bug.cgi?id=21856

        Reviewed by Darin Adler.

        * WebCoreSupport/InspectorClientQt.cpp:
        (WebCore::InspectorClientQt::populateSetting): Not implemented.
        (WebCore::InspectorClientQt::storeSetting): Ditto.
        (WebCore::InspectorClientQt::removeSetting): Ditto.
        * WebCoreSupport/InspectorClientQt.h:

WebKit/win:

2008-10-24  Timothy Hatcher  <timothy@apple.com>

        Implement new InspectorClient methods to work with Settings.

        https://bugs.webkit.org/show_bug.cgi?id=21856

        Reviewed by Adam Roben.

        * WebKit.vcproj/WebKit.vcproj: Add the new InspectorClientCF.cpp file.
        * WebCoreSupport/WebInspectorClient.h: Add the new methods.

WebKit/wx:

2008-10-24  Timothy Hatcher  <timothy@apple.com>

        Stub out new InspectorClient methods.

        https://bugs.webkit.org/show_bug.cgi?id=21856

        Reviewed by Darin Adler.

        * WebKitSupport/InspectorClientWx.cpp:
        (WebCore::InspectorClient::populateSetting): Not implemented.
        (WebCore::InspectorClient::storeSetting): Ditto.
        (WebCore::InspectorClient::removeSetting): Ditto.
        * WebKitSupport/InspectorClientWx.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 746c7f0..5daffcb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,51 @@
+2008-10-24  Timothy Hatcher  <timothy@apple.com>
+
+        Add a mechanism to ask the InspectorClient for key/value setting pairs.
+        These settings can be strings, numbers, booleans or string vectors. The
+        settings are also bridged to and from JavaScript.
+
+        https://bugs.webkit.org/show_bug.cgi?id=21856
+
+        Reviewed by Darin Adler.
+
+        * WebCore.base.exp: Expose the String CFStringRef constructor.
+        * inspector/InspectorClient.h:
+        (WebCore::InspectorClient::populateSetting): Added, pure virtual.
+        (WebCore::InspectorClient::storeSetting): Ditto.
+        (WebCore::InspectorClient::removeSetting): Ditto.
+        * inspector/InspectorController.cpp:
+        (WebCore::setting): Calls InspectorController::setting and wraps the result in script types.
+        (WebCore::setSetting): Calls InspectorController::setSetting after converting from script types.
+        (WebCore::InspectorController::InspectorController): Increment a global static
+        to track the number of live InspectorControllers.
+        (WebCore::InspectorController::~InspectorController): Decrement the global static
+        that tracks the number of live InspectorControllers. Delete the setting cache if there
+        are no more live controllers.
+        (WebCore::InspectorController::setting): Check the cache and return the setting from there,
+        otherwise make a new Setting and ask the client to populate it.
+        (WebCore::InspectorController::setSetting): Change the cache and ask the client to store it.
+        (WebCore::InspectorController::windowScriptObjectAvailable): Add setting and setSetting
+        to the InspectorController script class.
+        * inspector/InspectorController.h:
+        (WebCore::InspectorController::Setting::Setting):
+        (WebCore::InspectorController::Setting::operator=):
+        (WebCore::InspectorController::Setting::type): Return m_type.
+        (WebCore::InspectorController::Setting::string): Return m_string. Assert the type is correct.
+        (WebCore::InspectorController::Setting::stringVector): Return m_stringVector.
+        Assert the type is correct.
+        (WebCore::InspectorController::Setting::doubleValue): Return m_simpleContent.m_double.
+        Assert the type is correct.
+        (WebCore::InspectorController::Setting::integerValue): Return m_simpleContent.m_integer.
+        Assert the type is correct.
+        (WebCore::InspectorController::Setting::booleanValue): Return m_simpleContent.m_boolean.
+        Assert the type is correct.
+        (WebCore::InspectorController::Setting::set): Overloaded for each data type, sets the right
+        field and the type.
+        * loader/EmptyClients.h:
+        (WebCore::EmptyInspectorClient::populateSetting): Added, empty method.
+        (WebCore::EmptyInspectorClient::storeSetting): Ditto.
+        (WebCore::EmptyInspectorClient::removeSetting): Ditto.
+
 2008-10-24  Cameron Zwarich  <zwarich@apple.com>
 
         Reviewed by Sam Weinig.