WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-87852-20120530103947.patch (text/plain), 11.87 KB, created by
Mark Pilgrim (Google)
on 2012-05-30 07:40:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Mark Pilgrim (Google)
Created:
2012-05-30 07:40:25 PDT
Size:
11.87 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 118922) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,32 @@ >+2012-05-30 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Call fileUtilities methods directly >+ https://bugs.webkit.org/show_bug.cgi?id=87852 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Part of a refactoring series. See tracking bug 82948. >+ >+ * platform/chromium/DragDataChromium.cpp: >+ (WebCore::DragData::asURL): >+ * platform/chromium/FileSystemChromium.cpp: >+ (WebCore::deleteFile): >+ (WebCore::deleteEmptyDirectory): >+ (WebCore::getFileSize): >+ (WebCore::getFileModificationTime): >+ (WebCore::getFileMetadata): >+ (WebCore::directoryName): >+ (WebCore::pathByAppendingComponent): >+ (WebCore::makeAllDirectories): >+ (WebCore::openFile): >+ (WebCore::closeFile): >+ (WebCore::seekFile): >+ (WebCore::truncateFile): >+ (WebCore::readFromFile): >+ (WebCore::writeToFile): >+ * platform/chromium/PlatformSupport.h: >+ (PlatformSupport): >+ > 2012-05-30 Alexei Filippov <alexeif@chromium.org> > > Web Inspector: Add trace() method to the WorkerConsole >Index: Source/WebCore/platform/chromium/DragDataChromium.cpp >=================================================================== >--- Source/WebCore/platform/chromium/DragDataChromium.cpp (revision 118916) >+++ Source/WebCore/platform/chromium/DragDataChromium.cpp (working copy) >@@ -38,9 +38,11 @@ > #include "KURL.h" > #include "NotImplemented.h" > #include "PlatformString.h" >-#include "PlatformSupport.h" > #include "markup.h" > >+#include <public/Platform.h> >+#include <public/WebFileUtilities.h> >+ > namespace WebCore { > > static bool containsHTML(const ChromiumDataObject* dropData) >@@ -60,7 +62,7 @@ String DragData::asURL(Frame*, FilenameC > if (m_platformDragData->types().contains(mimeTypeTextURIList)) > m_platformDragData->urlAndTitle(url, title); > else if (filenamePolicy == ConvertFilenames && containsFiles()) { >- url = PlatformSupport::filePathToURL(PlatformSupport::getAbsolutePath(m_platformDragData->filenames()[0])); >+ url = static_cast<KURL>(WebKit::Platform::current()->fileUtilities()->filePathToURL(static_cast<String>(WebKit::Platform::current()->fileUtilities()->getAbsolutePath(m_platformDragData->filenames()[0])))); > } > return url; > } >Index: Source/WebCore/platform/chromium/FileSystemChromium.cpp >=================================================================== >--- Source/WebCore/platform/chromium/FileSystemChromium.cpp (revision 118916) >+++ Source/WebCore/platform/chromium/FileSystemChromium.cpp (working copy) >@@ -34,27 +34,27 @@ > #include "FileMetadata.h" > #include "NotImplemented.h" > #include "PlatformString.h" >-#include "PlatformSupport.h" > > #include <public/Platform.h> >+#include <public/WebFileInfo.h> > #include <public/WebFileUtilities.h> > > namespace WebCore { > > bool deleteFile(const String& path) > { >- return PlatformSupport::deleteFile(path); >+ return WebKit::Platform::current()->fileUtilities()->deleteFile(path); > } > > bool deleteEmptyDirectory(const String& path) > { >- return PlatformSupport::deleteEmptyDirectory(path); >+ return WebKit::Platform::current()->fileUtilities()->deleteEmptyDirectory(path); > } > > bool getFileSize(const String& path, long long& result) > { > FileMetadata metadata; >- if (!PlatformSupport::getFileMetadata(path, metadata)) >+ if (!getFileMetadata(path, metadata)) > return false; > result = metadata.length; > return true; >@@ -63,7 +63,7 @@ bool getFileSize(const String& path, lon > bool getFileModificationTime(const String& path, time_t& result) > { > FileMetadata metadata; >- if (!PlatformSupport::getFileMetadata(path, metadata)) >+ if (!getFileMetadata(path, metadata)) > return false; > result = metadata.modificationTime; > return true; >@@ -71,22 +71,28 @@ bool getFileModificationTime(const Strin > > bool getFileMetadata(const String& path, FileMetadata& metadata) > { >- return PlatformSupport::getFileMetadata(path, metadata); >+ WebKit::WebFileInfo webFileInfo; >+ if (!WebKit::Platform::current()->fileUtilities()->getFileInfo(path, webFileInfo)) >+ return false; >+ metadata.modificationTime = webFileInfo.modificationTime; >+ metadata.length = webFileInfo.length; >+ metadata.type = static_cast<FileMetadata::Type>(webFileInfo.type); >+ return true; > } > > String directoryName(const String& path) > { >- return PlatformSupport::directoryName(path); >+ return WebKit::Platform::current()->fileUtilities()->directoryName(path); > } > > String pathByAppendingComponent(const String& path, const String& component) > { >- return PlatformSupport::pathByAppendingComponent(path, component); >+ return WebKit::Platform::current()->fileUtilities()->pathByAppendingComponent(path, component); > } > > bool makeAllDirectories(const String& path) > { >- return PlatformSupport::makeAllDirectories(path); >+ return WebKit::Platform::current()->fileUtilities()->makeAllDirectories(path); > } > > bool fileExists(const String& path) >@@ -96,32 +102,32 @@ bool fileExists(const String& path) > > PlatformFileHandle openFile(const String& path, FileOpenMode mode) > { >- return PlatformSupport::openFile(path, mode); >+ return WebKit::Platform::current()->fileUtilities()->openFile(path, mode); > } > > void closeFile(PlatformFileHandle& handle) > { >- return PlatformSupport::closeFile(handle); >+ WebKit::Platform::current()->fileUtilities()->closeFile(handle); > } > > long long seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin) > { >- return PlatformSupport::seekFile(handle, offset, origin); >+ return WebKit::Platform::current()->fileUtilities()->seekFile(handle, offset, origin); > } > > bool truncateFile(PlatformFileHandle handle, long long offset) > { >- return PlatformSupport::truncateFile(handle, offset); >+ return WebKit::Platform::current()->fileUtilities()->truncateFile(handle, offset); > } > > int readFromFile(PlatformFileHandle handle, char* data, int length) > { >- return PlatformSupport::readFromFile(handle, data, length); >+ return WebKit::Platform::current()->fileUtilities()->readFromFile(handle, data, length); > } > > int writeToFile(PlatformFileHandle handle, const char* data, int length) > { >- return PlatformSupport::writeToFile(handle, data, length); >+ return WebKit::Platform::current()->fileUtilities()->writeToFile(handle, data, length); > } > > Vector<String> listDirectory(const String& path, const String& filter) >Index: Source/WebCore/platform/chromium/PlatformSupport.h >=================================================================== >--- Source/WebCore/platform/chromium/PlatformSupport.h (revision 118916) >+++ Source/WebCore/platform/chromium/PlatformSupport.h (working copy) >@@ -122,23 +122,6 @@ public: > static void deleteCookie(const Document*, const KURL&, const String& cookieName); > static bool cookiesEnabled(const Document*); > >- // File --------------------------------------------------------------- >- static bool deleteFile(const String&); >- static bool deleteEmptyDirectory(const String&); >- static bool getFileMetadata(const String&, FileMetadata& result); >- static String directoryName(const String& path); >- static String pathByAppendingComponent(const String& path, const String& component); >- static bool makeAllDirectories(const String& path); >- static String getAbsolutePath(const String&); >- static bool isDirectory(const String&); >- static KURL filePathToURL(const String&); >- static PlatformFileHandle openFile(const String& path, FileOpenMode); >- static void closeFile(PlatformFileHandle&); >- static long long seekFile(PlatformFileHandle, long long offset, FileSeekOrigin); >- static bool truncateFile(PlatformFileHandle, long long offset); >- static int readFromFile(PlatformFileHandle, char* data, int length); >- static int writeToFile(PlatformFileHandle, const char* data, int length); >- > #if ENABLE(FILE_SYSTEM) > static PassOwnPtr<AsyncFileSystem> createAsyncFileSystem(); > #endif >Index: Source/WebKit/chromium/ChangeLog >=================================================================== >--- Source/WebKit/chromium/ChangeLog (revision 118922) >+++ Source/WebKit/chromium/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2012-05-30 Mark Pilgrim <pilgrim@chromium.org> >+ >+ [Chromium] Call fileUtilities methods directly >+ https://bugs.webkit.org/show_bug.cgi?id=87852 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Part of a refactoring series. See tracking bug 82948. >+ >+ * src/PlatformSupport.cpp: >+ (WebCore): >+ > 2012-05-30 Jochen Eisinger <jochen@chromium.org> > > Match Firefox restrictions to window.blur and window.focus >Index: Source/WebKit/chromium/src/PlatformSupport.cpp >=================================================================== >--- Source/WebKit/chromium/src/PlatformSupport.cpp (revision 118916) >+++ Source/WebKit/chromium/src/PlatformSupport.cpp (working copy) >@@ -302,87 +302,6 @@ bool PlatformSupport::cookiesEnabled(con > > // File ------------------------------------------------------------------------ > >-bool PlatformSupport::deleteFile(const String& path) >-{ >- return WebKit::Platform::current()->fileUtilities()->deleteFile(path); >-} >- >-bool PlatformSupport::deleteEmptyDirectory(const String& path) >-{ >- return WebKit::Platform::current()->fileUtilities()->deleteEmptyDirectory(path); >-} >- >-bool PlatformSupport::getFileMetadata(const String& path, FileMetadata& result) >-{ >- WebFileInfo webFileInfo; >- if (!webKitPlatformSupport()->fileUtilities()->getFileInfo(path, webFileInfo)) >- return false; >- result.modificationTime = webFileInfo.modificationTime; >- result.length = webFileInfo.length; >- result.type = static_cast<FileMetadata::Type>(webFileInfo.type); >- return true; >-} >- >-String PlatformSupport::directoryName(const String& path) >-{ >- return WebKit::Platform::current()->fileUtilities()->directoryName(path); >-} >- >-String PlatformSupport::pathByAppendingComponent(const String& path, const String& component) >-{ >- return WebKit::Platform::current()->fileUtilities()->pathByAppendingComponent(path, component); >-} >- >-bool PlatformSupport::makeAllDirectories(const String& path) >-{ >- return WebKit::Platform::current()->fileUtilities()->makeAllDirectories(path); >-} >- >-String PlatformSupport::getAbsolutePath(const String& path) >-{ >- return WebKit::Platform::current()->fileUtilities()->getAbsolutePath(path); >-} >- >-bool PlatformSupport::isDirectory(const String& path) >-{ >- return WebKit::Platform::current()->fileUtilities()->isDirectory(path); >-} >- >-KURL PlatformSupport::filePathToURL(const String& path) >-{ >- return WebKit::Platform::current()->fileUtilities()->filePathToURL(path); >-} >- >-PlatformFileHandle PlatformSupport::openFile(const String& path, FileOpenMode mode) >-{ >- return WebKit::Platform::current()->fileUtilities()->openFile(path, mode); >-} >- >-void PlatformSupport::closeFile(PlatformFileHandle& handle) >-{ >- WebKit::Platform::current()->fileUtilities()->closeFile(handle); >-} >- >-long long PlatformSupport::seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin) >-{ >- return WebKit::Platform::current()->fileUtilities()->seekFile(handle, offset, origin); >-} >- >-bool PlatformSupport::truncateFile(PlatformFileHandle handle, long long offset) >-{ >- return WebKit::Platform::current()->fileUtilities()->truncateFile(handle, offset); >-} >- >-int PlatformSupport::readFromFile(PlatformFileHandle handle, char* data, int length) >-{ >- return WebKit::Platform::current()->fileUtilities()->readFromFile(handle, data, length); >-} >- >-int PlatformSupport::writeToFile(PlatformFileHandle handle, const char* data, int length) >-{ >- return WebKit::Platform::current()->fileUtilities()->writeToFile(handle, data, length); >-} >- > #if ENABLE(FILE_SYSTEM) > PassOwnPtr<AsyncFileSystem> PlatformSupport::createAsyncFileSystem() > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 87852
:
144812
|
144890
|
144904
|
144907