- Revision
- 129082
- Author
- [email protected]
- Date
- 2012-09-19 18:41:03 -0700 (Wed, 19 Sep 2012)
Log Message
Remove Blob.webkitSlice
https://bugs.webkit.org/show_bug.cgi?id=96715
Reviewed by Darin Fisher.
Based on these usage metrics, it appears that it is safe to remove
Blob.webkitSlice. Folks that were previously calling webkitSlice should
just call slice instead. They do the same thing.
Ratio of Blob.webkitSlice calls to Blob.slice: 14.87%
Ratio of Blob.webkitSlice calls to Document creation: 0.0053%
* fileapi/Blob.cpp:
(WebCore::Blob::slice):
* fileapi/Blob.h:
(Blob):
* fileapi/Blob.idl:
* fileapi/File.h:
(File):
* inspector/front-end/FileUtils.js:
(WebInspector.ChunkedFileReader.prototype._loadChunk):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129081 => 129082)
--- trunk/Source/WebCore/ChangeLog 2012-09-20 01:34:02 UTC (rev 129081)
+++ trunk/Source/WebCore/ChangeLog 2012-09-20 01:41:03 UTC (rev 129082)
@@ -1,3 +1,27 @@
+2012-09-19 Adam Barth <[email protected]>
+
+ Remove Blob.webkitSlice
+ https://bugs.webkit.org/show_bug.cgi?id=96715
+
+ Reviewed by Darin Fisher.
+
+ Based on these usage metrics, it appears that it is safe to remove
+ Blob.webkitSlice. Folks that were previously calling webkitSlice should
+ just call slice instead. They do the same thing.
+
+ Ratio of Blob.webkitSlice calls to Blob.slice: 14.87%
+ Ratio of Blob.webkitSlice calls to Document creation: 0.0053%
+
+ * fileapi/Blob.cpp:
+ (WebCore::Blob::slice):
+ * fileapi/Blob.h:
+ (Blob):
+ * fileapi/Blob.idl:
+ * fileapi/File.h:
+ (File):
+ * inspector/front-end/FileUtils.js:
+ (WebInspector.ChunkedFileReader.prototype._loadChunk):
+
2012-09-19 Julien Chaffraix <[email protected]>
The collapsing border code needs direction-aware border getters
Modified: trunk/Source/WebCore/fileapi/Blob.cpp (129081 => 129082)
--- trunk/Source/WebCore/fileapi/Blob.cpp 2012-09-20 01:34:02 UTC (rev 129081)
+++ trunk/Source/WebCore/fileapi/Blob.cpp 2012-09-20 01:41:03 UTC (rev 129082)
@@ -89,21 +89,6 @@
#if ENABLE(BLOB)
PassRefPtr<Blob> Blob::slice(long long start, long long end, const String& contentType) const
{
- HistogramSupport::histogramEnumeration("WebCore.Blob.slice", SliceWithoutPrefix, SliceHistogramEnumMax);
- return sliceInternal(start, end, contentType);
-}
-
-PassRefPtr<Blob> Blob::webkitSlice(ScriptExecutionContext* context, long long start, long long end, const String& contentType) const
-{
- String message("Blob.webkitSlice() is deprecated. Use Blob.slice() instead.");
- context->addConsoleMessage(JSMessageSource, LogMessageType, WarningMessageLevel, message);
-
- HistogramSupport::histogramEnumeration("WebCore.Blob.slice", SliceWithPrefix, SliceHistogramEnumMax);
- return sliceInternal(start, end, contentType);
-}
-
-PassRefPtr<Blob> Blob::sliceInternal(long long start, long long end, const String& contentType) const
-{
// When we slice a file for the first time, we obtain a snapshot of the file by capturing its current size and modification time.
// The modification time will be used to verify if the file has been changed or not, when the underlying data are accessed.
long long size;
Modified: trunk/Source/WebCore/fileapi/Blob.h (129081 => 129082)
--- trunk/Source/WebCore/fileapi/Blob.h 2012-09-20 01:34:02 UTC (rev 129081)
+++ trunk/Source/WebCore/fileapi/Blob.h 2012-09-20 01:41:03 UTC (rev 129082)
@@ -71,10 +71,6 @@
#if ENABLE(BLOB)
PassRefPtr<Blob> slice(long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const;
-
- // Prefixed version is deprecated. This internally calls sliceInternal() (as slice() does) after showing a deprecation message.
- PassRefPtr<Blob> webkitSlice(ScriptExecutionContext*, long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const;
-
#endif
protected:
@@ -84,10 +80,6 @@
// For deserialization.
Blob(const KURL& srcURL, const String& type, long long size);
-#if ENABLE(BLOB)
- PassRefPtr<Blob> sliceInternal(long long start, long long end, const String& contentType) const;
-#endif
-
// This is an internal URL referring to the blob data associated with this object. It serves
// as an identifier for this blob. The internal URL is never used to source the blob's content
// into an HTML or for FileRead'ing, public blob URLs must be used for those purposes.
Modified: trunk/Source/WebCore/fileapi/Blob.idl (129081 => 129082)
--- trunk/Source/WebCore/fileapi/Blob.idl 2012-09-20 01:34:02 UTC (rev 129081)
+++ trunk/Source/WebCore/fileapi/Blob.idl 2012-09-20 01:41:03 UTC (rev 129082)
@@ -43,12 +43,8 @@
#if !defined(LANGUAGE_OBJECTIVE_C)
#if defined(ENABLE_BLOB) && ENABLE_BLOB
Blob slice(in [Optional] long long start, in [Optional] long long end, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString contentType);
-#if !defined(LANGUAGE_GOBJECT) || !LANGUAGE_GOBJECT
- // Prefixed version is going to be deprecated.
- [CallWith=ScriptExecutionContext] Blob webkitSlice(in [Optional] long long start, in [Optional] long long end, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString contentType);
#endif
#endif
-#endif
};
}
Modified: trunk/Source/WebCore/fileapi/File.h (129081 => 129082)
--- trunk/Source/WebCore/fileapi/File.h 2012-09-20 01:34:02 UTC (rev 129081)
+++ trunk/Source/WebCore/fileapi/File.h 2012-09-20 01:41:03 UTC (rev 129082)
@@ -123,7 +123,7 @@
#if ENABLE(FILE_SYSTEM)
KURL m_fileSystemURL;
- // If m_snapshotSize is negative (initialized to -1 by default), the snapshot metadata is invalid and we retrieve the latest metadata synchronously in size(), lastModifiedTime() and webkitSlice().
+ // If m_snapshotSize is negative (initialized to -1 by default), the snapshot metadata is invalid and we retrieve the latest metadata synchronously in size(), lastModifiedTime() and slice().
// Otherwise, the snapshot metadata are used directly in those methods.
const long long m_snapshotSize;
const double m_snapshotModificationTime;
Modified: trunk/Source/WebCore/inspector/front-end/FileUtils.js (129081 => 129082)
--- trunk/Source/WebCore/inspector/front-end/FileUtils.js 2012-09-20 01:34:02 UTC (rev 129081)
+++ trunk/Source/WebCore/inspector/front-end/FileUtils.js 2012-09-20 01:41:03 UTC (rev 129082)
@@ -151,7 +151,7 @@
{
var chunkStart = this._loadedSize;
var chunkEnd = Math.min(this._fileSize, chunkStart + this._chunkSize)
- var nextPart = this._file.webkitSlice(chunkStart, chunkEnd);
+ var nextPart = this._file.slice(chunkStart, chunkEnd);
this._reader.readAsText(nextPart);
}
}