[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

jianli at chromium.org jianli at chromium.org
Thu Feb 4 21:22:12 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit a40e78b3c653d238504ed0a8b91765169c2f4ed0
Author: jianli at chromium.org <jianli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 20 23:53:27 2010 +0000

    Implement File and Blob interfaces as defined in File API spec.
    https://bugs.webkit.org/show_bug.cgi?id=32912
    
    Reviewed by Dmitry Titov.
    
    WebCore:
    
    * Android.derived.jscbindings.mk:
    * Android.derived.v8bindings.mk:
    * Android.mk:
    * DerivedSources.cpp:
    * DerivedSources.make:
    * GNUmakefile.am:
    * WebCore.gypi:
    * WebCore.pri:
    * WebCore.pro:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCore.xcodeproj/project.pbxproj:
    * WebCoreSources.bkl:
    * bindings/js/JSXMLHttpRequestCustom.cpp:
    (WebCore::JSXMLHttpRequest::send):
    * bindings/objc/DOMHTML.h:
    * bindings/objc/PublicDOMInterfaces.h:
    * bindings/scripts/CodeGeneratorJS.pm:
    * bindings/scripts/CodeGeneratorObjC.pm:
    * bindings/scripts/CodeGeneratorV8.pm:
    * bindings/v8/DOMObjectsInclude.h:
    * bindings/v8/DerivedSourcesAllInOne.cpp:
    * bindings/v8/V8Binding.h:
    (WebCore::toInt64):
    * bindings/v8/V8Index.cpp:
    * bindings/v8/V8Index.h:
    * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
    (WebCore::V8XMLHttpRequest::sendCallback):
    * html/File.cpp:
    (WebCore::File::File):
    * html/File.h:
    (WebCore::File::create):
    (WebCore::File::name):
    (WebCore::File::fileName):
    (WebCore::File::fileSize):
    * html/File.idl:
    * xml/XMLHttpRequest.cpp:
    (WebCore::XMLHttpRequest::send):
    * xml/XMLHttpRequest.h:
    
    WebKit/mac:
    
    * MigrateHeaders.make:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/Android.derived.jscbindings.mk b/WebCore/Android.derived.jscbindings.mk
index c74713a..19690bb 100644
--- a/WebCore/Android.derived.jscbindings.mk
+++ b/WebCore/Android.derived.jscbindings.mk
@@ -149,6 +149,7 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/dom/%.cpp : $(intermediates)/dom/
 
 # HTML
 GEN := \
+    $(intermediates)/html/JSBlob.h \
     $(intermediates)/html/JSDataGridColumn.h \
     $(intermediates)/html/JSDataGridColumnList.h \
     $(intermediates)/html/JSFile.h \
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index 7b687e8..a3a9673 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -132,6 +132,7 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/bindings/%.cpp : $(intermediates)
 
 # HTML
 GEN := \
+    $(intermediates)/bindings/V8Blob.h \
     $(intermediates)/bindings/V8DataGridColumn.h \
     $(intermediates)/bindings/V8DataGridColumnList.h \
     $(intermediates)/bindings/V8File.h \
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 823dd35..f1437c3 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -234,6 +234,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	\
 	history/android/HistoryItemAndroid.cpp \
 	\
+	html/Blob.cpp \
 	html/CollectionCache.cpp \
 	html/File.cpp \
 	html/FileList.cpp \
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2fbd51d..a123f61 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,49 @@
+2010-01-20  Jian Li  <jianli at chromium.org>
+
+        Reviewed by Dmitry Titov.
+
+        Implement File and Blob interfaces as defined in File API spec.
+        https://bugs.webkit.org/show_bug.cgi?id=32912
+
+        * Android.derived.jscbindings.mk:
+        * Android.derived.v8bindings.mk:
+        * Android.mk:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pri:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreSources.bkl:
+        * bindings/js/JSXMLHttpRequestCustom.cpp:
+        (WebCore::JSXMLHttpRequest::send):
+        * bindings/objc/DOMHTML.h:
+        * bindings/objc/PublicDOMInterfaces.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        * bindings/scripts/CodeGeneratorV8.pm:
+        * bindings/v8/DOMObjectsInclude.h:
+        * bindings/v8/DerivedSourcesAllInOne.cpp:
+        * bindings/v8/V8Binding.h:
+        (WebCore::toInt64):
+        * bindings/v8/V8Index.cpp:
+        * bindings/v8/V8Index.h:
+        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+        (WebCore::V8XMLHttpRequest::sendCallback):
+        * html/File.cpp:
+        (WebCore::File::File):
+        * html/File.h:
+        (WebCore::File::create):
+        (WebCore::File::name):
+        (WebCore::File::fileName):
+        (WebCore::File::fileSize):
+        * html/File.idl:
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::send):
+        * xml/XMLHttpRequest.h:
+
 2010-01-20  Chris Fleizach  <cfleizach at apple.com>
 
         Reviewed by Beth Dakin.
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index a88adef..17d8ad9 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -29,6 +29,7 @@
 #include "JSAttr.cpp"
 #include "JSBarInfo.cpp"
 #include "JSBeforeLoadEvent.cpp"
