diff options
author | Ben Murdoch <benm@google.com> | 2011-06-02 12:07:03 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-10 10:47:21 +0100 |
commit | 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch) | |
tree | e4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/platform/wx | |
parent | 87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff) | |
download | external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2 |
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/platform/wx')
-rw-r--r-- | Source/WebCore/platform/wx/FileSystemWx.cpp | 29 | ||||
-rw-r--r-- | Source/WebCore/platform/wx/WidgetWx.cpp | 8 |
2 files changed, 24 insertions, 13 deletions
diff --git a/Source/WebCore/platform/wx/FileSystemWx.cpp b/Source/WebCore/platform/wx/FileSystemWx.cpp index 3c2b453..3644a42 100644 --- a/Source/WebCore/platform/wx/FileSystemWx.cpp +++ b/Source/WebCore/platform/wx/FileSystemWx.cpp @@ -78,8 +78,11 @@ bool getFileSize(const String& path, long long& resultSize) bool getFileModificationTime(const String& path, time_t& t) { - t = wxFileName(path).GetModificationTime().GetTicks(); - return true; + if (wxFileExists(path)) { + t = wxFileName(path).GetModificationTime().GetTicks(); + return true; + } + return false; } bool makeAllDirectories(const String& path) @@ -107,22 +110,26 @@ String directoryName(const String& path) return wxFileName(path).GetPath(); } -String openTemporaryFile(const String&, PlatformFileHandle& handle) +String openTemporaryFile(const String& prefix, PlatformFileHandle& handle) { - notImplemented(); - handle = invalidPlatformFileHandle; - return String(); + wxString sFilename = wxFileName::CreateTempFileName(prefix); + wxFile* temp = new wxFile(); + temp->Open(sFilename.c_str(), wxFile::read_write); + handle = temp; + return String(sFilename); } -void closeFile(PlatformFileHandle&) +void closeFile(PlatformFileHandle& handle) { - notImplemented(); + if (handle) + delete handle; } -int writeToFile(PlatformFileHandle, const char* data, int length) +int writeToFile(PlatformFileHandle handle, const char* data, int length) { - notImplemented(); - return 0; + if (handle) + return static_cast<wxFile*>(handle)->Write(data, length); + return -1; } bool unloadModule(PlatformModule mod) diff --git a/Source/WebCore/platform/wx/WidgetWx.cpp b/Source/WebCore/platform/wx/WidgetWx.cpp index 9de4c3d..e9a3c98 100644 --- a/Source/WebCore/platform/wx/WidgetWx.cpp +++ b/Source/WebCore/platform/wx/WidgetWx.cpp @@ -27,8 +27,10 @@ #include "Cursor.h" #include "GraphicsContext.h" +#include "HostWindow.h" #include "IntRect.h" #include "NotImplemented.h" +#include "ScrollView.h" #include <wx/defs.h> #include <wx/scrolwin.h> @@ -54,8 +56,10 @@ void Widget::setFocus(bool focused) void Widget::setCursor(const Cursor& cursor) { - if (platformWidget() && cursor.impl()) - platformWidget()->SetCursor(*cursor.impl()); + ScrollView* view = root(); + if (!view) + return; + view->hostWindow()->setCursor(cursor); } void Widget::show() |