Diff
Modified: trunk/Source/WTF/ChangeLog (277514 => 277515)
--- trunk/Source/WTF/ChangeLog 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WTF/ChangeLog 2021-05-14 23:12:12 UTC (rev 277515)
@@ -1,5 +1,26 @@
2021-05-14 Chris Dumez <[email protected]>
+ Drop "get" prefix from WTF::FileSystem's getFileModificationTime() / getFileCreationTime()
+ https://bugs.webkit.org/show_bug.cgi?id=225812
+
+ Reviewed by Darin Adler.
+
+ We avoid the "get" prefix in WebKit.
+
+ * wtf/FileSystem.cpp:
+ (WTF::FileSystemImpl::fileModificationTime):
+ * wtf/FileSystem.h:
+ * wtf/glib/FileSystemGlib.cpp:
+ (WTF::FileSystemImpl::fileCreationTime):
+ * wtf/posix/FileSystemPOSIX.cpp:
+ (WTF::FileSystemImpl::fileCreationTime):
+ * wtf/win/FileSystemWin.cpp:
+ (WTF::FileSystemImpl::fileCreationTimeFromFindData):
+ (WTF::FileSystemImpl::fileModificationTimeFromFindData):
+ (WTF::FileSystemImpl::fileCreationTime):
+
+2021-05-14 Chris Dumez <[email protected]>
+
Rename FileSystem::getVolumeFreeSpace() to FileSystem::volumeFreeSpace()
https://bugs.webkit.org/show_bug.cgi?id=225811
Modified: trunk/Source/WTF/wtf/FileSystem.cpp (277514 => 277515)
--- trunk/Source/WTF/wtf/FileSystem.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WTF/wtf/FileSystem.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -676,7 +676,7 @@
return !ec;
}
-Optional<WallTime> getFileModificationTime(const String& path)
+Optional<WallTime> fileModificationTime(const String& path)
{
std::error_code ec;
auto modificationTime = std::filesystem::last_write_time(toStdFileSystemPath(path), ec);
Modified: trunk/Source/WTF/wtf/FileSystem.h (277514 => 277515)
--- trunk/Source/WTF/wtf/FileSystem.h 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WTF/wtf/FileSystem.h 2021-05-14 23:12:12 UTC (rev 277515)
@@ -113,9 +113,9 @@
WTF_EXPORT_PRIVATE bool moveFile(const String& oldPath, const String& newPath);
WTF_EXPORT_PRIVATE Optional<uint64_t> fileSize(const String&);
WTF_EXPORT_PRIVATE Optional<uint64_t> fileSize(PlatformFileHandle);
-WTF_EXPORT_PRIVATE Optional<WallTime> getFileModificationTime(const String&);
+WTF_EXPORT_PRIVATE Optional<WallTime> fileModificationTime(const String&);
WTF_EXPORT_PRIVATE bool updateFileModificationTime(const String& path); // Sets modification time to now.
-WTF_EXPORT_PRIVATE Optional<WallTime> getFileCreationTime(const String&); // Not all platforms store file creation time.
+WTF_EXPORT_PRIVATE Optional<WallTime> fileCreationTime(const String&); // Not all platforms store file creation time.
WTF_EXPORT_PRIVATE Optional<FileMetadata> fileMetadata(const String& path);
WTF_EXPORT_PRIVATE Optional<FileMetadata> fileMetadataFollowingSymlinks(const String& path);
WTF_EXPORT_PRIVATE bool isDirectory(const String&);
Modified: trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp (277514 => 277515)
--- trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WTF/wtf/glib/FileSystemGlib.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -129,7 +129,7 @@
return g_file_info_get_size(info.get());
}
-Optional<WallTime> getFileCreationTime(const String&)
+Optional<WallTime> fileCreationTime(const String&)
{
// FIXME: Is there a way to retrieve file creation time with Gtk on platforms that support it?
return WTF::nullopt;
Modified: trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp (277514 => 277515)
--- trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WTF/wtf/posix/FileSystemPOSIX.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -165,7 +165,7 @@
return fileInfo.st_size;
}
-Optional<WallTime> getFileCreationTime(const String& path)
+Optional<WallTime> fileCreationTime(const String& path)
{
#if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD)
CString fsRep = fileSystemRepresentation(path);
Modified: trunk/Source/WTF/wtf/win/FileSystemWin.cpp (277514 => 277515)
--- trunk/Source/WTF/wtf/win/FileSystemWin.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WTF/wtf/win/FileSystemWin.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -83,7 +83,7 @@
return fileSize.QuadPart;
}
-static void getFileCreationTimeFromFindData(const WIN32_FIND_DATAW& findData, time_t& time)
+static void fileCreationTimeFromFindData(const WIN32_FIND_DATAW& findData, time_t& time)
{
ULARGE_INTEGER fileTime;
fileTime.HighPart = findData.ftCreationTime.dwHighDateTime;
@@ -94,7 +94,7 @@
}
-static void getFileModificationTimeFromFindData(const WIN32_FIND_DATAW& findData, time_t& time)
+static void fileModificationTimeFromFindData(const WIN32_FIND_DATAW& findData, time_t& time)
{
ULARGE_INTEGER fileTime;
fileTime.HighPart = findData.ftLastWriteTime.dwHighDateTime;
@@ -113,7 +113,7 @@
return getFileSizeFromByHandleFileInformationStructure(fileInformation);
}
-Optional<WallTime> getFileCreationTime(const String& path)
+Optional<WallTime> fileCreationTime(const String& path)
{
WIN32_FIND_DATAW findData;
if (!getFindData(path, findData))
@@ -120,7 +120,7 @@
return WTF::nullopt;
time_t time = 0;
- getFileCreationTimeFromFindData(findData, time);
+ fileCreationTimeFromFindData(findData, time);
return WallTime::fromRawSeconds(time);
}
Modified: trunk/Source/WebCore/ChangeLog (277514 => 277515)
--- trunk/Source/WebCore/ChangeLog 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/ChangeLog 2021-05-14 23:12:12 UTC (rev 277515)
@@ -1,3 +1,30 @@
+2021-05-14 Chris Dumez <[email protected]>
+
+ Drop "get" prefix from WTF::FileSystem's getFileModificationTime() / getFileCreationTime()
+ https://bugs.webkit.org/show_bug.cgi?id=225812
+
+ Reviewed by Darin Adler.
+
+ Update code base due to WTF API change.
+
+ * Modules/indexeddb/server/IDBServer.cpp:
+ (WebCore::IDBServer::removeAllDatabasesForFullOriginPath):
+ * Modules/webdatabase/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
+ * fileapi/File.cpp:
+ (WebCore::File::lastModified const):
+ * page/Page.cpp:
+ (WebCore::Page::userStyleSheet const):
+ * platform/FileStream.cpp:
+ (WebCore::FileStream::getSize):
+ * platform/network/FormData.cpp:
+ (WebCore::FormDataElement::EncodedFileData::fileModificationTimeMatchesExpectation const):
+ * platform/network/curl/CurlCacheEntry.cpp:
+ (WebCore::CurlCacheEntry::parseResponseHeaders):
+ * platform/sql/SQLiteFileSystem.cpp:
+ (WebCore::SQLiteFileSystem::databaseCreationTime):
+ (WebCore::SQLiteFileSystem::databaseModificationTime):
+
2021-05-14 Alan Bujtas <[email protected]>
[LFC] Add enclosing line top/bottom to showInlineTreeAndRuns
Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (277514 => 277515)
--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -632,7 +632,7 @@
auto databasePath = FileSystem::pathByAppendingComponent(originPath, databaseName);
String databaseFile = FileSystem::pathByAppendingComponent(databasePath, "IndexedDB.sqlite3");
if (modifiedSince > -WallTime::infinity() && FileSystem::fileExists(databaseFile)) {
- auto modificationTime = FileSystem::getFileModificationTime(databaseFile);
+ auto modificationTime = FileSystem::fileModificationTime(databaseFile);
if (!modificationTime)
continue;
Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp (277514 => 277515)
--- trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -791,7 +791,7 @@
// from the tracker database. We want to delete all of the information associated with this
// database from the tracker database, so still add its name to databaseNamesToDelete.
if (FileSystem::fileExists(fullPath)) {
- auto modificationTime = FileSystem::getFileModificationTime(fullPath);
+ auto modificationTime = FileSystem::fileModificationTime(fullPath);
if (!modificationTime)
continue;
Modified: trunk/Source/WebCore/fileapi/File.cpp (277514 => 277515)
--- trunk/Source/WebCore/fileapi/File.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/fileapi/File.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -110,7 +110,7 @@
// FIXME: This does sync-i/o on the main thread and also recalculates every time the method is called.
// The i/o should be performed on a background thread,
// and the result should be cached along with an asynchronous monitor for changes to the file.
- auto modificationTime = FileSystem::getFileModificationTime(m_path);
+ auto modificationTime = FileSystem::fileModificationTime(m_path);
if (modificationTime)
result = modificationTime->secondsSinceEpoch().millisecondsAs<int64_t>();
else
Modified: trunk/Source/WebCore/page/Page.cpp (277514 => 277515)
--- trunk/Source/WebCore/page/Page.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/page/Page.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -1856,7 +1856,7 @@
if (m_userStyleSheetPath.isEmpty())
return m_userStyleSheet;
- auto modificationTime = FileSystem::getFileModificationTime(m_userStyleSheetPath);
+ auto modificationTime = FileSystem::fileModificationTime(m_userStyleSheetPath);
if (!modificationTime) {
// The stylesheet either doesn't exist, was just deleted, or is
// otherwise unreadable. If we've read the stylesheet before, we should
Modified: trunk/Source/WebCore/platform/FileStream.cpp (277514 => 277515)
--- trunk/Source/WebCore/platform/FileStream.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/platform/FileStream.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -50,7 +50,7 @@
long long FileStream::getSize(const String& path, Optional<WallTime> expectedModificationTime)
{
// Check the modification time for the possible file change.
- auto modificationTime = FileSystem::getFileModificationTime(path);
+ auto modificationTime = FileSystem::fileModificationTime(path);
if (!modificationTime)
return -1;
if (expectedModificationTime) {
Modified: trunk/Source/WebCore/platform/network/FormData.cpp (277514 => 277515)
--- trunk/Source/WebCore/platform/network/FormData.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/platform/network/FormData.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -419,7 +419,7 @@
if (!expectedFileModificationTime)
return true;
- auto fileModificationTime = FileSystem::getFileModificationTime(filename);
+ auto fileModificationTime = FileSystem::fileModificationTime(filename);
if (!fileModificationTime)
return false;
Modified: trunk/Source/WebCore/platform/network/curl/CurlCacheEntry.cpp (277514 => 277515)
--- trunk/Source/WebCore/platform/network/curl/CurlCacheEntry.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/platform/network/curl/CurlCacheEntry.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -276,7 +276,7 @@
WallTime fileTime;
- if (auto fileTimeFromFile = FileSystem::getFileModificationTime(m_headerFilename))
+ if (auto fileTimeFromFile = FileSystem::fileModificationTime(m_headerFilename))
fileTime = fileTimeFromFile.value();
else
fileTime = WallTime::now(); // GMT
Modified: trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp (277514 => 277515)
--- trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -116,12 +116,12 @@
Optional<WallTime> SQLiteFileSystem::databaseCreationTime(const String& fileName)
{
- return FileSystem::getFileCreationTime(fileName);
+ return FileSystem::fileCreationTime(fileName);
}
Optional<WallTime> SQLiteFileSystem::databaseModificationTime(const String& fileName)
{
- return FileSystem::getFileModificationTime(fileName);
+ return FileSystem::fileModificationTime(fileName);
}
String SQLiteFileSystem::computeHashForFileName(const String& fileName)
Modified: trunk/Source/WebKit/ChangeLog (277514 => 277515)
--- trunk/Source/WebKit/ChangeLog 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebKit/ChangeLog 2021-05-14 23:12:12 UTC (rev 277515)
@@ -1,5 +1,21 @@
2021-05-14 Chris Dumez <[email protected]>
+ Drop "get" prefix from WTF::FileSystem's getFileModificationTime() / getFileCreationTime()
+ https://bugs.webkit.org/show_bug.cgi?id=225812
+
+ Reviewed by Darin Adler.
+
+ Update code base due to WTF API change.
+
+ * NetworkProcess/cache/NetworkCacheFileSystem.cpp:
+ (WebKit::NetworkCache::fileTimes):
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::removeMediaKeys):
+ * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
+ (WebKit::removeAllMediaKeyStorageForOriginPath):
+
+2021-05-14 Chris Dumez <[email protected]>
+
Rename FileSystem::getVolumeFreeSpace() to FileSystem::volumeFreeSpace()
https://bugs.webkit.org/show_bug.cgi?id=225811
Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp (277514 => 277515)
--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -82,8 +82,8 @@
return { WallTime::fromRawSeconds(g_ascii_strtoull(birthtimeString, nullptr, 10)),
WallTime::fromRawSeconds(g_file_info_get_attribute_uint64(fileInfo.get(), "time::modified")) };
#elif OS(WINDOWS)
- auto createTime = FileSystem::getFileCreationTime(path);
- auto modifyTime = FileSystem::getFileModificationTime(path);
+ auto createTime = FileSystem::fileCreationTime(path);
+ auto modifyTime = FileSystem::fileModificationTime(path);
return { createTime.valueOr(WallTime()), modifyTime.valueOr(WallTime()) };
#endif
}
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (277514 => 277515)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -1693,7 +1693,7 @@
auto mediaKeyDirectory = FileSystem::pathByAppendingComponent(mediaKeysStorageDirectory, directoryName);
auto mediaKeyFile = computeMediaKeyFile(mediaKeyDirectory);
- auto modificationTime = FileSystem::getFileModificationTime(mediaKeyFile);
+ auto modificationTime = FileSystem::fileModificationTime(mediaKeyFile);
if (!modificationTime)
continue;
Modified: trunk/Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp (277514 => 277515)
--- trunk/Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebKit/WebProcess/MediaCache/WebMediaKeyStorageManager.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -79,7 +79,7 @@
if (!FileSystem::fileExists(mediaKeyFile))
continue;
- auto modificationTime = FileSystem::getFileModificationTime(mediaKeyFile);
+ auto modificationTime = FileSystem::fileModificationTime(mediaKeyFile);
if (!modificationTime)
continue;
if (modificationTime.value() < startDate || modificationTime.value() > endDate)
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (277514 => 277515)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2021-05-14 23:12:12 UTC (rev 277515)
@@ -1,5 +1,17 @@
2021-05-14 Chris Dumez <[email protected]>
+ Drop "get" prefix from WTF::FileSystem's getFileModificationTime() / getFileCreationTime()
+ https://bugs.webkit.org/show_bug.cgi?id=225812
+
+ Reviewed by Darin Adler.
+
+ Update code base due to WTF API change.
+
+ * Plugins/PluginDatabase.cpp:
+ (WebCore::PluginDatabase::refresh):
+
+2021-05-14 Chris Dumez <[email protected]>
+
Drop unused FileSystem::homeDirectoryPath()
https://bugs.webkit.org/show_bug.cgi?id=225808
Modified: trunk/Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp (277514 => 277515)
--- trunk/Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Source/WebKitLegacy/win/Plugins/PluginDatabase.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -122,7 +122,7 @@
auto pathsEnd = paths.end();
for (auto it = paths.begin(); it != pathsEnd; ++it) {
- auto lastModifiedTime = FileSystem::getFileModificationTime(*it);
+ auto lastModifiedTime = FileSystem::fileModificationTime(*it);
if (!lastModifiedTime)
continue;
time_t lastModified = lastModifiedTime->secondsSinceEpoch().secondsAs<time_t>();
Modified: trunk/Tools/ChangeLog (277514 => 277515)
--- trunk/Tools/ChangeLog 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Tools/ChangeLog 2021-05-14 23:12:12 UTC (rev 277515)
@@ -1,5 +1,18 @@
2021-05-14 Chris Dumez <[email protected]>
+ Drop "get" prefix from WTF::FileSystem's getFileModificationTime() / getFileCreationTime()
+ https://bugs.webkit.org/show_bug.cgi?id=225812
+
+ Reviewed by Darin Adler.
+
+ Update code base due to WTF API change.
+
+ * TestWebKitAPI/Tests/WTF/FileSystem.cpp:
+ (TestWebKitAPI::runGetFileModificationTimeTest):
+ (TestWebKitAPI::TEST_F):
+
+2021-05-14 Chris Dumez <[email protected]>
+
Rename FileSystem::getVolumeFreeSpace() to FileSystem::volumeFreeSpace()
https://bugs.webkit.org/show_bug.cgi?id=225811
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp (277514 => 277515)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp 2021-05-14 23:08:03 UTC (rev 277514)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp 2021-05-14 23:12:12 UTC (rev 277515)
@@ -693,9 +693,9 @@
EXPECT_TRUE(!linkCount);
}
-static void runGetFileModificationTimeTest(const String& path, Function<Optional<WallTime>(const String&)>&& getFileModificationTime)
+static void runGetFileModificationTimeTest(const String& path, Function<Optional<WallTime>(const String&)>&& fileModificationTime)
{
- auto modificationTime = getFileModificationTime(path);
+ auto modificationTime = fileModificationTime(path);
EXPECT_TRUE(!!modificationTime);
if (!modificationTime)
return;
@@ -715,7 +715,7 @@
FileSystem::writeToFile(fileHandle, "foo", strlen("foo"));
FileSystem::closeFile(fileHandle);
- auto newModificationTime = getFileModificationTime(path);
+ auto newModificationTime = fileModificationTime(path);
EXPECT_TRUE(!!newModificationTime);
if (!newModificationTime)
return;
@@ -724,14 +724,14 @@
EXPECT_GT(newModificationTime->secondsSinceEpoch().value(), timeBeforeModification.secondsSinceEpoch().value());
}
-TEST_F(FileSystemTest, getFileModificationTime)
+TEST_F(FileSystemTest, fileModificationTime)
{
runGetFileModificationTimeTest(tempFilePath(), [](const String& path) {
- return FileSystem::getFileModificationTime(path);
+ return FileSystem::fileModificationTime(path);
});
}
-TEST_F(FileSystemTest, getFileModificationTimeViaFileMetadata)
+TEST_F(FileSystemTest, fileModificationTimeViaFileMetadata)
{
runGetFileModificationTimeTest(tempFilePath(), [](const String& path) -> Optional<WallTime> {
auto metadata = FileSystem::fileMetadata(path);
@@ -743,7 +743,7 @@
TEST_F(FileSystemTest, updateFileModificationTime)
{
- auto modificationTime = FileSystem::getFileModificationTime(tempFilePath());
+ auto modificationTime = FileSystem::fileModificationTime(tempFilePath());
ASSERT_TRUE(!!modificationTime);
unsigned timeout = 0;
@@ -754,7 +754,7 @@
TestWebKitAPI::Util::sleep(1);
EXPECT_TRUE(FileSystem::updateFileModificationTime(tempFilePath()));
- auto newModificationTime = FileSystem::getFileModificationTime(tempFilePath());
+ auto newModificationTime = FileSystem::fileModificationTime(tempFilePath());
ASSERT_TRUE(!!newModificationTime);
EXPECT_GT(newModificationTime->secondsSinceEpoch().value(), modificationTime->secondsSinceEpoch().value());