+#include "JSBlob.cpp"
 #include "JSCanvasGradient.cpp"
 #include "JSCanvasPattern.cpp"
 #include "JSCanvasRenderingContext.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index c269b96..3676dc9 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -53,6 +53,7 @@ DOM_CLASSES = \
     Attr \
     BarInfo \
     BeforeLoadEvent \
+    Blob \
     CDATASection \
     CSSCharsetRule \
     CSSFontFaceRule \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 96efda4..796d4e5 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -163,6 +163,7 @@ IDL_BINDINGS += \
 	WebCore/dom/WebKitAnimationEvent.idl \
 	WebCore/dom/WebKitTransitionEvent.idl \
 	WebCore/dom/WheelEvent.idl \
+	WebCore/html/Blob.idl \
 	WebCore/html/canvas/WebGLArray.idl \
 	WebCore/html/canvas/WebGLArrayBuffer.idl \
 	WebCore/html/canvas/WebGLByteArray.idl \
@@ -957,6 +958,8 @@ webcore_sources += \
 	WebCore/history/HistoryItem.h \
 	WebCore/history/PageCache.cpp \
 	WebCore/history/PageCache.h \
+        WebCore/html/Blob.cpp \
+        WebCore/html/Blob.h \
 	WebCore/html/canvas/CanvasContextAttributes.h \
 	WebCore/html/canvas/CanvasGradient.cpp \
 	WebCore/html/canvas/CanvasGradient.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 36fbbad..de6d296 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -78,6 +78,7 @@
             'dom/WebKitAnimationEvent.idl',
             'dom/WebKitTransitionEvent.idl',
             'dom/WheelEvent.idl',
+            'html/Blob.idl',
             'html/canvas/WebGLActiveInfo.idl',
             'html/canvas/WebGLArray.idl',
             'html/canvas/WebGLArrayBuffer.idl',
@@ -1302,6 +1303,8 @@
             'history/HistoryItem.h',
             'history/PageCache.cpp',
             'history/PageCache.h',
+            'html/Blob.cpp',
+            'html/Blob.h',
             'html/canvas/WebGLArray.cpp',
             'html/canvas/WebGLArray.h',
             'html/canvas/WebGLArrayBuffer.cpp',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index 0f11323..32c97c4 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -271,6 +271,7 @@ IDL_BINDINGS += \
     dom/WebKitAnimationEvent.idl \
     dom/WebKitTransitionEvent.idl \
     dom/WheelEvent.idl \
+    html/Blob.idl \
     html/canvas/WebGLArray.idl \
     html/canvas/WebGLArrayBuffer.idl \
     html/canvas/WebGLByteArray.idl \
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 6294c1a..c1912e9 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -555,6 +555,7 @@ SOURCES += \
     history/HistoryItem.cpp \
     history/qt/HistoryItemQt.cpp \
     history/PageCache.cpp \
+    html/Blob.cpp \
     html/canvas/CanvasGradient.cpp \
     html/canvas/CanvasPattern.cpp \
     html/canvas/CanvasPixelArray.cpp \
@@ -1239,6 +1240,7 @@ HEADERS += \
     history/CachedPage.h \
     history/HistoryItem.h \
     history/PageCache.h \
+    html/Blob.h \
     html/canvas/CanvasGradient.h \
     html/canvas/CanvasPattern.h \
     html/canvas/CanvasPixelArray.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 52e0163..93bd2ef 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -721,6 +721,62 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSBlob.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_Internal|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_Cairo|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_Cairo|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_All|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSBlob.h"
+				>
+			</File>
+            <File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSCanvasGradient.cpp"
 				>
 				<FileConfiguration
@@ -29729,6 +29785,14 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\html\Blob.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\html\Blob.h"
+				>
+			</File>
+			<File
 				RelativePath="..\html\CollectionCache.h"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 970cdc3..015d3b2 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -594,6 +594,13 @@
 		29A8124B0FBB9CA900510293 /* AXObjectCacheMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29A812470FBB9CA900510293 /* AXObjectCacheMac.mm */; };
 		2D9066060BE141D400956998 /* LayoutState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D9066040BE141D400956998 /* LayoutState.cpp */; };
 		2D9066070BE141D400956998 /* LayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9066050BE141D400956998 /* LayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		2E2D99CD10E2BBDA00496337 /* JSBlob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */; };
+		2E2D99CE10E2BBDA00496337 /* JSBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99CC10E2BBDA00496337 /* JSBlob.h */; };
+		2E2D99E710E2BC1C00496337 /* DOMBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E510E2BC1C00496337 /* DOMBlob.h */; };
+		2E2D99E810E2BC1C00496337 /* DOMBlob.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E2D99E610E2BC1C00496337 /* DOMBlob.mm */; };
+		2E2D99EA10E2BC3800496337 /* DOMBlobInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */; };
+		2E2D99EB10E2BD3900496337 /* DOMBlob.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E510E2BC1C00496337 /* DOMBlob.h */; };
+		2E2D99EC10E2BD3900496337 /* DOMBlobInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */; };
 		2E4346440F546A8200B0F1BA /* GenericWorkerTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346320F546A8200B0F1BA /* GenericWorkerTask.h */; };
 		2E4346450F546A8200B0F1BA /* Worker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E4346330F546A8200B0F1BA /* Worker.cpp */; };
 		2E4346460F546A8200B0F1BA /* Worker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346340F546A8200B0F1BA /* Worker.h */; };
@@ -612,6 +619,8 @@
 		2E4346580F546A9900B0F1BA /* CrossThreadCopier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E4346560F546A9900B0F1BA /* CrossThreadCopier.cpp */; };
 		2E4346590F546A9900B0F1BA /* CrossThreadCopier.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346570F546A9900B0F1BA /* CrossThreadCopier.h */; };
 		2EA768040FE7126400AB9C8A /* WorkerScriptLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EA768030FE7126400AB9C8A /* WorkerScriptLoaderClient.h */; };
+		2EAFAF0E10E2AF2D007ED3D6 /* Blob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2EAFAF0B10E2AF2D007ED3D6 /* Blob.cpp */; };
+		2EAFAF0F10E2AF2D007ED3D6 /* Blob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EAFAF0C10E2AF2D007ED3D6 /* Blob.h */; };
 		2ECF7ADC10162B3800427DE7 /* JSErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2ECF7ADA10162B3800427DE7 /* JSErrorEvent.cpp */; };
 		2ECF7ADD10162B3800427DE7 /* JSErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2ECF7ADB10162B3800427DE7 /* JSErrorEvent.h */; };
 		2ECF7AE110162B5800427DE7 /* ErrorEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2ECF7ADE10162B5800427DE7 /* ErrorEvent.cpp */; };
@@ -4863,6 +4872,8 @@
 				5DF7F5C20F01F92A00526B4B /* CSSPropertyNames.h in Copy Generated Headers */,
 				8538F0300AD71CDB006A81D1 /* DOMAbstractView.h in Copy Generated Headers */,
 				1C11CCBC0AA6093700DADB20 /* DOMAttr.h in Copy Generated Headers */,
+				2E2D99EB10E2BD3900496337 /* DOMBlob.h in Copy Generated Headers */,
+				2E2D99EC10E2BD3900496337 /* DOMBlobInternal.h in Copy Generated Headers */,
 				1C11CCC70AA6093700DADB20 /* DOMCDATASection.h in Copy Generated Headers */,
 				1C11CCC50AA6093700DADB20 /* DOMCharacterData.h in Copy Generated Headers */,
 				1C11CCB60AA6093700DADB20 /* DOMComment.h in Copy Generated Headers */,
