Changeset 76824 in webkit
- Timestamp:
- Jan 27, 2011 11:51:14 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76822 r76824 1 2011-01-26 Enrica Casucci <enrica@apple.com> 2 3 Reviewed by Darin Adler and Adam Roben. 4 5 WebKit2: add support for drag and drop on Windows 6 https://bugs.webkit.org/show_bug.cgi?id=52775 7 <rdar://problem/8514409> 8 9 On Windows the access to the content being dragged is 10 provided via the IDataObject interface that is made available 11 to the window that registers itself as drop target. 12 Since this interface cannot be accessed from the WebProcess, 13 in every call to one of the methods of the IDropTarget interface 14 we serialize the content of the drag clipboard and send it over to 15 the WebProcess. 16 The bulk of this patch consists in the refactoring needed in DragData 17 and ClipboardWin classes to extract the data from the serialized object. 18 19 * platform/DragData.cpp: 20 * platform/DragData.h: 21 * platform/win/ClipboardUtilitiesWin.cpp: 22 (WebCore::getWebLocData): 23 (WebCore::getURL): 24 (WebCore::getPlainText): 25 (WebCore::getTextHTML): 26 (WebCore::getCFHTML): 27 (WebCore::fragmentFromFilenames): 28 (WebCore::containsFilenames): 29 (WebCore::fragmentFromHTML): 30 (WebCore::containsHTML): 31 (WebCore::getClipboardData): 32 * platform/win/ClipboardUtilitiesWin.h: 33 * platform/win/ClipboardWin.cpp: 34 (WebCore::Clipboard::create): 35 (WebCore::ClipboardWin::ClipboardWin): 36 (WebCore::ClipboardWin::getData): 37 (WebCore::ClipboardWin::types): 38 (WebCore::ClipboardWin::files): 39 (WebCore::ClipboardWin::hasData): 40 * platform/win/ClipboardWin.h: 41 (WebCore::ClipboardWin::create): 42 * platform/win/DragDataWin.cpp: 43 (WebCore::DragData::DragData): 44 (WebCore::DragData::containsURL): 45 (WebCore::DragData::dragDataMap): 46 (WebCore::DragData::asURL): 47 (WebCore::DragData::containsFiles): 48 (WebCore::DragData::asFilenames): 49 (WebCore::DragData::containsPlainText): 50 (WebCore::DragData::asPlainText): 51 (WebCore::DragData::canSmartReplace): 52 (WebCore::DragData::containsCompatibleContent): 53 (WebCore::DragData::asFragment): 54 1 55 2011-01-27 Mario Sanchez Prada <msanchez@igalia.com> 2 56 -
trunk/Source/WebCore/platform/DragData.h
r75743 r76824 32 32 33 33 #include <wtf/Forward.h> 34 #include <wtf/HashMap.h> 34 35 #include <wtf/Vector.h> 35 36 … … 52 53 #elif PLATFORM(WIN) 53 54 typedef struct IDataObject* DragDataRef; 55 #include <wtf/text/WTFString.h> 54 56 #elif PLATFORM(WX) 55 57 typedef class wxDataObject* DragDataRef; … … 83 85 DragApplicationIsCopyKeyDown = 8 84 86 }; 85 87 88 #if PLATFORM(WIN) 89 typedef HashMap<UINT, Vector<String> > DragDataMap; 90 #endif 91 86 92 class DragData { 87 93 public: … … 91 97 DragData(DragDataRef, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone); 92 98 DragData(const String& dragStorageName, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone); 93 99 #if PLATFORM(WIN) 100 DragData(const DragDataMap&, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation sourceOperationMask, DragApplicationFlags = DragApplicationNone); 101 const DragDataMap& dragDataMap(); 102 #endif 94 103 const IntPoint& clientPosition() const { return m_clientPosition; } 95 104 const IntPoint& globalPosition() const { return m_globalPosition; } … … 118 127 RetainPtr<NSPasteboard> m_pasteboard; 119 128 #endif 129 #if PLATFORM(WIN) 130 DragDataMap m_dragDataMap; 131 #endif 120 132 }; 121 133 -
trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
r71401 r76824 71 71 #endif 72 72 73 static bool getDataMapItem(const DragDataMap* dataObject, FORMATETC* format, String& item) 74 { 75 DragDataMap::const_iterator found = dataObject->find(format->cfFormat); 76 if (found == dataObject->end()) 77 return false; 78 item = found->second[0]; 79 return true; 80 } 81 73 82 static bool getWebLocData(IDataObject* dataObject, String& url, String* title) 74 83 { … … 110 119 #endif 111 120 return succeeded; 121 } 122 123 static bool getWebLocData(const DragDataMap* dataObject, String& url, String* title) 124 { 125 #if PLATFORM(CF) 126 WCHAR filename[MAX_PATH]; 127 WCHAR urlBuffer[INTERNET_MAX_URL_LENGTH]; 128 129 if (!dataObject->contains(cfHDropFormat()->cfFormat)) 130 return false; 131 132 wcscpy(filename, dataObject->get(cfHDropFormat()->cfFormat)[0].characters()); 133 if (_wcsicmp(PathFindExtensionW(filename), L".url")) 134 return false; 135 136 if (!GetPrivateProfileStringW(L"InternetShortcut", L"url", 0, urlBuffer, WTF_ARRAY_LENGTH(urlBuffer), filename)) 137 return false; 138 139 if (title) { 140 PathRemoveExtension(filename); 141 *title = filename; 142 } 143 144 url = urlBuffer; 145 return true; 146 #else 147 return false; 148 #endif 112 149 } 113 150 … … 387 424 } 388 425 426 String getURL(const DragDataMap* data, DragData::FilenameConversionPolicy filenamePolicy, String* title) 427 { 428 String url; 429 430 if (getWebLocData(data, url, title)) 431 return url; 432 if (getDataMapItem(data, urlWFormat(), url)) 433 return extractURL(url, title); 434 if (getDataMapItem(data, urlFormat(), url)) 435 return extractURL(url, title); 436 #if PLATFORM(CF) 437 if (filenamePolicy != DragData::ConvertFilenames) 438 return url; 439 440 String stringData; 441 if (!getDataMapItem(data, filenameWFormat(), stringData)) 442 getDataMapItem(data, filenameFormat(), stringData); 443 444 if (stringData.isEmpty() || (!PathFileExists(stringData.charactersWithNullTermination()) && !PathIsUNC(stringData.charactersWithNullTermination()))) 445 return url; 446 RetainPtr<CFStringRef> pathAsCFString(AdoptCF, CFStringCreateWithCharacters(kCFAllocatorDefault, (const UniChar *)stringData.charactersWithNullTermination(), stringData.length())); 447 if (urlFromPath(pathAsCFString.get(), url) && title) 448 *title = url; 449 #endif 450 return url; 451 } 452 389 453 String getPlainText(IDataObject* dataObject, bool& success) 390 454 { … … 416 480 } 417 481 482 String getPlainText(const DragDataMap* data) 483 { 484 String text; 485 486 if (getDataMapItem(data, plainTextWFormat(), text)) 487 return text; 488 if (getDataMapItem(data, plainTextFormat(), text)) 489 return text; 490 return getURL(data, DragData::DoNotConvertFilenames); 491 } 492 418 493 String getTextHTML(IDataObject* data, bool& success) 419 494 { … … 431 506 } 432 507 508 String getTextHTML(const DragDataMap* data) 509 { 510 String text; 511 getDataMapItem(data, texthtmlFormat(), text); 512 return text; 513 } 514 433 515 String getCFHTML(IDataObject* data, bool& success) 434 516 { … … 439 521 } 440 522 523 String getCFHTML(const DragDataMap* dataMap) 524 { 525 String cfhtml; 526 getDataMapItem(dataMap, htmlFormat(), cfhtml); 527 return extractMarkupFromCFHTML(cfhtml); 528 } 529 441 530 PassRefPtr<DocumentFragment> fragmentFromFilenames(Document*, const IDataObject*) 442 531 { … … 445 534 } 446 535 536 PassRefPtr<DocumentFragment> fragmentFromFilenames(Document*, const DragDataMap*) 537 { 538 // FIXME: We should be able to create fragments from files 539 return 0; 540 } 541 447 542 bool containsFilenames(const IDataObject*) 543 { 544 // FIXME: We'll want to update this once we can produce fragments from files 545 return false; 546 } 547 548 bool containsFilenames(const DragDataMap*) 448 549 { 449 550 // FIXME: We'll want to update this once we can produce fragments from files … … 478 579 String cfhtml = getFullCFHTML(data, success); 479 580 if (success) { 480 if ( PassRefPtr<DocumentFragment> fragment = fragmentFromCFHTML(doc, cfhtml))481 return fragment ;581 if (RefPtr<DocumentFragment> fragment = fragmentFromCFHTML(doc, cfhtml)) 582 return fragment.release(); 482 583 } 483 584 … … 490 591 } 491 592 593 PassRefPtr<DocumentFragment> fragmentFromHTML(Document* document, const DragDataMap* data) 594 { 595 if (!document || !data || data->isEmpty()) 596 return 0; 597 598 String stringData; 599 if (getDataMapItem(data, htmlFormat(), stringData)) { 600 if (RefPtr<DocumentFragment> fragment = fragmentFromCFHTML(document, stringData)) 601 return fragment.release(); 602 } 603 604 String srcURL; 605 if (getDataMapItem(data, texthtmlFormat(), stringData)) 606 return createFragmentFromMarkup(document, stringData, srcURL, FragmentScriptingNotAllowed); 607 608 return 0; 609 } 610 492 611 bool containsHTML(IDataObject* data) 493 612 { … … 495 614 } 496 615 616 bool containsHTML(const DragDataMap* data) 617 { 618 return data->contains(texthtmlFormat()->cfFormat) || data->contains(htmlFormat()->cfFormat); 619 } 620 621 typedef void (*GetStringFunction)(IDataObject*, FORMATETC*, Vector<String>&); 622 typedef HashMap<UINT, GetStringFunction> ClipboardFormatMap; 623 624 template<typename T> void getStringData(IDataObject* data, FORMATETC* format, Vector<String>& dataStrings) 625 { 626 STGMEDIUM store; 627 if (FAILED(data->GetData(format, &store))) 628 return; 629 dataStrings.append(String(static_cast<T*>(GlobalLock(store.hGlobal)), ::GlobalSize(store.hGlobal) / sizeof(T))); 630 GlobalUnlock(store.hGlobal); 631 ReleaseStgMedium(&store); 632 } 633 634 void getUtf8Data(IDataObject* data, FORMATETC* format, Vector<String>& dataStrings) 635 { 636 STGMEDIUM store; 637 if (FAILED(data->GetData(format, &store))) 638 return; 639 dataStrings.append(String(UTF8Encoding().decode(static_cast<char*>(GlobalLock(store.hGlobal)), GlobalSize(store.hGlobal)))); 640 GlobalUnlock(store.hGlobal); 641 ReleaseStgMedium(&store); 642 } 643 644 #if PLATFORM(CF) 645 void getCfData(IDataObject* data, FORMATETC* format, Vector<String>& dataStrings) 646 { 647 STGMEDIUM store; 648 if (FAILED(data->GetData(format, &store))) 649 return; 650 651 HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(store.hGlobal)); 652 if (!hdrop) 653 return; 654 655 WCHAR filename[MAX_PATH]; 656 UINT fileCount = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0); 657 for (UINT i = 0; i < fileCount; i++) { 658 if (!DragQueryFileW(hdrop, i, filename, WTF_ARRAY_LENGTH(filename))) 659 continue; 660 dataStrings.append(static_cast<UChar*>(filename)); 661 } 662 663 GlobalUnlock(store.hGlobal); 664 ReleaseStgMedium(&store); 665 } 666 #endif 667 668 void getClipboardData(IDataObject *dataObject, FORMATETC* format, Vector<String>& dataStrings) 669 { 670 static ClipboardFormatMap formatMap; 671 if (formatMap.isEmpty()) { 672 formatMap.add(htmlFormat()->cfFormat, getUtf8Data); 673 formatMap.add(texthtmlFormat()->cfFormat, getStringData<UChar>); 674 formatMap.add(plainTextFormat()->cfFormat, getStringData<char>); 675 formatMap.add(plainTextWFormat()->cfFormat, getStringData<UChar>); 676 #if PLATFORM(CF) 677 formatMap.add(cfHDropFormat()->cfFormat, getCfData); 678 #endif 679 formatMap.add(filenameFormat()->cfFormat, getStringData<char>); 680 formatMap.add(filenameWFormat()->cfFormat, getStringData<UChar>); 681 formatMap.add(urlFormat()->cfFormat, getStringData<char>); 682 formatMap.add(urlWFormat()->cfFormat, getStringData<UChar>); 683 } 684 ClipboardFormatMap::iterator found = formatMap.find(format->cfFormat); 685 if (found == formatMap.end()) 686 return; 687 found->second(dataObject, format, dataStrings); 688 } 689 497 690 } // namespace WebCore -
trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.h
r65021 r76824 56 56 57 57 bool containsFilenames(const IDataObject*); 58 bool containsFilenames(const DragDataMap*); 58 59 bool containsHTML(IDataObject*); 60 bool containsHTML(const DragDataMap*); 59 61 60 62 PassRefPtr<DocumentFragment> fragmentFromFilenames(Document*, const IDataObject*); 63 PassRefPtr<DocumentFragment> fragmentFromFilenames(Document*, const DragDataMap*); 61 64 PassRefPtr<DocumentFragment> fragmentFromHTML(Document*, IDataObject*); 65 PassRefPtr<DocumentFragment> fragmentFromHTML(Document*, const DragDataMap*); 62 66 PassRefPtr<DocumentFragment> fragmentFromCFHTML(Document*, const String& cfhtml); 63 67 64 68 String getURL(IDataObject*, DragData::FilenameConversionPolicy, bool& success, String* title = 0); 69 String getURL(const DragDataMap*, DragData::FilenameConversionPolicy, String* title = 0); 65 70 String getPlainText(IDataObject*, bool& success); 71 String getPlainText(const DragDataMap*); 66 72 String getTextHTML(IDataObject*, bool& success); 73 String getTextHTML(const DragDataMap*); 67 74 String getCFHTML(IDataObject*, bool& success); 75 String getCFHTML(const DragDataMap*); 76 77 void getClipboardData(IDataObject*, FORMATETC* fetc, Vector<String>& dataStrings); 68 78 69 79 } // namespace WebCore -
trunk/Source/WebCore/platform/win/ClipboardWin.cpp
r71401 r76824 341 341 PassRefPtr<Clipboard> Clipboard::create(ClipboardAccessPolicy policy, DragData* dragData, Frame* frame) 342 342 { 343 return ClipboardWin::create(DragAndDrop, dragData->platformData(), policy, frame); 343 if (dragData->platformData()) 344 return ClipboardWin::create(DragAndDrop, dragData->platformData(), policy, frame); 345 return ClipboardWin::create(DragAndDrop, dragData->dragDataMap(), policy, frame); 344 346 } 345 347 … … 357 359 , m_writableDataObject(dataObject) 358 360 , m_frame(frame) 361 { 362 } 363 364 ClipboardWin::ClipboardWin(ClipboardType clipboardType, const DragDataMap& dataMap, ClipboardAccessPolicy policy, Frame* frame) 365 : Clipboard(policy, clipboardType) 366 , m_dataObject(0) 367 , m_writableDataObject(0) 368 , m_frame(frame) 369 , m_dragDataMap(dataMap) 359 370 { 360 371 } … … 443 454 { 444 455 success = false; 445 if (policy() != ClipboardReadable || !m_dataObject )456 if (policy() != ClipboardReadable || !m_dataObject || m_dragDataMap.isEmpty()) 446 457 return ""; 447 458 448 459 ClipboardDataType dataType = clipboardTypeFromMIMEType(type); 449 460 if (dataType == ClipboardDataTypeText) 450 return getPlainText(m_dataObject.get(), success);461 return m_dataObject ? getPlainText(m_dataObject.get(), success) : getPlainText(&m_dragDataMap); 451 462 if (dataType == ClipboardDataTypeURL) 452 return getURL(m_dataObject.get(), DragData::DoNotConvertFilenames, success);463 return m_dataObject ? getURL(m_dataObject.get(), DragData::DoNotConvertFilenames, success) : getURL(&m_dragDataMap, DragData::DoNotConvertFilenames); 453 464 else if (dataType == ClipboardDataTypeTextHTML) { 454 String data = getTextHTML(m_dataObject.get(), success);465 String data = m_dataObject ? getTextHTML(m_dataObject.get(), success) : getTextHTML(&m_dragDataMap); 455 466 if (success) 456 467 return data; 457 return getCFHTML(m_dataObject.get(), success);468 return m_dataObject ? getCFHTML(m_dataObject.get(), success) : getCFHTML(&m_dragDataMap); 458 469 } 459 470 … … 511 522 return results; 512 523 513 if (!m_dataObject )524 if (!m_dataObject || m_dragDataMap.isEmpty()) 514 525 return results; 515 526 516 COMPtr<IEnumFORMATETC> itr; 517 518 if (FAILED(m_dataObject->EnumFormatEtc(DATADIR_GET, &itr))) 519 return results; 520 521 if (!itr) 522 return results; 523 524 FORMATETC data; 525 526 // IEnumFORMATETC::Next returns S_FALSE if there are no more items. 527 while (itr->Next(1, &data, 0) == S_OK) 528 addMimeTypesForFormat(results, data); 527 if (m_dataObject) { 528 COMPtr<IEnumFORMATETC> itr; 529 530 if (FAILED(m_dataObject->EnumFormatEtc(DATADIR_GET, &itr))) 531 return results; 532 533 if (!itr) 534 return results; 535 536 FORMATETC data; 537 538 // IEnumFORMATETC::Next returns S_FALSE if there are no more items. 539 while (itr->Next(1, &data, 0) == S_OK) 540 addMimeTypesForFormat(results, data); 541 } else { 542 for (DragDataMap::const_iterator it = m_dragDataMap.begin(); it != m_dragDataMap.end(); ++it) { 543 FORMATETC data; 544 data.cfFormat = (*it).first; 545 addMimeTypesForFormat(results, data); 546 } 547 } 529 548 530 549 return results; … … 541 560 return files.release(); 542 561 543 if (!m_dataObject )562 if (!m_dataObject || m_dragDataMap.isEmpty()) 544 563 return files.release(); 545 564 546 STGMEDIUM medium; 547 if (FAILED(m_dataObject->GetData(cfHDropFormat(), &medium))) 565 if (m_dataObject) { 566 STGMEDIUM medium; 567 if (FAILED(m_dataObject->GetData(cfHDropFormat(), &medium))) 568 return files.release(); 569 570 HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(medium.hGlobal)); 571 if (!hdrop) 572 return files.release(); 573 574 WCHAR filename[MAX_PATH]; 575 UINT fileCount = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0); 576 for (UINT i = 0; i < fileCount; i++) { 577 if (!DragQueryFileW(hdrop, i, filename, WTF_ARRAY_LENGTH(filename))) 578 continue; 579 files->append(File::create(reinterpret_cast<UChar*>(filename))); 580 } 581 582 GlobalUnlock(medium.hGlobal); 583 ReleaseStgMedium(&medium); 548 584 return files.release(); 549 550 HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(medium.hGlobal)); 551 if (!hdrop) 585 } 586 if (!m_dragDataMap.contains(cfHDropFormat()->cfFormat)) 552 587 return files.release(); 553 554 WCHAR filename[MAX_PATH]; 555 UINT fileCount = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0); 556 for (UINT i = 0; i < fileCount; i++) { 557 if (!DragQueryFileW(hdrop, i, filename, WTF_ARRAY_LENGTH(filename))) 558 continue; 559 files->append(File::create(reinterpret_cast<UChar*>(filename))); 560 } 561 562 GlobalUnlock(medium.hGlobal); 563 ReleaseStgMedium(&medium); 588 Vector<String> filesVector = m_dragDataMap.get(cfHDropFormat()->cfFormat); 589 for (Vector<String>::iterator it = filesVector.begin(); it != filesVector.end(); ++it) 590 files->append(File::create((*it).characters())); 564 591 return files.release(); 565 592 #endif … … 779 806 bool ClipboardWin::hasData() 780 807 { 781 if (!m_dataObject )808 if (!m_dataObject && m_dragDataMap.isEmpty()) 782 809 return false; 783 810 784 COMPtr<IEnumFORMATETC> itr; 785 if (FAILED(m_dataObject->EnumFormatEtc(DATADIR_GET, &itr))) 811 if (m_dataObject) { 812 COMPtr<IEnumFORMATETC> itr; 813 if (FAILED(m_dataObject->EnumFormatEtc(DATADIR_GET, &itr))) 814 return false; 815 816 if (!itr) 817 return false; 818 819 FORMATETC data; 820 821 // IEnumFORMATETC::Next returns S_FALSE if there are no more items. 822 if (itr->Next(1, &data, 0) == S_OK) { 823 // There is at least one item in the IDataObject 824 return true; 825 } 826 786 827 return false; 787 788 if (!itr) 789 return false; 790 791 FORMATETC data; 792 793 // IEnumFORMATETC::Next returns S_FALSE if there are no more items. 794 if (itr->Next(1, &data, 0) == S_OK) { 795 // There is at least one item in the IDataObject 796 return true; 797 } 798 799 return false; 828 } 829 return !m_dragDataMap.isEmpty(); 800 830 } 801 831 -
trunk/Source/WebCore/platform/win/ClipboardWin.h
r76248 r76824 30 30 #include "CachedResourceClient.h" 31 31 #include "Clipboard.h" 32 #include "DragData.h" 32 33 33 34 struct IDataObject; … … 51 52 { 52 53 return adoptRef(new ClipboardWin(clipboardType, dataObject, policy, frame)); 54 } 55 static PassRefPtr<ClipboardWin> create(ClipboardType clipboardType, const DragDataMap& dataMap, ClipboardAccessPolicy policy, Frame* frame) 56 { 57 return adoptRef(new ClipboardWin(clipboardType, dataMap, policy, frame)); 53 58 } 54 59 ~ClipboardWin(); … … 81 86 ClipboardWin(ClipboardType, IDataObject*, ClipboardAccessPolicy, Frame*); 82 87 ClipboardWin(ClipboardType, WCDataObject*, ClipboardAccessPolicy, Frame*); 88 ClipboardWin(ClipboardType, const DragDataMap&, ClipboardAccessPolicy, Frame*); 83 89 84 90 void resetFromClipboard(); … … 87 93 COMPtr<IDataObject> m_dataObject; 88 94 COMPtr<WCDataObject> m_writableDataObject; 95 DragDataMap m_dragDataMap; 89 96 Frame* m_frame; 90 97 }; -
trunk/Source/WebCore/platform/win/DragDataWin.cpp
r75523 r76824 27 27 #include "DragData.h" 28 28 29 #include "COMPtr.h" 29 30 #include "ClipboardUtilitiesWin.h" 30 31 #include "Frame.h" … … 36 37 #include <shlwapi.h> 37 38 #include <wininet.h> 39 #include <wtf/Forward.h> 40 #include <wtf/Hashmap.h> 41 #include <wtf/PassRefPtr.h> 42 #include <wtf/RefPtr.h> 38 43 39 44 namespace WebCore { 40 45 46 DragData::DragData(const DragDataMap& data, const IntPoint& clientPosition, const IntPoint& globalPosition, 47 DragOperation sourceOperationMask, DragApplicationFlags flags) 48 : m_clientPosition(clientPosition) 49 , m_globalPosition(globalPosition) 50 , m_platformDragData(0) 51 , m_draggingSourceOperationMask(sourceOperationMask) 52 , m_applicationFlags(flags) 53 , m_dragDataMap(data) 54 { 55 } 56 41 57 bool DragData::containsURL(Frame*, FilenameConversionPolicy filenamePolicy) const 42 58 { 43 return SUCCEEDED(m_platformDragData->QueryGetData(urlWFormat())) 44 || SUCCEEDED(m_platformDragData->QueryGetData(urlFormat())) 45 || (filenamePolicy == ConvertFilenames 46 && (SUCCEEDED(m_platformDragData->QueryGetData(filenameWFormat())) 47 || SUCCEEDED(m_platformDragData->QueryGetData(filenameFormat())))); 59 if (m_platformDragData) 60 return SUCCEEDED(m_platformDragData->QueryGetData(urlWFormat())) 61 || SUCCEEDED(m_platformDragData->QueryGetData(urlFormat())) 62 || (filenamePolicy == ConvertFilenames 63 && (SUCCEEDED(m_platformDragData->QueryGetData(filenameWFormat())) 64 || SUCCEEDED(m_platformDragData->QueryGetData(filenameFormat())))); 65 return m_dragDataMap.contains(urlWFormat()->cfFormat) || m_dragDataMap.contains(urlFormat()->cfFormat) 66 || (filenamePolicy == ConvertFilenames && (m_dragDataMap.contains(filenameWFormat()->cfFormat) || m_dragDataMap.contains(filenameFormat()->cfFormat))); 67 } 68 69 const DragDataMap& DragData::dragDataMap() 70 { 71 if (!m_dragDataMap.isEmpty() || !m_platformDragData) 72 return m_dragDataMap; 73 // Enumerate clipboard content and load it in the map. 74 COMPtr<IEnumFORMATETC> itr; 75 76 if (FAILED(m_platformDragData->EnumFormatEtc(DATADIR_GET, &itr)) || !itr) 77 return m_dragDataMap; 78 79 FORMATETC dataFormat; 80 while (itr->Next(1, &dataFormat, 0) == S_OK) { 81 Vector<String> dataStrings; 82 getClipboardData(m_platformDragData, &dataFormat, dataStrings); 83 if (!dataStrings.isEmpty()) 84 m_dragDataMap.set(dataFormat.cfFormat, dataStrings); 85 } 86 return m_dragDataMap; 48 87 } 49 88 … … 51 90 { 52 91 bool success; 53 return getURL(m_platformDragData, filenamePolicy, success, title);92 return (m_platformDragData) ? getURL(m_platformDragData, filenamePolicy, success, title) : getURL(&m_dragDataMap, filenamePolicy, title); 54 93 } 55 94 56 95 bool DragData::containsFiles() const 57 96 { 58 return SUCCEEDED(m_platformDragData->QueryGetData(cfHDropFormat()));97 return (m_platformDragData) ? SUCCEEDED(m_platformDragData->QueryGetData(cfHDropFormat())) : m_dragDataMap.contains(cfHDropFormat()->cfFormat); 59 98 } 60 99 61 100 void DragData::asFilenames(Vector<String>& result) const 62 101 { 63 WCHAR filename[MAX_PATH]; 64 65 STGMEDIUM medium; 66 if (FAILED(m_platformDragData->GetData(cfHDropFormat(), &medium))) 102 if (m_platformDragData) { 103 WCHAR filename[MAX_PATH]; 104 105 STGMEDIUM medium; 106 if (FAILED(m_platformDragData->GetData(cfHDropFormat(), &medium))) 107 return; 108 109 HDROP hdrop = (HDROP)GlobalLock(medium.hGlobal); 110 111 if (!hdrop) 112 return; 113 114 const unsigned numFiles = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0); 115 for (unsigned i = 0; i < numFiles; i++) { 116 if (!DragQueryFileW(hdrop, 0, filename, WTF_ARRAY_LENGTH(filename))) 117 continue; 118 result.append((UChar*)filename); 119 } 120 121 // Free up memory from drag 122 DragFinish(hdrop); 123 124 GlobalUnlock(medium.hGlobal); 67 125 return; 68 69 HDROP hdrop = (HDROP)GlobalLock(medium.hGlobal);70 71 if (!hdrop)72 return;73 74 const unsigned numFiles = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0);75 for (unsigned i = 0; i < numFiles; i++) {76 if (!DragQueryFileW(hdrop, 0, filename, WTF_ARRAY_LENGTH(filename)))77 continue;78 result.append((UChar*)filename);79 126 } 80 81 // Free up memory from drag 82 DragFinish(hdrop); 83 84 GlobalUnlock(medium.hGlobal); 127 result = m_dragDataMap.get(cfHDropFormat()->cfFormat); 85 128 } 86 129 87 130 bool DragData::containsPlainText() const 88 131 { 89 return SUCCEEDED(m_platformDragData->QueryGetData(plainTextWFormat())) 90 || SUCCEEDED(m_platformDragData->QueryGetData(plainTextFormat())); 132 if (m_platformDragData) 133 return SUCCEEDED(m_platformDragData->QueryGetData(plainTextWFormat())) 134 || SUCCEEDED(m_platformDragData->QueryGetData(plainTextFormat())); 135 return m_dragDataMap.contains(plainTextWFormat()->cfFormat) || m_dragDataMap.contains(plainTextFormat()->cfFormat); 91 136 } 92 137 … … 94 139 { 95 140 bool success; 96 return getPlainText(m_platformDragData, success);141 return (m_platformDragData) ? getPlainText(m_platformDragData, success) : getPlainText(&m_dragDataMap); 97 142 } 98 143 … … 104 149 bool DragData::canSmartReplace() const 105 150 { 106 return SUCCEEDED(m_platformDragData->QueryGetData(smartPasteFormat())); 151 if (m_platformDragData) 152 return SUCCEEDED(m_platformDragData->QueryGetData(smartPasteFormat())); 153 return m_dragDataMap.contains(smartPasteFormat()->cfFormat); 107 154 } 108 155 … … 110 157 { 111 158 return containsPlainText() || containsURL(0) 112 || containsHTML(m_platformDragData)113 || containsFilenames(m_platformDragData)159 || ((m_platformDragData) ? (containsHTML(m_platformDragData) || containsFilenames(m_platformDragData)) 160 : (containsHTML(&m_dragDataMap) || containsFilenames(&m_dragDataMap))) 114 161 || containsColor(); 115 162 } … … 126 173 * * PICT 127 174 */ 128 129 if (containsFilenames(m_platformDragData)) 130 if (PassRefPtr<DocumentFragment> fragment = fragmentFromFilenames(frame->document(), m_platformDragData)) 131 return fragment; 132 133 if (containsHTML(m_platformDragData)) 134 if (PassRefPtr<DocumentFragment> fragment = fragmentFromHTML(frame->document(), m_platformDragData)) 135 return fragment; 136 137 return 0; 175 176 if (m_platformDragData) { 177 if (containsFilenames(m_platformDragData)) { 178 if (PassRefPtr<DocumentFragment> fragment = fragmentFromFilenames(frame->document(), m_platformDragData)) 179 return fragment; 180 } 181 182 if (containsHTML(m_platformDragData)) { 183 if (PassRefPtr<DocumentFragment> fragment = fragmentFromHTML(frame->document(), m_platformDragData)) 184 return fragment; 185 } 186 } else { 187 if (containsFilenames(&m_dragDataMap)) { 188 if (PassRefPtr<DocumentFragment> fragment = fragmentFromFilenames(frame->document(), &m_dragDataMap)) 189 return fragment; 190 } 191 192 if (containsHTML(&m_dragDataMap)) { 193 if (PassRefPtr<DocumentFragment> fragment = fragmentFromHTML(frame->document(), &m_dragDataMap)) 194 return fragment; 195 } 196 } 197 return 0; 138 198 } 139 199 … … 144 204 145 205 } 146 -
trunk/Source/WebKit2/ChangeLog
r76821 r76824 1 2011-01-26 Enrica Casucci <enrica@apple.com> 2 3 Reviewed by Darin Adler and Adam Roben. 4 5 WebKit2: add support for drag and drop on Windows 6 https://bugs.webkit.org/show_bug.cgi?id=52775 7 <rdar://problem/8514409> 8 9 On Windows the access to the content being dragged is 10 provided via the IDataObject interface that is made available 11 to the window that registers itself as drop target. 12 Since this interface cannot be accessed from the WebProcess, 13 in every call to one of the methods of the IDropTarget interface 14 we serialize the content of the drag clipboard and send it over to 15 the WebProcess. The implementation uses the same messages as the 16 Mac one, with slightly different parameters to pass the serialized 17 clipboard. 18 19 * UIProcess/WebPageProxy.cpp: 20 (WebKit::WebPageProxy::performDragControllerAction): Added Windows 21 specific implementation. 22 * UIProcess/WebPageProxy.h: 23 * UIProcess/win/WebView.cpp: 24 (WebKit::WebView::WebView): Added dropTargetHelper object creation. 25 (WebKit::WebView::initialize): Added to register for drag/drop with out 26 refcount issues. 27 (WebKit::WebView::close): 28 (WebKit::WebView::windowReceivedMessage): 29 (WebKit::WebView::QueryInterface): 30 (WebKit::WebView::AddRef): 31 (WebKit::WebView::Release): 32 (WebKit::dragOperationToDragCursor): 33 (WebKit::WebView::keyStateToDragOperation): 34 (WebKit::WebView::DragEnter): 35 (WebKit::WebView::DragOver): 36 (WebKit::WebView::DragLeave): 37 (WebKit::WebView::Drop): 38 * UIProcess/win/WebView.h: 39 (WebKit::WebView::create): 40 * WebProcess/WebPage/WebPage.cpp: 41 (WebKit::WebPage::performDragControllerAction): 42 * WebProcess/WebPage/WebPage.h: 43 * WebProcess/WebPage/WebPage.messages.in: 44 1 45 2011-01-26 Alexey Proskuryakov <ap@apple.com> 2 46 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r76821 r76824 613 613 if (!isValid()) 614 614 return; 615 #if PLATFORM(WIN) 616 // FIXME: We should pass the drag data map only on DragEnter. 617 process()->send(Messages::WebPage::PerformDragControllerAction(action, dragData->clientPosition(), dragData->globalPosition(), 618 dragData->draggingSourceOperationMask(), dragData->dragDataMap(), dragData->flags()), m_pageID); 619 #else 615 620 process()->send(Messages::WebPage::PerformDragControllerAction(action, dragData->clientPosition(), dragData->globalPosition(), dragData->draggingSourceOperationMask(), dragStorageName, dragData->flags()), m_pageID); 621 #endif 616 622 } 617 623 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r76821 r76824 295 295 296 296 // Drag and drop support. 297 void performDragControllerAction(DragControllerAction, WebCore::DragData*, const String& );297 void performDragControllerAction(DragControllerAction, WebCore::DragData*, const String& = String()); 298 298 void didPerformDragControllerAction(uint64_t resultOperation); 299 299 void dragEnded(const WebCore::IntPoint& clientPosition, const WebCore::IntPoint& globalPosition, uint64_t operation); -
trunk/Source/WebKit2/UIProcess/win/WebView.cpp
r76657 r76824 244 244 m_page->initializeWebPage(); 245 245 246 CoCreateInstance(CLSID_DragDropHelper, 0, CLSCTX_INPROC_SERVER, IID_IDropTargetHelper, (void**)&m_dropTargetHelper); 247 246 248 ::ShowWindow(m_window, SW_SHOW); 247 249 … … 259 261 if (::IsWindow(m_toolTipWindow)) 260 262 ::DestroyWindow(m_toolTipWindow); 263 } 264 265 void WebView::initialize() 266 { 267 ::RegisterDragDrop(m_window, this); 261 268 } 262 269 … … 570 577 void WebView::close() 571 578 { 579 ::RevokeDragDrop(m_window); 572 580 setParentWindow(0); 573 581 m_page->close(); … … 1093 1101 } 1094 1102 1103 HRESULT STDMETHODCALLTYPE WebView::QueryInterface(REFIID riid, void** ppvObject) 1104 { 1105 *ppvObject = 0; 1106 if (IsEqualGUID(riid, IID_IUnknown)) 1107 *ppvObject = static_cast<IUnknown*>(this); 1108 else if (IsEqualGUID(riid, IID_IDropTarget)) 1109 *ppvObject = static_cast<IDropTarget*>(this); 1110 else 1111 return E_NOINTERFACE; 1112 1113 AddRef(); 1114 return S_OK; 1115 } 1116 1117 ULONG STDMETHODCALLTYPE WebView::AddRef(void) 1118 { 1119 ref(); 1120 return refCount(); 1121 } 1122 1123 ULONG STDMETHODCALLTYPE WebView::Release(void) 1124 { 1125 deref(); 1126 return refCount(); 1127 } 1128 1129 static DWORD dragOperationToDragCursor(DragOperation op) 1130 { 1131 DWORD res = DROPEFFECT_NONE; 1132 if (op & DragOperationCopy) 1133 res = DROPEFFECT_COPY; 1134 else if (op & DragOperationLink) 1135 res = DROPEFFECT_LINK; 1136 else if (op & DragOperationMove) 1137 res = DROPEFFECT_MOVE; 1138 else if (op & DragOperationGeneric) 1139 res = DROPEFFECT_MOVE; // This appears to be the Firefox behaviour 1140 return res; 1141 } 1142 1143 WebCore::DragOperation WebView::keyStateToDragOperation(DWORD grfKeyState) const 1144 { 1145 if (!m_page) 1146 return DragOperationNone; 1147 1148 // Conforms to Microsoft's key combinations as documented for 1149 // IDropTarget::DragOver. Note, grfKeyState is the current 1150 // state of the keyboard modifier keys on the keyboard. See: 1151 // <http://msdn.microsoft.com/en-us/library/ms680129(VS.85).aspx>. 1152 DragOperation operation = m_page->dragOperation(); 1153 1154 if ((grfKeyState & (MK_CONTROL | MK_SHIFT)) == (MK_CONTROL | MK_SHIFT)) 1155 operation = DragOperationLink; 1156 else if ((grfKeyState & MK_CONTROL) == MK_CONTROL) 1157 operation = DragOperationCopy; 1158 else if ((grfKeyState & MK_SHIFT) == MK_SHIFT) 1159 operation = DragOperationGeneric; 1160 1161 return operation; 1162 } 1163 1164 HRESULT STDMETHODCALLTYPE WebView::DragEnter(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect) 1165 { 1166 m_dragData = 0; 1167 m_page->resetDragOperation(); 1168 1169 if (m_dropTargetHelper) 1170 m_dropTargetHelper->DragEnter(m_window, pDataObject, (POINT*)&pt, *pdwEffect); 1171 1172 POINTL localpt = pt; 1173 ::ScreenToClient(m_window, (LPPOINT)&localpt); 1174 DragData data(pDataObject, IntPoint(localpt.x, localpt.y), IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState)); 1175 m_page->performDragControllerAction(DragControllerActionEntered, &data); 1176 *pdwEffect = dragOperationToDragCursor(m_page->dragOperation()); 1177 1178 m_lastDropEffect = *pdwEffect; 1179 m_dragData = pDataObject; 1180 1181 return S_OK; 1182 } 1183 1184 HRESULT STDMETHODCALLTYPE WebView::DragOver(DWORD grfKeyState, POINTL pt, DWORD* pdwEffect) 1185 { 1186 if (m_dropTargetHelper) 1187 m_dropTargetHelper->DragOver((POINT*)&pt, *pdwEffect); 1188 1189 if (m_dragData) { 1190 POINTL localpt = pt; 1191 ::ScreenToClient(m_window, (LPPOINT)&localpt); 1192 DragData data(m_dragData.get(), IntPoint(localpt.x, localpt.y), IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState)); 1193 m_page->performDragControllerAction(DragControllerActionUpdated, &data); 1194 *pdwEffect = dragOperationToDragCursor(m_page->dragOperation()); 1195 } else 1196 *pdwEffect = DROPEFFECT_NONE; 1197 1198 m_lastDropEffect = *pdwEffect; 1199 return S_OK; 1200 } 1201 1202 HRESULT STDMETHODCALLTYPE WebView::DragLeave() 1203 { 1204 if (m_dropTargetHelper) 1205 m_dropTargetHelper->DragLeave(); 1206 1207 if (m_dragData) { 1208 DragData data(m_dragData.get(), IntPoint(), IntPoint(), DragOperationNone); 1209 m_page->performDragControllerAction(DragControllerActionExited, &data); 1210 m_dragData = 0; 1211 m_page->resetDragOperation(); 1212 } 1213 return S_OK; 1214 } 1215 1216 HRESULT STDMETHODCALLTYPE WebView::Drop(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect) 1217 { 1218 if (m_dropTargetHelper) 1219 m_dropTargetHelper->Drop(pDataObject, (POINT*)&pt, *pdwEffect); 1220 1221 m_dragData = 0; 1222 *pdwEffect = m_lastDropEffect; 1223 POINTL localpt = pt; 1224 ::ScreenToClient(m_window, (LPPOINT)&localpt); 1225 DragData data(pDataObject, IntPoint(localpt.x, localpt.y), IntPoint(pt.x, pt.y), keyStateToDragOperation(grfKeyState)); 1226 m_page->performDragControllerAction(DragControllerActionPerformDrag, &data); 1227 return S_OK; 1228 } 1229 1095 1230 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/win/WebView.h
r76657 r76824 30 30 #include "PageClient.h" 31 31 #include "WebPageProxy.h" 32 #include <WebCore/COMPtr.h> 33 #include <WebCore/DragActions.h> 34 #include <WebCore/DragData.h> 32 35 #include <WebCore/WindowMessageListener.h> 33 36 #include <wtf/Forward.h> 34 37 #include <wtf/PassRefPtr.h> 35 38 #include <wtf/RefPtr.h> 39 #include <ShlObj.h> 40 41 interface IDropTargetHelper; 36 42 37 43 namespace WebKit { … … 39 45 class DrawingAreaProxy; 40 46 41 class WebView : public APIObject, public PageClient, WebCore::WindowMessageListener {47 class WebView : public APIObject, public PageClient, WebCore::WindowMessageListener, public IDropTarget { 42 48 public: 43 49 static PassRefPtr<WebView> create(RECT rect, WebContext* context, WebPageGroup* pageGroup, HWND parentWindow) 44 50 { 45 return adoptRef(new WebView(rect, context, pageGroup, parentWindow)); 51 RefPtr<WebView> webView = adoptRef(new WebView(rect, context, pageGroup, parentWindow)); 52 webView->initialize(); 53 return webView; 46 54 } 47 55 ~WebView(); … … 53 61 void setOverrideCursor(HCURSOR overrideCursor); 54 62 void setInitialFocus(bool forward); 63 void initialize(); 64 65 // IUnknown 66 virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject); 67 virtual ULONG STDMETHODCALLTYPE AddRef(void); 68 virtual ULONG STDMETHODCALLTYPE Release(void); 69 70 // IDropTarget 71 virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect); 72 virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD* pdwEffect); 73 virtual HRESULT STDMETHODCALLTYPE DragLeave(); 74 virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt, DWORD* pdwEffect); 55 75 56 76 WebPageProxy* page() const { return m_page.get(); } … … 143 163 virtual double customRepresentationZoomFactor(); 144 164 virtual void setCustomRepresentationZoomFactor(double); 165 WebCore::DragOperation keyStateToDragOperation(DWORD grfKeyState) const; 145 166 146 167 virtual HWND nativeWindow(); … … 166 187 167 188 unsigned m_inIMEComposition; 189 COMPtr<IDataObject> m_dragData; 190 COMPtr<IDropTargetHelper> m_dropTargetHelper; 191 // FIXME: This variable is part of a workaround. The drop effect (pdwEffect) passed to Drop is incorrect. 192 // We set this variable in DragEnter and DragOver so that it can be used in Drop to set the correct drop effect. 193 // Thus, on return from DoDragDrop we have the correct pdwEffect for the drag-and-drop operation. 194 // (see https://bugs.webkit.org/show_bug.cgi?id=29264) 195 DWORD m_lastDropEffect; 168 196 }; 169 197 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r76821 r76824 1332 1332 #endif 1333 1333 1334 void WebPage::performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const String& dragStorageName, uint32_t flags) 1334 #if PLATFORM(WIN) 1335 void WebPage::performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WebCore::DragDataMap& dataMap, uint32_t flags) 1335 1336 { 1336 1337 if (!m_page) { … … 1339 1340 } 1340 1341 1341 DragData dragData(d ragStorageName, clientPosition, globalPosition, static_cast<DragOperation>(draggingSourceOperationMask), static_cast<DragApplicationFlags>(flags));1342 DragData dragData(dataMap, clientPosition, globalPosition, static_cast<DragOperation>(draggingSourceOperationMask), static_cast<DragApplicationFlags>(flags)); 1342 1343 switch (action) { 1343 1344 case DragControllerActionEntered: … … 1361 1362 } 1362 1363 } 1364 #else 1365 void WebPage::performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const String& dragStorageName, uint32_t flags) 1366 { 1367 if (!m_page) { 1368 send(Messages::WebPageProxy::DidPerformDragControllerAction(DragOperationNone)); 1369 return; 1370 } 1371 1372 DragData dragData(dragStorageName, clientPosition, globalPosition, static_cast<DragOperation>(draggingSourceOperationMask), static_cast<DragApplicationFlags>(flags)); 1373 switch (action) { 1374 case DragControllerActionEntered: 1375 send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController()->dragEntered(&dragData))); 1376 break; 1377 1378 case DragControllerActionUpdated: 1379 send(Messages::WebPageProxy::DidPerformDragControllerAction(m_page->dragController()->dragUpdated(&dragData))); 1380 break; 1381 1382 case DragControllerActionExited: 1383 m_page->dragController()->dragExited(&dragData); 1384 break; 1385 1386 case DragControllerActionPerformDrag: 1387 m_page->dragController()->performDrag(&dragData); 1388 break; 1389 1390 default: 1391 ASSERT_NOT_REACHED(); 1392 } 1393 } 1394 #endif 1363 1395 1364 1396 void WebPage::dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation) -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r76821 r76824 41 41 #include "SandboxExtension.h" 42 42 #include "WebEditCommand.h" 43 #include <WebCore/DragData.h> 43 44 #include <WebCore/Editor.h> 44 45 #include <WebCore/FrameLoaderTypes.h> … … 305 306 306 307 void replaceSelectionWithText(WebCore::Frame*, const String&); 308 #if PLATFORM(WIN) 309 void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WebCore::DragDataMap&, uint32_t flags); 310 #else 307 311 void performDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, const WTF::String& dragStorageName, uint32_t flags); 312 #endif 308 313 void dragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation); 309 314 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r76821 r76824 107 107 108 108 # Drag and drop. 109 #if PLATFORM(WIN) 110 PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, HashMap<UINT,Vector<String>> dataMap, uint32_t flags) 111 #endif 112 #if !PLATFORM(WIN) 109 113 PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags) 114 #endif 110 115 DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation) 111 116
Note: See TracChangeset
for help on using the changeset viewer.