[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
jianli at chromium.org
jianli at chromium.org
Fri Feb 26 22:16:13 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 9f7012bd9a78c94412cb8f4bde6bee4ed39d10d1
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 9 20:50:12 2010 +0000
[chromium] Add the chromium interface to support Blob.slice.
https://bugs.webkit.org/show_bug.cgi?id=34652
Reviewed by Darin Fisher.
* WebKit.gyp:
* public/WebFileInfo.h: Added.
* public/WebHTTPBody.h:
* src/WebHTTPBody.cpp:
(WebKit::WebHTTPBody::elementAt):
(WebKit::WebHTTPBody::appendFile):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 6588c1f..383ccd4 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,17 @@
+2010-02-09 Jian Li <jianli at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add the chromium interface to support Blob.slice.
+ https://bugs.webkit.org/show_bug.cgi?id=34652
+
+ * WebKit.gyp:
+ * public/WebFileInfo.h: Added.
+ * public/WebHTTPBody.h:
+ * src/WebHTTPBody.cpp:
+ (WebKit::WebHTTPBody::elementAt):
+ (WebKit::WebHTTPBody::appendFile):
+
2010-02-09 Yury Semikhatsky <yurys at chromium.org>
Unreviewed. Follow-up fix.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 51693ba..1ed26ec 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -112,6 +112,7 @@
'public/WebEventListener.h',
'public/WebFileChooserCompletion.h',
'public/WebFileChooserParams.h',
+ 'public/WebFileInfo.h',
'public/WebFindOptions.h',
'public/WebFrame.h',
'public/WebFrameClient.h',
diff --git a/WebKit/chromium/public/WebFileInfo.h b/WebKit/chromium/public/WebFileInfo.h
new file mode 100644
index 0000000..4590a30
--- /dev/null
+++ b/WebKit/chromium/public/WebFileInfo.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebFileInfo_h
+#define WebFileInfo_h
+
+namespace WebKit {
+
+struct WebFileInfo {
+ // The last modification time of the file, in seconds.
+ // The value 0.0 means that the time is not set.
+ double modificationTime;
+
+ WebFileInfo() : modificationTime(0.0) { }
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebHTTPBody.h b/WebKit/chromium/public/WebHTTPBody.h
index 43f51a6..fcc44ff 100644
--- a/WebKit/chromium/public/WebHTTPBody.h
+++ b/WebKit/chromium/public/WebHTTPBody.h
@@ -32,6 +32,7 @@
#define WebHTTPBody_h
#include "WebData.h"
+#include "WebFileInfo.h"
#include "WebNonCopyable.h"
#include "WebString.h"
@@ -50,6 +51,9 @@ public:
enum { TypeData, TypeFile } type;
WebData data;
WebString filePath;
+ long long fileStart;
+ long long fileLength; // -1 means to the end of the file.
+ WebFileInfo fileInfo;
};
~WebHTTPBody() { reset(); }
@@ -77,7 +81,9 @@ public:
// Append to the list of elements.
WEBKIT_API void appendData(const WebData&);
- WEBKIT_API void appendFile(const WebString&);
+ WEBKIT_API void appendFile(const WebString&); // FIXME: to be removed.
+ // Passing -1 to fileLength means to the end of the file.
+ WEBKIT_API void appendFile(const WebString&, long long fileStart, long long fileLength, const WebFileInfo&);
// Identifies a particular form submission instance. A value of 0 is
// used to indicate an unspecified identifier.
diff --git a/WebKit/chromium/src/WebHTTPBody.cpp b/WebKit/chromium/src/WebHTTPBody.cpp
index 335ed5c..3d40869 100644
--- a/WebKit/chromium/src/WebHTTPBody.cpp
+++ b/WebKit/chromium/src/WebHTTPBody.cpp
@@ -32,6 +32,7 @@
#include "WebHTTPBody.h"
#include "FormData.h"
+#include "WebFileInfo.h"
using namespace WebCore;
@@ -78,11 +79,17 @@ bool WebHTTPBody::elementAt(size_t index, Element& result) const
result.type = Element::TypeData;
result.data.assign(element.m_data.data(), element.m_data.size());
result.filePath.reset();
+ result.fileStart = 0;
+ result.fileLength = 0;
+ result.fileInfo.modificationTime = 0.0;
break;
case FormDataElement::encodedFile:
result.type = Element::TypeFile;
result.data.reset();
result.filePath = element.m_filename;
+ result.fileStart = 0; // FIXME: to be set from FormData.
+ result.fileLength = -1; // FIXME: to be set from FormData.
+ result.fileInfo.modificationTime = 0.0; // FIXME: to be set from FormData.
break;
default:
ASSERT_NOT_REACHED();
@@ -106,6 +113,11 @@ void WebHTTPBody::appendFile(const WebString& filePath)
m_private->appendFile(filePath);
}
+void WebHTTPBody::appendFile(const WebString& filePath, long long fileStart, long long fileLength, const WebFileInfo& fileInfo)
+{
+ // FIXME: to be implemented.
+}
+
long long WebHTTPBody::identifier() const
{
ASSERT(!isNull());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list