Changeset 217865 in webkit


Ignore:
Timestamp:
Jun 6, 2017 4:04:48 PM (7 years ago)
Author:
aestes@apple.com
Message:

REGRESSION (r199558): WKWebView upload file which name contains Chinese character results in garbled code
https://bugs.webkit.org/show_bug.cgi?id=172849
<rdar://problem/32567454>

Reviewed by Darin Adler.

Source/WebKit2:

This is the Mac equivalent of what was fixed in r208295. This time we use -[NSURL path] to
construct a WTF::String instead of calling String::fromUTF8() on -[NSURL fileSystemRepresentation].

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::runOpenPanel):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/RunOpenPanel.mm: Added.

(-[RunOpenPanelUIDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::TEST):

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r217863 r217865  
     12017-06-06  Andy Estes  <aestes@apple.com>
     2
     3        REGRESSION (r199558): WKWebView upload file which name contains Chinese character results in garbled code
     4        https://bugs.webkit.org/show_bug.cgi?id=172849
     5        <rdar://problem/32567454>
     6
     7        Reviewed by Darin Adler.
     8
     9        This is the Mac equivalent of what was fixed in r208295. This time we use -[NSURL path] to
     10        construct a WTF::String instead of calling String::fromUTF8() on -[NSURL fileSystemRepresentation].
     11
     12        * UIProcess/Cocoa/UIDelegate.mm:
     13        (WebKit::UIDelegate::UIClient::runOpenPanel):
     14
    1152017-06-06  Yoav Weiss  <yoav@yoav.ws>
    216
  • trunk/Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm

    r217571 r217865  
    396396        Vector<String> filenames;
    397397        for (NSURL *url in URLs)
    398             filenames.append(url.fileSystemRepresentation);
     398            filenames.append(url.path);
    399399
    400400        resultListener->chooseFiles(filenames);
  • trunk/Tools/ChangeLog

    r217863 r217865  
     12017-06-06  Andy Estes  <aestes@apple.com>
     2
     3        REGRESSION (r199558): WKWebView upload file which name contains Chinese character results in garbled code
     4        https://bugs.webkit.org/show_bug.cgi?id=172849
     5        <rdar://problem/32567454>
     6
     7        Reviewed by Darin Adler.
     8
     9        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     10        * TestWebKitAPI/Tests/WebKit2Cocoa/RunOpenPanel.mm: Added.
     11        (-[RunOpenPanelUIDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
     12        (TestWebKitAPI::TEST):
     13
    1142017-06-06  Yoav Weiss  <yoav@yoav.ws>
    215
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r217725 r217865  
    530530                A17991881E1C994E00A505ED /* SharedBuffer.mm in Sources */ = {isa = PBXBuildFile; fileRef = A17991861E1C994E00A505ED /* SharedBuffer.mm */; };
    531531                A179918B1E1CA24100A505ED /* SharedBufferTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17991891E1CA24100A505ED /* SharedBufferTest.cpp */; };
     532                A180C0FA1EE67DF000468F47 /* RunOpenPanel.mm in Sources */ = {isa = PBXBuildFile; fileRef = A180C0F91EE67DF000468F47 /* RunOpenPanel.mm */; };
    532533                A1C4FB731BACD1CA003742D0 /* pages.pages in Copy Resources */ = {isa = PBXBuildFile; fileRef = A1C4FB721BACD1B7003742D0 /* pages.pages */; };
    533534                A1DF74321C41B65800A2F4D0 /* AlwaysRevalidatedURLSchemes.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1DF74301C41B65800A2F4D0 /* AlwaysRevalidatedURLSchemes.mm */; };
     
    13641365                A17991891E1CA24100A505ED /* SharedBufferTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SharedBufferTest.cpp; sourceTree = "<group>"; };
    13651366                A179918A1E1CA24100A505ED /* SharedBufferTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedBufferTest.h; sourceTree = "<group>"; };
     1367                A180C0F91EE67DF000468F47 /* RunOpenPanel.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RunOpenPanel.mm; sourceTree = "<group>"; };
    13661368                A18AA8CC1C3FA218009B2B97 /* ContentFiltering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentFiltering.h; sourceTree = "<group>"; };
    13671369                A1A4FE5D18DD3DB700B5EA8A /* Download.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Download.mm; sourceTree = "<group>"; };
     
    17841786                                A12DDC011E8374F500CF6CAE /* RenderedImageWithOptionsProtocol.h */,
    17851787                                CD9E292B1C90A71F000BB800 /* RequiresUserActionForPlayback.mm */,
     1788                                A180C0F91EE67DF000468F47 /* RunOpenPanel.mm */,
    17861789                                37BCA61B1B596BA9002012CA /* ShouldOpenExternalURLsInNewWindowActions.mm */,
    17871790                                2D9A53AE1B31FA8D0074D5AA /* ShrinkToFit.mm */,
     
    30883091                                7CCE7EDD1A411A9200447C4C /* TimeRanges.cpp in Sources */,
    30893092                                0F4FFA9E1ED3AA8500F7111F /* SnapshotViaRenderInContext.mm in Sources */,
     3093                                A180C0FA1EE67DF000468F47 /* RunOpenPanel.mm in Sources */,
    30903094                                7CCE7ED31A411A7E00447C4C /* TypingStyleCrash.mm in Sources */,
    30913095                                7CCE7EDE1A411A9200447C4C /* URL.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.