[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jianli at chromium.org
jianli at chromium.org
Wed Dec 22 12:30:36 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6040962376a0b010af935f123dd01d8c14428551
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 24 22:47:15 2010 +0000
[chromium] Update WebBlobData.
https://bugs.webkit.org/show_bug.cgi?id=44481
Reviewed by Darin Fisher.
Some changes to WebBlobData to match with chromium implementation.
1) Change to use WebCString for data, instead of WebData.
2) Separate path from URL.
* public/WebBlobData.h:
* src/WebBlobData.cpp:
(WebKit::WebBlobData::itemAt):
(WebKit::WebBlobData::appendData):
(WebKit::WebBlobData::appendBlob):
* src/WebBlobStorageData.cpp:
(WebKit::WebBlobStorageData::itemAt):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 45f6064..10d859b 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,22 @@
+2010-08-24 Jian Li <jianli at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Update WebBlobData.
+ https://bugs.webkit.org/show_bug.cgi?id=44481
+
+ Some changes to WebBlobData to match with chromium implementation.
+ 1) Change to use WebCString for data, instead of WebData.
+ 2) Separate path from URL.
+
+ * public/WebBlobData.h:
+ * src/WebBlobData.cpp:
+ (WebKit::WebBlobData::itemAt):
+ (WebKit::WebBlobData::appendData):
+ (WebKit::WebBlobData::appendBlob):
+ * src/WebBlobStorageData.cpp:
+ (WebKit::WebBlobStorageData::itemAt):
+
2010-08-24 Marcus Bulach <bulach at chromium.org>
Reviewed by Jeremy Orlow.
diff --git a/WebKit/chromium/public/WebBlobData.h b/WebKit/chromium/public/WebBlobData.h
index 893aa89..8c0e1aa 100644
--- a/WebKit/chromium/public/WebBlobData.h
+++ b/WebKit/chromium/public/WebBlobData.h
@@ -31,8 +31,9 @@
#ifndef WebBlobData_h
#define WebBlobData_h
-#include "WebData.h"
+#include "WebCString.h"
#include "WebString.h"
+#include "WebURL.h"
#if WEBKIT_IMPLEMENTATION
namespace WebCore { class BlobData; }
@@ -47,8 +48,9 @@ class WebBlobData {
public:
struct Item {
enum { TypeData, TypeFile, TypeBlob } type;
- WebData data;
- WebString pathOrURL;
+ WebCString data;
+ WebString filePath;
+ WebURL blobURL;
long long offset;
long long length; // -1 means go to the end of the file/blob.
double expectedModificationTime; // 0.0 means that the time is not set.
@@ -71,10 +73,10 @@ public:
WEBKIT_API bool itemAt(size_t index, Item& result) const;
// Appends to the list of items.
- WEBKIT_API void appendData(const WebData&);
+ WEBKIT_API void appendData(const WebCString&);
WEBKIT_API void appendFile(const WebString& filePath);
WEBKIT_API void appendFile(const WebString& filePath, long long offset, long long length, double expectedModificationTime);
- WEBKIT_API void appendBlob(const WebString& blobURL, long long offset, long long length);
+ WEBKIT_API void appendBlob(const WebURL& blobURL, long long offset, long long length);
WEBKIT_API WebString contentType() const;
WEBKIT_API void setContentType(const WebString&);
diff --git a/WebKit/chromium/src/WebBlobData.cpp b/WebKit/chromium/src/WebBlobData.cpp
index 7f30b1e..4cd1d67 100644
--- a/WebKit/chromium/src/WebBlobData.cpp
+++ b/WebKit/chromium/src/WebBlobData.cpp
@@ -64,34 +64,35 @@ bool WebBlobData::itemAt(size_t index, Item& result) const
return false;
const BlobDataItem& item = m_private->items()[index];
+ result.data.reset();
+ result.filePath.reset();
+ result.blobURL = KURL();
result.offset = item.offset;
result.length = item.length;
result.expectedModificationTime = item.expectedModificationTime;
+
switch (item.type) {
case BlobDataItem::Data:
result.type = Item::TypeData;
- result.data.assign(item.data.data(), static_cast<size_t>(item.data.length()));
- result.pathOrURL.reset();
+ result.data = item.data;
return true;
case BlobDataItem::File:
result.type = Item::TypeFile;
- result.data.reset();
- result.pathOrURL = item.path;
+ result.filePath = item.path;
return true;
case BlobDataItem::Blob:
result.type = Item::TypeBlob;
- result.data.reset();
- result.pathOrURL = item.url;
+ result.blobURL = item.url;
return true;
}
ASSERT_NOT_REACHED();
return false;
}
-void WebBlobData::appendData(const WebData& data)
+void WebBlobData::appendData(const WebCString& data)
{
ASSERT(!isNull());
- m_private->appendData(CString(data.data(), data.size()));
+ m_private->appendData(data);
}
void WebBlobData::appendFile(const WebString& filePath)
@@ -106,10 +107,10 @@ void WebBlobData::appendFile(const WebString& filePath, long long offset, long l
m_private->appendFile(filePath, offset, length, expectedModificationTime);
}
-void WebBlobData::appendBlob(const WebString& blobURL, long long offset, long long length)
+void WebBlobData::appendBlob(const WebURL& blobURL, long long offset, long long length)
{
ASSERT(!isNull());
- m_private->appendBlob(KURL(ParsedURLString, blobURL), offset, length);
+ m_private->appendBlob(blobURL, offset, length);
}
WebString WebBlobData::contentType() const
diff --git a/WebKit/chromium/src/WebBlobStorageData.cpp b/WebKit/chromium/src/WebBlobStorageData.cpp
index 40a73cc..38a25fe 100644
--- a/WebKit/chromium/src/WebBlobStorageData.cpp
+++ b/WebKit/chromium/src/WebBlobStorageData.cpp
@@ -69,7 +69,7 @@ bool WebBlobStorageData::itemAt(size_t index, WebBlobData::Item& result) const
} else {
ASSERT(item.type == BlobDataItem::File);
result.type = WebBlobData::Item::TypeFile;
- result.pathOrURL = item.path;
+ result.filePath = item.path;
return true;
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list