summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/haiku
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/haiku')
-rw-r--r--WebCore/platform/haiku/DragDataHaiku.cpp4
-rw-r--r--WebCore/platform/haiku/SharedBufferHaiku.cpp11
2 files changed, 5 insertions, 10 deletions
diff --git a/WebCore/platform/haiku/DragDataHaiku.cpp b/WebCore/platform/haiku/DragDataHaiku.cpp
index 4a20147..7f40b8a 100644
--- a/WebCore/platform/haiku/DragDataHaiku.cpp
+++ b/WebCore/platform/haiku/DragDataHaiku.cpp
@@ -86,13 +86,13 @@ bool DragData::containsCompatibleContent() const
return containsColor() || containsURL() || containsPlainText();
}
-bool DragData::containsURL() const
+bool DragData::containsURL(FilenameConversionPolicy filenamePolicy) const
{
notImplemented();
return false;
}
-String DragData::asURL(String* title) const
+String DragData::asURL(FilenameConversionPolicy filenamePolicy, String* title) const
{
notImplemented();
return String();
diff --git a/WebCore/platform/haiku/SharedBufferHaiku.cpp b/WebCore/platform/haiku/SharedBufferHaiku.cpp
index abe9e2d..5bab562 100644
--- a/WebCore/platform/haiku/SharedBufferHaiku.cpp
+++ b/WebCore/platform/haiku/SharedBufferHaiku.cpp
@@ -40,17 +40,12 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& fi
if (file.InitCheck() != B_OK)
return 0;
- RefPtr<SharedBuffer> result = SharedBuffer::create();
-
off_t size;
file.GetSize(&size);
- result->m_buffer.resize(size);
- if (result->m_buffer.size() != size)
- return 0;
- result->m_size = size;
- file.Read(result->m_buffer.data(), result->m_buffer.size());
- return result.release();
+ Vector<char> buffer(size);
+ file.Read(buffer.data(), buffer.size());
+ return SharedBuffer::adoptVector(buffer);
}
} // namespace WebCore