Title: [107986] trunk/Source/WebCore
Revision
107986
Author
commit-qu...@webkit.org
Date
2012-02-16 15:32:46 -0800 (Thu, 16 Feb 2012)

Log Message

[GTK] File system api build is broken
https://bugs.webkit.org/show_bug.cgi?id=78479

Patch by ChangSeok Oh <shivami...@gmail.com> on 2012-02-16
Reviewed by Philippe Normand.

This patch is a small step to support FileSystem API for GTK port.
As I know, bug58443 also dealt with it, but it looks like the submitted patch
needs to be updated. To do that, I think I need to discuss with the original author.
So, I hope to just fix build break issue in this bug.

No new tests. Implementing the feature is not done yet.

* GNUmakefile.list.am: Added some missing files.
* bindings/js/JSDirectoryEntryCustom.cpp: Added Error.h to use its API.
* platform/AsyncFileSystem.cpp:
(WebCore):
(WebCore::AsyncFileSystem::create): The arguments don't match the declaration in AsyncFileSystem.h.
* platform/gtk/AsyncFileSystemGtk.cpp: Added.
(WebCore):
(WebCore::AsyncFileSystem::isAvailable):
(WebCore::AsyncFileSystem::isValidType):
(WebCore::AsyncFileSystem::create):
(WebCore::AsyncFileSystem::openFileSystem):
(WebCore::AsyncFileSystem::crackFileSystemURL):
(WebCore::AsyncFileSystemGtk::AsyncFileSystemGtk):
(WebCore::AsyncFileSystemGtk::~AsyncFileSystemGtk):
(WebCore::AsyncFileSystemGtk::toURL):
(WebCore::AsyncFileSystemGtk::move):
(WebCore::AsyncFileSystemGtk::copy):
(WebCore::AsyncFileSystemGtk::remove):
(WebCore::AsyncFileSystemGtk::removeRecursively):
(WebCore::AsyncFileSystemGtk::readMetadata):
(WebCore::AsyncFileSystemGtk::createFile):
(WebCore::AsyncFileSystemGtk::createDirectory):
(WebCore::AsyncFileSystemGtk::fileExists):
(WebCore::AsyncFileSystemGtk::directoryExists):
(WebCore::AsyncFileSystemGtk::readDirectory):
(WebCore::AsyncFileSystemGtk::createWriter):
* platform/gtk/AsyncFileSystemGtk.h: Added.
(WebCore):
(AsyncFileSystemGtk):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107985 => 107986)


--- trunk/Source/WebCore/ChangeLog	2012-02-16 23:30:55 UTC (rev 107985)
+++ trunk/Source/WebCore/ChangeLog	2012-02-16 23:32:46 UTC (rev 107986)
@@ -1,3 +1,47 @@
+2012-02-16  ChangSeok Oh  <shivami...@gmail.com>
+
+        [GTK] File system api build is broken
+        https://bugs.webkit.org/show_bug.cgi?id=78479
+
+        Reviewed by Philippe Normand.
+
+        This patch is a small step to support FileSystem API for GTK port.
+        As I know, bug58443 also dealt with it, but it looks like the submitted patch
+        needs to be updated. To do that, I think I need to discuss with the original author.
+        So, I hope to just fix build break issue in this bug.
+
+        No new tests. Implementing the feature is not done yet.
+
+        * GNUmakefile.list.am: Added some missing files.
+        * bindings/js/JSDirectoryEntryCustom.cpp: Added Error.h to use its API.
+        * platform/AsyncFileSystem.cpp:
+        (WebCore):
+        (WebCore::AsyncFileSystem::create): The arguments don't match the declaration in AsyncFileSystem.h.
+        * platform/gtk/AsyncFileSystemGtk.cpp: Added.
+        (WebCore):
+        (WebCore::AsyncFileSystem::isAvailable):
+        (WebCore::AsyncFileSystem::isValidType):
+        (WebCore::AsyncFileSystem::create):
+        (WebCore::AsyncFileSystem::openFileSystem):
+        (WebCore::AsyncFileSystem::crackFileSystemURL):
+        (WebCore::AsyncFileSystemGtk::AsyncFileSystemGtk):
+        (WebCore::AsyncFileSystemGtk::~AsyncFileSystemGtk):
+        (WebCore::AsyncFileSystemGtk::toURL):
+        (WebCore::AsyncFileSystemGtk::move):
+        (WebCore::AsyncFileSystemGtk::copy):
+        (WebCore::AsyncFileSystemGtk::remove):
+        (WebCore::AsyncFileSystemGtk::removeRecursively):
+        (WebCore::AsyncFileSystemGtk::readMetadata):
+        (WebCore::AsyncFileSystemGtk::createFile):
+        (WebCore::AsyncFileSystemGtk::createDirectory):
+        (WebCore::AsyncFileSystemGtk::fileExists):
+        (WebCore::AsyncFileSystemGtk::directoryExists):
+        (WebCore::AsyncFileSystemGtk::readDirectory):
+        (WebCore::AsyncFileSystemGtk::createWriter):
+        * platform/gtk/AsyncFileSystemGtk.h: Added.
+        (WebCore):
+        (AsyncFileSystemGtk):
+
 2012-02-16  Adrienne Walker  <e...@google.com>
 
         Handle dirty descendant visibility status in RenderLayer::updateLayerPositionsAfterScroll

Modified: trunk/Source/WebCore/GNUmakefile.list.am (107985 => 107986)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-02-16 23:30:55 UTC (rev 107985)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-02-16 23:32:46 UTC (rev 107986)
@@ -1871,6 +1871,7 @@
 	Source/WebCore/fileapi/EntryArray.h \
 	Source/WebCore/fileapi/EntryArraySync.cpp \
 	Source/WebCore/fileapi/EntryArraySync.h \
