[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 11:10:28 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 5abc3e330339be6fcf4395f3e56b1e242b6f98cf
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 14 11:15:05 2010 +0000
2010-07-14 Joone Hur <joone at kldp.org>
Reviewed by Jian Li.
[GTK] Enabling File Reader/Writer APIs
https://bugs.webkit.org/show_bug.cgi?id=40209
The layout test fast/files will be enabled after eventSender.beginDragWithFiles is implemented for GTK.
* platform/gtk/FileSystemGtk.cpp:
(WebCore::openFile): Added.
(WebCore::readFromFile): Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3cba5c8..17da874 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-07-14 Joone Hur <joone at kldp.org>
+
+ Reviewed by Jian Li.
+
+ [GTK] Enabling File Reader/Writer APIs
+ https://bugs.webkit.org/show_bug.cgi?id=40209
+
+ The layout test fast/files will be enabled after eventSender.beginDragWithFiles is implemented for GTK.
+
+ * platform/gtk/FileSystemGtk.cpp:
+ (WebCore::openFile): Added.
+ (WebCore::readFromFile): Added.
+
2010-07-14 Nikolas Zimmermann <nzimmermann at rim.com>
Reviewed by Dirk Schulze.
diff --git a/WebCore/platform/gtk/FileSystemGtk.cpp b/WebCore/platform/gtk/FileSystemGtk.cpp
index 401bd4a..7ad2a39 100644
--- a/WebCore/platform/gtk/FileSystemGtk.cpp
+++ b/WebCore/platform/gtk/FileSystemGtk.cpp
@@ -24,12 +24,13 @@
#include "GOwnPtr.h"
#include "PlatformString.h"
-#include <wtf/text/CString.h>
+#include <errno.h>
+#include <fcntl.h>
#include <glib.h>
#include <glib/gstdio.h>
-
#include <unistd.h>
+#include <wtf/text/CString.h>
namespace WebCore {
@@ -233,6 +234,22 @@ CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle)
return tempFilePath;
}
+PlatformFileHandle openFile(const String& path, FileOpenMode mode)
+{
+ CString fsRep = fileSystemRepresentation(path);
+
+ if (fsRep.isNull())
+ return invalidPlatformFileHandle;
+
+ int platformFlag = 0;
+ if (mode == OpenForRead)
+ platformFlag |= O_RDONLY;
+ else if (mode == OpenForWrite)
+ platformFlag |= (O_WRONLY | O_CREAT | O_TRUNC);
+
+ return g_open(fsRep.data(), platformFlag, 0666);
+}
+
void closeFile(PlatformFileHandle& handle)
{
if (isHandleValid(handle)) {
@@ -255,6 +272,17 @@ int writeToFile(PlatformFileHandle handle, const char* data, int length)
return totalBytesWritten;
}
+int readFromFile(PlatformFileHandle handle, char* data, int length)
+{
+ do {
+ int bytesRead = read(handle, data, static_cast<size_t>(length));
+ if (bytesRead >= 0)
+ return bytesRead;
+ } while (errno == EINTR);
+
+ return -1;
+}
+
bool unloadModule(PlatformModule module)
{
return g_module_close(module);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list