Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change
event for input[type=file] does not fire when different file…
… with same name is selected https://bugs.webkit.org/show_bug.cgi?id=187084 rdar://98460303 Reviewed by Ryosuke Niwa and Aditya Keerthi. When a different file with the same name as the currently selected file is selected, the `change` event does not currently fire, because a file's path is it's identifier, so the two files are considered the same by the system. This PR works around this by saving each file's unique id and then comparing the files both based on their name and now their id too. * Source/WTF/wtf/FileSystem.h: * Source/WTF/wtf/glib/FileSystemGlib.cpp: (WTF::FileSystemImpl::fileID): (WTF::FileSystemImpl::fileIDsAreEqual): (WTF::FileSystemImpl::08c7e637e60a): (WTF::FileSystemImpl::fileCreationTime): Deleted. * Source/WTF/wtf/posix/FileSystemPOSIX.cpp: (WTF::FileSystemImpl::fileID): (WTF::FileSystemImpl::fileIDsAreEqual): * Source/WTF/wtf/win/FileSystemWin.cpp: (WTF::FileSystemImpl::fileID): (WTF::FileSystemImpl::fileIDsAreEqual): * Source/WebCore/fileapi/File.cpp: (WebCore::File::create): (WebCore::File::File): * Source/WebCore/fileapi/File.h: * Source/WebCore/html/FileInputType.cpp: (WebCore::FileInputType::setFiles): (WebCore::FileInputType::filesChosen): * Source/WebCore/platform/FileChooser.cpp: (WebCore::FileChooser::chooseFiles): (WebCore::FileChooser::chooseMediaFiles): Canonical link: https://commits.webkit.org/255297@main
- Loading branch information
Showing
8 changed files
with
70 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters