Changeset 201486 in webkit


Ignore:
Timestamp:
May 28, 2016 10:05:06 AM (8 years ago)
Author:
Konstantin Tokarev
Message:

FileSystem: use OS(WINDOWS) instead of PLATFORM(WIN).
https://bugs.webkit.org/show_bug.cgi?id=158168

Reviewed by Darin Adler.

No new tests needed.

  • platform/FileSystem.cpp:

(WebCore::lastComponentOfPathIgnoringTrailingSlash):
(WebCore::MappedFileData::~MappedFileData):
(WebCore::MappedFileData::MappedFileData):

  • platform/FileSystem.h: Removed unused PlatformFilePathSeparator

constant.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r201485 r201486  
     12016-05-28  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        FileSystem: use OS(WINDOWS) instead of PLATFORM(WIN).
     4        https://bugs.webkit.org/show_bug.cgi?id=158168
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests needed.
     9
     10        * platform/FileSystem.cpp:
     11        (WebCore::lastComponentOfPathIgnoringTrailingSlash):
     12        (WebCore::MappedFileData::~MappedFileData):
     13        (WebCore::MappedFileData::MappedFileData):
     14        * platform/FileSystem.h: Removed unused PlatformFilePathSeparator
     15        constant.
     16
    1172016-05-28  Konstantin Tokarev  <annulen@yandex.ru>
    218
  • trunk/Source/WebCore/platform/FileSystem.cpp

    r200212 r201486  
    3333#include <wtf/text/StringBuilder.h>
    3434
    35 #if !PLATFORM(WIN)
     35#if !OS(WINDOWS)
    3636#include <fcntl.h>
    3737#include <sys/mman.h>
     
    196196String lastComponentOfPathIgnoringTrailingSlash(const String& path)
    197197{
    198 #if PLATFORM(WIN)
    199     char pathSeperator = '\\';
     198#if OS(WINDOWS)
     199    char pathSeparator = '\\';
    200200#else
    201     char pathSeperator = '/';
    202 #endif
    203 
    204     auto position = path.reverseFind(pathSeperator);
     201    char pathSeparator = '/';
     202#endif
     203
     204    auto position = path.reverseFind(pathSeparator);
    205205    if (position == notFound)
    206206        return path;
     
    209209    if (position == endOfSubstring) {
    210210        --endOfSubstring;
    211         position = path.reverseFind(pathSeperator, endOfSubstring);
     211        position = path.reverseFind(pathSeparator, endOfSubstring);
    212212    }
    213213
     
    266266MappedFileData::~MappedFileData()
    267267{
    268 #if !PLATFORM(WIN)
     268#if !OS(WINDOWS)
    269269    if (!m_fileData)
    270270        return;
     
    275275MappedFileData::MappedFileData(const String& filePath, bool& success)
    276276{
    277 #if PLATFORM(WIN)
     277#if OS(WINDOWS)
    278278    // FIXME: Implement mapping
    279279    success = false;
  • trunk/Source/WebCore/platform/FileSystem.h

    r200163 r201486  
    129129};
    130130
    131 #if OS(WINDOWS)
    132 static const char PlatformFilePathSeparator = '\\';
    133 #else
    134 static const char PlatformFilePathSeparator = '/';
    135 #endif
    136 
    137131struct FileMetadata;
    138132
Note: See TracChangeset for help on using the changeset viewer.