summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/qt
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-05-26 10:11:43 +0100
committerSteve Block <steveblock@google.com>2010-05-27 11:14:42 +0100
commite78cbe89e6f337f2f1fe40315be88f742b547151 (patch)
treed778000b84a04f24bbad50c7fa66244365e960e9 /WebCore/platform/qt
parent7b582e96e4e909ed7dba1e07153d20fbddaec3f7 (diff)
downloadexternal_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.zip
external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.tar.gz
external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.tar.bz2
Merge WebKit at r60074: Initial merge by git
Change-Id: I18a2dc5439e36c928351ea829d8fb4e39b062fc7
Diffstat (limited to 'WebCore/platform/qt')
-rw-r--r--WebCore/platform/qt/QWebPageClient.h2
-rw-r--r--WebCore/platform/qt/SharedBufferQt.cpp15
2 files changed, 6 insertions, 11 deletions
diff --git a/WebCore/platform/qt/QWebPageClient.h b/WebCore/platform/qt/QWebPageClient.h
index 5608069..9e32d31 100644
--- a/WebCore/platform/qt/QWebPageClient.h
+++ b/WebCore/platform/qt/QWebPageClient.h
@@ -89,6 +89,8 @@ public:
virtual QStyle* style() const = 0;
virtual QRectF graphicsItemVisibleRect() const { return QRectF(); }
+
+ virtual bool viewResizesToContentsEnabled() const = 0;
protected:
#ifndef QT_NO_CURSOR
diff --git a/WebCore/platform/qt/SharedBufferQt.cpp b/WebCore/platform/qt/SharedBufferQt.cpp
index 029d9d6..6b7f9c9 100644
--- a/WebCore/platform/qt/SharedBufferQt.cpp
+++ b/WebCore/platform/qt/SharedBufferQt.cpp
@@ -39,16 +39,9 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& fi
if (!file.exists() || !file.open(QFile::ReadOnly))
return 0;
-
- RefPtr<SharedBuffer> result = SharedBuffer::create();
- result->m_buffer.resize(file.size());
- if (result->m_buffer.size() != file.size())
- return 0;
-
- result->m_size = result->m_buffer.size();
-
- file.read(result->m_buffer.data(), result->m_buffer.size());
- return result.release();
+ Vector<char> buffer(file.size());
+ file.read(buffer.data(), buffer.size());
+ return SharedBuffer::adoptVector(buffer);
}
-}
+} // namespace WebCore