Changeset 116186 in webkit


Ignore:
Timestamp:
May 4, 2012 3:59:34 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[chromium] Add plumbing for file display names for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=85673

Patch by Satoru Takabayashi <satorux@chromium.org> on 2012-05-04
Reviewed by Darin Fisher.

Source/WebCore:

No new tests: this change itself shouldn't change existing behavior.

  • platform/chromium/ChromiumDataObject.cpp:

(WebCore::ChromiumDataObject::addFilename):

  • platform/chromium/ChromiumDataObject.h:

(ChromiumDataObject):

Source/WebKit/chromium:

  • public/platform/WebDragData.h:
  • src/WebDragData.cpp:

(WebKit::WebDragData::items):
(WebKit::WebDragData::addItem):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116185 r116186  
     12012-05-04  Satoru Takabayashi  <satorux@chromium.org>
     2
     3        [chromium] Add plumbing for file display names for drag and drop
     4        https://bugs.webkit.org/show_bug.cgi?id=85673
     5
     6        Reviewed by Darin Fisher.
     7
     8        No new tests: this change itself shouldn't change existing behavior.
     9
     10        * platform/chromium/ChromiumDataObject.cpp:
     11        (WebCore::ChromiumDataObject::addFilename):
     12        * platform/chromium/ChromiumDataObject.h:
     13        (ChromiumDataObject):
     14
    1152012-05-04  Levi Weintraub  <leviw@chromium.org>
    216
  • trunk/Source/WebCore/platform/chromium/ChromiumDataObject.cpp

    r113297 r116186  
    203203}
    204204
    205 void ChromiumDataObject::addFilename(const String& filename)
    206 {
    207     internalAddFileItem(ChromiumDataObjectItem::createFromFile(File::create(filename)));
     205void ChromiumDataObject::addFilename(const String& filename, const String& displayName)
     206{
     207    internalAddFileItem(ChromiumDataObjectItem::createFromFile(File::createWithName(filename, displayName)));
    208208}
    209209
  • trunk/Source/WebCore/platform/chromium/ChromiumDataObject.h

    r113297 r116186  
    8282    bool containsFilenames() const;
    8383    Vector<String> filenames() const;
    84     void addFilename(const String&);
     84    void addFilename(const String& filename, const String& displayName);
    8585
    8686    // Used to handle files (images) being dragged out.
  • trunk/Source/WebKit/chromium/ChangeLog

    r116177 r116186  
     12012-05-04  Satoru Takabayashi  <satorux@chromium.org>
     2
     3        [chromium] Add plumbing for file display names for drag and drop
     4        https://bugs.webkit.org/show_bug.cgi?id=85673
     5
     6        Reviewed by Darin Fisher.
     7
     8        * public/platform/WebDragData.h:
     9        * src/WebDragData.cpp:
     10        (WebKit::WebDragData::items):
     11        (WebKit::WebDragData::addItem):
     12
    1132012-05-04  Adam Barth  <abarth@webkit.org>
    214
  • trunk/Source/WebKit/chromium/public/platform/WebDragData.h

    r112510 r116186  
    7171        // Only valid when storageType == StorageTypeFilename.
    7272        WebString filenameData;
     73        WebString displayNameData;
    7374
    7475        // Only valid when storageType == StorageTypeBinaryData.
  • trunk/Source/WebKit/chromium/src/WebDragData.cpp

    r113297 r116186  
    8989                    File* file = static_cast<File*>(blob.get());
    9090                    item.filenameData = file->path();
     91                    item.displayNameData = file->name();
    9192                } else
    9293                    ASSERT_NOT_REACHED();
     
    122123        return;
    123124    case Item::StorageTypeFilename:
    124         m_private->addFilename(item.filenameData);
     125        m_private->addFilename(item.filenameData, item.displayNameData);
    125126        return;
    126127    case Item::StorageTypeBinaryData:
Note: See TracChangeset for help on using the changeset viewer.