Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
LayoutTests/imported/w3c:
Change FileReader.error to DOMException from obsoleted FileError
https://bugs.webkit.org/show_bug.cgi?id=213117

Patch by Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> on 2020-06-12
Reviewed by Chris Dumez.

* web-platform-tests/FileAPI/historical.https-expected.txt:
  FileError should not be exposed.

Source/WebCore:
FileReader.error should be DOMException now
https://bugs.webkit.org/show_bug.cgi?id=213117

Patch by Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> on 2020-06-12
Reviewed by Chris Dumez.

By the [lastest spec](https://w3c.github.io/FileAPI/),
`FileReader.error` should return `DOMException`
and this remove obsoleted `FileError` from exposed interfaces.

Internally, our codebase still depends on `fileapi/FileError.h`
in everywhere. I'll plan to create a patch to refactor them.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.order:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/FileError.idl: Removed.
* fileapi/FileReader.cpp:
(WebCore::FileReader::abort):
(WebCore::FileReader::didFail):
* fileapi/FileReader.h:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.cpp:
(WebCore::FileReaderSync::errorCodeToException):
* fileapi/FileReaderSync.h:

LayoutTests:
Change FileReader.error to DOMException from obsoleted FileError
https://bugs.webkit.org/show_bug.cgi?id=213117

Patch by Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> on 2020-06-12
Reviewed by Chris Dumez.

By the [lastest spec](https://w3c.github.io/FileAPI/),
`FileReader.error` should return `DOMException`
and this change remove `FileError` from exposed interfaces.

* fast/files/file-reader-abort-expected.txt:
* fast/files/file-reader-abort-using-open-panel-expected.txt:
* fast/files/read-blob-async-expected.txt:
* fast/files/read-file-async-expected.txt:
* fast/files/workers/worker-read-blob-async-expected.txt:
* fast/files/workers/worker-read-file-async-expected.txt:
  Update to `DOMException` error code from `FileError` error code.
* platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt:
  FileError should not be exposed.

Canonical link: https://commits.webkit.org/225907@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
tetsuharuohzeki authored and webkit-commit-queue committed Jun 12, 2020
1 parent 44a5e69 commit 432bcf7
Show file tree
Hide file tree
Showing 24 changed files with 99 additions and 97 deletions.
21 changes: 21 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
2020-06-12 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com>

Change FileReader.error to DOMException from obsoleted FileError
https://bugs.webkit.org/show_bug.cgi?id=213117

Reviewed by Chris Dumez.

By the [lastest spec](https://w3c.github.io/FileAPI/),
`FileReader.error` should return `DOMException`
and this change remove `FileError` from exposed interfaces.

* fast/files/file-reader-abort-expected.txt:
* fast/files/file-reader-abort-using-open-panel-expected.txt:
* fast/files/read-blob-async-expected.txt:
* fast/files/read-file-async-expected.txt:
* fast/files/workers/worker-read-blob-async-expected.txt:
* fast/files/workers/worker-read-file-async-expected.txt:
Update to `DOMException` error code from `FileError` error code.
* platform/mac-wk1/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt:
FileError should not be exposed.

2020-06-12 Zalan Bujtas <zalan@apple.com>

[LFC][TFC] Add support for min/max-width
Expand Down
2 changes: 1 addition & 1 deletion LayoutTests/fast/files/file-reader-abort-expected.txt
@@ -1,7 +1,7 @@

Test that FileReader.abort works.
Received loadstart event
Received error event: 3
Received error event: 20
Received abort event
Received loadend event
DONE
Expand Down
Expand Up @@ -2,7 +2,7 @@ OPEN FILE PANEL

Test that FileReader.abort works.
Received loadstart event
Received error event: 3
Received error event: 20
Received abort event
Received loadend event
DONE
Expand Down
4 changes: 2 additions & 2 deletions LayoutTests/fast/files/read-blob-async-expected.txt
Expand Up @@ -3,14 +3,14 @@ Test reading a blob containing non-existent file
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a blob containing existent and non-existent file
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a blob containing empty file
Expand Down
10 changes: 5 additions & 5 deletions LayoutTests/fast/files/read-file-async-expected.txt
Expand Up @@ -3,28 +3,28 @@ Test reading a non-existent file as array buffer
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a non-existent file as binary string
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a non-existent file as text
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a non-existent file as data URL
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading an empty file as array buffer
Expand Down Expand Up @@ -207,7 +207,7 @@ Test reading again after failed read
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
readyState after recalling read method: 1
Expand Down
Expand Up @@ -4,14 +4,14 @@ Test reading a blob containing non-existent file
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a blob containing existent and non-existent file
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a blob containing empty file
Expand Down
Expand Up @@ -4,28 +4,28 @@ Test reading a non-existent file as array buffer
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a non-existent file as binary string
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a non-existent file as text
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading a non-existent file as data URL
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
Test reading an empty file as array buffer
Expand Down Expand Up @@ -208,7 +208,7 @@ Test reading again after failed read
readyState: 0
Received error event
readyState: 2
error code: 1
error code: 8
result: null
Received loadend event
readyState after recalling read method: 1
Expand Down
10 changes: 10 additions & 0 deletions LayoutTests/imported/w3c/ChangeLog
@@ -1,3 +1,13 @@
2020-06-12 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com>

Change FileReader.error to DOMException from obsoleted FileError
https://bugs.webkit.org/show_bug.cgi?id=213117

Reviewed by Chris Dumez.

* web-platform-tests/FileAPI/historical.https-expected.txt:
FileError should not be exposed.

2020-06-11 Sam Weinig <weinig@apple.com>

Document.currentScript does not work for SVGScriptElements
Expand Down
@@ -1,6 +1,6 @@

PASS "toNativeLineEndings" should not be supported
FAIL "FileError" should not be supported assert_false: expected false got true
PASS "FileError" should not be supported
PASS "FileException" should not be supported
PASS "FileHandle" should not be supported
PASS "FileRequest" should not be supported
Expand Down
@@ -1,6 +1,6 @@

PASS "toNativeLineEndings" should not be supported
FAIL "FileError" should not be supported assert_false: expected false got true
PASS "FileError" should not be supported
PASS "FileException" should not be supported
PASS "FileHandle" should not be supported
PASS "FileRequest" should not be supported
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/CMakeLists.txt
Expand Up @@ -768,7 +768,6 @@ set(WebCore_NON_SVG_IDL_FILES
fileapi/BlobPropertyBag.idl
fileapi/EndingType.idl
fileapi/File.idl
fileapi/FileError.idl
fileapi/FileList.idl
fileapi/FileReader.idl
fileapi/FileReaderSync.idl
Expand Down
31 changes: 31 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,34 @@
2020-06-12 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com>

FileReader.error should be DOMException now
https://bugs.webkit.org/show_bug.cgi?id=213117

Reviewed by Chris Dumez.

By the [lastest spec](https://w3c.github.io/FileAPI/),
`FileReader.error` should return `DOMException`
and this remove obsoleted `FileError` from exposed interfaces.

Internally, our codebase still depends on `fileapi/FileError.h`
in everywhere. I'll plan to create a patch to refactor them.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Sources.txt:
* WebCore.order:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/FileError.idl: Removed.
* fileapi/FileReader.cpp:
(WebCore::FileReader::abort):
(WebCore::FileReader::didFail):
* fileapi/FileReader.h:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.cpp:
(WebCore::FileReaderSync::errorCodeToException):
* fileapi/FileReaderSync.h:

2020-06-12 Zalan Bujtas <zalan@apple.com>

[LFC][TFC] Add support for min/max-width
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/DerivedSources-input.xcfilelist
Expand Up @@ -704,7 +704,6 @@ $(PROJECT_DIR)/fileapi/BlobCallback.idl
$(PROJECT_DIR)/fileapi/BlobPropertyBag.idl
$(PROJECT_DIR)/fileapi/EndingType.idl
$(PROJECT_DIR)/fileapi/File.idl
$(PROJECT_DIR)/fileapi/FileError.idl
$(PROJECT_DIR)/fileapi/FileList.idl
$(PROJECT_DIR)/fileapi/FileReader.idl
$(PROJECT_DIR)/fileapi/FileReaderSync.idl
Expand Down
2 changes: 0 additions & 2 deletions Source/WebCore/DerivedSources-output.xcfilelist
Expand Up @@ -600,8 +600,6 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFile.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFile.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFileCallback.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFileCallback.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFileError.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFileError.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFileList.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFileList.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSFileReader.cpp
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/DerivedSources.make
Expand Up @@ -733,7 +733,6 @@ JS_BINDING_IDLS = \
$(WebCore)/fileapi/BlobPropertyBag.idl \
$(WebCore)/fileapi/EndingType.idl \
$(WebCore)/fileapi/File.idl \
$(WebCore)/fileapi/FileError.idl \
$(WebCore)/fileapi/FileList.idl \
$(WebCore)/fileapi/FileReader.idl \
$(WebCore)/fileapi/FileReaderSync.idl \
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/Sources.txt
Expand Up @@ -2952,7 +2952,6 @@ JSFetchRequestRedirect.cpp
JSFetchResponse.cpp
JSFile.cpp
JSFileCallback.cpp
JSFileError.cpp
JSFileList.cpp
JSFileReader.cpp
JSFileReaderSync.cpp
Expand Down
10 changes: 0 additions & 10 deletions Source/WebCore/WebCore.order
Expand Up @@ -21402,13 +21402,6 @@ __ZN7WebCore17JSFileConstructor6s_infoE
__ZN7WebCore15JSFilePrototype6s_infoE
__ZN7WebCore6JSFile6s_infoE
__ZN7WebCoreL17JSFileTableValuesE
__ZN7WebCore22JSFileErrorConstructor6s_infoE
__ZN7WebCore20JSFileErrorPrototype6s_infoE
__ZN7WebCore11JSFileError6s_infoE
__ZTVN7WebCore16JSFileErrorOwnerE
__ZN7WebCoreL22JSFileErrorTableValuesE
__ZN7WebCoreL31JSFileErrorPrototypeTableValuesE
__ZN7WebCoreL33JSFileErrorConstructorTableValuesE
__ZN7WebCore26JSFileExceptionConstructor6s_infoE
__ZN7WebCore24JSFileExceptionPrototype6s_infoE
__ZN7WebCore15JSFileException6s_infoE
Expand Down Expand Up @@ -24710,9 +24703,6 @@ __ZGVZN7WebCore12wrapperOwnerEPNS_15DOMWrapperWorldEPNS_27EXTTextureFilterAnisot
__ZN7WebCoreL11JSFileTableE
__ZN7WebCoreL20JSFilePrototypeTableE
__ZN7WebCoreL22JSFileConstructorTableE
__ZN7WebCoreL16JSFileErrorTableE
__ZN7WebCoreL25JSFileErrorPrototypeTableE
__ZN7WebCoreL27JSFileErrorConstructorTableE
__ZZN7WebCore12wrapperOwnerEPNS_15DOMWrapperWorldEPNS_9FileErrorEE16jsFileErrorOwner
__ZGVZN7WebCore12wrapperOwnerEPNS_15DOMWrapperWorldEPNS_9FileErrorEE16jsFileErrorOwner
__ZN7WebCoreL20JSFileExceptionTableE
Expand Down
8 changes: 0 additions & 8 deletions Source/WebCore/WebCore.xcodeproj/project.pbxproj
Expand Up @@ -832,7 +832,6 @@
2E2D99CE10E2BBDA00496337 /* JSBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99CC10E2BBDA00496337 /* JSBlob.h */; settings = {ATTRIBUTES = (Private, ); }; };
2E37DFDB12DBAFB800A6B233 /* DOMURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E37DFD812DBAFB800A6B233 /* DOMURL.h */; };
2E37E00612DBC5A400A6B233 /* JSDOMURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E37E00412DBC5A400A6B233 /* JSDOMURL.h */; };
2E3BC0CB117D3E0800B9409A /* JSFileError.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E3BC0C9117D3E0800B9409A /* JSFileError.h */; };
2E4346460F546A8200B0F1BA /* Worker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346340F546A8200B0F1BA /* Worker.h */; };
2E4346490F546A8200B0F1BA /* WorkerGlobalScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346370F546A8200B0F1BA /* WorkerGlobalScope.h */; settings = {ATTRIBUTES = (Private, ); }; };
2E43464B0F546A8200B0F1BA /* WorkerGlobalScopeProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E4346390F546A8200B0F1BA /* WorkerGlobalScopeProxy.h */; };
Expand Down Expand Up @@ -6943,8 +6942,6 @@
2E37DFD912DBAFB800A6B233 /* DOMURL.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMURL.idl; sourceTree = "<group>"; };
2E37E00312DBC5A400A6B233 /* JSDOMURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMURL.cpp; sourceTree = "<group>"; };
2E37E00412DBC5A400A6B233 /* JSDOMURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMURL.h; sourceTree = "<group>"; };
2E3BC0C8117D3E0800B9409A /* JSFileError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileError.cpp; sourceTree = "<group>"; };
2E3BC0C9117D3E0800B9409A /* JSFileError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileError.h; sourceTree = "<group>"; };
2E4346330F546A8200B0F1BA /* Worker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Worker.cpp; sourceTree = "<group>"; };
2E4346340F546A8200B0F1BA /* Worker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Worker.h; sourceTree = "<group>"; };
2E4346350F546A8200B0F1BA /* Worker.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Worker.idl; sourceTree = "<group>"; };
Expand Down Expand Up @@ -15282,7 +15279,6 @@
E1A643FC0EC097A000779668 /* WorkerScriptController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerScriptController.cpp; sourceTree = "<group>"; };
E1AB1EA814E9E27D00449E13 /* FileList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FileList.idl; sourceTree = "<group>"; };
E1AB1EB714E9E35800449E13 /* File.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = File.idl; sourceTree = "<group>"; };
E1AB1EBB14E9E37A00449E13 /* FileError.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = FileError.idl; sourceTree = "<group>"; };
E1AB1EBD14E9E3A800449E13 /* FileReaderSync.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = FileReaderSync.idl; sourceTree = "<group>"; };
E1ADECBD0E76ACF1004A1A5E /* MessagePort.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = MessagePort.h; sourceTree = "<group>"; };
E1ADECBE0E76ACF1004A1A5E /* MessagePort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessagePort.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -21938,8 +21934,6 @@
7C77C3DA1DEF86D700A50BFA /* JSEndingType.h */,
BC00F0100E0A189500FD04E3 /* JSFile.cpp */,
BC00F0110E0A189500FD04E3 /* JSFile.h */,
2E3BC0C8117D3E0800B9409A /* JSFileError.cpp */,
2E3BC0C9117D3E0800B9409A /* JSFileError.h */,
BC00F0120E0A189500FD04E3 /* JSFileList.cpp */,
BC00F0130E0A189500FD04E3 /* JSFileList.h */,
2E94F439119207DA00B7F75D /* JSFileReader.cpp */,
Expand Down Expand Up @@ -22927,7 +22921,6 @@
E1AB1EB714E9E35800449E13 /* File.idl */,
E164A2E7191AC5BB0010737D /* FileCocoa.mm */,
976D6C64122B8A3D001FD1F7 /* FileError.h */,
E1AB1EBB14E9E37A00449E13 /* FileError.idl */,
976D6C66122B8A3D001FD1F7 /* FileList.cpp */,
976D6C67122B8A3D001FD1F7 /* FileList.h */,
E1AB1EA814E9E27D00449E13 /* FileList.idl */,
Expand Down Expand Up @@ -31394,7 +31387,6 @@
8E4C96DD1AD4483500365A50 /* JSFetchResponse.h in Headers */,
BC00F0150E0A189500FD04E3 /* JSFile.h in Headers */,
8370568E1F50915700D93425 /* JSFileCallback.h in Headers */,
2E3BC0CB117D3E0800B9409A /* JSFileError.h in Headers */,
BC00F0170E0A189500FD04E3 /* JSFileList.h in Headers */,
2E94F43C119207DA00B7F75D /* JSFileReader.h in Headers */,
898785F5122E1EAC003AABDA /* JSFileReaderSync.h in Headers */,
Expand Down
48 changes: 0 additions & 48 deletions Source/WebCore/fileapi/FileError.idl

This file was deleted.

0 comments on commit 432bcf7

Please sign in to comment.