Changeset 198133 in webkit
- Timestamp:
- Mar 14, 2016 8:58:14 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 15 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r198116 r198133 1 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [Fetch API] Implement data resolution for blob stored in Body 4 https://bugs.webkit.org/show_bug.cgi?id=155359 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/fetch/api/request/request-consume-expected.txt: 9 * web-platform-tests/fetch/api/request/request-consume.html: 10 * web-platform-tests/fetch/api/request/request-init-002-expected.txt: 11 * web-platform-tests/fetch/api/response/response-consume-expected.txt: 12 * web-platform-tests/fetch/api/response/response-consume.html: 13 * web-platform-tests/fetch/api/response/response-init-002-expected.txt: 14 1 15 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume-expected.txt
r197396 r198133 6 6 FAIL Consume request's body as formData promise_test: Unhandled rejection with value: undefined 7 7 PASS Consume blob response's body as blob 8 FAIL Consume blob response's body as text promise_test: Unhandled rejection with value: undefined 9 FAIL Consume blob response's body as json promise_test: Unhandled rejection with value: undefined 10 FAIL Consume blob response's body as arrayBuffer promise_test: Unhandled rejection with value: undefined 8 PASS Consume blob response's body as text 9 PASS Consume blob response's body as json 10 PASS Consume blob response's body as arrayBuffer 11 11 PASS Consume JSON from text: '"null"' 12 12 PASS Consume JSON from text: '"1"' -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-consume.html
r197396 r198133 80 80 var formData = new FormData(); 81 81 formData.append("name", "value") 82 var textData = "This is response's body";82 var textData = JSON.stringify("This is response's body"); 83 83 var blob = new Blob([textData], { "type" : "text/plain" }); 84 84 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-init-002-expected.txt
r195954 r198133 1 1 2 2 PASS Initialize Request with headers values 3 FAIL Initialize Request's body with application/octet-binary promise_test: Unhandled rejection with value: undefined 3 PASS Initialize Request's body with application/octet-binary 4 4 FAIL Initialize Request's body with multipart/form-data promise_test: Unhandled rejection with value: undefined 5 5 PASS Initialize Request's body with text/plain;charset=UTF-8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-consume-expected.txt
r197396 r198133 6 6 FAIL Consume response's body as formData promise_test: Unhandled rejection with value: undefined 7 7 PASS Consume blob response's body as blob 8 FAIL Consume blob response's body as text promise_test: Unhandled rejection with value: undefined 9 FAIL Consume blob response's body as json promise_test: Unhandled rejection with value: undefined 10 FAIL Consume blob response's body as arrayBuffer promise_test: Unhandled rejection with value: undefined 8 PASS Consume blob response's body as text 9 PASS Consume blob response's body as json 10 PASS Consume blob response's body as arrayBuffer 11 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-consume.html
r197396 r198133 80 80 var formData = new FormData(); 81 81 formData.append("name", "value"); 82 var textData = "This is response's body";82 var textData = JSON.stringify("This is response's body"); 83 83 var blob = new Blob([textData], { "type" : "text/plain" }); 84 84 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/response/response-init-002-expected.txt
r197049 r198133 1 1 2 2 PASS Initialize Response with headers values 3 FAIL Initialize Response's body with application/octet-binary promise_test: Unhandled rejection with value: undefined 3 PASS Initialize Response's body with application/octet-binary 4 4 FAIL Initialize Response's body with multipart/form-data promise_test: Unhandled rejection with value: undefined 5 5 FAIL Initialize Response's body with application/x-www-form-urlencoded;charset=UTF-8 assert_true: Content-Type header should be "application/x-www-form-urlencoded;charset=UTF-8" expected true got false -
trunk/Source/WebCore/CMakeLists.txt
r198074 r198133 817 817 Modules/fetch/DOMWindowFetch.cpp 818 818 Modules/fetch/FetchBody.cpp 819 Modules/fetch/FetchBodyOwner.cpp 819 820 Modules/fetch/FetchHeaders.cpp 821 Modules/fetch/FetchLoader.cpp 820 822 Modules/fetch/FetchRequest.cpp 821 823 Modules/fetch/FetchResponse.cpp -
trunk/Source/WebCore/ChangeLog
r198129 r198133 1 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [Fetch API] Implement data resolution for blob stored in Body 4 https://bugs.webkit.org/show_bug.cgi?id=155359 5 6 Reviewed by Darin Adler. 7 8 Introducing FetchLoader as a wrapper around ThreadableLoader to load resources. 9 FetchLoader can retrieve data as text or array buffer. It only supports blob currently. 10 11 Introducing FetchLoaderClient interface and FetchBodyOwner::BlobLoader as specifc blob loader client. 12 13 Covered by existing rebased tests. 14 15 * CMakeLists.txt: 16 * Modules/fetch/FetchBody.cpp: 17 (WebCore::FetchBody::loadingType): 18 (WebCore::FetchBody::loadedAsArrayBuffer): 19 (WebCore::FetchBody::loadedAsText): 20 * Modules/fetch/FetchBody.h: 21 * Modules/fetch/FetchBodyOwner.cpp: Added. 22 (WebCore::FetchBodyOwner::FetchBodyOwner): 23 (WebCore::FetchBodyOwner::loadBlob): 24 (WebCore::FetchBodyOwner::finishBlobLoading): 25 (WebCore::FetchBodyOwner::blobLoadingFailed): 26 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse): 27 * Modules/fetch/FetchBodyOwner.h: 28 (WebCore::FetchBodyOwner::loadedBlobAsText): 29 (WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer): 30 (WebCore::FetchBodyOwner::blobLoadingSucceeded): 31 * Modules/fetch/FetchLoader.cpp: Added. 32 (WebCore::FetchLoader::start): 33 (WebCore::FetchLoader::FetchLoader): 34 (WebCore::FetchLoader::stop): 35 (WebCore::FetchLoader::didReceiveResponse): 36 (WebCore::FetchLoader::didReceiveData): 37 (WebCore::FetchLoader::didFinishLoading): 38 (WebCore::FetchLoader::didFail): 39 * Modules/fetch/FetchLoader.h: Added. 40 * Modules/fetch/FetchLoaderClient.h: Added. 41 (WebCore::FetchLoaderClient::~FetchLoaderClient): 42 (WebCore::FetchLoaderClient::didReceiveResponse): 43 (WebCore::FetchLoaderClient::didFinishLoadingAsText): 44 (WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer): 45 * WebCore.xcodeproj/project.pbxproj: 46 1 47 2016-03-14 Frederic Wang <fwang@igalia.com> 2 48 -
trunk/Source/WebCore/Modules/fetch/FetchBody.cpp
r198005 r198133 136 136 return; 137 137 138 if (!owner.scriptExecutionContext()) 139 return; 140 138 141 if (m_type == Type::Text) { 139 resolveAsJSON( owner.scriptExecutionContext(), m_text, WTFMove(promise));142 resolveAsJSON(*owner.scriptExecutionContext(), m_text, WTFMove(promise)); 140 143 return; 141 144 } … … 183 186 } 184 187 185 FetchLoad ingType FetchBody::loadingType(Consumer::Type type)188 FetchLoader::Type FetchBody::loadingType(Consumer::Type type) 186 189 { 187 190 switch (type) { 188 191 case Consumer::Type::JSON: 189 192 case Consumer::Type::Text: 190 return FetchLoad ingType::Text;193 return FetchLoader::Type::Text; 191 194 case Consumer::Type::Blob: 192 return FetchLoadingType::Blob;193 195 case Consumer::Type::ArrayBuffer: 194 return FetchLoad ingType::ArrayBuffer;196 return FetchLoader::Type::ArrayBuffer; 195 197 default: 196 198 ASSERT_NOT_REACHED(); 197 return FetchLoad ingType::ArrayBuffer;199 return FetchLoader::Type::ArrayBuffer; 198 200 }; 199 201 } … … 207 209 } 208 210 209 void FetchBody::resolveAsJSON(ScriptExecutionContext *context, const String& data, DeferredWrapper&& promise)210 { 211 DOMRequestState state( context);211 void FetchBody::resolveAsJSON(ScriptExecutionContext& context, const String& data, DeferredWrapper&& promise) 212 { 213 DOMRequestState state(&context); 212 214 JSC::JSValue value = JSC::JSONParse(state.exec(), data); 213 215 if (!value) … … 234 236 } 235 237 236 void FetchBody::loadedAs Blob(Blob& blob)238 void FetchBody::loadedAsArrayBuffer(RefPtr<ArrayBuffer>&& buffer) 237 239 { 238 240 ASSERT(m_consumer); 239 m_consumer->promise.resolve(&blob); 241 ASSERT(m_consumer->type == Consumer::Type::Blob || m_consumer->type == Consumer::Type::ArrayBuffer); 242 if (m_consumer->type == Consumer::Type::ArrayBuffer) 243 m_consumer->promise.resolve(buffer); 244 else { 245 ASSERT(m_blob); 246 Vector<char> data; 247 data.reserveCapacity(buffer->byteLength()); 248 data.append(static_cast<const char*>(buffer->data()), buffer->byteLength()); 249 m_consumer->promise.resolve<RefPtr<Blob>>(Blob::create(WTFMove(data), m_blob->type())); 250 } 240 251 m_consumer = Nullopt; 241 252 } 242 253 254 void FetchBody::loadedAsText(ScriptExecutionContext& context, String&& text) 255 { 256 ASSERT(m_consumer); 257 ASSERT(m_consumer->type == Consumer::Type::Text || m_consumer->type == Consumer::Type::JSON); 258 if (m_consumer->type == Consumer::Type::Text) 259 m_consumer->promise.resolve(text); 260 else 261 resolveAsJSON(context, text, WTFMove(m_consumer->promise)); 262 m_consumer = Nullopt; 263 } 264 243 265 } 244 266 -
trunk/Source/WebCore/Modules/fetch/FetchBody.h
r198005 r198133 34 34 #include "Blob.h" 35 35 #include "DOMFormData.h" 36 #include "FetchLoader.h" 36 37 #include "JSDOMPromise.h" 37 38 … … 44 45 45 46 class FetchBodyOwner; 46 enum class FetchLoadingType;47 47 48 48 class FetchBody { … … 65 65 66 66 void loadingFailed(); 67 void loadedAsBlob(Blob&); 67 void loadedAsArrayBuffer(RefPtr<ArrayBuffer>&&); 68 void loadedAsText(ScriptExecutionContext&, String&&); 68 69 69 70 private: … … 86 87 void consumeText(Consumer::Type, DeferredWrapper&&); 87 88 void consumeBlob(FetchBodyOwner&, Consumer::Type, DeferredWrapper&&); 88 void resolveAsJSON(ScriptExecutionContext *, const String&, DeferredWrapper&&);89 static FetchLoad ingType loadingType(Consumer::Type);89 void resolveAsJSON(ScriptExecutionContext&, const String&, DeferredWrapper&&); 90 static FetchLoader::Type loadingType(Consumer::Type); 90 91 91 92 Type m_type = Type::None; -
trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp
r198132 r198133 27 27 */ 28 28 29 #i fndef FetchBodyOwner_h30 # define FetchBodyOwner_h29 #include "config.h" 30 #include "FetchBodyOwner.h" 31 31 32 32 #if ENABLE(FETCH_API) 33 33 34 #include " ActiveDOMObject.h"35 #include " FetchBody.h"34 #include "FetchLoader.h" 35 #include "ResourceResponse.h" 36 36 37 37 namespace WebCore { 38 38 39 enum class FetchLoadingType { Text, ArrayBuffer, Blob }; 40 41 class FetchBodyOwner : public RefCounted<FetchBodyOwner>, public ActiveDOMObject { 42 public: 43 FetchBodyOwner(ScriptExecutionContext&, FetchBody&&); 44 45 // Exposed Body API 46 bool isDisturbed() const { return m_body.isDisturbed(); } 47 void arrayBuffer(DeferredWrapper&& promise) { m_body.arrayBuffer(*this, WTFMove(promise)); } 48 void blob(DeferredWrapper&& promise) { m_body.blob(*this, WTFMove(promise)); } 49 void formData(DeferredWrapper&& promise) { m_body.formData(*this, WTFMove(promise)); } 50 void json(DeferredWrapper&& promise) { m_body.json(*this, WTFMove(promise)); } 51 void text(DeferredWrapper&& promise) { m_body.text(*this, WTFMove(promise)); } 52 53 void loadBlob(Blob&, FetchLoadingType); 54 55 protected: 56 FetchBody m_body; 57 }; 58 59 inline FetchBodyOwner::FetchBodyOwner(ScriptExecutionContext& context, FetchBody&& body) 39 FetchBodyOwner::FetchBodyOwner(ScriptExecutionContext& context, FetchBody&& body) 60 40 : ActiveDOMObject(&context) 61 41 , m_body(WTFMove(body)) … … 64 44 } 65 45 66 inline void FetchBodyOwner::loadBlob(Blob& blob, FetchLoadingType type)46 void FetchBodyOwner::stop() 67 47 { 68 if ( type == FetchLoadingType::Blob) {69 // FIXME: Clone blob.70 m_body.loadedAsBlob(blob);71 return;48 if (m_blobLoader) { 49 if (m_blobLoader->loader) 50 m_blobLoader->loader->stop(); 51 finishBlobLoading(); 72 52 } 73 // FIXME: Implement blob loading. 53 ASSERT(!m_blobLoader); 54 } 55 56 void FetchBodyOwner::loadBlob(Blob& blob, FetchLoader::Type type) 57 { 58 // Can only be called once for a body instance. 59 ASSERT(m_body.isDisturbed()); 60 ASSERT(!m_blobLoader); 61 62 m_blobLoader = { *this }; 63 m_blobLoader->loader = std::make_unique<FetchLoader>(type, *m_blobLoader); 64 65 setPendingActivity(this); 66 if (!scriptExecutionContext() || !m_blobLoader->loader->start(*scriptExecutionContext(), blob)) 67 blobLoadingFailed(); 68 } 69 70 void FetchBodyOwner::loadedBlobAsText(String&& text) 71 { 72 ASSERT(*scriptExecutionContext()); 73 74 m_body.loadedAsText(*scriptExecutionContext(), WTFMove(text)); 75 } 76 77 void FetchBodyOwner::finishBlobLoading() 78 { 79 ASSERT(m_blobLoader); 80 81 m_blobLoader = Nullopt; 82 unsetPendingActivity(this); 83 } 84 85 void FetchBodyOwner::blobLoadingFailed() 86 { 74 87 m_body.loadingFailed(); 88 finishBlobLoading(); 89 } 90 91 FetchBodyOwner::BlobLoader::BlobLoader(FetchBodyOwner& owner) 92 : owner(owner) 93 { 94 } 95 96 void FetchBodyOwner::BlobLoader::didReceiveResponse(const ResourceResponse& response) 97 { 98 if (response.httpStatusCode() != 200) 99 didFail(); 75 100 } 76 101 … … 78 103 79 104 #endif // ENABLE(FETCH_API) 80 81 #endif // FetchBodyOwner_h -
trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h
r198005 r198133 34 34 #include "ActiveDOMObject.h" 35 35 #include "FetchBody.h" 36 #include "FetchLoader.h" 37 #include "FetchLoaderClient.h" 36 38 37 39 namespace WebCore { 38 39 enum class FetchLoadingType { Text, ArrayBuffer, Blob };40 40 41 41 class FetchBodyOwner : public RefCounted<FetchBodyOwner>, public ActiveDOMObject { … … 51 51 void text(DeferredWrapper&& promise) { m_body.text(*this, WTFMove(promise)); } 52 52 53 void loadBlob(Blob&, FetchLoadingType); 53 void loadBlob(Blob&, FetchLoader::Type); 54 55 bool isActive() const { return !!m_blobLoader; } 56 57 private: 58 // Blob loading routines 59 void loadedBlobAsText(String&&); 60 void loadedBlobAsArrayBuffer(RefPtr<ArrayBuffer>&& buffer) { m_body.loadedAsArrayBuffer(WTFMove(buffer)); } 61 void blobLoadingSucceeded() { finishBlobLoading(); } 62 void blobLoadingFailed(); 63 void finishBlobLoading(); 64 65 // ActiveDOMObject API 66 void stop() override; 67 68 struct BlobLoader final : FetchLoaderClient { 69 BlobLoader(FetchBodyOwner&); 70 71 // FetchLoaderClient API 72 void didFinishLoadingAsText(String&& text) final { owner.loadedBlobAsText(WTFMove(text)); } 73 void didFinishLoadingAsArrayBuffer(RefPtr<ArrayBuffer>&& buffer) final { owner.loadedBlobAsArrayBuffer(WTFMove(buffer)); } 74 void didReceiveResponse(const ResourceResponse&) final; 75 void didFail() final { owner.blobLoadingFailed(); }; 76 void didSucceed() final { owner.blobLoadingSucceeded(); } 77 78 FetchBodyOwner& owner; 79 std::unique_ptr<FetchLoader> loader; 80 }; 54 81 55 82 protected: 56 83 FetchBody m_body; 84 85 private: 86 Optional<BlobLoader> m_blobLoader; 57 87 }; 58 59 inline FetchBodyOwner::FetchBodyOwner(ScriptExecutionContext& context, FetchBody&& body)60 : ActiveDOMObject(&context)61 , m_body(WTFMove(body))62 {63 suspendIfNeeded();64 }65 66 inline void FetchBodyOwner::loadBlob(Blob& blob, FetchLoadingType type)67 {68 if (type == FetchLoadingType::Blob) {69 // FIXME: Clone blob.70 m_body.loadedAsBlob(blob);71 return;72 }73 // FIXME: Implement blob loading.74 m_body.loadingFailed();75 }76 88 77 89 } // namespace WebCore -
trunk/Source/WebCore/Modules/fetch/FetchLoader.h
r198132 r198133 27 27 */ 28 28 29 #ifndef Fetch BodyOwner_h30 #define Fetch BodyOwner_h29 #ifndef FetchLoader_h 30 #define FetchLoader_h 31 31 32 32 #if ENABLE(FETCH_API) 33 33 34 #include "ActiveDOMObject.h" 35 #include "FetchBody.h" 34 #include "SharedBuffer.h" 35 #include "ThreadableLoader.h" 36 #include "ThreadableLoaderClient.h" 36 37 37 38 namespace WebCore { 38 39 39 enum class FetchLoadingType { Text, ArrayBuffer, Blob }; 40 class Blob; 41 class FetchLoaderClient; 42 class ScriptExecutionContext; 40 43 41 class Fetch BodyOwner : public RefCounted<FetchBodyOwner>, public ActiveDOMObject {44 class FetchLoader final : public ThreadableLoaderClient { 42 45 public: 43 FetchBodyOwner(ScriptExecutionContext&, FetchBody&&);46 enum class Type { ArrayBuffer, Text }; 44 47 45 // Exposed Body API 46 bool isDisturbed() const { return m_body.isDisturbed(); } 47 void arrayBuffer(DeferredWrapper&& promise) { m_body.arrayBuffer(*this, WTFMove(promise)); } 48 void blob(DeferredWrapper&& promise) { m_body.blob(*this, WTFMove(promise)); } 49 void formData(DeferredWrapper&& promise) { m_body.formData(*this, WTFMove(promise)); } 50 void json(DeferredWrapper&& promise) { m_body.json(*this, WTFMove(promise)); } 51 void text(DeferredWrapper&& promise) { m_body.text(*this, WTFMove(promise)); } 48 FetchLoader(Type, FetchLoaderClient&); 52 49 53 void loadBlob(Blob&, FetchLoadingType); 50 bool start(ScriptExecutionContext&, Blob&); 51 void stop(); 54 52 55 protected: 56 FetchBody m_body; 53 private: 54 // ThreadableLoaderClient API. 55 void didReceiveResponse(unsigned long, const ResourceResponse&) final; 56 void didReceiveData(const char*, int) final; 57 void didFinishLoading(unsigned long, double) final; 58 void didFail(const ResourceError&) final; 59 60 private: 61 Type m_type { Type::ArrayBuffer }; 62 FetchLoaderClient& m_client; 63 RefPtr<ThreadableLoader> m_loader; 64 RefPtr<SharedBuffer> m_data; 57 65 }; 58 59 inline FetchBodyOwner::FetchBodyOwner(ScriptExecutionContext& context, FetchBody&& body)60 : ActiveDOMObject(&context)61 , m_body(WTFMove(body))62 {63 suspendIfNeeded();64 }65 66 inline void FetchBodyOwner::loadBlob(Blob& blob, FetchLoadingType type)67 {68 if (type == FetchLoadingType::Blob) {69 // FIXME: Clone blob.70 m_body.loadedAsBlob(blob);71 return;72 }73 // FIXME: Implement blob loading.74 m_body.loadingFailed();75 }76 66 77 67 } // namespace WebCore … … 79 69 #endif // ENABLE(FETCH_API) 80 70 81 #endif // Fetch BodyOwner_h71 #endif // FetchLoader_h -
trunk/Source/WebCore/Modules/fetch/FetchLoaderClient.h
r198132 r198133 27 27 */ 28 28 29 #ifndef Fetch BodyOwner_h30 #define Fetch BodyOwner_h29 #ifndef FetchLoaderClient_h 30 #define FetchLoaderClient_h 31 31 32 32 #if ENABLE(FETCH_API) 33 33 34 #include "ActiveDOMObject.h" 35 #include "FetchBody.h" 34 #include <wtf/Forward.h> 35 36 namespace JSC { 37 class ArrayBuffer; 38 } 36 39 37 40 namespace WebCore { 38 41 39 enum class FetchLoadingType { Text, ArrayBuffer, Blob };42 class ResourceResponse; 40 43 41 class Fetch BodyOwner : public RefCounted<FetchBodyOwner>, public ActiveDOMObject {44 class FetchLoaderClient { 42 45 public: 43 FetchBodyOwner(ScriptExecutionContext&, FetchBody&&);46 virtual ~FetchLoaderClient() { } 44 47 45 // Exposed Body API 46 bool isDisturbed() const { return m_body.isDisturbed(); } 47 void arrayBuffer(DeferredWrapper&& promise) { m_body.arrayBuffer(*this, WTFMove(promise)); } 48 void blob(DeferredWrapper&& promise) { m_body.blob(*this, WTFMove(promise)); } 49 void formData(DeferredWrapper&& promise) { m_body.formData(*this, WTFMove(promise)); } 50 void json(DeferredWrapper&& promise) { m_body.json(*this, WTFMove(promise)); } 51 void text(DeferredWrapper&& promise) { m_body.text(*this, WTFMove(promise)); } 48 virtual void didReceiveResponse(const ResourceResponse&) { } 52 49 53 void loadBlob(Blob&, FetchLoadingType); 50 virtual void didFinishLoadingAsText(String&&) { } 51 virtual void didFinishLoadingAsArrayBuffer(RefPtr<JSC::ArrayBuffer>&&) { } 54 52 55 protected: 56 FetchBody m_body;53 virtual void didSucceed() = 0; 54 virtual void didFail() = 0; 57 55 }; 58 59 inline FetchBodyOwner::FetchBodyOwner(ScriptExecutionContext& context, FetchBody&& body)60 : ActiveDOMObject(&context)61 , m_body(WTFMove(body))62 {63 suspendIfNeeded();64 }65 66 inline void FetchBodyOwner::loadBlob(Blob& blob, FetchLoadingType type)67 {68 if (type == FetchLoadingType::Blob) {69 // FIXME: Clone blob.70 m_body.loadedAsBlob(blob);71 return;72 }73 // FIXME: Implement blob loading.74 m_body.loadingFailed();75 }76 56 77 57 } // namespace WebCore … … 79 59 #endif // ENABLE(FETCH_API) 80 60 81 #endif // Fetch BodyOwner_h61 #endif // FetchLoaderClient_h -
trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp
r198002 r198133 454 454 bool FetchRequest::canSuspendForDocumentSuspension() const 455 455 { 456 return true; 456 // FIXME: We can probably do the same strategy as XHR. 457 return !isActive(); 457 458 } 458 459 -
trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp
r198002 r198133 161 161 bool FetchResponse::canSuspendForDocumentSuspension() const 162 162 { 163 return true; 163 // FIXME: We can probably do the same strategy as XHR. 164 return !isActive(); 164 165 } 165 166 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r198092 r198133 1522 1522 4138D3361244054800323D33 /* EventContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4138D3341244054800323D33 /* EventContext.cpp */; }; 1523 1523 413C2C341BC29A8F0075204C /* JSDOMConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 413C2C331BC29A7B0075204C /* JSDOMConstructor.h */; }; 1524 4147E2B71C89912C00A7E715 /* FetchLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4147E2B41C89912600A7E715 /* FetchLoader.cpp */; }; 1525 4147E2B81C89912F00A7E715 /* FetchBodyOwner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4147E2B31C89912600A7E715 /* FetchBodyOwner.cpp */; }; 1524 1526 415071571685067300C3C7B3 /* SelectorFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 415071551685067300C3C7B3 /* SelectorFilter.cpp */; }; 1525 1527 415071581685067300C3C7B3 /* SelectorFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 415071561685067300C3C7B3 /* SelectorFilter.h */; }; … … 9002 9004 413C2C331BC29A7B0075204C /* JSDOMConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMConstructor.h; sourceTree = "<group>"; }; 9003 9005 4147E2B21C88337F00A7E715 /* FetchBodyOwner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchBodyOwner.h; sourceTree = "<group>"; }; 9006 4147E2B31C89912600A7E715 /* FetchBodyOwner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FetchBodyOwner.cpp; sourceTree = "<group>"; }; 9007 4147E2B41C89912600A7E715 /* FetchLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FetchLoader.cpp; sourceTree = "<group>"; }; 9008 4147E2B51C89912600A7E715 /* FetchLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchLoader.h; sourceTree = "<group>"; }; 9009 4147E2B61C89912600A7E715 /* FetchLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchLoaderClient.h; sourceTree = "<group>"; }; 9004 9010 415071551685067300C3C7B3 /* SelectorFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorFilter.cpp; sourceTree = "<group>"; }; 9005 9011 415071561685067300C3C7B3 /* SelectorFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorFilter.h; sourceTree = "<group>"; }; … … 16824 16830 41F54F7E1C50C4F600338488 /* FetchBody.h */, 16825 16831 41F54F7F1C50C4F600338488 /* FetchBody.idl */, 16832 4147E2B31C89912600A7E715 /* FetchBodyOwner.cpp */, 16826 16833 4147E2B21C88337F00A7E715 /* FetchBodyOwner.h */, 16827 16834 41F54F821C50C4F600338488 /* FetchHeaders.cpp */, … … 16829 16836 41F54F841C50C4F600338488 /* FetchHeaders.idl */, 16830 16837 41F54F851C50C4F600338488 /* FetchHeaders.js */, 16838 4147E2B41C89912600A7E715 /* FetchLoader.cpp */, 16839 4147E2B51C89912600A7E715 /* FetchLoader.h */, 16840 4147E2B61C89912600A7E715 /* FetchLoaderClient.h */, 16831 16841 41F54F861C50C4F600338488 /* FetchOptions.h */, 16832 16842 41F54F871C50C4F600338488 /* FetchRequest.cpp */, … … 30548 30558 07969DC317D14151007FF842 /* JSRTCStatsResponse.cpp in Sources */, 30549 30559 07DC5FD417D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp in Sources */, 30560 4147E2B81C89912F00A7E715 /* FetchBodyOwner.cpp in Sources */, 30550 30561 5E2C436B1BCF071E0001E2BC /* JSRTCTrackEvent.cpp in Sources */, 30551 30562 BCEC01C20C274DDD009F4EC9 /* JSScreen.cpp in Sources */, … … 31882 31893 854FE7380A2297BE0058D7AD /* TreeWalker.cpp in Sources */, 31883 31894 C375D7FD16639519006184AB /* TypeAhead.cpp in Sources */, 31895 4147E2B71C89912C00A7E715 /* FetchLoader.cpp in Sources */, 31884 31896 93309E19099E64920056E581 /* TypingCommand.cpp in Sources */, 31885 31897 85031B4D0A44EFC700F992E0 /* UIEvent.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.