Title: [87181] trunk
- Revision
- 87181
- Author
- [email protected]
- Date
- 2011-05-24 11:57:27 -0700 (Tue, 24 May 2011)
Log Message
Make start parameter of Blob.slice optional.
https://bugs.webkit.org/show_bug.cgi?id=59628
Reviewed by Kenneth Russell.
Source/WebCore:
The start parameter should be optional per the latest FILE API
spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob.
* fileapi/Blob.h:
* fileapi/Blob.idl: Make start parameter optional.
LayoutTests:
* fast/files/blob-slice-test-expected.txt:
* fast/files/blob-slice-test.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (87180 => 87181)
--- trunk/LayoutTests/ChangeLog 2011-05-24 18:55:10 UTC (rev 87180)
+++ trunk/LayoutTests/ChangeLog 2011-05-24 18:57:27 UTC (rev 87181)
@@ -1,3 +1,13 @@
+2011-05-24 Jian Li <[email protected]>
+
+ Reviewed by Kenneth Russell.
+
+ Make start parameter of Blob.slice optional.
+ https://bugs.webkit.org/show_bug.cgi?id=59628
+
+ * fast/files/blob-slice-test-expected.txt:
+ * fast/files/blob-slice-test.html:
+
2011-05-24 Adam Roben <[email protected]>
Test that we don't crash when a JS wrapper for an NPObject is destroyed after its plugin is unloaded
Modified: trunk/LayoutTests/fast/files/blob-slice-test-expected.txt (87180 => 87181)
--- trunk/LayoutTests/fast/files/blob-slice-test-expected.txt 2011-05-24 18:55:10 UTC (rev 87180)
+++ trunk/LayoutTests/fast/files/blob-slice-test-expected.txt 2011-05-24 18:57:27 UTC (rev 87181)
@@ -24,4 +24,5 @@
Slicing from -2147483648: 0123456789
Slicing from 9223372036854775000:
Slicing from -9223372036854775000: 0123456789
+Slicing without parameters: 0123456789
Modified: trunk/LayoutTests/fast/files/blob-slice-test.html (87180 => 87181)
--- trunk/LayoutTests/fast/files/blob-slice-test.html 2011-05-24 18:55:10 UTC (rev 87180)
+++ trunk/LayoutTests/fast/files/blob-slice-test.html 2011-05-24 18:57:27 UTC (rev 87181)
@@ -31,6 +31,7 @@
[-2147483648],
[9223372036854775000],
[-9223372036854775000],
+ [],
];
function log(message)
@@ -41,15 +42,19 @@
function testSlicing(start, end)
{
var subBlob;
- var message;
var reader = new FileReader();
- if (end == undefined) {
+ var message = "Slicing ";
+ if (start == undefined && end == undefined) {
+ message += "without parameters";
+ subBlob = blob.webkitSlice();
+ } else if (end == undefined) {
+ message += "from " + start;
subBlob = blob.webkitSlice(start);
- message = "Slicing from " + start + ": ";
} else {
+ message += "from " + start + " to " + end;
subBlob = blob.webkitSlice(start, end);
- message = "Slicing from " + start + " to " + end + ": ";
}
+ message += ": ";
reader._onload_ = function(event) {
log(message + event.target.result);
runNextTest();
Modified: trunk/Source/WebCore/ChangeLog (87180 => 87181)
--- trunk/Source/WebCore/ChangeLog 2011-05-24 18:55:10 UTC (rev 87180)
+++ trunk/Source/WebCore/ChangeLog 2011-05-24 18:57:27 UTC (rev 87181)
@@ -1,3 +1,16 @@
+2011-05-24 Jian Li <[email protected]>
+
+ Reviewed by Kenneth Russell.
+
+ Make start parameter of Blob.slice optional.
+ https://bugs.webkit.org/show_bug.cgi?id=59628
+
+ The start parameter should be optional per the latest FILE API
+ spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob.
+
+ * fileapi/Blob.h:
+ * fileapi/Blob.idl: Make start parameter optional.
+
2011-05-24 Adam Roben <[email protected]>
Invalidate RuntimeObjects when they are finalized
Modified: trunk/Source/WebCore/fileapi/Blob.h (87180 => 87181)
--- trunk/Source/WebCore/fileapi/Blob.h 2011-05-24 18:55:10 UTC (rev 87180)
+++ trunk/Source/WebCore/fileapi/Blob.h 2011-05-24 18:57:27 UTC (rev 87181)
@@ -63,7 +63,7 @@
virtual bool isFile() const { return false; }
#if ENABLE(BLOB)
- PassRefPtr<Blob> webkitSlice(long long start, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const;
+ PassRefPtr<Blob> webkitSlice(long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const;
#endif
protected:
Modified: trunk/Source/WebCore/fileapi/Blob.idl (87180 => 87181)
--- trunk/Source/WebCore/fileapi/Blob.idl 2011-05-24 18:55:10 UTC (rev 87180)
+++ trunk/Source/WebCore/fileapi/Blob.idl 2011-05-24 18:57:27 UTC (rev 87181)
@@ -39,7 +39,7 @@
#if !defined(LANGUAGE_OBJECTIVE_C)
#if defined(ENABLE_BLOB) && ENABLE_BLOB
- Blob webkitSlice(in long long start, in [Optional] long long end, in [Optional, ConvertUndefinedOrNullToNullString] DOMString contentType);
+ Blob webkitSlice(in [Optional] long long start, in [Optional] long long end, in [Optional, ConvertUndefinedOrNullToNullString] DOMString contentType);
#endif
#endif
};
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes