Commit a3cd2789 authored by kinuko@chromium.org's avatar kinuko@chromium.org

2010-06-21 Kinuko Yasuda <kinuko@chromium.org>

        Reviewed by Adam Barth.

        Add BlobBuilder.idl to expose BlobBuilder interface
        https://bugs.webkit.org/show_bug.cgi?id=40593

        BlobBuilder is defined in FileAPI's FileWriter spec.
        (http://dev.w3.org/2009/dap/file-system/file-writer.html)

        Also removes the ENABLE_FILE_WRITER ifdef guard for BlobBuilder.

        Tests: http/tests/local/blob/send-data-blob.html
               http/tests/local/blob/send-hybrid-blob.html
               http/tests/local/blob/send-sliced-data-blob.html

        * Android.derived.jscbindings.mk:
        * Android.derived.v8bindings.mk:
        * CMakeLists.txt:
        * DerivedSources.cpp:
        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pri:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * html/BlobBuilder.cpp:
        (WebCore::BlobBuilder::append):
        * html/BlobBuilder.h:
        * html/BlobBuilder.idl: Added.
        * page/DOMWindow.idl:
2010-06-21  Kinuko Yasuda  <kinuko@chromium.org>

        Reviewed by Adam Barth.

        Add BlobBuilder.idl to expose BlobBuilder interface
        https://bugs.webkit.org/show_bug.cgi?id=40593

        Add new layout tests to test BlobBuilder interface.
        Also update test expectations affected by adding the constructors to DOMWindow.

        * fast/dom/Window/window-properties-expected.txt:
        * fast/dom/Window/window-property-descriptors-expected.txt:
        * fast/dom/constructed-objects-prototypes-expected.txt:
        * fast/dom/prototype-inheritance-2-expected.txt:
        * fast/dom/prototype-inheritance-expected.txt:
        * fast/js/global-constructors-expected.txt:
        * http/tests/local/blob/resources/hybrid-blob-util.js: Added.
        * http/tests/local/blob/script-tests/TEMPLATE.html: Added.
        * http/tests/local/blob/script-tests/send-data-blob.js: Added.
        * http/tests/local/blob/script-tests/send-hybrid-blob.js: Added.
        * http/tests/local/blob/script-tests/send-sliced-data-blob.js: Added.
        * http/tests/local/blob/send-data-blob-expected.txt: Added.
        * http/tests/local/blob/send-data-blob.html: Added.
        * http/tests/local/blob/send-hybrid-blob-expected.txt: Added.
        * http/tests/local/blob/send-hybrid-blob.html: Added.
        * http/tests/local/blob/send-sliced-data-blob-expected.txt: Added.
        * http/tests/local/blob/send-sliced-data-blob.html: Added.
        * http/tests/local/resources/file-for-drag-to-send2.txt: Added.
        * http/tests/resources/post-and-verify-hybrid.cgi: Added.
        * platform/chromium/fast/dom/prototype-inheritance-expected.txt:
        * platform/gtk/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles Blob.slice.
        * platform/gtk/fast/dom/Window/window-properties-expected.txt:
        * platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/gtk/fast/dom/prototype-inheritance-expected.txt:
        * platform/qt/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles Blob.slice.
        * platform/qt/fast/dom/Window/window-properties-expected.txt:
        * platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/qt/fast/dom/prototype-inheritance-expected.txt:
        * platform/win/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles Blob.slice.
        * platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
        * platform/win/fast/dom/prototype-inheritance-2-expected.txt:
        * platform/win/fast/dom/prototype-inheritance-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f1026915
2010-06-21 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by Adam Barth.
Add BlobBuilder.idl to expose BlobBuilder interface
https://bugs.webkit.org/show_bug.cgi?id=40593
Add new layout tests to test BlobBuilder interface.
Also update test expectations affected by adding the constructors to DOMWindow.
* fast/dom/Window/window-properties-expected.txt:
* fast/dom/Window/window-property-descriptors-expected.txt:
* fast/dom/constructed-objects-prototypes-expected.txt:
* fast/dom/prototype-inheritance-2-expected.txt:
* fast/dom/prototype-inheritance-expected.txt:
* fast/js/global-constructors-expected.txt:
* http/tests/local/blob/resources/hybrid-blob-util.js: Added.
* http/tests/local/blob/script-tests/TEMPLATE.html: Added.
* http/tests/local/blob/script-tests/send-data-blob.js: Added.
* http/tests/local/blob/script-tests/send-hybrid-blob.js: Added.
* http/tests/local/blob/script-tests/send-sliced-data-blob.js: Added.
* http/tests/local/blob/send-data-blob-expected.txt: Added.
* http/tests/local/blob/send-data-blob.html: Added.
* http/tests/local/blob/send-hybrid-blob-expected.txt: Added.
* http/tests/local/blob/send-hybrid-blob.html: Added.
* http/tests/local/blob/send-sliced-data-blob-expected.txt: Added.
* http/tests/local/blob/send-sliced-data-blob.html: Added.
* http/tests/local/resources/file-for-drag-to-send2.txt: Added.
* http/tests/resources/post-and-verify-hybrid.cgi: Added.
* platform/chromium/fast/dom/prototype-inheritance-expected.txt:
* platform/gtk/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles Blob.slice.
* platform/gtk/fast/dom/Window/window-properties-expected.txt:
* platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/gtk/fast/dom/prototype-inheritance-expected.txt:
* platform/qt/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles Blob.slice.
* platform/qt/fast/dom/Window/window-properties-expected.txt:
* platform/qt/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/qt/fast/dom/prototype-inheritance-expected.txt:
* platform/win/Skipped: Added send-hybrid-blob.html and send-sliced-data-blob.html because they need eventSender.beginDragWithFiles Blob.slice.
* platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
* platform/win/fast/dom/prototype-inheritance-2-expected.txt:
* platform/win/fast/dom/prototype-inheritance-expected.txt:
2010-06-21 Robert Hogan <robert@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -150,6 +150,10 @@ window.BeforeLoadEvent.prototype.stopImmediatePropagation [function]
window.BeforeLoadEvent.prototype.stopPropagation [function]
window.Blob [object BlobConstructor]
window.Blob.prototype [object BlobPrototype]
window.BlobBuilder [object BlobBuilderConstructor]
window.BlobBuilder.prototype [object BlobBuilderPrototype]
window.BlobBuilder.prototype.append [function]
window.BlobBuilder.prototype.getBlob [function]
window.CDATASection [object CDATASectionConstructor]
window.CDATASection.prototype [object CDATASectionPrototype]
window.CDATASection.prototype.ATTRIBUTE_NODE [number]
......
......@@ -8,6 +8,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'Attr') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Audio') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BeforeLoadEvent') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Blob') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BlobBuilder') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Boolean') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CDATASection') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CSSCharsetRule') is 'object'
......
......@@ -5,6 +5,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS (new inner.Audio()).isInner is true
PASS (new inner.Audio()).constructor.isInner is true
PASS (new inner.BlobBuilder()).isInner is true
PASS (new inner.BlobBuilder()).constructor.isInner is true
PASS (new inner.DOMParser()).isInner is true
PASS (new inner.DOMParser()).constructor.isInner is true
PASS (new inner.FormData()).isInner is true
......
......@@ -208,6 +208,7 @@ PASS WebKitCSSKeyframesRule from inner.document.getElementById("dummyStyle").she
PASS WebKitCSSKeyframesRuleConstructor from inner.document.getElementById("dummyStyle").sheet.cssRules.6.constructor
PASS WebKitCSSKeyframesRulePrototype from inner.document.getElementById("dummyStyle").sheet.cssRules.6.__proto__
Never found Audio
Never found BlobBuilder
Never found Blob
Never found CDATASection
Never found CSSRule
......
......@@ -11,6 +11,8 @@ PASS inner.BeforeLoadEvent.isInner is true
PASS inner.BeforeLoadEvent.constructor.isInner is true
PASS inner.Blob.isInner is true
PASS inner.Blob.constructor.isInner is true
PASS inner.BlobBuilder.isInner is true
PASS inner.BlobBuilder.constructor.isInner is true
PASS inner.CDATASection.isInner is true
PASS inner.CDATASection.constructor.isInner is true
PASS inner.CSSCharsetRule.isInner is true
......
......@@ -7,6 +7,7 @@ PASS Attr.toString() is '[object AttrConstructor]'
PASS Audio.toString() is '[object AudioConstructor]'
PASS BeforeLoadEvent.toString() is '[object BeforeLoadEventConstructor]'
PASS Blob.toString() is '[object BlobConstructor]'
PASS BlobBuilder.toString() is '[object BlobBuilderConstructor]'
PASS CDATASection.toString() is '[object CDATASectionConstructor]'
PASS CSSCharsetRule.toString() is '[object CSSCharsetRuleConstructor]'
PASS CSSFontFaceRule.toString() is '[object CSSFontFaceRuleConstructor]'
......
......@@ -11,6 +11,8 @@ PASS inner.BeforeLoadEvent.isInner is true
PASS inner.BeforeLoadEvent.constructor.isInner is true
PASS inner.Blob.isInner is true
PASS inner.Blob.constructor.isInner is true
PASS inner.BlobBuilder.isInner is true
PASS inner.BlobBuilder.constructor.isInner is true
PASS inner.CDATASection.isInner is true
PASS inner.CDATASection.constructor.isInner is true
PASS inner.CSSCharsetRule.isInner is true
......
......@@ -3292,6 +3292,8 @@ http/tests/loading/slow-parsing-subframe.html
http/tests/loading/text-content-type-with-binary-extension.html
http/tests/local/send-dragged-file.html
http/tests/local/send-sliced-dragged-file.html
http/tests/local/blob/send-hybrid-blob.html
http/tests/local/blob/send-sliced-data-blob.html
http/tests/local/formdata/send-form-data.html
http/tests/local/formdata/send-form-data-with-sliced-file.html
http/tests/local/formdata/upload-events.html
......
......@@ -121,6 +121,10 @@ window.Audio.prototype.setAttribute [function]
window.Audio.prototype.setAttributeNS [function]
window.Audio.prototype.setAttributeNode [function]
window.Audio.prototype.setAttributeNodeNS [function]
window.BlobBuilder [object BlobBuilderConstructor]
window.BlobBuilder.prototype [object BlobBuilderPrototype]
window.BlobBuilder.prototype.append [function]
window.BlobBuilder.prototype.getBlob [function]
window.CDATASection [object CDATASectionConstructor]
window.CDATASection.prototype [object CDATASectionPrototype]
window.CDATASection.prototype.ATTRIBUTE_NODE [number]
......
......@@ -8,6 +8,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'Attr') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Audio') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BeforeLoadEvent') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Blob') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BlobBuilder') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Boolean') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CDATASection') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CSSCharsetRule') is 'object'
......
......@@ -11,6 +11,8 @@ PASS inner.BeforeLoadEvent.isInner is true
PASS inner.BeforeLoadEvent.constructor.isInner is true
PASS inner.Blob.isInner is true
PASS inner.Blob.constructor.isInner is true
PASS inner.BlobBuilder.isInner is true
PASS inner.BlobBuilder.constructor.isInner is true
PASS inner.CDATASection.isInner is true
PASS inner.CDATASection.constructor.isInner is true
PASS inner.CSSCharsetRule.isInner is true
......
......@@ -215,6 +215,8 @@ http/tests/loading/text-content-type-with-binary-extension.html
http/tests/local/drag-over-remote-content.html
http/tests/local/send-dragged-file.html
http/tests/local/send-sliced-dragged-file.html
http/tests/local/blob/send-hybrid-blob.html
http/tests/local/blob/send-sliced-data-blob.html
http/tests/local/formdata/send-form-data.html
http/tests/local/formdata/send-form-data-with-sliced-file.html
http/tests/local/formdata/upload-events.html
......
......@@ -150,6 +150,10 @@ window.BeforeLoadEvent.prototype.stopImmediatePropagation [function]
window.BeforeLoadEvent.prototype.stopPropagation [function]
window.Blob [object BlobConstructor]
window.Blob.prototype [object BlobPrototype]
window.BlobBuilder [object BlobBuilderConstructor]
window.BlobBuilder.prototype [object BlobBuilderPrototype]
window.BlobBuilder.prototype.append [function]
window.BlobBuilder.prototype.getBlob [function]
window.CDATASection [object CDATASectionConstructor]
window.CDATASection.prototype [object CDATASectionPrototype]
window.CDATASection.prototype.ATTRIBUTE_NODE [number]
......
......@@ -8,6 +8,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'Attr') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Audio') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BeforeLoadEvent') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Blob') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BlobBuilder') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Boolean') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CDATASection') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CSSCharsetRule') is 'object'
......
......@@ -11,6 +11,8 @@ PASS inner.BeforeLoadEvent.isInner is true
PASS inner.BeforeLoadEvent.constructor.isInner is true
PASS inner.Blob.isInner is true
PASS inner.Blob.constructor.isInner is true
PASS inner.BlobBuilder.isInner is true
PASS inner.BlobBuilder.constructor.isInner is true
PASS inner.CDATASection.isInner is true
PASS inner.CDATASection.constructor.isInner is true
PASS inner.CSSCharsetRule.isInner is true
......
......@@ -680,10 +680,14 @@ fast/forms/input-selectedoption.html
# <https://bugs.webkit.org/show_bug.cgi?id=29287>
http/tests/local/send-dragged-file.html
http/tests/local/send-sliced-dragged-file.html
http/tests/local/blob/send-hybrid-blob.html
http/tests/local/formdata/send-form-data.html
http/tests/local/formdata/send-form-data-with-sliced-file.html
http/tests/local/formdata/upload-events.html
# Need Blob.slice support
http/tests/local/blob/send-sliced-data-blob.html
# <https://bugs.webkit.org/show_bug.cgi?id=29289>
plugins/destroy-during-npp-new.html
......
......@@ -8,6 +8,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'Attr') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Audio') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BeforeLoadEvent') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Blob') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'BlobBuilder') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'Boolean') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CDATASection') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'CSSCharsetRule') is 'object'
......
......@@ -209,6 +209,7 @@ PASS WebKitCSSKeyframesRuleConstructor from inner.document.getElementById("dummy
PASS WebKitCSSKeyframesRulePrototype from inner.document.getElementById("dummyStyle").sheet.cssRules.6.__proto__
Never found Audio
Never found Blob
Never found BlobBuilder
Never found CDATASection
Never found CSSRule
Never found CSSVariablesDeclaration
......
......@@ -11,6 +11,8 @@ PASS inner.BeforeLoadEvent.isInner is true
PASS inner.BeforeLoadEvent.constructor.isInner is true
PASS inner.Blob.isInner is true
PASS inner.Blob.constructor.isInner is true
PASS inner.BlobBuilder.isInner is true
PASS inner.BlobBuilder.constructor.isInner is true
PASS inner.CDATASection.isInner is true
PASS inner.CDATASection.constructor.isInner is true
PASS inner.CSSCharsetRule.isInner is true
......
......@@ -155,6 +155,7 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/dom/%.cpp : $(intermediates)/dom/
# HTML
GEN := \
$(intermediates)/html/JSBlob.h \
$(intermediates)/html/JSBlobBuilder.h \
$(intermediates)/html/JSDOMFormData.h \
$(intermediates)/html/JSDataGridColumn.h \
$(intermediates)/html/JSDataGridColumnList.h \
......
......@@ -138,6 +138,7 @@ $(patsubst %.h,%.cpp,$(GEN)): $(intermediates)/bindings/%.cpp : $(intermediates)
# HTML
GEN := \
$(intermediates)/bindings/V8Blob.h \
$(intermediates)/bindings/V8BlobBuilder.h \
$(intermediates)/bindings/V8DataGridColumn.h \
$(intermediates)/bindings/V8DataGridColumnList.h \
$(intermediates)/bindings/V8File.h \
......
......@@ -182,6 +182,7 @@ SET(WebCore_IDL_FILES
dom/WheelEvent.idl
html/Blob.idl
html/BlobBuilder.idl
html/DataGridColumn.idl
html/DataGridColumnList.idl
html/DOMFormData.idl
......
2010-06-21 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by Adam Barth.
Add BlobBuilder.idl to expose BlobBuilder interface
https://bugs.webkit.org/show_bug.cgi?id=40593
BlobBuilder is defined in FileAPI's FileWriter spec.
(http://dev.w3.org/2009/dap/file-system/file-writer.html)
Also removes the ENABLE_FILE_WRITER ifdef guard for BlobBuilder.
Tests: http/tests/local/blob/send-data-blob.html
http/tests/local/blob/send-hybrid-blob.html
http/tests/local/blob/send-sliced-data-blob.html
* Android.derived.jscbindings.mk:
* Android.derived.v8bindings.mk:
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pri:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/BlobBuilder.cpp:
(WebCore::BlobBuilder::append):
* html/BlobBuilder.h:
* html/BlobBuilder.idl: Added.
* page/DOMWindow.idl:
2010-06-21 Nate Chapin <japhet@chromium.org>
Reviewed by Adam Barth.
......
......@@ -30,6 +30,7 @@
#include "JSBarInfo.cpp"
#include "JSBeforeLoadEvent.cpp"
#include "JSBlob.cpp"
#include "JSBlobBuilder.cpp"
#include "JSCanvasGradient.cpp"
#include "JSCanvasPattern.cpp"
#include "JSCanvasRenderingContext.cpp"
......
......@@ -54,6 +54,7 @@ DOM_CLASSES = \
BarInfo \
BeforeLoadEvent \
Blob \
BlobBuilder \
CDATASection \
CSSCharsetRule \
CSSFontFaceRule \
......
......@@ -180,6 +180,7 @@ IDL_BINDINGS += \
WebCore/dom/WebKitTransitionEvent.idl \
WebCore/dom/WheelEvent.idl \
WebCore/html/Blob.idl \
WebCore/html/BlobBuilder.idl \
WebCore/html/canvas/ArrayBufferView.idl \
WebCore/html/canvas/ArrayBuffer.idl \
WebCore/html/canvas/Int8Array.idl \
......
......@@ -83,6 +83,7 @@
'dom/WebKitTransitionEvent.idl',
'dom/WheelEvent.idl',
'html/Blob.idl',
'html/BlobBuilder.idl',
'html/canvas/WebGLActiveInfo.idl',
'html/canvas/ArrayBufferView.idl',
'html/canvas/ArrayBuffer.idl',
......
......@@ -320,6 +320,7 @@ IDL_BINDINGS += \
dom/WebKitTransitionEvent.idl \
dom/WheelEvent.idl \
html/Blob.idl \
html/BlobBuilder.idl \
html/canvas/ArrayBufferView.idl \
html/canvas/ArrayBuffer.idl \
html/canvas/Int8Array.idl \
......
......@@ -776,6 +776,14 @@
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSBlob.h"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSBlobBuilder.cpp"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSBlobBuilder.h"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSCanvasGradient.cpp"
>
......@@ -2277,6 +2277,8 @@
8988E10F11A3508B00DB732E /* BlobItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 8988E10D11A3508B00DB732E /* BlobItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
89BED5EB11BE11CE00448492 /* BlobBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89BED5E911BE11CE00448492 /* BlobBuilder.cpp */; };
89BED5EC11BE11CE00448492 /* BlobBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 89BED5EA11BE11CE00448492 /* BlobBuilder.h */; };
89CD029311C85B870070B791 /* JSBlobBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 89CD029111C85B870070B791 /* JSBlobBuilder.cpp */; };
89CD029411C85B870070B791 /* JSBlobBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 89CD029211C85B870070B791 /* JSBlobBuilder.h */; };
8FAC774D119872CB0015AE94 /* JSMainThreadExecState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */; };
9302B0BD0D79F82900C7EE83 /* PageGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */; };
9302B0BF0D79F82C00C7EE83 /* PageGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 9302B0BE0D79F82C00C7EE83 /* PageGroup.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -7897,6 +7899,9 @@
8988E10D11A3508B00DB732E /* BlobItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobItem.h; sourceTree = "<group>"; };
89BED5E911BE11CE00448492 /* BlobBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobBuilder.cpp; sourceTree = "<group>"; };
89BED5EA11BE11CE00448492 /* BlobBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobBuilder.h; sourceTree = "<group>"; };
89CD027911C859A80070B791 /* BlobBuilder.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BlobBuilder.idl; sourceTree = "<group>"; };
89CD029111C85B870070B791 /* JSBlobBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBlobBuilder.cpp; sourceTree = "<group>"; };
89CD029211C85B870070B791 /* JSBlobBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBlobBuilder.h; sourceTree = "<group>"; };
8F934D831189F1EE00508D5D /* JSMainThreadExecState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMainThreadExecState.h; sourceTree = "<group>"; };
8F934D841189F1EE00508D5D /* JSMainThreadExecState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMainThreadExecState.cpp; sourceTree = "<group>"; };
9302B0BC0D79F82900C7EE83 /* PageGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageGroup.cpp; sourceTree = "<group>"; };
......@@ -13423,6 +13428,7 @@
2EAFAF0D10E2AF2D007ED3D6 /* Blob.idl */,
89BED5E911BE11CE00448492 /* BlobBuilder.cpp */,
89BED5EA11BE11CE00448492 /* BlobBuilder.h */,
89CD027911C859A80070B791 /* BlobBuilder.idl */,
93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */,
93C441EE0F813A1A00C1A634 /* CollectionCache.h */,
93C441FF0F813AE100C1A634 /* CollectionType.h */,
......@@ -13808,6 +13814,8 @@
49EECF1A105072F300099FAB /* JSArrayBufferView.h */,
2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */,
2E2D99CC10E2BBDA00496337 /* JSBlob.h */,
89CD029111C85B870070B791 /* JSBlobBuilder.cpp */,
89CD029211C85B870070B791 /* JSBlobBuilder.h */,
65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
65DF323409D1DE65000BE325 /* JSCanvasGradient.h */,
65DF323509D1DE65000BE325 /* JSCanvasPattern.cpp */,
......@@ -18231,6 +18239,7 @@
BC124F000C26447A009E2349 /* JSBarInfo.h in Headers */,
BC946348107A936600857193 /* JSBeforeLoadEvent.h in Headers */,
2E2D99CE10E2BBDA00496337 /* JSBlob.h in Headers */,
89CD029411C85B870070B791 /* JSBlobBuilder.h in Headers */,
1449E24C107D4A8400B5793F /* JSCallbackData.h in Headers */,
65DF323A09D1DE65000BE325 /* JSCanvasGradient.h in Headers */,
65DF323C09D1DE65000BE325 /* JSCanvasPattern.h in Headers */,
......@@ -20558,6 +20567,7 @@
BC124EFF0C26447A009E2349 /* JSBarInfo.cpp in Sources */,
BC946346107A934B00857193 /* JSBeforeLoadEvent.cpp in Sources */,
2E2D99CD10E2BBDA00496337 /* JSBlob.cpp in Sources */,
89CD029311C85B870070B791 /* JSBlobBuilder.cpp in Sources */,
1449E287107D4DB400B5793F /* JSCallbackData.cpp in Sources */,
65DF323909D1DE65000BE325 /* JSCanvasGradient.cpp in Sources */,
65DF323B09D1DE65000BE325 /* JSCanvasPattern.cpp in Sources */,
......@@ -30,8 +30,6 @@
#include "config.h"
#if ENABLE(FILE_WRITER)
#include "BlobBuilder.h"
#include "AtomicString.h"
......@@ -57,7 +55,7 @@ static bool getLineEndingTypeFromString(const AtomicString& typeString, LineEndi
return false;
}
bool BlobBuilder::appendString(const String& text, const String& type, ExceptionCode& ec)
bool BlobBuilder::append(const String& text, const String& type, ExceptionCode& ec)
{
ec = 0;
LineEnding endingType;
......@@ -69,7 +67,12 @@ bool BlobBuilder::appendString(const String& text, const String& type, Exception
return true;
}
bool BlobBuilder::appendBlob(PassRefPtr<Blob> blob)
bool BlobBuilder::append(const String& text, ExceptionCode& ec)
{
return append(text, String(), ec);
}
bool BlobBuilder::append(PassRefPtr<Blob> blob)
{
if (blob) {
for (size_t i = 0; i < blob->items().size(); ++i)
......@@ -85,5 +88,3 @@ PassRefPtr<Blob> BlobBuilder::getBlob(const String& contentType) const
}
} // namespace WebCore
#endif // ENABLE(FILE_WRITER)
......@@ -31,8 +31,6 @@
#ifndef BlobBuilder_h
#define BlobBuilder_h
#if ENABLE(FILE_WRITER)
#include "BlobItem.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
......@@ -47,10 +45,11 @@ class BlobBuilder : public RefCounted<BlobBuilder> {
public:
static PassRefPtr<BlobBuilder> create() { return adoptRef(new BlobBuilder()); }
bool appendString(const String& text, const String& ending, ExceptionCode&);
bool appendBlob(PassRefPtr<Blob>);
bool append(PassRefPtr<Blob>);
bool append(const String& text, ExceptionCode&);
bool append(const String& text, const String& ending, ExceptionCode&);
PassRefPtr<Blob> getBlob(const String& contentType) const;
PassRefPtr<Blob> getBlob(const String& contentType = String()) const;
private:
BlobItemList m_items;
......@@ -58,7 +57,4 @@ private:
} // namespace WebCore
#endif // ENABLE(FILE_WRITER)
#endif // BlobBuilder_h
......@@ -740,6 +740,8 @@ module window {
attribute [Conditional=FILE_READER|FILE_WRITER] FileErrorConstructor FileError;
attribute [Conditional=FILE_READER] FileReaderConstructor FileReader;
attribute BlobBuilderConstructor BlobBuilder;
#endif // defined(LANGUAGE_JAVASCRIPT)
#if defined(V8_BINDING) && V8_BINDING
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment