2007-10-19 Alp Toker <alp@atoker.com>
authoralp <alp@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Oct 2007 05:37:07 +0000 (05:37 +0000)
committeralp <alp@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Oct 2007 05:37:07 +0000 (05:37 +0000)
        Reviewed by Oliver.

        GTK+ build fix enabling the new local database storage feature.
        There is also a prospective Qt build fix.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@26810 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/WebCore.pro
WebCore/bindings/js/JSDatabaseCustom.cpp
WebCore/platform/gtk/FileSystemGtk.cpp
WebKit/gtk/ChangeLog
WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
WebKit/qt/WebCoreSupport/ChromeClientQt.h

index a5d9669f3a4ef7b36bead45f806467846f85bb13..01e2d7dee54dff2fd4a25a1639b86db5980b15bf 100644 (file)
@@ -1,3 +1,16 @@
+2007-10-19  Alp Toker  <alp@atoker.com>
+
+        Reviewed by Oliver.
+
+        GTK+ build fix enabling the new local database storage feature.
+        There is also a prospective Qt build fix.
+
+        * WebCore.pro:
+        * bindings/js/JSDatabaseCustom.cpp:
+        * platform/gtk/FileSystemGtk.cpp:
+        (WebCore::pathByAppendingComponent):
+        (WebCore::makeAllDirectories):
+
 2007-10-19  Andrew Wellington  <proton@wiretapped.net>
 
         Reviewed by Brady Eidson.
index ede1ad465a98574b3ab48eda72f5b6da17df654c..ffe4d39504085044aad8bbb624f0ef714bc79a99 100644 (file)
@@ -51,6 +51,7 @@ win32-g++ {
 }
 
 # Optional components (look for defs in config.h and included files!)
+!contains(DEFINES, ENABLE_DATABASE=.): DEFINES += ENABLE_DATABASE=1
 !contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
 !contains(DEFINES, ENABLE_XPATH=.): DEFINES += ENABLE_XPATH=1
 gtk-port:!contains(DEFINES, ENABLE_XSLT=.): DEFINES += ENABLE_XSLT=1
@@ -118,6 +119,8 @@ INCLUDEPATH +=  $$PWD \
                 $$PWD/platform/graphics \
                 $$PWD/platform/graphics/svg \
                 $$PWD/platform/graphics/svg/filters \
+                $$PWD/platform/sql \
+                $$PWD/storage \
                 $$PWD/loader $$PWD/loader/icon \
                 $$PWD/css \
                 $$PWD/dom \
@@ -292,6 +295,11 @@ IDL_BINDINGS += \
     page/DOMWindow.idl \
     page/History.idl \
     page/Screen.idl \
+    storage/Database.idl \
+    storage/SQLResultSetRowList.idl \
+    storage/VersionChangeCallback.idl \
+    storage/SQLCallback.idl \
+    storage/SQLResultSet.idl \
     xml/DOMParser.idl \
     xml/XMLSerializer.idl
 
@@ -304,6 +312,10 @@ SOURCES += \
     bindings/js/JSCSSStyleDeclarationCustom.cpp \
     bindings/js/JSCSSValueCustom.cpp \
     bindings/js/JSCustomXPathNSResolver.cpp \
+    bindings/js/JSCustomVersionChangeCallback.cpp \
+    bindings/js/JSCustomSQLCallback.cpp \
+    bindings/js/JSDatabaseCustom.cpp \
+    bindings/js/JSSQLResultSetRowListCustom.cpp \
     bindings/js/JSDocumentCustom.cpp \
     bindings/js/JSDOMExceptionConstructor.cpp \
     bindings/js/JSDOMWindowCustom.cpp \
@@ -946,17 +958,32 @@ gtk-port {
         ../WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp \
         ../WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
 }
