Summary: | Add stub for File System Access API | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sihui Liu <sihui_liu> | ||||||||||||||
Component: | New Bugs | Assignee: | Sihui Liu <sihui_liu> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Normal | CC: | achristensen, annulen, beidson, benjamin, calvaris, cdumez, dvpdiner2, esprehn+autocc, ews-watchlist, gyuyoung.kim, jonlee, kondapallykalyan, ryuan.choi, sergio, webkit-bug-importer, youennf | ||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||
OS: | Unspecified | ||||||||||||||||
Bug Depends on: | |||||||||||||||||
Bug Blocks: | 231706 | ||||||||||||||||
Attachments: |
|
Description
Sihui Liu
2021-09-09 09:00:38 PDT
Created attachment 437747 [details]
Patch
Created attachment 437750 [details]
Patch
Created attachment 437751 [details]
Patch
Created attachment 437755 [details]
Patch
Created attachment 437795 [details]
Patch
Comment on attachment 437795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437795&action=review > Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.h:56 > + FileSystemDirectoryHandle(String&&); explicit. > Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.h:37 > + struct CreateWritableOptions { Let's add it when needed. > Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.h:45 > + FileSystemFileHandle(String&&); explicit. > Source/WebCore/Modules/filesystemaccess/FileSystemHandle.h:49 > + FileSystemHandle(Kind, String&& name); Since it is refcounted, it is better to move the constructor to protected. > Source/WebCore/Modules/filesystemaccess/FileSystemHandle.idl:32 > + EnabledBySetting=FileSystemAccess I am not sure this has any effect on dictionaries. > Source/WebCore/Modules/filesystemaccess/FileSystemHandle.idl:47 > + Promise<PermissionState> requestPermission(optional FileSystemHandlePermissionDescriptor descriptor); Are we sure we will quickly implement these two? If not, it might be better to not include them so that feature detection works by just checking that the method is defined. Same questions for other methods. > Source/WebCore/Modules/filesystemaccess/FileSystemPermissionDescriptor.idl:28 > +] dictionary FileSystemPermissionDescriptor : PermissionDescriptor { Let's add this one and related when actually needed, I do not think this is exposed to JS. Ditto for struct FileSystemPermissionDescriptor > Source/WebCore/Modules/filesystemaccess/FileSystemPermissionMode.h:30 > +enum class FileSystemPermissionMode : uint8_t { could be bool I guess Created attachment 438054 [details]
Patch for landing
Comment on attachment 437795 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437795&action=review >> Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.h:56 >> + FileSystemDirectoryHandle(String&&); > > explicit. Will add. >> Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.h:37 >> + struct CreateWritableOptions { > > Let's add it when needed. Okay. >> Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.h:45 >> + FileSystemFileHandle(String&&); > > explicit. Will add. >> Source/WebCore/Modules/filesystemaccess/FileSystemHandle.h:49 >> + FileSystemHandle(Kind, String&& name); > > Since it is refcounted, it is better to move the constructor to protected. Sure. >> Source/WebCore/Modules/filesystemaccess/FileSystemHandle.idl:32 >> + EnabledBySetting=FileSystemAccess > > I am not sure this has any effect on dictionaries. I saw other files using it on dictionary and I checked IDLAttributes.json; but it does seem to have no effect on dictionary according to CodeGenerator if I am reading it correctly >> Source/WebCore/Modules/filesystemaccess/FileSystemHandle.idl:47 >> + Promise<PermissionState> requestPermission(optional FileSystemHandlePermissionDescriptor descriptor); > > Are we sure we will quickly implement these two? > If not, it might be better to not include them so that feature detection works by just checking that the method is defined. > Same questions for other methods. I think we do; but these two may not be implemented very quickly. I will remove these two first. >> Source/WebCore/Modules/filesystemaccess/FileSystemPermissionDescriptor.idl:28 >> +] dictionary FileSystemPermissionDescriptor : PermissionDescriptor { > > Let's add this one and related when actually needed, I do not think this is exposed to JS. > Ditto for struct FileSystemPermissionDescriptor Sure. >> Source/WebCore/Modules/filesystemaccess/FileSystemPermissionMode.h:30 >> +enum class FileSystemPermissionMode : uint8_t { > > could be bool I guess Will remove this file and add when it's needed. Committed r282361 (241624@main): <https://commits.webkit.org/241624@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 438054 [details]. |