@@ -5876,6 +5887,11 @@
 		2D9066050BE141D400956998 /* LayoutState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LayoutState.h; sourceTree = "<group>"; };
 		2D90660B0665D937006B6F1A /* ClipboardMac.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ClipboardMac.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		2D90660C0665D937006B6F1A /* ClipboardMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ClipboardMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+		2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBlob.cpp; sourceTree = "<group>"; };
+		2E2D99CC10E2BBDA00496337 /* JSBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBlob.h; sourceTree = "<group>"; };
+		2E2D99E510E2BC1C00496337 /* DOMBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMBlob.h; sourceTree = "<group>"; };
+		2E2D99E610E2BC1C00496337 /* DOMBlob.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMBlob.mm; sourceTree = "<group>"; };
+		2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMBlobInternal.h; sourceTree = "<group>"; };
 		2E4346320F546A8200B0F1BA /* GenericWorkerTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GenericWorkerTask.h; path = workers/GenericWorkerTask.h; sourceTree = "<group>"; };
 		2E4346330F546A8200B0F1BA /* Worker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Worker.cpp; path = workers/Worker.cpp; sourceTree = "<group>"; };
 		2E4346340F546A8200B0F1BA /* Worker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Worker.h; path = workers/Worker.h; sourceTree = "<group>"; };
@@ -5897,6 +5913,9 @@
 		2E4346560F546A9900B0F1BA /* CrossThreadCopier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CrossThreadCopier.cpp; sourceTree = "<group>"; };
 		2E4346570F546A9900B0F1BA /* CrossThreadCopier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadCopier.h; sourceTree = "<group>"; };
 		2EA768030FE7126400AB9C8A /* WorkerScriptLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerScriptLoaderClient.h; path = workers/WorkerScriptLoaderClient.h; sourceTree = "<group>"; };
+		2EAFAF0B10E2AF2D007ED3D6 /* Blob.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Blob.cpp; sourceTree = "<group>"; };
+		2EAFAF0C10E2AF2D007ED3D6 /* Blob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Blob.h; sourceTree = "<group>"; };
+		2EAFAF0D10E2AF2D007ED3D6 /* Blob.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Blob.idl; sourceTree = "<group>"; };
 		2ECF7ADA10162B3800427DE7 /* JSErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSErrorEvent.cpp; sourceTree = "<group>"; };
 		2ECF7ADB10162B3800427DE7 /* JSErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSErrorEvent.h; sourceTree = "<group>"; };
 		2ECF7ADE10162B5800427DE7 /* ErrorEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ErrorEvent.cpp; sourceTree = "<group>"; };
@@ -12135,6 +12154,8 @@
 		85C56D030AA8BAA700D95755 /* HTML */ = {
 			isa = PBXGroup;
 			children = (
+				2E2D99E510E2BC1C00496337 /* DOMBlob.h */,
+				2E2D99E610E2BC1C00496337 /* DOMBlob.mm */,
 				BC00EFFE0E0A185500FD04E3 /* DOMFile.h */,
 				BC00EFFF0E0A185500FD04E3 /* DOMFile.mm */,
 				BC00F0010E0A185500FD04E3 /* DOMFileList.h */,
@@ -12276,6 +12297,7 @@
 			children = (
 				8538F0180AD718D8006A81D1 /* DOMAbstractViewInternal.h */,
 				85E7113E0AC5D5340053270F /* DOMAttrInternal.h */,
+				2E2D99E910E2BC3800496337 /* DOMBlobInternal.h */,
 				85E7113F0AC5D5340053270F /* DOMCDATASectionInternal.h */,
 				85E711400AC5D5340053270F /* DOMCharacterDataInternal.h */,
 				85E711410AC5D5340053270F /* DOMCommentInternal.h */,
@@ -12674,6 +12696,9 @@
 		93EEC1EC09C2877700C515D1 /* html */ = {
 			isa = PBXGroup;
 			children = (
+				2EAFAF0B10E2AF2D007ED3D6 /* Blob.cpp */,
+				2EAFAF0C10E2AF2D007ED3D6 /* Blob.h */,
+				2EAFAF0D10E2AF2D007ED3D6 /* Blob.idl */,
 				49484FAE102CF01E00187DD3 /* canvas */,
 				93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */,
 				93C441EE0F813A1A00C1A634 /* CollectionCache.h */,
@@ -12992,6 +13017,8 @@
 		A83B79080CCAFF2B000B0825 /* HTML */ = {
 			isa = PBXGroup;
 			children = (
+				2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */,
+				2E2D99CC10E2BBDA00496337 /* JSBlob.h */,
 				A7D20F60107F406900A80392 /* JSWebGLActiveInfo.cpp */,
 				A7D20F61107F406900A80392 /* JSWebGLActiveInfo.h */,
 				49EECF19105072F300099FAB /* JSWebGLArray.cpp */,
@@ -18397,6 +18424,10 @@
 				76CDD2F51103DA6600680521 /* AccessibilityMenuListPopup.h in Headers */,
 				76CDD2F71103DA6600680521 /* AccessibilityMenuListOption.h in Headers */,
 				5913953B110758450083EC55 /* JNIBridge.h in Headers */,
+				2EAFAF0F10E2AF2D007ED3D6 /* Blob.h in Headers */,
+				2E2D99CE10E2BBDA00496337 /* JSBlob.h in Headers */,
+				2E2D99E710E2BC1C00496337 /* DOMBlob.h in Headers */,
+				2E2D99EA10E2BC3800496337 /* DOMBlobInternal.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -20567,6 +20598,9 @@
 				76CDD2F41103DA6600680521 /* AccessibilityMenuListPopup.cpp in Sources */,
 				76CDD2F61103DA6600680521 /* AccessibilityMenuListOption.cpp in Sources */,
 				5913953D1107584E0083EC55 /* JNIBridge.cpp in Sources */,
+				2EAFAF0E10E2AF2D007ED3D6 /* Blob.cpp in Sources */,
+				2E2D99CD10E2BBDA00496337 /* JSBlob.cpp in Sources */,
+				2E2D99E810E2BC1C00496337 /* DOMBlob.mm in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/WebCoreSources.bkl b/WebCore/WebCoreSources.bkl
index 68a3838..9e631be 100644
--- a/WebCore/WebCoreSources.bkl
+++ b/WebCore/WebCoreSources.bkl
@@ -249,6 +249,7 @@ This file contains the list of files needed to build WebCore.
         DerivedSources/WebCore/HTMLNames.cpp
         DerivedSources/WebCore/JSAttr.cpp
         DerivedSources/WebCore/JSBarInfo.cpp
+        DerivedSources/WebCore/JSBlob.cpp
         DerivedSources/WebCore/JSCDATASection.cpp
         DerivedSources/WebCore/JSCSSCharsetRule.cpp
         DerivedSources/WebCore/JSCSSFontFaceRule.cpp
@@ -585,6 +586,7 @@ This file contains the list of files needed to build WebCore.
     </set>
 
     <set append="1" var="WEBCORE_SOURCES_HTML">
+        html/Blob.cpp
         html/canvas/CanvasGradient.cpp
         html/canvas/CanvasPattern.cpp
         html/canvas/CanvasPixelArray.cpp
diff --git a/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp b/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
index 7ee2720..d35d53a 100644
--- a/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
+++ b/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
@@ -29,18 +29,18 @@
 #include "config.h"
 #include "JSXMLHttpRequest.h"
 
+#include "Blob.h"
 #include "DOMWindow.h"
 #include "Document.h"
 #include "Event.h"
-#include "File.h"
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "HTMLDocument.h"
+#include "JSBlob.h"
 #include "JSDOMWindowCustom.h"
 #include "JSDocument.h"
 #include "JSEvent.h"
 #include "JSEventListener.h"
-#include "JSFile.h"
 #include "XMLHttpRequest.h"
 #include <runtime/Error.h>
 #include <interpreter/Interpreter.h>
@@ -109,8 +109,8 @@ JSValue JSXMLHttpRequest::send(ExecState* exec, const ArgList& args)
             impl()->send(ec);
         else if (val.inherits(&JSDocument::s_info))
             impl()->send(toDocument(val), ec);
-        else if (val.inherits(&JSFile::s_info))
-            impl()->send(toFile(val), ec);
+        else if (val.inherits(&JSBlob::s_info))
+            impl()->send(toBlob(val), ec);
         else
             impl()->send(val.toString(exec), ec);
     }
diff --git a/WebCore/bindings/objc/DOMHTML.h b/WebCore/bindings/objc/DOMHTML.h
index c336c04..882e397 100644
--- a/WebCore/bindings/objc/DOMHTML.h
+++ b/WebCore/bindings/objc/DOMHTML.h
@@ -26,6 +26,7 @@
 
 #import <WebCore/DOMCore.h>
 
+#import <WebCore/DOMBlob.h>
 #import <WebCore/DOMFile.h>
 #import <WebCore/DOMFileList.h>
 #import <WebCore/DOMHTMLAnchorElement.h>
diff --git a/WebCore/bindings/objc/PublicDOMInterfaces.h b/WebCore/bindings/objc/PublicDOMInterfaces.h
index 9221037..ea46436 100644
--- a/WebCore/bindings/objc/PublicDOMInterfaces.h
+++ b/WebCore/bindings/objc/PublicDOMInterfaces.h
@@ -235,7 +235,14 @@
 @interface DOMEntityReference : DOMNode WEBKIT_VERSION_1_3
 @end
 
- at interface DOMFile : DOMObject WEBKIT_VERSION_4_0
+ at interface DOMBlob : DOMObject WEBKIT_VERSION_4_0
+ at property(readonly) unsigned long long size;
+ at end
+
+ at interface DOMFile : DOMBlob WEBKIT_VERSION_4_0
+ at property(readonly, copy) NSString *name;
+
+// FIXME: obsolete properties. To be removed.
 @property(readonly, copy) NSString *fileName;
 @property(readonly) unsigned long long fileSize;
 @end
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index aaf8587..76bb5b9 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1852,6 +1852,8 @@ my %nativeType = (
     "long" => "int",
     "unsigned long" => "unsigned",
     "unsigned short" => "unsigned short",
+    "long long" => "long long",
+    "unsigned long long" => "unsigned long long",
 );
 
 sub GetNativeType
@@ -1875,6 +1877,7 @@ sub JSValueToNative
     return "$value.toNumber(exec)" if $type eq "double";
     return "$value.toFloat(exec)" if $type eq "float" or $type eq "SVGNumber";
     return "$value.toInt32(exec)" if $type eq "unsigned long" or $type eq "long" or $type eq "unsigned short";
+    return "static_cast<$type>($value.toInteger(exec))" if $type eq "long long" or $type eq "unsigned long long";
 
     return "valueToDate(exec, $value)" if $type eq "Date";
     return "static_cast<Range::CompareHow>($value.toInt32(exec))" if $type eq "CompareHow";
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index 91248c5..aa09715 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -66,7 +66,7 @@ my %nativeObjCTypeHash = ("URL" => 1, "Color" => 1);
 my %baseTypeHash = ("Object" => 1, "Node" => 1, "NodeList" => 1, "NamedNodeMap" => 1, "DOMImplementation" => 1,
                     "Event" => 1, "CSSRule" => 1, "CSSValue" => 1, "StyleSheet" => 1, "MediaList" => 1,
                     "Counter" => 1, "Rect" => 1, "RGBColor" => 1, "XPathExpression" => 1, "XPathResult" => 1,
-                    "NodeIterator" => 1, "TreeWalker" => 1, "AbstractView" => 1,
+                    "NodeIterator" => 1, "TreeWalker" => 1, "AbstractView" => 1, "Blob" => 1,
                     "SVGAngle" => 1, "SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1, "SVGAnimatedEnumeration" => 1,
                     "SVGAnimatedInteger" => 1, "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
                     "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1, "SVGAnimatedPoints" => 1,
@@ -1040,6 +1040,7 @@ sub GenerateImplementation
     $implIncludes{$classHeaderName . "Internal.h"} = 1;
 
     # FIXME: These includes are only needed when the class is a subclass of one of these polymorphic classes.
+    $implIncludes{"DOMBlobInternal.h"} = 1;
     $implIncludes{"DOMCSSRuleInternal.h"} = 1;
     $implIncludes{"DOMCSSValueInternal.h"} = 1;
     $implIncludes{"DOMEventInternal.h"} = 1;
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 6a90bb4..8880264 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -2167,6 +2167,7 @@ sub GetNativeType
     return "int" if $type eq "short" or $type eq "unsigned short";
     return "unsigned" if $type eq "unsigned long";
     return "int" if $type eq "long";
+    return "long long" if $type eq "long long";
     return "unsigned long long" if $type eq "unsigned long long";
     return "bool" if $type eq "boolean";
     return "String" if $type eq "DOMString";
@@ -2261,6 +2262,8 @@ my %typeCanFailConversion = (
     "long" => 0,
     "unsigned long" => 0,
     "unsigned short" => 0,
+    "long long" => 0,
+    "unsigned long long" => 0
 );
 
 
@@ -2317,6 +2320,7 @@ sub JSValueToNative
     return "$value->NumberValue()" if $type eq "SVGNumber";
 
     return "toInt32($value${maybeOkParam})" if $type eq "unsigned long" or $type eq "unsigned short" or $type eq "long";
+    return "toInt64($value)" if $type eq "unsigned long long" or $type eq "long long";
     return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "CompareHow";
     return "static_cast<SVGPaint::SVGPaintType>($value->ToInt32()->Int32Value())" if $type eq "SVGPaintType";
     return "toWebCoreDate($value)" if $type eq "Date";
@@ -2450,6 +2454,8 @@ my %non_wrapper_types = (
     'long' => 1,
     'unsigned long' => 1,
     'boolean' => 1,
+    'long long' => 1,
+    'unsigned long long' => 1,
     'DOMString' => 1,
     'CompareHow' => 1,
     'SVGAngle' => 1,
diff --git a/WebCore/bindings/v8/DOMObjectsInclude.h b/WebCore/bindings/v8/DOMObjectsInclude.h
index 8a8a1b1..afefe13 100644
--- a/WebCore/bindings/v8/DOMObjectsInclude.h
+++ b/WebCore/bindings/v8/DOMObjectsInclude.h
@@ -34,6 +34,7 @@
 #include "Attr.h"
 #include "BarInfo.h"
 #include "BeforeLoadEvent.h"
+#include "Blob.h"
 #include "WebGLActiveInfo.h"
 #include "WebGLArray.h"
 #include "WebGLArrayBuffer.h"
diff --git a/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp b/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
index 6654412..56a3fda 100644
--- a/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
+++ b/WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
@@ -38,6 +38,7 @@
 #include "bindings/V8Attr.cpp"
 #include "bindings/V8BarInfo.cpp"
 #include "bindings/V8BeforeLoadEvent.cpp"
+#include "bindings/V8Blob.cpp"
 #include "bindings/V8WebGLActiveInfo.cpp"
 #include "bindings/V8WebGLArray.cpp"
 #include "bindings/V8WebGLArrayBuffer.cpp"
diff --git a/WebCore/bindings/v8/V8Binding.h b/WebCore/bindings/v8/V8Binding.h
index 1778978..8bf633e 100644
--- a/WebCore/bindings/v8/V8Binding.h
+++ b/WebCore/bindings/v8/V8Binding.h
@@ -112,6 +112,11 @@ namespace WebCore {
         return static_cast<float>(value->NumberValue());
     }
 
+    inline int64 toInt64(v8::Local<v8::Value> value)
+    {
+        return static_cast<int64>(value->IntegerValue());
+    }
+
     // FIXME: Drop this in favor of the type specific v8ValueToWebCoreString when we rework the code generation.
     inline String toWebCoreString(v8::Handle<v8::Value> object)
     {
diff --git a/WebCore/bindings/v8/V8Index.cpp b/WebCore/bindings/v8/V8Index.cpp
index 69290af..c1050fe 100644
--- a/WebCore/bindings/v8/V8Index.cpp
+++ b/WebCore/bindings/v8/V8Index.cpp
@@ -34,6 +34,7 @@
 #include "V8Attr.h"
 #include "V8BarInfo.h"
 #include "V8BeforeLoadEvent.h"
+#include "V8Blob.h"
 #include "V8WebGLActiveInfo.h"
 #include "V8CanvasRenderingContext.h"
 #include "V8CanvasRenderingContext2D.h"
diff --git a/WebCore/bindings/v8/V8Index.h b/WebCore/bindings/v8/V8Index.h
index 7fec667..6904456 100644
--- a/WebCore/bindings/v8/V8Index.h
+++ b/WebCore/bindings/v8/V8Index.h
@@ -330,6 +330,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
 #define DOM_OBJECT_TYPES_1(V)                                           \
     V(BARINFO, BarInfo)                                                 \
     V(BEFORELOADEVENT, BeforeLoadEvent)                                 \
+    V(BLOB, Blob)                                                       \
     V(CANVASGRADIENT, CanvasGradient)                                   \
     V(CANVASPATTERN, CanvasPattern)                                     \
     V(CANVASRENDERINGCONTEXT, CanvasRenderingContext)                   \
diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index 3fe414f..d7cdcd1 100644
--- a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -33,9 +33,9 @@
 
 #include "Frame.h"
 #include "V8Binding.h"
+#include "V8Blob.h"
 #include "V8CustomBinding.h"
 #include "V8Document.h"
-#include "V8File.h"
 #include "V8HTMLDocument.h"
 #include "V8Proxy.h"
 #include "V8Utilities.h"
@@ -149,11 +149,11 @@ v8::Handle<v8::Value> V8XMLHttpRequest::sendCallback(const v8::Arguments& args)
             Document* document = V8Document::toNative(object);
             ASSERT(document);
             xmlHttpRequest->send(document, ec);
-        } else if (V8File::HasInstance(arg)) {
+        } else if (V8Blob::HasInstance(arg)) {
             v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
-            File* file = V8File::toNative(object);
-            ASSERT(file);
-            xmlHttpRequest->send(file, ec);
+            Blob* blob = V8Blob::toNative(object);
+            ASSERT(blob);
+            xmlHttpRequest->send(blob, ec);
         } else
             xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec);
     }
diff --git a/WebCore/html/Blob.cpp b/WebCore/html/Blob.cpp
new file mode 100644
index 0000000..0b677ea
--- /dev/null
+++ b/WebCore/html/Blob.cpp
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "Blob.h"
+
+#include "FileSystem.h"
+
+namespace WebCore {
+
+Blob::Blob(const String& path)
+    : m_path(path)
+{
+}
+
+unsigned long long Blob::size() const
+{
+    // FIXME: JavaScript cannot represent sizes as large as unsigned long long, we need to
+    // come up with an exception to throw if file size is not represetable.
+    long long size;
+    if (!getFileSize(m_path, size))
+        return 0;
+    return static_cast<unsigned long long>(size);
+}
+
+} // namespace WebCore
diff --git a/WebCore/html/Blob.h b/WebCore/html/Blob.h
new file mode 100644
index 0000000..b910e8f
--- /dev/null
+++ b/WebCore/html/Blob.h
@@ -0,0 +1,62 @@
+/*
+ * 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 Blob_h
+#define Blob_h
+
+#include "ExceptionCode.h"
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class Blob : public RefCounted<Blob> {
+public:
+    static PassRefPtr<Blob> create(const String& path)
+    {
+        return adoptRef(new Blob(path));
+    }
+
+    virtual ~Blob() { }
+
+    const String& path() const { return m_path; }
+    unsigned long long size() const;
+
+protected:
+    Blob(const String& path);
+
+private:
+    String m_path;
+};
+
+} // namespace WebCore
+
+#endif // Blob_h
diff --git a/WebCore/html/Blob.idl b/WebCore/html/Blob.idl
new file mode 100644
index 0000000..573be35
--- /dev/null
+++ b/WebCore/html/Blob.idl
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+module html {
+
+    interface Blob {
+        readonly attribute unsigned long long size;
+    };
+
+}
diff --git a/WebCore/html/File.cpp b/WebCore/html/File.cpp
index dbbbfa6..25e28e4 100644
--- a/WebCore/html/File.cpp
+++ b/WebCore/html/File.cpp
@@ -27,25 +27,13 @@
 #include "File.h"
 
 #include "FileSystem.h"
-#include "PlatformString.h"
 
 namespace WebCore {
 
 File::File(const String& path)
-    : m_path(path)
-    , m_fileName(pathGetFileName(path))
+    : Blob(path)
+    , m_name(pathGetFileName(path))
 {
 }
 
-unsigned long long File::fileSize()
-{
-    // FIXME: Should we cache this?
-    // FIXME: JavaScript cannot represent sizes as large as unsigned long long, we need to
-    // come up with an exception to throw if file size is not represetable.
-    long long size;
-    if (!getFileSize(m_path, size))
-        return 0;
-    return size;
-}
-
 } // namespace WebCore
diff --git a/WebCore/html/File.h b/WebCore/html/File.h
index 7d79aa5..be53e30 100644
--- a/WebCore/html/File.h
+++ b/WebCore/html/File.h
@@ -26,30 +26,30 @@
 #ifndef File_h
 #define File_h
 
-#include "PlatformString.h"
+#include "Blob.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
-    class File : public RefCounted<File> {
-    public:
-        static PassRefPtr<File> create(const String& path)
-        {
-            return adoptRef(new File(path));
-        }
+class File : public Blob {
+public:
+    static PassRefPtr<File> create(const String& path)
+    {
+        return adoptRef(new File(path));
+    }
 
-        const String& fileName() const { return m_fileName; }
-        unsigned long long fileSize();
+    const String& name() const { return m_name; }
 
-        const String& path() const { return m_path; }
+    // FIXME: obsolete attributes. To be removed.
+    const String& fileName() const { return m_name; }
+    unsigned long long fileSize() const { return size(); }
 
-    private:
-        File(const String& path);
+private:
+    File(const String& path);
 
-        String m_path;
-        String m_fileName;
-    };
+    String m_name;
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/html/File.idl b/WebCore/html/File.idl
index ea761fb..2632a4d 100644
--- a/WebCore/html/File.idl
+++ b/WebCore/html/File.idl
@@ -25,7 +25,13 @@
 
 module html {
 
-    interface File {
+    interface [
+        GenerateNativeConverter,
+        GenerateToJS
+    ] File : Blob {
+        readonly attribute DOMString name;
+
+        // FIXME: obsolete attributes. To be removed.
         readonly attribute DOMString fileName;
         readonly attribute unsigned long long fileSize;
     };
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index f1a7969..32818df 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -22,6 +22,7 @@
 #include "config.h"
 #include "XMLHttpRequest.h"
 
+#include "Blob.h"
 #include "Cache.h"
 #include "CString.h"
 #include "CrossOriginAccessControl.h"
@@ -31,7 +32,6 @@
 #include "EventException.h"
 #include "EventListener.h"
 #include "EventNames.h"
-#include "File.h"
 #include "HTTPParsers.h"
 #include "InspectorTimelineAgent.h"
 #include "ResourceError.h"
@@ -435,7 +435,7 @@ void XMLHttpRequest::send(const String& body, ExceptionCode& ec)
     createRequest(ec);
 }
 
-void XMLHttpRequest::send(File* body, ExceptionCode& ec)
+void XMLHttpRequest::send(Blob* body, ExceptionCode& ec)
 {
     if (!initSend(ec))
         return;
diff --git a/WebCore/xml/XMLHttpRequest.h b/WebCore/xml/XMLHttpRequest.h
index 69019a5..2cea5c6 100644
--- a/WebCore/xml/XMLHttpRequest.h
+++ b/WebCore/xml/XMLHttpRequest.h
@@ -33,8 +33,8 @@
 
 namespace WebCore {
 
+class Blob;
 class Document;
-class File;
 class ResourceRequest;
 class TextResourceDecoder;
 class ThreadableLoader;
@@ -72,7 +72,7 @@ public:
     void send(ExceptionCode&);
     void send(Document*, ExceptionCode&);
     void send(const String&, ExceptionCode&);
-    void send(File*, ExceptionCode&);
+    void send(Blob*, ExceptionCode&);
     void abort();
     void setRequestHeader(const AtomicString& name, const String& value, ExceptionCode&);
     void overrideMimeType(const String& override);
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 4b87f7c..5cc5b3d 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-20  Jian Li  <jianli at chromium.org>
+
+        Reviewed by Dmitry Titov.
+
+        Implement File and Blob interfaces as defined in File API spec.
+        https://bugs.webkit.org/show_bug.cgi?id=32912
+
+        * MigrateHeaders.make:
+
 2010-01-19  Timothy Hatcher  <timothy at apple.com>
 
         Fix erroneous page scrolls when trying to select text or use form elements
diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make
index 072da65..7d01c99 100644
--- a/WebKit/mac/MigrateHeaders.make
+++ b/WebKit/mac/MigrateHeaders.make
@@ -36,6 +36,8 @@ all : \
     $(PUBLIC_HEADERS_DIR)/DOM.h \
     $(PUBLIC_HEADERS_DIR)/DOMAbstractView.h \
     $(PUBLIC_HEADERS_DIR)/DOMAttr.h \
+    $(PRIVATE_HEADERS_DIR)/DOMBlob.h \
+    $(INTERNAL_HEADERS_DIR)/DOMBlobInternal.h \
     $(PUBLIC_HEADERS_DIR)/DOMCDATASection.h \
     $(PUBLIC_HEADERS_DIR)/DOMCSS.h \
     $(PUBLIC_HEADERS_DIR)/DOMCSSCharsetRule.h \

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list