-contains(DEFINES, ENABLE_ICONDATABASE=1) {
+
+# ENABLE_DATABASE probably cannot be disabled without breaking things
+contains(DEFINES, ENABLE_DATABASE=1) {
     qt-port: INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
     LIBS += -lsqlite3
+    SOURCES += \
+        platform/sql/SQLAuthorizer.cpp \
+        platform/sql/SQLDatabase.cpp \
+        platform/sql/SQLStatement.cpp \
+        platform/sql/SQLTransaction.cpp \
+        platform/sql/SQLValue.cpp \
+        storage/DatabaseAuthorizer.cpp \
+        storage/DatabaseCallback.cpp \
+        storage/Database.cpp \
+        storage/DatabaseTask.cpp \
+        storage/DatabaseThread.cpp \
+        storage/DatabaseTracker.cpp \
+        storage/SQLResultSet.cpp \
+        storage/SQLResultSetRowList.cpp
+}
+
+contains(DEFINES, ENABLE_ICONDATABASE=1) {
     SOURCES += \
         loader/icon/IconDatabase.cpp \
         loader/icon/IconRecord.cpp \
-        loader/icon/PageURLRecord.cpp \
-        loader/icon/SQLDatabase.cpp \
-        loader/icon/SQLStatement.cpp \
-        loader/icon/SQLTransaction.cpp
+        loader/icon/PageURLRecord.cpp
 } else {
     SOURCES += \
         loader/icon/IconDatabaseNone.cpp
index 23f8b457fa4368d1fd3c5e8a753f249eff244be3..fe5382cca85171d23b9b74f1f415f40a6c7ee574 100644 (file)
 #include "JSCustomVersionChangeCallback.h"
 #include "PlatformString.h"
 #include "SQLValue.h"
+#if PLATFORM(GTK) || PLATFORM(QT)
+#include <JavaScriptCore/kjs/array_instance.h>
+#else
 #include <JavaScriptCore/array_instance.h>
+#endif
 
 namespace WebCore {
 
index cebac37b59105f0223c121665c6e152ad16e1f2a..ffb7662757461c161acb47f7f084ea0382160f36 100644 (file)
@@ -77,4 +77,25 @@ bool fileSize(const String& path, long long& resultSize)
     return true;
 }
 
+String pathByAppendingComponent(const String& path, const String& component)
+{
+    // FIXME: Use the platform separator.
+
+    if (path.endsWith("/"))
+        return path + component;
+    else
+        return path + "/" + component;
+}
+
+bool makeAllDirectories(const String& path)
+{
+    gchar* filename = g_filename_from_utf8(path.utf8().data(), -1, 0, 0, 0);
+    if (!filename)
+        return false;
+
+    gint result = g_mkdir_with_parents(filename, S_IRWXU);
+    g_free(filename);
+
+    return result == 0;
+}
 }
index 599d5e9986f473aec3cc9c0793553103f3d9489f..ee4c150fe5fd6a35a632f2b9837da7205cb91a6f 100644 (file)
@@ -1,3 +1,14 @@
+2007-10-19  Alp Toker  <alp@atoker.com>
+
+        Reviewed by Oliver.
+
+        GTK+ build fix enabling the new local database storage feature.
+        There is also a prospective Qt build fix.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::runDatabaseSizeLimitPrompt):
+        * WebCoreSupport/ChromeClientGtk.h:
+
 2007-10-14  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
 
         Reviewed by Adam.
index 08664b1060207f9b01852f741d5e5483dc4570b0..b922b8a42fbf36dc6020ae350f6db1f516fe1e22 100644 (file)
@@ -297,4 +297,10 @@ void ChromeClient::print(Frame*)
 {
     notImplemented();
 }
+
+bool ChromeClient::runDatabaseSizeLimitPrompt(Frame*, const String& origin)
+{
+    notImplemented();
+    return false;
+}
 }
index 43219dd40229583769b435b3aa8121b73671da99..45144d445fd88a9b0d4f68b9818d58cfa1f16659 100644 (file)
@@ -102,6 +102,9 @@ namespace WebKit {
         virtual void setToolTip(const WebCore::String&);
 
         virtual void print(WebCore::Frame*);
+
+        virtual bool runDatabaseSizeLimitPrompt(WebCore::Frame*, const WebCore::String&);
+
     private:
         WebKitPage* m_webPage;
         WebCore::KURL m_hoveredLinkURL;
index c7c459a1a916d3fa21ecafddc0281c38838814b5..441b7abd0cb5327620a079ffd166a22f002d8d78 100644 (file)
@@ -1,3 +1,14 @@
+2007-10-19  Alp Toker  <alp@atoker.com>
+
+        Reviewed by Oliver.
+
+        GTK+ build fix enabling the new local database storage feature.
+        There is also a prospective Qt build fix.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::runDatabaseSizeLimitPrompt):
+        * WebCoreSupport/ChromeClientQt.h:
+
 2007-10-19  Simon Hausmann  <hausmann@kde.org>
 
         Fix the Qt/Windows build: Include the moc file from the .cpp file so
index 982523b15bc418dee01f4c389284fd6a9e5fdb62..cb15d3abb67b31d346d76a53631309ece57bbe06 100644 (file)
@@ -318,6 +318,12 @@ void ChromeClientQt::print(Frame*)
     notImplemented();
 }
 
+bool ChromeClientQt::runDatabaseSizeLimitPrompt(Frame*, const String& origin)
+{
+    notImplemented();
+    return false;
+}
+
 }
 
 
index 0c4f0d3e29b17dbbc6b32ec64ef4f2bb1e914671..f98cb80813ec69cf124ccb7c97828daca1e73403 100644 (file)
@@ -108,6 +108,8 @@ namespace WebCore {
 
         virtual void print(Frame*);
 
+        virtual bool runDatabaseSizeLimitPrompt(Frame*, const String&);
+
         QWebPage* m_webPage;
     };
 }