Changeset 230554 in webkit


Ignore:
Timestamp:
Apr 11, 2018 8:55:51 PM (6 years ago)
Author:
Chris Dumez
Message:

input.webkitEntries does not work as expected when folder contains accented chars
https://bugs.webkit.org/show_bug.cgi?id=184517
<rdar://problem/39265537>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Use String::fromUTF8() to construct a WTF String from the char* returned by
dirname() in FileSystem::directoryName(). Previously, we were just calling
the String constructor, which would treat the input as latin 1 instead of
UTF-8.

Test: fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html

  • platform/posix/FileSystemPOSIX.cpp:

(WebCore::FileSystem::directoryName):

LayoutTests:

Add layout test coverage.

  • fast/forms/file/entries-api/webkitEntries-nonascii-folder-name-expected.txt: Added.
  • fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r230548 r230554  
     12018-04-11  Chris Dumez  <cdumez@apple.com>
     2
     3        input.webkitEntries does not work as expected when folder contains accented chars
     4        https://bugs.webkit.org/show_bug.cgi?id=184517
     5        <rdar://problem/39265537>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        Add layout test coverage.
     10
     11        * fast/forms/file/entries-api/webkitEntries-nonascii-folder-name-expected.txt: Added.
     12        * fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html: Added.
     13
    1142018-04-11  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r230548 r230554  
     12018-04-11  Chris Dumez  <cdumez@apple.com>
     2
     3        input.webkitEntries does not work as expected when folder contains accented chars
     4        https://bugs.webkit.org/show_bug.cgi?id=184517
     5        <rdar://problem/39265537>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        Use String::fromUTF8() to construct a WTF String from the char* returned by
     10        dirname() in FileSystem::directoryName(). Previously, we were just calling
     11        the String constructor, which would treat the input as latin 1 instead of
     12        UTF-8.
     13
     14        Test: fast/forms/file/entries-api/webkitEntries-nonascii-folder-name.html
     15
     16        * platform/posix/FileSystemPOSIX.cpp:
     17        (WebCore::FileSystem::directoryName):
     18
    1192018-04-11  Youenn Fablet  <youenn@apple.com>
    220
  • trunk/Source/WebCore/platform/posix/FileSystemPOSIX.cpp

    r224635 r230554  
    352352        return String();
    353353
    354     return dirname(fsRep.mutableData());
     354    return String::fromUTF8(dirname(fsRep.mutableData()));
    355355}
    356356
Note: See TracChangeset for help on using the changeset viewer.