New issue
Advanced search Search tips

Issue 878690 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 3
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Can not get multiple filenames for dragging on Window and Mac

Project Member Reported by myid.shin@chromium.org, Aug 29

Issue description

Chrome Version: since 2012 (landed the patch at https://codereview.chromium.org/11444013)
OS: Windows only

What steps will reproduce the problem?
We can reproduce it simply with unit test if adding the below code at os_exchange_data_win_unittest.cc

'''
TEST(OSExchangeDataWinTest, Filenames) {
  OSExchangeData data;
  const std::vector<FileInfo> kTestFilenames = {
      {base::FilePath(FILE_PATH_LITERAL("/tmp/test_file1")),
       base::FilePath()},
      {base::FilePath(FILE_PATH_LITERAL("/tmp/test_file2")),
       base::FilePath()},
  };
  data.SetFilenames(kTestFilenames);

  OSExchangeData copy(data.provider().Clone());
  std::vector<FileInfo> dropped_filenames;

  EXPECT_TRUE(copy.GetFilenames(&dropped_filenames));
  EXPECT_EQ(kTestFilenames, dropped_filenames);
}
'''

I attached also the modified file.

Why?
For dragging multiple files, we should have one CF_HDROP having the multiple file paths.
(CF_HDROP clipboard format consists of DROPFILES structure, a series of file names including the terminating NULL character and the additional null character at the tail to terminate the array.
see https://docs.microsoft.com/ko-kr/windows/desktop/shell/clipboard#cf_hdrop)
But we have multiple CF_HDROPs having a file path.

What is the expected result?
PASS

What happens instead?
FAIL

 
Owner: myid.shin@chromium.org
Summary: Can not get the multiple filenames for dragging on Window (was: drag on Window)
Components: UI
Labels: OS-Windows
Summary: Can not get multiple filenames for dragging on Window (was: Can not get the multiple filenames for dragging on Window)

Comment 3 Deleted

Comment 4 Deleted

Comment 5 Deleted

Status: Started (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c1abe8266196f7d7c18fe0b7ff4aed1bb6d01a7

commit 2c1abe8266196f7d7c18fe0b7ff4aed1bb6d01a7
Author: Miyoung Shin <myid.shin@chromium.org>
Date: Tue Oct 02 08:33:10 2018

Fix multiple file paths issue for dragging

This CL reimplements to use one CF_HDROP clipboard format having
series of file path's strings instead of series of CF_HDROP having
a file path string to get multiple file paths correctly for
dragging.

BUG= 878690 

Change-Id: I167e93f6411f866cb143b910b1fc7d4896481ffc
Reviewed-on: https://chromium-review.googlesource.com/1195176
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595759}
[modify] https://crrev.com/2c1abe8266196f7d7c18fe0b7ff4aed1bb6d01a7/services/ws/drag_drop_delegate_unittest.cc
[modify] https://crrev.com/2c1abe8266196f7d7c18fe0b7ff4aed1bb6d01a7/ui/base/dragdrop/file_info.cc
[modify] https://crrev.com/2c1abe8266196f7d7c18fe0b7ff4aed1bb6d01a7/ui/base/dragdrop/file_info.h
[modify] https://crrev.com/2c1abe8266196f7d7c18fe0b7ff4aed1bb6d01a7/ui/base/dragdrop/os_exchange_data_provider_win.cc
[modify] https://crrev.com/2c1abe8266196f7d7c18fe0b7ff4aed1bb6d01a7/ui/base/dragdrop/os_exchange_data_win_unittest.cc

Summary: Can not get multiple filenames for dragging on Window and Mac (was: Can not get multiple filenames for dragging on Window)
Labels: OS-Mac
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1bcfd0dfa18248a7d05f9756458307348c3eea62

commit 1bcfd0dfa18248a7d05f9756458307348c3eea62
Author: Miyoung Shin <myid.shin@navercorp.com>
Date: Wed Oct 03 02:18:09 2018

Implement getter/setter of filenames in OSExchangeDataProviderMac

This CL supports to write/read the multiple file names for
dragging on Mac.

BUG= 878690 

Rename the email self in AUTHORS

Change-Id: I3bba2912ad5f89de7e8fb106c89c8f4eb6468935
Reviewed-on: https://chromium-review.googlesource.com/c/1256791
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596097}
[modify] https://crrev.com/1bcfd0dfa18248a7d05f9756458307348c3eea62/AUTHORS
[modify] https://crrev.com/1bcfd0dfa18248a7d05f9756458307348c3eea62/ui/base/dragdrop/os_exchange_data_provider_mac.mm
[modify] https://crrev.com/1bcfd0dfa18248a7d05f9756458307348c3eea62/ui/base/dragdrop/os_exchange_data_unittest.cc
[modify] https://crrev.com/1bcfd0dfa18248a7d05f9756458307348c3eea62/ui/base/dragdrop/os_exchange_data_win_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment