⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 121319 in webkit


Ignore:
Timestamp:
Jun 26, 2012, 9:22:47 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

DragData::asFilenames should not push same file names to result in Windows.
https://bugs.webkit.org/show_bug.cgi?id=79861

Patch by Xueqing Huang <huangxueqing@baidu.com> on 2012-06-26
Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: platform/win/fast/forms/file/drag-and-drop-files.html

  • platform/win/DragDataWin.cpp:

(WebCore::DragData::asFilenames):

LayoutTests:

  • platform/win/fast/forms/file/drag-and-drop-files-expected.txt: Added.
  • platform/win/fast/forms/file/drag-and-drop-files.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r121318 r121319  
     12012-06-26  Xueqing Huang  <huangxueqing@baidu.com>
     2
     3        DragData::asFilenames should not push same file names to result in Windows.
     4        https://bugs.webkit.org/show_bug.cgi?id=79861
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * platform/win/fast/forms/file/drag-and-drop-files-expected.txt: Added.
     9        * platform/win/fast/forms/file/drag-and-drop-files.html: Added.
     10
    1112012-06-26  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r121316 r121319  
     12012-06-26  Xueqing Huang  <huangxueqing@baidu.com>
     2
     3        DragData::asFilenames should not push same file names to result in Windows.
     4        https://bugs.webkit.org/show_bug.cgi?id=79861
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Test: platform/win/fast/forms/file/drag-and-drop-files.html
     9
     10        * platform/win/DragDataWin.cpp:
     11        (WebCore::DragData::asFilenames):
     12
    1132012-06-26  Geoffrey Garen  <ggaren@apple.com>
    214
  • trunk/Source/WebCore/platform/win/DragDataWin.cpp

    r118941 r121319  
    141141        if (FAILED(m_platformDragData->GetData(cfHDropFormat(), &medium)))
    142142            return;
    143         
    144         HDROP hdrop = (HDROP)GlobalLock(medium.hGlobal);
     143       
     144        HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(medium.hGlobal));
    145145       
    146146        if (!hdrop)
     
    149149        const unsigned numFiles = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0);
    150150        for (unsigned i = 0; i < numFiles; i++) {
    151             if (!DragQueryFileW(hdrop, 0, filename, WTF_ARRAY_LENGTH(filename)))
     151            if (!DragQueryFileW(hdrop, i, filename, WTF_ARRAY_LENGTH(filename)))
    152152                continue;
    153             result.append((UChar*)filename);
     153            result.append(static_cast<UChar*>(filename));
    154154        }
    155155
Note: See TracChangeset for help on using the changeset viewer.