+	Source/WebCore/fileapi/EntryBase.cpp \
 	Source/WebCore/fileapi/EntryBase.h \
 	Source/WebCore/fileapi/EntryCallback.h \
 	Source/WebCore/fileapi/EntrySync.cpp \
@@ -4835,8 +4836,11 @@
 	$(WebCore)/fileapi/FileWriterCallback.idl \
 	$(WebCore)/fileapi/FileWriterSync.idl \
 	$(WebCore)/fileapi/Metadata.idl \
-	$(WebCore)/fileapi/MetadataCallback.idl \
-	$(WebCore)/fileapi/WebKitFlags.idl
+	$(WebCore)/fileapi/MetadataCallback.idl
+
+webcoregtk_sources += \
+	Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp \
+	Source/WebCore/platform/gtk/AsyncFileSystemGtk.h
 endif # END ENABLE_FILE_SYSTEM
 
 # ----

Modified: trunk/Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp (107985 => 107986)


--- trunk/Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp	2012-02-16 23:30:55 UTC (rev 107985)
+++ trunk/Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp	2012-02-16 23:32:46 UTC (rev 107986)
@@ -38,6 +38,7 @@
 #include "JSDOMBinding.h"
 #include "JSEntryCallback.h"
 #include "JSErrorCallback.h"
+#include <runtime/Error.h>
 #include <wtf/Assertions.h>
 
 using namespace JSC;

Modified: trunk/Source/WebCore/platform/AsyncFileSystem.cpp (107985 => 107986)


--- trunk/Source/WebCore/platform/AsyncFileSystem.cpp	2012-02-16 23:30:55 UTC (rev 107985)
+++ trunk/Source/WebCore/platform/AsyncFileSystem.cpp	2012-02-16 23:32:46 UTC (rev 107986)
@@ -34,6 +34,7 @@
 #if ENABLE(FILE_SYSTEM)
 
 #include "AsyncFileSystemCallbacks.h"
+#include "ExceptionCode.h"
 #include "FileSystem.h"
 #include "NotImplemented.h"
 
@@ -44,7 +45,7 @@
 const char AsyncFileSystem::temporaryPathPrefix[] = "temporary";
 const size_t AsyncFileSystem::temporaryPathPrefixLength = sizeof(AsyncFileSystem::temporaryPathPrefix) - 1;
 
-#if !PLATFORM(CHROMIUM)
+#if !PLATFORM(CHROMIUM) && !PLATFORM(GTK)
 bool AsyncFileSystem::isAvailable()
 {
     notImplemented();
@@ -56,10 +57,10 @@
     return type == Temporary || type == Persistent;
 }
 
-PassOwnPtr<AsyncFileSystem> AsyncFileSystem::create(Type, const String&)
+PassOwnPtr<AsyncFileSystem> AsyncFileSystem::create(Type)
 {
     notImplemented();
-    return 0;
+    return nullptr;
 }
 
 void AsyncFileSystem::openFileSystem(const String& basePath, const String& storageIdentifier, Type type, bool, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)

Added: trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp (0 => 107986)


--- trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.cpp	2012-02-16 23:32:46 UTC (rev 107986)
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2012 ChangSeok Oh <shivami...@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystemGtk.h"
+
+#include "AsyncFileSystemCallbacks.h"
+#include "ExceptionCode.h"
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+bool AsyncFileSystem::isAvailable()
+{
+    notImplemented();
+    return false;
+}
+
+bool AsyncFileSystem::isValidType(Type type)
+{
+    notImplemented();
+    return false;
+}
+
+PassOwnPtr<AsyncFileSystem> AsyncFileSystem::create(Type type)
+{
+    return adoptPtr(new AsyncFileSystemGtk(type));
+}
+
+void AsyncFileSystem::openFileSystem(const String& basePath, const String& storageIdentifier, Type type, bool, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+    callbacks->didFail(NOT_SUPPORTED_ERR);
+}
+
+bool AsyncFileSystem::crackFileSystemURL(const KURL& url, AsyncFileSystem::Type& type, String& filePath)
+{
+    notImplemented();
+    return false;
+}
+
+AsyncFileSystemGtk::AsyncFileSystemGtk(AsyncFileSystem::Type type)
+    : AsyncFileSystem(type)
+{
+    notImplemented();
+}
+
+AsyncFileSystemGtk::~AsyncFileSystemGtk()
+{
+    notImplemented();
+}
+
+String AsyncFileSystemGtk::toURL(const String& originString, const String& fullPath)
+{
+    notImplemented();
+    return String();
+}
+
+void AsyncFileSystemGtk::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+void AsyncFileSystemGtk::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+
+void AsyncFileSystemGtk::createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+    notImplemented();
+}
+
+} // namespace WebCore
+
+#endif

Added: trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h (0 => 107986)


--- trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/gtk/AsyncFileSystemGtk.h	2012-02-16 23:32:46 UTC (rev 107986)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012 ChangSeok Oh <shivami...@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ */
+
+#ifndef  AsyncFileSystemGtk_h
+#define  AsyncFileSystemGtk_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class AsyncFileSystemCallbacks;
+
+class AsyncFileSystemGtk : public AsyncFileSystem {
+public:
+    AsyncFileSystemGtk(AsyncFileSystem::Type);
+    virtual ~AsyncFileSystemGtk();
+
+    virtual String toURL(const String& originString, const String& fullPath);
+    virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+    virtual void createWriter(AsyncFileWriterClient*, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif //  AsyncFileSystemGtk_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to