Changeset 166965 in webkit


Ignore:
Timestamp:
Apr 8, 2014 3:06:16 PM (10 years ago)
Author:
ap@apple.com
Message:

Source/WebCore: Rename Clipboard to DataTransfer
https://bugs.webkit.org/show_bug.cgi?id=131371

Reviewed by Anders Carlsson.

This is the name used in HTML5, and it's much better than the confusing Clipboard one.

Renamed related enums too, and made DataTransferAccessPolicy an enum class.

  • CMakeLists.txt:
  • Configurations/WebCore.xcconfig:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.exp.in:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSClipboardCustom.cpp: Removed.
  • bindings/js/JSDataTransferCustom.cpp: Copied from Source/WebCore/bindings/js/JSClipboardCustom.cpp.

(WebCore::JSDataTransfer::types):
(WebCore::JSClipboard::types): Deleted.

  • bindings/js/JSEventCustom.cpp:
  • dom/Clipboard.cpp: Removed.
  • dom/Clipboard.h: Removed.
  • dom/Clipboard.idl: Removed.
  • dom/ClipboardAccessPolicy.h: Removed.
  • dom/ClipboardEvent.cpp:

(WebCore::ClipboardEvent::ClipboardEvent):

  • dom/ClipboardEvent.h:

(WebCore::ClipboardEvent::create):
(WebCore::ClipboardEvent::clipboard): Deleted.

  • dom/ClipboardMac.mm: Removed.
  • dom/DOMAllInOne.cpp:
  • dom/DataTransfer.cpp: Copied from Source/WebCore/dom/Clipboard.cpp.

(WebCore::DataTransfer::DataTransfer):
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::~DataTransfer):
(WebCore::DataTransfer::setAccessPolicy):
(WebCore::DataTransfer::canReadTypes):
(WebCore::DataTransfer::canReadData):
(WebCore::DataTransfer::canWriteData):
(WebCore::DataTransfer::clearData):
(WebCore::DataTransfer::getData):
(WebCore::DataTransfer::setData):
(WebCore::DataTransfer::types):
(WebCore::DataTransfer::files):
(WebCore::DataTransfer::dropEffect):
(WebCore::DataTransfer::setDropEffect):
(WebCore::DataTransfer::effectAllowed):
(WebCore::DataTransfer::setEffectAllowed):
(WebCore::DataTransfer::setDragImage):
(WebCore::DataTransfer::createForDragAndDrop):
(WebCore::DataTransfer::canSetDragImage):
(WebCore::DataTransfer::updateDragImage):
(WebCore::DataTransfer::createDragImage):
(WebCore::DragImageLoader::DragImageLoader):
(WebCore::DragImageLoader::imageChanged):
(WebCore::DataTransfer::sourceOperation):
(WebCore::DataTransfer::destinationOperation):
(WebCore::DataTransfer::setSourceOperation):
(WebCore::DataTransfer::setDestinationOperation):
(WebCore::Clipboard::Clipboard): Deleted.
(WebCore::Clipboard::createForCopyAndPaste): Deleted.
(WebCore::Clipboard::~Clipboard): Deleted.
(WebCore::Clipboard::setAccessPolicy): Deleted.
(WebCore::Clipboard::canReadTypes): Deleted.
(WebCore::Clipboard::canReadData): Deleted.
(WebCore::Clipboard::canWriteData): Deleted.
(WebCore::Clipboard::clearData): Deleted.
(WebCore::Clipboard::getData): Deleted.
(WebCore::Clipboard::setData): Deleted.
(WebCore::Clipboard::types): Deleted.
(WebCore::Clipboard::files): Deleted.
(WebCore::Clipboard::dropEffect): Deleted.
(WebCore::Clipboard::setDropEffect): Deleted.
(WebCore::Clipboard::effectAllowed): Deleted.
(WebCore::Clipboard::setEffectAllowed): Deleted.
(WebCore::Clipboard::setDragImage): Deleted.
(WebCore::Clipboard::createForDragAndDrop): Deleted.
(WebCore::Clipboard::canSetDragImage): Deleted.
(WebCore::Clipboard::updateDragImage): Deleted.
(WebCore::Clipboard::createDragImage): Deleted.
(WebCore::Clipboard::sourceOperation): Deleted.
(WebCore::Clipboard::destinationOperation): Deleted.
(WebCore::Clipboard::setSourceOperation): Deleted.
(WebCore::Clipboard::setDestinationOperation): Deleted.

  • dom/DataTransfer.h: Copied from Source/WebCore/dom/Clipboard.h.
  • dom/DataTransfer.idl: Copied from Source/WebCore/dom/Clipboard.idl.
  • dom/DataTransferAccessPolicy.h: Copied from Source/WebCore/dom/ClipboardAccessPolicy.h.
  • dom/DataTransferItemList.h:
  • dom/DataTransferMac.mm: Copied from Source/WebCore/dom/ClipboardMac.mm.

(WebCore::DataTransfer::createDragImage):
(WebCore::Clipboard::createDragImage): Deleted.

  • dom/Event.h:

(WebCore::Event::clipboardData):
(WebCore::Event::internalDataTransfer):
(WebCore::Event::clipboard): Deleted.

  • dom/Event.idl:
  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::initMouseEvent):

  • dom/MouseEvent.h:

(WebCore::MouseEvent::dataTransfer):

  • dom/MouseEvent.idl:
  • dom/WheelEvent.cpp:
  • editing/Editor.cpp:

(WebCore::Editor::canDHTMLCut):
(WebCore::Editor::canDHTMLCopy):
(WebCore::Editor::canDHTMLPaste):
(WebCore::Editor::tryDHTMLCopy):
(WebCore::Editor::tryDHTMLCut):
(WebCore::Editor::tryDHTMLPaste):
(WebCore::Editor::dispatchCPPEvent):
(WebCore::Editor::performCutOrCopy):
(WebCore::Editor::selectedTextForDataTransfer):
(WebCore::Editor::selectedTextForClipboard): Deleted.

  • editing/Editor.h:
  • editing/ios/EditorIOS.mm:

(WebCore::Editor::stringSelectionForPasteboardWithImageAltText):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::takeFindStringFromSelection):
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText):

  • loader/EmptyClients.h:
  • page/DragClient.h:
  • page/DragController.cpp:

(WebCore::DragController::dragExited):
(WebCore::DragController::performDrag):
(WebCore::DragController::tryDHTMLDrag):
(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):

  • page/DragController.h:
  • page/DragState.h:
  • page/EventHandler.cpp:

(WebCore::EventHandler::dispatchDragEvent):
(WebCore::hasFileOfType):
(WebCore::hasStringOfType):
(WebCore::hasDropZoneType):
(WebCore::findDropZone):
(WebCore::EventHandler::updateDragAndDrop):
(WebCore::EventHandler::cancelDragAndDrop):
(WebCore::EventHandler::performDragAndDrop):
(WebCore::EventHandler::freeDataTransfer):
(WebCore::EventHandler::dragSourceEndedAt):
(WebCore::EventHandler::dispatchDragSrcEvent):
(WebCore::EventHandler::handleDrag):
(WebCore::EventHandler::freeClipboard): Deleted.

  • page/EventHandler.h:
  • page/efl/EventHandlerEfl.cpp:

(WebCore::EventHandler::createDraggingDataTransfer):
(WebCore::EventHandler::createDraggingClipboard): Deleted.

  • page/gtk/DragControllerGtk.cpp:

(WebCore::DragController::declareAndWriteDragImage):

  • page/gtk/EventHandlerGtk.cpp:

(WebCore::EventHandler::createDraggingDataTransfer):
(WebCore::EventHandler::createDraggingClipboard): Deleted.

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::declareAndWriteDragImage):

  • page/mac/EventHandlerMac.mm:

(WebCore::EventHandler::createDraggingDataTransfer):
(WebCore::EventHandler::createDraggingClipboard): Deleted.

  • page/win/DragControllerWin.cpp:

(WebCore::DragController::declareAndWriteDragImage):

  • page/win/EventHandlerWin.cpp:

(WebCore::EventHandler::createDraggingataTransfer):
(WebCore::EventHandler::createDraggingClipboard): Deleted.

  • platform/Pasteboard.h:
  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::writeSelection):

  • platform/mac/PasteboardMac.mm:
  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::writeRangeToDataObject):
(WebCore::Pasteboard::writeSelection):

Source/WebKit/ios: Rename Clipboard to DataTransfer
https://bugs.webkit.org/show_bug.cgi?id=131371

Reviewed by Anders Carlsson.

  • WebView/WebPDFViewPlaceholder.mm:

Source/WebKit/mac: Rename Clipboard to DataTransfer
https://bugs.webkit.org/show_bug.cgi?id=131371

Reviewed by Anders Carlsson.

  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::willPerformDragSourceAction):
(WebDragClient::startDrag):

  • WebView/WebPDFView.mm:

Source/WebKit2: Fix build.

Patch by Anders Carlsson <andersca@apple.com> on 2014-04-08

  • WebKit2Prefix.h:

LayoutTests: Rename Clipboard to DataTransfer
https://bugs.webkit.org/show_bug.cgi?id=131371

Reviewed by Anders Carlsson.

  • fast/dom/dom-constructors-expected.txt:
  • fast/dom/dom-constructors.html:
  • js/dom/global-constructors-attributes-expected.txt:
  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
Location:
trunk
Files:
64 edited
6 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r166960 r166965  
     12014-04-08  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Rename Clipboard to DataTransfer
     4        https://bugs.webkit.org/show_bug.cgi?id=131371
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * fast/dom/dom-constructors-expected.txt:
     9        * fast/dom/dom-constructors.html:
     10        * js/dom/global-constructors-attributes-expected.txt:
     11        * platform/efl/js/dom/global-constructors-attributes-expected.txt:
     12        * platform/gtk-wk1/js/dom/global-constructors-attributes-expected.txt:
     13        * platform/gtk-wk2/js/dom/global-constructors-attributes-expected.txt:
     14        * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
     15        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
     16        * platform/win/js/dom/global-constructors-attributes-expected.txt:
     17
    1182014-04-08  Brent Fulgham  <bfulgham@apple.com>
    219
  • trunk/LayoutTests/fast/dom/dom-constructors-expected.txt

    r164036 r166965  
    7272PASS TryAllocate('HTMLElement') is 'exception'
    7373PASS TryAllocate('CanvasRenderingContext2D') is 'exception'
    74 PASS TryAllocate('Clipboard') is 'exception'
    7574PASS TryAllocate('Counter') is 'exception'
    7675PASS TryAllocate('CSSCharsetRule') is 'exception'
     
    8786PASS TryAllocate('CSSValue') is 'exception'
    8887PASS TryAllocate('CSSValueList') is 'exception'
     88PASS TryAllocate('DataTransfer') is 'exception'
    8989PASS TryAllocate('DOMImplementation') is 'exception'
    9090PASS TryAllocate('HTMLCollection') is 'exception'
  • trunk/LayoutTests/fast/dom/dom-constructors.html

    r164036 r166965  
    8282    'HTMLElement',
    8383    'CanvasRenderingContext2D',
    84     'Clipboard',
    8584    'Counter',
    8685    'CSSCharsetRule',
     
    9796    'CSSValue',
    9897    'CSSValueList',
     98    'DataTransfer',
    9999    'DOMImplementation',
    100100    'HTMLCollection',
  • trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt

    r165651 r166965  
    189189PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
    190190PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
    191 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').value is Clipboard
    192 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('get') is false
    193 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('set') is false
    194 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').enumerable is false
    195 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').configurable is true
    196191PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
    197192PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
     
    264259PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false
    265260PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true
     261PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').value is DataTransfer
     262PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('get') is false
     263PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('set') is false
     264PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').enumerable is false
     265PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').configurable is true
    266266PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode
    267267PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt

    r165806 r166965  
    189189PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
    190190PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
    191 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').value is Clipboard
    192 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('get') is false
    193 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('set') is false
    194 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').enumerable is false
    195 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').configurable is true
    196191PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
    197192PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
     
    264259PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false
    265260PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true
     261PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').value is DataTransfer
     262PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('get') is false
     263PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('set') is false
     264PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').enumerable is false
     265PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').configurable is true
    266266PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode
    267267PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt

    r166911 r166965  
    194194PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
    195195PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
    196 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').value is Clipboard
    197 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('get') is false
    198 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('set') is false
    199 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').enumerable is false
    200 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').configurable is true
    201196PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
    202197PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
     
    269264PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false
    270265PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true
     266PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').value is DataTransfer
     267PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('get') is false
     268PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('set') is false
     269PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').enumerable is false
     270PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').configurable is true
    271271PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode
    272272PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt

    r166201 r166965  
    189189PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
    190190PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
    191 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').value is Clipboard
    192 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('get') is false
    193 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('set') is false
    194 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').enumerable is false
    195 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').configurable is true
    196191PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
    197192PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
     
    264259PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false
    265260PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true
     261PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').value is DataTransfer
     262PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('get') is false
     263PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('set') is false
     264PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').enumerable is false
     265PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').configurable is true
    266266PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode
    267267PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt

    r166201 r166965  
    189189PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
    190190PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
    191 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').value is Clipboard
    192 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('get') is false
    193 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('set') is false
    194 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').enumerable is false
    195 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').configurable is true
    196191PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
    197192PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
     
    264259PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false
    265260PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true
     261PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').value is DataTransfer
     262PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('get') is false
     263PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('set') is false
     264PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').enumerable is false
     265PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').configurable is true
    266266PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').value is DelayNode
    267267PASS Object.getOwnPropertyDescriptor(global, 'DelayNode').hasOwnProperty('get') is false
  • trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt

    r163974 r166965  
    134134PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').enumerable is false
    135135PASS Object.getOwnPropertyDescriptor(global, 'ClientRectList').configurable is true
    136 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').value is Clipboard
    137 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('get') is false
    138 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').hasOwnProperty('set') is false
    139 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').enumerable is false
    140 PASS Object.getOwnPropertyDescriptor(global, 'Clipboard').configurable is true
    141136PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').value is CloseEvent
    142137PASS Object.getOwnPropertyDescriptor(global, 'CloseEvent').hasOwnProperty('get') is false
     
    204199PASS Object.getOwnPropertyDescriptor(global, 'DataCue').enumerable is false
    205200PASS Object.getOwnPropertyDescriptor(global, 'DataCue').configurable is true
     201PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').value is DataTransfer
     202PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('get') is false
     203PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').hasOwnProperty('set') is false
     204PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').enumerable is false
     205PASS Object.getOwnPropertyDescriptor(global, 'DataTransfer').configurable is true
    206206PASS Object.getOwnPropertyDescriptor(global, 'Document').value is Document
    207207PASS Object.getOwnPropertyDescriptor(global, 'Document').hasOwnProperty('get') is false
  • trunk/Source/WebCore/CMakeLists.txt

    r166752 r166965  
    345345    dom/ClientRect.idl
    346346    dom/ClientRectList.idl
    347     dom/Clipboard.idl
    348347    dom/Comment.idl
    349348    dom/CompositionEvent.idl
     
    355354    dom/DOMStringList.idl
    356355    dom/DOMStringMap.idl
     356    dom/DataTransfer.idl
    357357    dom/DataTransferItem.idl
    358358    dom/DataTransferItemList.idl
     
    11281128    dom/ClientRect.cpp
    11291129    dom/ClientRectList.cpp
    1130     dom/Clipboard.cpp
    11311130    dom/ClipboardEvent.cpp
    11321131    dom/CollectionIndexCache.cpp
     
    11421141    dom/DOMNamedFlowCollection.cpp
    11431142    dom/DOMStringList.cpp
     1143    dom/DataTransfer.cpp
    11441144    dom/DataTransferItem.cpp
    11451145    dom/DatasetDOMStringMap.cpp
  • trunk/Source/WebCore/ChangeLog

    r166964 r166965  
     12014-04-08  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Rename Clipboard to DataTransfer
     4        https://bugs.webkit.org/show_bug.cgi?id=131371
     5
     6        Reviewed by Anders Carlsson.
     7
     8        This is the name used in HTML5, and it's much better than the confusing Clipboard one.
     9
     10        Renamed related enums too, and made DataTransferAccessPolicy an enum class.
     11
     12        * CMakeLists.txt:
     13        * Configurations/WebCore.xcconfig:
     14        * DerivedSources.cpp:
     15        * DerivedSources.make:
     16        * WebCore.exp.in:
     17        * WebCore.vcxproj/WebCore.vcxproj:
     18        * WebCore.vcxproj/WebCore.vcxproj.filters:
     19        * WebCore.xcodeproj/project.pbxproj:
     20        * bindings/js/JSBindingsAllInOne.cpp:
     21        * bindings/js/JSClipboardCustom.cpp: Removed.
     22        * bindings/js/JSDataTransferCustom.cpp: Copied from Source/WebCore/bindings/js/JSClipboardCustom.cpp.
     23        (WebCore::JSDataTransfer::types):
     24        (WebCore::JSClipboard::types): Deleted.
     25        * bindings/js/JSEventCustom.cpp:
     26        * dom/Clipboard.cpp: Removed.
     27        * dom/Clipboard.h: Removed.
     28        * dom/Clipboard.idl: Removed.
     29        * dom/ClipboardAccessPolicy.h: Removed.
     30        * dom/ClipboardEvent.cpp:
     31        (WebCore::ClipboardEvent::ClipboardEvent):
     32        * dom/ClipboardEvent.h:
     33        (WebCore::ClipboardEvent::create):
     34        (WebCore::ClipboardEvent::clipboard): Deleted.
     35        * dom/ClipboardMac.mm: Removed.
     36        * dom/DOMAllInOne.cpp:
     37        * dom/DataTransfer.cpp: Copied from Source/WebCore/dom/Clipboard.cpp.
     38        (WebCore::DataTransfer::DataTransfer):
     39        (WebCore::DataTransfer::createForCopyAndPaste):
     40        (WebCore::DataTransfer::~DataTransfer):
     41        (WebCore::DataTransfer::setAccessPolicy):
     42        (WebCore::DataTransfer::canReadTypes):
     43        (WebCore::DataTransfer::canReadData):
     44        (WebCore::DataTransfer::canWriteData):
     45        (WebCore::DataTransfer::clearData):
     46        (WebCore::DataTransfer::getData):
     47        (WebCore::DataTransfer::setData):
     48        (WebCore::DataTransfer::types):
     49        (WebCore::DataTransfer::files):
     50        (WebCore::DataTransfer::dropEffect):
     51        (WebCore::DataTransfer::setDropEffect):
     52        (WebCore::DataTransfer::effectAllowed):
     53        (WebCore::DataTransfer::setEffectAllowed):
     54        (WebCore::DataTransfer::setDragImage):
     55        (WebCore::DataTransfer::createForDragAndDrop):
     56        (WebCore::DataTransfer::canSetDragImage):
     57        (WebCore::DataTransfer::updateDragImage):
     58        (WebCore::DataTransfer::createDragImage):
     59        (WebCore::DragImageLoader::DragImageLoader):
     60        (WebCore::DragImageLoader::imageChanged):
     61        (WebCore::DataTransfer::sourceOperation):
     62        (WebCore::DataTransfer::destinationOperation):
     63        (WebCore::DataTransfer::setSourceOperation):
     64        (WebCore::DataTransfer::setDestinationOperation):
     65        (WebCore::Clipboard::Clipboard): Deleted.
     66        (WebCore::Clipboard::createForCopyAndPaste): Deleted.
     67        (WebCore::Clipboard::~Clipboard): Deleted.
     68        (WebCore::Clipboard::setAccessPolicy): Deleted.
     69        (WebCore::Clipboard::canReadTypes): Deleted.
     70        (WebCore::Clipboard::canReadData): Deleted.
     71        (WebCore::Clipboard::canWriteData): Deleted.
     72        (WebCore::Clipboard::clearData): Deleted.
     73        (WebCore::Clipboard::getData): Deleted.
     74        (WebCore::Clipboard::setData): Deleted.
     75        (WebCore::Clipboard::types): Deleted.
     76        (WebCore::Clipboard::files): Deleted.
     77        (WebCore::Clipboard::dropEffect): Deleted.
     78        (WebCore::Clipboard::setDropEffect): Deleted.
     79        (WebCore::Clipboard::effectAllowed): Deleted.
     80        (WebCore::Clipboard::setEffectAllowed): Deleted.
     81        (WebCore::Clipboard::setDragImage): Deleted.
     82        (WebCore::Clipboard::createForDragAndDrop): Deleted.
     83        (WebCore::Clipboard::canSetDragImage): Deleted.
     84        (WebCore::Clipboard::updateDragImage): Deleted.
     85        (WebCore::Clipboard::createDragImage): Deleted.
     86        (WebCore::Clipboard::sourceOperation): Deleted.
     87        (WebCore::Clipboard::destinationOperation): Deleted.
     88        (WebCore::Clipboard::setSourceOperation): Deleted.
     89        (WebCore::Clipboard::setDestinationOperation): Deleted.
     90        * dom/DataTransfer.h: Copied from Source/WebCore/dom/Clipboard.h.
     91        * dom/DataTransfer.idl: Copied from Source/WebCore/dom/Clipboard.idl.
     92        * dom/DataTransferAccessPolicy.h: Copied from Source/WebCore/dom/ClipboardAccessPolicy.h.
     93        * dom/DataTransferItemList.h:
     94        * dom/DataTransferMac.mm: Copied from Source/WebCore/dom/ClipboardMac.mm.
     95        (WebCore::DataTransfer::createDragImage):
     96        (WebCore::Clipboard::createDragImage): Deleted.
     97        * dom/Event.h:
     98        (WebCore::Event::clipboardData):
     99        (WebCore::Event::internalDataTransfer):
     100        (WebCore::Event::clipboard): Deleted.
     101        * dom/Event.idl:
     102        * dom/MouseEvent.cpp:
     103        (WebCore::MouseEvent::create):
     104        (WebCore::MouseEvent::MouseEvent):
     105        (WebCore::MouseEvent::initMouseEvent):
     106        * dom/MouseEvent.h:
     107        (WebCore::MouseEvent::dataTransfer):
     108        * dom/MouseEvent.idl:
     109        * dom/WheelEvent.cpp:
     110        * editing/Editor.cpp:
     111        (WebCore::Editor::canDHTMLCut):
     112        (WebCore::Editor::canDHTMLCopy):
     113        (WebCore::Editor::canDHTMLPaste):
     114        (WebCore::Editor::tryDHTMLCopy):
     115        (WebCore::Editor::tryDHTMLCut):
     116        (WebCore::Editor::tryDHTMLPaste):
     117        (WebCore::Editor::dispatchCPPEvent):
     118        (WebCore::Editor::performCutOrCopy):
     119        (WebCore::Editor::selectedTextForDataTransfer):
     120        (WebCore::Editor::selectedTextForClipboard): Deleted.
     121        * editing/Editor.h:
     122        * editing/ios/EditorIOS.mm:
     123        (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
     124        * editing/mac/EditorMac.mm:
     125        (WebCore::Editor::takeFindStringFromSelection):
     126        (WebCore::Editor::stringSelectionForPasteboardWithImageAltText):
     127        * loader/EmptyClients.h:
     128        * page/DragClient.h:
     129        * page/DragController.cpp:
     130        (WebCore::DragController::dragExited):
     131        (WebCore::DragController::performDrag):
     132        (WebCore::DragController::tryDHTMLDrag):
     133        (WebCore::DragController::startDrag):
     134        (WebCore::DragController::doImageDrag):
     135        (WebCore::DragController::doSystemDrag):
     136        * page/DragController.h:
     137        * page/DragState.h:
     138        * page/EventHandler.cpp:
     139        (WebCore::EventHandler::dispatchDragEvent):
     140        (WebCore::hasFileOfType):
     141        (WebCore::hasStringOfType):
     142        (WebCore::hasDropZoneType):
     143        (WebCore::findDropZone):
     144        (WebCore::EventHandler::updateDragAndDrop):
     145        (WebCore::EventHandler::cancelDragAndDrop):
     146        (WebCore::EventHandler::performDragAndDrop):
     147        (WebCore::EventHandler::freeDataTransfer):
     148        (WebCore::EventHandler::dragSourceEndedAt):
     149        (WebCore::EventHandler::dispatchDragSrcEvent):
     150        (WebCore::EventHandler::handleDrag):
     151        (WebCore::EventHandler::freeClipboard): Deleted.
     152        * page/EventHandler.h:
     153        * page/efl/EventHandlerEfl.cpp:
     154        (WebCore::EventHandler::createDraggingDataTransfer):
     155        (WebCore::EventHandler::createDraggingClipboard): Deleted.
     156        * page/gtk/DragControllerGtk.cpp:
     157        (WebCore::DragController::declareAndWriteDragImage):
     158        * page/gtk/EventHandlerGtk.cpp:
     159        (WebCore::EventHandler::createDraggingDataTransfer):
     160        (WebCore::EventHandler::createDraggingClipboard): Deleted.
     161        * page/mac/DragControllerMac.mm:
     162        (WebCore::DragController::declareAndWriteDragImage):
     163        * page/mac/EventHandlerMac.mm:
     164        (WebCore::EventHandler::createDraggingDataTransfer):
     165        (WebCore::EventHandler::createDraggingClipboard): Deleted.
     166        * page/win/DragControllerWin.cpp:
     167        (WebCore::DragController::declareAndWriteDragImage):
     168        * page/win/EventHandlerWin.cpp:
     169        (WebCore::EventHandler::createDraggingataTransfer):
     170        (WebCore::EventHandler::createDraggingClipboard): Deleted.
     171        * platform/Pasteboard.h:
     172        * platform/gtk/PasteboardGtk.cpp:
     173        (WebCore::Pasteboard::writeSelection):
     174        * platform/mac/PasteboardMac.mm:
     175        * platform/win/PasteboardWin.cpp:
     176        (WebCore::Pasteboard::writeRangeToDataObject):
     177        (WebCore::Pasteboard::writeSelection):
     178
    11792014-04-08  Jer Noble  <jer.noble@apple.com>
    2180
  • trunk/Source/WebCore/Configurations/WebCore.xcconfig

    r163657 r166965  
    113113
    114114EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
    115 EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ClipboardMac.mm ColorMac.mm Cursor.cpp CursorMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm PluginMainThreadScheduler.cpp RunLoopMac.mm SSLKeyGeneratorMac.cpp ScrollingCoordinatorMac.mm ScrollingStateScrollingNodeMac.mm ScrollingTreeScrollingNodeMac.mm ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm UserAgentMac.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreURLResponse.mm WebCoreView.m WebFontCache.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WidgetMac.mm mac/LayerPool.mm DisplayRefreshMonitorMac.cpp;
     115EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ColorMac.mm Cursor.cpp CursorMac.mm DataTransferMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm PluginMainThreadScheduler.cpp RunLoopMac.mm SSLKeyGeneratorMac.cpp ScrollingCoordinatorMac.mm ScrollingStateScrollingNodeMac.mm ScrollingTreeScrollingNodeMac.mm ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm UserAgentMac.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreURLResponse.mm WebCoreView.m WebFontCache.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WidgetMac.mm mac/LayerPool.mm DisplayRefreshMonitorMac.cpp;
    116116EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
    117117EXCLUDED_SOURCE_FILE_NAMES_macosx = *IOS.h *IOS.cpp *IOS.mm JSTouch* JSGesture* DOMGesture* DOMTouch* KillRingNone.cpp WAKAppKitStubs.h WAKClipView.h WAKResponder.h WAKScrollView.h WAKView.h WAKViewPrivate.h WAKWindow.h WKContentObservation.h WKGraphics.h WKTypes.h WKUtilities.h WKView.h WKViewPrivate.h WebCoreThread.h WebCoreThreadMessage.h WebCoreThreadRun.h WebCoreThreadSystemInterface.h;
  • trunk/Source/WebCore/DerivedSources.cpp

    r166782 r166965  
    7676#include "JSClientRect.cpp"
    7777#include "JSClientRectList.cpp"
    78 #include "JSClipboard.cpp"
    7978#include "JSCloseEvent.cpp"
    8079#include "JSCommandLineAPIHost.cpp"
     
    105104#include "JSDatabaseCallback.cpp"
    106105#include "JSDatabaseSync.cpp"
     106#include "JSDataTransfer.cpp"
    107107#include "JSDataTransferItem.cpp"
    108108#include "JSDataTransferItemList.cpp"
  • trunk/Source/WebCore/DerivedSources.make

    r166782 r166965  
    252252    $(WebCore)/dom/ClientRect.idl \
    253253    $(WebCore)/dom/ClientRectList.idl \
    254     $(WebCore)/dom/Clipboard.idl \
    255254    $(WebCore)/dom/Comment.idl \
    256255    $(WebCore)/dom/CompositionEvent.idl \
     
    261260    $(WebCore)/dom/DOMStringList.idl \
    262261    $(WebCore)/dom/DOMStringMap.idl \
     262    $(WebCore)/dom/DataTransfer.idl \
    263263    $(WebCore)/dom/DataTransferItem.idl \
    264264    $(WebCore)/dom/DataTransferItemList.idl \
  • trunk/Source/WebCore/WebCore.exp.in

    r166886 r166965  
    7979__ZN7WebCore10LayoutRectC1ERKNS_9FloatRectE
    8080__ZN7WebCore10MouseEvent6createERKN3WTF12AtomicStringENS1_10PassRefPtrINS_9DOMWindowEEERKNS_18PlatformMouseEventEiNS5_INS_4NodeEEE
    81 __ZN7WebCore10MouseEvent6createERKN3WTF12AtomicStringEbbdNS1_10PassRefPtrINS_9DOMWindowEEEiiiiibbbbtNS5_INS_11EventTargetEEENS5_INS_9ClipboardEEEb
     81__ZN7WebCore10MouseEvent6createERKN3WTF12AtomicStringEbbdNS1_10PassRefPtrINS_9DOMWindowEEEiiiiibbbbtNS5_INS_11EventTargetEEENS5_INS_12DataTransferEEEb
    8282__ZN7WebCore10Pasteboard14writePlainTextERKN3WTF6StringENS0_18SmartReplaceOptionE
    8383__ZN7WebCore10Pasteboard21createForCopyAndPasteEv
     
    190190__ZN7WebCore11startOfWordERKNS_15VisiblePositionENS_9EWordSideE
    191191__ZN7WebCore11writeToFileEiPKci
     192__ZN7WebCore12DataTransferD1Ev
    192193__ZN7WebCore12EditingStyleD1Ev
    193194__ZN7WebCore12EventHandler10mouseMovedERKNS_18PlatformMouseEventE
     
    13081309__ZN7WebCore8toUInt16EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
    13091310__ZN7WebCore8toUInt64EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
    1310 __ZN7WebCore9ClipboardD1Ev
    13111311__ZN7WebCore9DOMWindow30dispatchAllPendingUnloadEventsEv
    13121312__ZN7WebCore9DOMWindow36dispatchAllPendingBeforeUnloadEventsEv
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r166782 r166965  
    996996      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    997997    </ClCompile>
    998     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSClipboard.cpp">
    999       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    1000       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    1001       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
    1002       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
    1003       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
    1004       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
    1005       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    1006       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    1007       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
    1008       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
    1009       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    1010       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    1011     </ClCompile>
    1012998    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCommandLineAPIHost.cpp">
    1013999      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     
    13331319    </ClCompile>
    13341320    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDatabaseSync.cpp">
     1321      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     1322      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     1323      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
     1324      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     1325      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
     1326      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     1327      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
     1328      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     1329      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
     1330      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     1331      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
     1332      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     1333    </ClCompile>
     1334    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDataTransfer.cpp">
    13351335      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    13361336      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     
    1237812378      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    1237912379    </ClCompile>
    12380     <ClCompile Include="..\dom\Clipboard.cpp">
    12381       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    12382       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    12383       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
    12384       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
    12385       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
    12386       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
    12387       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    12388       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    12389       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
    12390       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
    12391       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    12392       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    12393     </ClCompile>
    1239412380    <ClCompile Include="..\dom\ClipboardEvent.cpp">
    1239512381      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     
    1249112477    </ClCompile>
    1249212478    <ClCompile Include="..\dom\DatasetDOMStringMap.cpp">
     12479      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     12480      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     12481      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
     12482      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     12483      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
     12484      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     12485      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
     12486      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     12487      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
     12488      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     12489      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
     12490      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     12491    </ClCompile>
     12492    <ClCompile Include="..\dom\DataTransfer.cpp">
    1249312493      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    1249412494      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     
    1605516055      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    1605616056    </ClCompile>
    16057     <ClCompile Include="..\bindings\js\JSClipboardCustom.cpp">
    16058       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    16059       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    16060       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
    16061       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
    16062       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
    16063       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
    16064       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
    16065       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
    16066       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
    16067       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
    16068       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
    16069       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    16070     </ClCompile>
    1607116057    <ClCompile Include="..\bindings\js\JSCommandLineAPIHostCustom.cpp">
    1607216058      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     
    1615416140    </ClCompile>
    1615516141    <ClCompile Include="..\bindings\js\JSCustomXPathNSResolver.cpp">
     16142      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     16143      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     16144      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
     16145      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     16146      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
     16147      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     16148      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
     16149      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     16150      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
     16151      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     16152      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
     16153      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     16154    </ClCompile>
     16155    <ClCompile Include="..\bindings\js\JSDataTransferCustom.cpp">
    1615616156      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
    1615716157      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     
    1811418114    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSClientRect.h" />
    1811518115    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSClientRectList.h" />
    18116     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSClipboard.h" />
    1811718116    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCommandLineAPIHost.h" />
    1811818117    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSComment.h" />
     
    1813918138    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDatabase.h" />
    1814018139    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDatabaseSync.h" />
     18140    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDataTransfer.h" />
    1814118141    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDataTransferItem.h" />
    1814218142    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDataTransferItemList.h" />
     
    2023320233    <ClInclude Include="..\dom\ClientRect.h" />
    2023420234    <ClInclude Include="..\dom\ClientRectList.h" />
    20235     <ClInclude Include="..\dom\Clipboard.h" />
    20236     <ClInclude Include="..\dom\ClipboardAccessPolicy.h" />
    2023720235    <ClInclude Include="..\dom\ClipboardEvent.h" />
    2023820236    <ClInclude Include="..\dom\CollectionIndexCache.h" />
     
    2024420242    <ClInclude Include="..\dom\CustomEvent.h" />
    2024520243    <ClInclude Include="..\dom\DatasetDOMStringMap.h" />
     20244    <ClInclude Include="..\dom\DataTransfer.h" />
     20245    <ClInclude Include="..\dom\DataTransferAccessPolicy.h" />
    2024620246    <ClInclude Include="..\dom\DataTransferItem.h" />
    2024720247    <ClInclude Include="..\dom\DataTransferItemList.h" />
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r166782 r166965  
    30553055      <Filter>dom</Filter>
    30563056    </ClCompile>
    3057     <ClCompile Include="..\dom\Clipboard.cpp">
    3058       <Filter>dom</Filter>
    3059     </ClCompile>
    30603057    <ClCompile Include="..\dom\ClipboardEvent.cpp">
    30613058      <Filter>dom</Filter>
     
    30773074    </ClCompile>
    30783075    <ClCompile Include="..\dom\DatasetDOMStringMap.cpp">
     3076      <Filter>dom</Filter>
     3077    </ClCompile>
     3078    <ClCompile Include="..\dom\DataTransfer.cpp">
    30793079      <Filter>dom</Filter>
    30803080    </ClCompile>
     
    42644264      <Filter>bindings\js</Filter>
    42654265    </ClCompile>
    4266     <ClCompile Include="..\bindings\js\JSClipboardCustom.cpp">
    4267       <Filter>bindings\js</Filter>
    4268     </ClCompile>
    42694266    <ClCompile Include="..\bindings\js\JSCommandLineAPIHostCustom.cpp">
    42704267      <Filter>bindings\js</Filter>
     
    42864283    </ClCompile>
    42874284    <ClCompile Include="..\bindings\js\JSCustomXPathNSResolver.cpp">
     4285      <Filter>bindings\js</Filter>
     4286    </ClCompile>
     4287    <ClCompile Include="..\bindings\js\JSDataTransferCustom.cpp">
    42884288      <Filter>bindings\js</Filter>
    42894289    </ClCompile>
     
    52255225      <Filter>DerivedSources</Filter>
    52265226    </ClCompile>
    5227     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSClipboard.cpp">
    5228       <Filter>DerivedSources</Filter>
    5229     </ClCompile>
    52305227    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCommandLineAPIHost.cpp">
    52315228      <Filter>DerivedSources</Filter>
     
    52985295    </ClCompile>
    52995296    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDatabaseSync.cpp">
     5297      <Filter>DerivedSources</Filter>
     5298    </ClCompile>
     5299    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDataTransfer.cpp">
    53005300      <Filter>DerivedSources</Filter>
    53015301    </ClCompile>
     
    1000410004      <Filter>dom</Filter>
    1000510005    </ClInclude>
    10006     <ClInclude Include="..\dom\Clipboard.h">
    10007       <Filter>dom</Filter>
    10008     </ClInclude>
    10009     <ClInclude Include="..\dom\ClipboardAccessPolicy.h">
    10010       <Filter>dom</Filter>
    10011     </ClInclude>
    1001210006    <ClInclude Include="..\dom\ClipboardEvent.h">
    1001310007      <Filter>dom</Filter>
     
    1003210026    </ClInclude>
    1003310027    <ClInclude Include="..\dom\DatasetDOMStringMap.h">
     10028      <Filter>dom</Filter>
     10029    </ClInclude>
     10030    <ClInclude Include="..\dom\DataTransfer.h">
     10031      <Filter>dom</Filter>
     10032    </ClInclude>
     10033    <ClInclude Include="..\dom\DataTransferAccessPolicy.h">
    1003410034      <Filter>dom</Filter>
    1003510035    </ClInclude>
     
    1303913039      <Filter>DerivedSources</Filter>
    1304013040    </ClInclude>
    13041     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSClipboard.h">
    13042       <Filter>DerivedSources</Filter>
    13043     </ClInclude>
    1304413041    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSCommandLineAPIHost.h">
    1304513042      <Filter>DerivedSources</Filter>
     
    1311213109    </ClInclude>
    1311313110    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDatabaseSync.h">
     13111      <Filter>DerivedSources</Filter>
     13112    </ClInclude>
     13113    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDataTransfer.h">
    1311413114      <Filter>DerivedSources</Filter>
    1311513115    </ClInclude>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r166880 r166965  
    17161716                4B6FA6F40C39E48C00087011 /* SmartReplace.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6FA6F20C39E48C00087011 /* SmartReplace.h */; settings = {ATTRIBUTES = (Private, ); }; };
    17171717                4B6FA6F70C39E4A100087011 /* SmartReplaceCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FA6F60C39E4A100087011 /* SmartReplaceCF.cpp */; };
    1718                 4B8AF4AA0B1CE02B00687690 /* ClipboardAccessPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8AF4A90B1CE02B00687690 /* ClipboardAccessPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1718                4B8AF4AA0B1CE02B00687690 /* DataTransferAccessPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8AF4A90B1CE02B00687690 /* DataTransferAccessPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
    17191719                4BAE95B10B2FA9CE00AED8A0 /* EditorDeleteAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAE95B00B2FA9CE00AED8A0 /* EditorDeleteAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
    17201720                4E1959210A39DABA00220FE5 /* MediaFeatureNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4E19591F0A39DABA00220FE5 /* MediaFeatureNames.cpp */; };
     
    24942494                85031B3C0A44EFC700F992E0 /* BeforeUnloadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B260A44EFC700F992E0 /* BeforeUnloadEvent.cpp */; };
    24952495                85031B3D0A44EFC700F992E0 /* BeforeUnloadEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B270A44EFC700F992E0 /* BeforeUnloadEvent.h */; };
    2496                 85031B3E0A44EFC700F992E0 /* Clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B280A44EFC700F992E0 /* Clipboard.h */; settings = {ATTRIBUTES = (Private, ); }; };
     2496                85031B3E0A44EFC700F992E0 /* DataTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B280A44EFC700F992E0 /* DataTransfer.h */; settings = {ATTRIBUTES = (Private, ); }; };
    24972497                85031B3F0A44EFC700F992E0 /* ClipboardEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */; };
    24982498                85031B400A44EFC700F992E0 /* ClipboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */; };
     
    32753275                93F19AF808245E59001E9ABC /* Position.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE91FC8C06133666005E3790 /* Position.cpp */; };
    32763276                93F19AFD08245E59001E9ABC /* HTMLCanvasElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F6A3D50663BF04004D2919 /* HTMLCanvasElement.cpp */; };
    3277                 93F19AFF08245E59001E9ABC /* ClipboardMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D90660C0665D937006B6F1A /* ClipboardMac.mm */; };
     3277                93F19AFF08245E59001E9ABC /* DataTransferMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D90660C0665D937006B6F1A /* DataTransferMac.mm */; };
    32783278                93F19B0308245E59001E9ABC /* XSLStyleSheetLibxslt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC06F24906D18A7E004A6FA3 /* XSLStyleSheetLibxslt.cpp */; };
    32793279                93F19B0408245E59001E9ABC /* XSLTProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC06F24B06D18A7E004A6FA3 /* XSLTProcessor.cpp */; };
     
    37783778                A77E1FF014AACB6E005B7CB6 /* TreeScopeAdopter.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E1FEE14AACB6E005B7CB6 /* TreeScopeAdopter.h */; };
    37793779                A781C6A713828B5D0012A62A /* DocumentMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A781C6A613828B5D0012A62A /* DocumentMarker.cpp */; };
    3780                 A784941B0B5FE507001E237A /* Clipboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A784941A0B5FE507001E237A /* Clipboard.cpp */; };
     3780                A784941B0B5FE507001E237A /* DataTransfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A784941A0B5FE507001E237A /* DataTransfer.cpp */; };
    37813781                A78E526F1346BD1700AD9C31 /* MeterShadowElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A78E526D1346BD1700AD9C31 /* MeterShadowElement.cpp */; };
    37823782                A78E52701346BD1700AD9C31 /* MeterShadowElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A78E526E1346BD1700AD9C31 /* MeterShadowElement.h */; };
     
    51965196                BCA2B061105047600043BD1C /* UserScript.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA2B0601050475F0043BD1C /* UserScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
    51975197                BCA2B08B10505BCD0043BD1C /* UserScriptTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA2B08A10505BCD0043BD1C /* UserScriptTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
    5198                 BCA83E4F0D7CE1E9003421A8 /* JSClipboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA83E4D0D7CE1E9003421A8 /* JSClipboard.cpp */; };
    5199                 BCA83E500D7CE1E9003421A8 /* JSClipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA83E4E0D7CE1E9003421A8 /* JSClipboard.h */; };
    5200                 BCA83E520D7CE205003421A8 /* JSClipboardCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA83E510D7CE205003421A8 /* JSClipboardCustom.cpp */; };
     5198                BCA83E4F0D7CE1E9003421A8 /* JSDataTransfer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA83E4D0D7CE1E9003421A8 /* JSDataTransfer.cpp */; };
     5199                BCA83E500D7CE1E9003421A8 /* JSDataTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA83E4E0D7CE1E9003421A8 /* JSDataTransfer.h */; };
     5200                BCA83E520D7CE205003421A8 /* JSDataTransferCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA83E510D7CE205003421A8 /* JSDataTransferCustom.cpp */; };
    52015201                BCA846D60DC67A350026C309 /* RenderReplica.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA846D40DC67A350026C309 /* RenderReplica.cpp */; };
    52025202                BCA846D70DC67A350026C309 /* RenderReplica.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA846D50DC67A350026C309 /* RenderReplica.h */; };
     
    79607960                2D9066040BE141D400956998 /* LayoutState.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutState.cpp; sourceTree = "<group>"; };
    79617961                2D9066050BE141D400956998 /* LayoutState.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = LayoutState.h; sourceTree = "<group>"; };
    7962                 2D90660C0665D937006B6F1A /* ClipboardMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ClipboardMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
     7962                2D90660C0665D937006B6F1A /* DataTransferMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataTransferMac.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    79637963                2D9A246A15B9BBDD00D34527 /* DOMSecurityPolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMSecurityPolicy.cpp; sourceTree = "<group>"; };
    79647964                2D9A246B15B9BBDD00D34527 /* DOMSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSecurityPolicy.h; sourceTree = "<group>"; };
     
    86878687                4B6FA6F20C39E48C00087011 /* SmartReplace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmartReplace.h; sourceTree = "<group>"; };
    86888688                4B6FA6F60C39E4A100087011 /* SmartReplaceCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SmartReplaceCF.cpp; sourceTree = "<group>"; };
    8689                 4B8AF4A90B1CE02B00687690 /* ClipboardAccessPolicy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ClipboardAccessPolicy.h; sourceTree = "<group>"; };
     8689                4B8AF4A90B1CE02B00687690 /* DataTransferAccessPolicy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DataTransferAccessPolicy.h; sourceTree = "<group>"; };
    86908690                4BAE95B00B2FA9CE00AED8A0 /* EditorDeleteAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorDeleteAction.h; sourceTree = "<group>"; };
    86918691                4E19591F0A39DABA00220FE5 /* MediaFeatureNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MediaFeatureNames.cpp; sourceTree = "<group>"; };
     
    95399539                85031B260A44EFC700F992E0 /* BeforeUnloadEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BeforeUnloadEvent.cpp; sourceTree = "<group>"; };
    95409540                85031B270A44EFC700F992E0 /* BeforeUnloadEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BeforeUnloadEvent.h; sourceTree = "<group>"; };
    9541                 85031B280A44EFC700F992E0 /* Clipboard.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Clipboard.h; sourceTree = "<group>"; };
     9541                85031B280A44EFC700F992E0 /* DataTransfer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DataTransfer.h; sourceTree = "<group>"; };
    95429542                85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ClipboardEvent.cpp; sourceTree = "<group>"; };
    95439543                85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ClipboardEvent.h; sourceTree = "<group>"; };
     
    1083610836                A77E1FEE14AACB6E005B7CB6 /* TreeScopeAdopter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreeScopeAdopter.h; sourceTree = "<group>"; };
    1083710837                A781C6A613828B5D0012A62A /* DocumentMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentMarker.cpp; sourceTree = "<group>"; };
    10838                 A784941A0B5FE507001E237A /* Clipboard.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Clipboard.cpp; sourceTree = "<group>"; };
     10838                A784941A0B5FE507001E237A /* DataTransfer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DataTransfer.cpp; sourceTree = "<group>"; };
    1083910839                A78E526D1346BD1700AD9C31 /* MeterShadowElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MeterShadowElement.cpp; sourceTree = "<group>"; };
    1084010840                A78E526E1346BD1700AD9C31 /* MeterShadowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeterShadowElement.h; sourceTree = "<group>"; };
     
    1247812478                BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduledAction.cpp; sourceTree = "<group>"; };
    1247912479                BCA378BB0D15F64200B793D6 /* ScheduledAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScheduledAction.h; sourceTree = "<group>"; };
    12480                 BCA83E360D7CDC4E003421A8 /* Clipboard.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Clipboard.idl; sourceTree = "<group>"; };
    12481                 BCA83E4D0D7CE1E9003421A8 /* JSClipboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSClipboard.cpp; sourceTree = "<group>"; };
    12482                 BCA83E4E0D7CE1E9003421A8 /* JSClipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClipboard.h; sourceTree = "<group>"; };
    12483                 BCA83E510D7CE205003421A8 /* JSClipboardCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSClipboardCustom.cpp; sourceTree = "<group>"; };
     12480                BCA83E360D7CDC4E003421A8 /* DataTransfer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DataTransfer.idl; sourceTree = "<group>"; };
     12481                BCA83E4D0D7CE1E9003421A8 /* JSDataTransfer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataTransfer.cpp; sourceTree = "<group>"; };
     12482                BCA83E4E0D7CE1E9003421A8 /* JSDataTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDataTransfer.h; sourceTree = "<group>"; };
     12483                BCA83E510D7CE205003421A8 /* JSDataTransferCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataTransferCustom.cpp; sourceTree = "<group>"; };
    1248412484                BCA846D40DC67A350026C309 /* RenderReplica.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderReplica.cpp; sourceTree = "<group>"; };
    1248512485                BCA846D50DC67A350026C309 /* RenderReplica.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderReplica.h; sourceTree = "<group>"; };
     
    1894318943                                65DF31DF09D1CC60000BE325 /* JSCharacterData.cpp */,
    1894418944                                65DF31E009D1CC60000BE325 /* JSCharacterData.h */,
    18945                                 BCA83E4D0D7CE1E9003421A8 /* JSClipboard.cpp */,
    18946                                 BCA83E4E0D7CE1E9003421A8 /* JSClipboard.h */,
    1894718945                                93F9B6DE0BA0FB7200854064 /* JSComment.cpp */,
    1894818946                                93F9B6DF0BA0FB7200854064 /* JSComment.h */,
    1894918947                                FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */,
    1895018948                                FE6FD48C0F676E9300092873 /* JSCoordinates.h */,
     18949                                BCA83E4D0D7CE1E9003421A8 /* JSDataTransfer.cpp */,
     18950                                BCA83E4E0D7CE1E9003421A8 /* JSDataTransfer.h */,
    1895118951                                31FB1A63120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp */,
    1895218952                                31FB1A64120A5D3F00DC02A0 /* JSDeviceMotionEvent.h */,
     
    2052020520                                49EED14D1051971A00099FAB /* JSCanvasRenderingContextCustom.cpp */,
    2052120521                                93BA59B10F2AA5FE008E8E99 /* JSCDATASectionCustom.cpp */,
    20522                                 BCA83E510D7CE205003421A8 /* JSClipboardCustom.cpp */,
    2052320522                                A584FE371864DAC100843B10 /* JSCommandLineAPIHostCustom.cpp */,
    2052420523                                209B456A16796A7E00E54E4E /* JSCryptoCustom.cpp */,
     
    2053120530                                AD726FEA16D9F40B003A4E6D /* JSCSSStyleDeclarationCustom.h */,
    2053220531                                BC20FB7E0C0E8E6C00D1447F /* JSCSSValueCustom.cpp */,
     20532                                BCA83E510D7CE205003421A8 /* JSDataTransferCustom.cpp */,
    2053320533                                4162A453101145E300DFF3ED /* JSDedicatedWorkerGlobalScopeCustom.cpp */,
    2053420534                                31FB1A6B120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp */,
     
    2213922139                                BCC0657B0F3CE1B700CD2D87 /* ClientRectList.h */,
    2214022140                                BCC0657C0F3CE1B700CD2D87 /* ClientRectList.idl */,
    22141                                 A784941A0B5FE507001E237A /* Clipboard.cpp */,
    22142                                 85031B280A44EFC700F992E0 /* Clipboard.h */,
    22143                                 BCA83E360D7CDC4E003421A8 /* Clipboard.idl */,
    22144                                 4B8AF4A90B1CE02B00687690 /* ClipboardAccessPolicy.h */,
    2214522141                                85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */,
    2214622142                                85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */,
    22147                                 2D90660C0665D937006B6F1A /* ClipboardMac.mm */,
    2214822143                                E425A49918292B840020CFCF /* CollectionIndexCache.h */,
    2214922144                                9BD8A95918BEFC7600987E9A /* CollectionIndexCache.cpp */,
     
    2216422159                                62CD32571157E57C0063B0A7 /* CustomEvent.h */,
    2216522160                                62CD32581157E57C0063B0A7 /* CustomEvent.idl */,
     22161                                A784941A0B5FE507001E237A /* DataTransfer.cpp */,
     22162                                85031B280A44EFC700F992E0 /* DataTransfer.h */,
     22163                                BCA83E360D7CDC4E003421A8 /* DataTransfer.idl */,
     22164                                2D90660C0665D937006B6F1A /* DataTransferMac.mm */,
     22165                                4B8AF4A90B1CE02B00687690 /* DataTransferAccessPolicy.h */,
    2216622166                                BC64641B11D7F416006455B0 /* DatasetDOMStringMap.cpp */,
    2216722167                                BC64641A11D7F416006455B0 /* DatasetDOMStringMap.h */,
     
    2312223122                                BCC0657E0F3CE1B700CD2D87 /* ClientRect.h in Headers */,
    2312323123                                BCC065810F3CE1B700CD2D87 /* ClientRectList.h in Headers */,
    23124                                 85031B3E0A44EFC700F992E0 /* Clipboard.h in Headers */,
    23125                                 4B8AF4AA0B1CE02B00687690 /* ClipboardAccessPolicy.h in Headers */,
     23124                                85031B3E0A44EFC700F992E0 /* DataTransfer.h in Headers */,
     23125                                4B8AF4AA0B1CE02B00687690 /* DataTransferAccessPolicy.h in Headers */,
    2312623126                                85031B400A44EFC700F992E0 /* ClipboardEvent.h in Headers */,
    2312723127                                FB92DF4B15FED08700994433 /* ClipPathOperation.h in Headers */,
     
    2427324273                                BCC065880F3CE2A700CD2D87 /* JSClientRect.h in Headers */,
    2427424274                                BCC0658A0F3CE2A700CD2D87 /* JSClientRectList.h in Headers */,
    24275                                 BCA83E500D7CE1E9003421A8 /* JSClipboard.h in Headers */,
     24275                                BCA83E500D7CE1E9003421A8 /* JSDataTransfer.h in Headers */,
    2427624276                                51FB5504113E3E9100821176 /* JSCloseEvent.h in Headers */,
    2427724277                                A584FE3C1864E2D800843B10 /* JSCommandLineAPIHost.h in Headers */,
     
    2678426784                                BCC0657D0F3CE1B700CD2D87 /* ClientRect.cpp in Sources */,
    2678526785                                BCC065800F3CE1B700CD2D87 /* ClientRectList.cpp in Sources */,
    26786                                 A784941B0B5FE507001E237A /* Clipboard.cpp in Sources */,
     26786                                A784941B0B5FE507001E237A /* DataTransfer.cpp in Sources */,
    2678726787                                85031B3F0A44EFC700F992E0 /* ClipboardEvent.cpp in Sources */,
    26788                                 93F19AFF08245E59001E9ABC /* ClipboardMac.mm in Sources */,
     26788                                93F19AFF08245E59001E9ABC /* DataTransferMac.mm in Sources */,
    2678926789                                CDEA76351460B71A008B31F1 /* Clock.cpp in Sources */,
    2679026790                                CDEA76341460B56F008B31F1 /* ClockGeneric.cpp in Sources */,
     
    2767527675                                BCC065870F3CE2A700CD2D87 /* JSClientRect.cpp in Sources */,
    2767627676                                BCC065890F3CE2A700CD2D87 /* JSClientRectList.cpp in Sources */,
    27677                                 BCA83E4F0D7CE1E9003421A8 /* JSClipboard.cpp in Sources */,
    27678                                 BCA83E520D7CE205003421A8 /* JSClipboardCustom.cpp in Sources */,
     27677                                BCA83E4F0D7CE1E9003421A8 /* JSDataTransfer.cpp in Sources */,
     27678                                BCA83E520D7CE205003421A8 /* JSDataTransferCustom.cpp in Sources */,
    2767927679                                51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */,
    2768027680                                A584FE3B1864E2D800843B10 /* JSCommandLineAPIHost.cpp in Sources */,
  • trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp

    r163568 r166965  
    4444#include "JSCanvasRenderingContext2DCustom.cpp"
    4545#include "JSCanvasRenderingContextCustom.cpp"
    46 #include "JSClipboardCustom.cpp"
    4746#include "JSCommandLineAPIHostCustom.cpp"
    4847#include "JSCryptoCustom.cpp"
     
    6362#include "JSDOMWindowShell.cpp"
    6463#include "JSDOMWrapper.cpp"
     64#include "JSDataTransferCustom.cpp"
    6565#include "JSDedicatedWorkerGlobalScopeCustom.cpp"
    6666#include "JSDeviceOrientationEventCustom.cpp"
  • trunk/Source/WebCore/bindings/js/JSDataTransferCustom.cpp

    r166873 r166965  
    2828
    2929#include "config.h"
    30 #include "JSClipboard.h"
     30#include "JSDataTransfer.h"
    3131
    32 #include "Clipboard.h"
     32#include "DataTransfer.h"
    3333
    3434using namespace JSC;
     
    3636namespace WebCore {
    3737
    38 JSValue JSClipboard::types(ExecState* exec) const
     38JSValue JSDataTransfer::types(ExecState* exec) const
    3939{
    4040    Vector<String> types = impl().types();
  • trunk/Source/WebCore/bindings/js/JSEventCustom.cpp

    r166128 r166965  
    3030#include "JSEvent.h"
    3131
    32 #include "Clipboard.h"
     32#include "DataTransfer.h"
    3333#include "Event.h"
    3434#include "EventHeaders.h"
    3535#include "EventInterfaces.h"
    3636#include "EventNames.h"
    37 #include "JSClipboard.h"
     37#include "JSDataTransfer.h"
    3838#include <runtime/JSLock.h>
    3939#include <wtf/HashMap.h>
  • trunk/Source/WebCore/dom/ClipboardEvent.cpp

    r156241 r166965  
    2424#include "ClipboardEvent.h"
    2525
    26 #include "Clipboard.h"
     26#include "DataTransfer.h"
    2727#include "EventNames.h"
    2828
     
    3333}
    3434
    35 ClipboardEvent::ClipboardEvent(const AtomicString& eventType, bool canBubble, bool cancelable, PassRefPtr<Clipboard> clipboard)
    36     : Event(eventType, canBubble, cancelable), m_clipboard(clipboard)
     35ClipboardEvent::ClipboardEvent(const AtomicString& eventType, bool canBubble, bool cancelable, PassRefPtr<DataTransfer> dataTransfer)
     36    : Event(eventType, canBubble, cancelable), m_dataTransfer(dataTransfer)
    3737{
    3838}
  • trunk/Source/WebCore/dom/ClipboardEvent.h

    r162139 r166965  
    2929namespace WebCore {
    3030
    31     class Clipboard;
     31    class DataTransfer;
    3232
    3333    class ClipboardEvent : public Event {
     
    3939            return adoptRef(new ClipboardEvent);
    4040        }
    41         static PassRefPtr<ClipboardEvent> create(const AtomicString& type, bool canBubbleArg, bool cancelableArg, PassRefPtr<Clipboard> clipboardArg)
     41        static PassRefPtr<ClipboardEvent> create(const AtomicString& type, bool canBubbleArg, bool cancelableArg, PassRefPtr<DataTransfer> clipboardArg)
    4242        {
    4343            return adoptRef(new ClipboardEvent(type, canBubbleArg, cancelableArg, clipboardArg));
    4444        }
    4545
    46         Clipboard* clipboard() const { return m_clipboard.get(); }
     46        virtual DataTransfer* internalDataTransfer() const override { return m_dataTransfer.get(); }
    4747
    4848    private:
    4949        ClipboardEvent();
    50         ClipboardEvent(const AtomicString& type, bool canBubbleArg, bool cancelableArg, PassRefPtr<Clipboard>);
     50        ClipboardEvent(const AtomicString& type, bool canBubbleArg, bool cancelableArg, PassRefPtr<DataTransfer>);
    5151
    5252        virtual EventInterface eventInterface() const override;
    5353        virtual bool isClipboardEvent() const override;
    5454
    55         RefPtr<Clipboard> m_clipboard;
     55        RefPtr<DataTransfer> m_dataTransfer;
    5656    };
    5757
  • trunk/Source/WebCore/dom/DOMAllInOne.cpp

    r164853 r166965  
    3838#include "ClientRect.cpp"
    3939#include "ClientRectList.cpp"
    40 #include "Clipboard.cpp"
    4140#include "ClipboardEvent.cpp"
    4241#include "CollectionIndexCache.cpp"
     
    5150#include "DOMNamedFlowCollection.cpp"
    5251#include "DOMStringList.cpp"
     52#include "DataTransfer.cpp"
    5353#include "DatasetDOMStringMap.cpp"
    5454#include "DecodedDataDocumentParser.cpp"
  • trunk/Source/WebCore/dom/DataTransfer.cpp

    r166873 r166965  
    2525
    2626#include "config.h"
    27 #include "Clipboard.h"
     27#include "DataTransfer.h"
    2828
    2929#include "CachedImage.h"
     
    4545    WTF_MAKE_NONCOPYABLE(DragImageLoader); WTF_MAKE_FAST_ALLOCATED;
    4646public:
    47     explicit DragImageLoader(Clipboard*);
     47    explicit DragImageLoader(DataTransfer*);
    4848    void startLoading(CachedResourceHandle<CachedImage>&);
    4949    void stopLoading(CachedResourceHandle<CachedImage>&);
     
    5151private:
    5252    virtual void imageChanged(CachedImage*, const IntRect*) override;
    53     Clipboard* m_clipboard;
     53    DataTransfer* m_dataTransfer;
    5454};
    5555
    5656#endif
    5757
    58 Clipboard::Clipboard(ClipboardAccessPolicy policy, PassOwnPtr<Pasteboard> pasteboard, ClipboardType type, bool forFileDrag)
     58DataTransfer::DataTransfer(DataTransferAccessPolicy policy, PassOwnPtr<Pasteboard> pasteboard, Type type, bool forFileDrag)
    5959    : m_policy(policy)
    6060    , m_pasteboard(pasteboard)
     
    7373}
    7474
    75 PassRefPtr<Clipboard> Clipboard::createForCopyAndPaste(ClipboardAccessPolicy policy)
    76 {
    77     return adoptRef(new Clipboard(policy, policy == ClipboardWritable ? Pasteboard::createPrivate() : Pasteboard::createForCopyAndPaste()));
    78 }
    79 
    80 Clipboard::~Clipboard()
     75PassRefPtr<DataTransfer> DataTransfer::createForCopyAndPaste(DataTransferAccessPolicy policy)
     76{
     77    return adoptRef(new DataTransfer(policy, policy == DataTransferAccessPolicy::Writable ? Pasteboard::createPrivate() : Pasteboard::createForCopyAndPaste()));
     78}
     79
     80DataTransfer::~DataTransfer()
    8181{
    8282#if ENABLE(DRAG_SUPPORT)
     
    8686}
    8787   
    88 void Clipboard::setAccessPolicy(ClipboardAccessPolicy policy)
    89 {
    90     // Once the clipboard goes numb, it can never go back.
    91     ASSERT(m_policy != ClipboardNumb || policy == ClipboardNumb);
     88void DataTransfer::setAccessPolicy(DataTransferAccessPolicy policy)
     89{
     90    // Once the dataTransfer goes numb, it can never go back.
     91    ASSERT(m_policy != DataTransferAccessPolicy::Numb || policy == DataTransferAccessPolicy::Numb);
    9292    m_policy = policy;
    9393}
    9494
    95 bool Clipboard::canReadTypes() const
    96 {
    97     return m_policy == ClipboardReadable || m_policy == ClipboardTypesReadable || m_policy == ClipboardWritable;
    98 }
    99 
    100 bool Clipboard::canReadData() const
    101 {
    102     return m_policy == ClipboardReadable || m_policy == ClipboardWritable;
    103 }
    104 
    105 bool Clipboard::canWriteData() const
    106 {
    107     return m_policy == ClipboardWritable;
    108 }
    109 
    110 void Clipboard::clearData(const String& type)
     95bool DataTransfer::canReadTypes() const
     96{
     97    return m_policy == DataTransferAccessPolicy::Readable || m_policy == DataTransferAccessPolicy::TypesReadable || m_policy == DataTransferAccessPolicy::Writable;
     98}
     99
     100bool DataTransfer::canReadData() const
     101{
     102    return m_policy == DataTransferAccessPolicy::Readable || m_policy == DataTransferAccessPolicy::Writable;
     103}
     104
     105bool DataTransfer::canWriteData() const
     106{
     107    return m_policy == DataTransferAccessPolicy::Writable;
     108}
     109
     110void DataTransfer::clearData(const String& type)
    111111{
    112112    if (!canWriteData())
     
    116116}
    117117
    118 void Clipboard::clearData()
     118void DataTransfer::clearData()
    119119{
    120120    if (!canWriteData())
     
    124124}
    125125
    126 String Clipboard::getData(const String& type) const
     126String DataTransfer::getData(const String& type) const
    127127{
    128128    if (!canReadData())
     
    137137}
    138138
    139 bool Clipboard::setData(const String& type, const String& data)
     139bool DataTransfer::setData(const String& type, const String& data)
    140140{
    141141    if (!canWriteData())
     
    150150}
    151151
    152 Vector<String> Clipboard::types() const
     152Vector<String> DataTransfer::types() const
    153153{
    154154    if (!canReadTypes())
     
    158158}
    159159
    160 PassRefPtr<FileList> Clipboard::files() const
     160PassRefPtr<FileList> DataTransfer::files() const
    161161{
    162162    // FIXME: We could cache the computed file list if it was necessary and helpful.
    163163    // Currently, each access gets a new copy, and thus setData() modifications to the
    164     // clipboard are not reflected in any FileList objects the page has accessed and stored.
     164    // dataTransfer are not reflected in any FileList objects the page has accessed and stored.
    165165
    166166    if (!canReadData())
     
    181181#if !ENABLE(DRAG_SUPPORT)
    182182
    183 String Clipboard::dropEffect() const
     183String DataTransfer::dropEffect() const
    184184{
    185185    return ASCIILiteral("none");
    186186}
    187187
    188 void Clipboard::setDropEffect(const String&)
    189 {
    190 }
    191 
    192 String Clipboard::effectAllowed() const
     188void DataTransfer::setDropEffect(const String&)
     189{
     190}
     191
     192String DataTransfer::effectAllowed() const
    193193{
    194194    return ASCIILiteral("uninitialized");
    195195}
    196196
    197 void Clipboard::setEffectAllowed(const String&)
    198 {
    199 }
    200 
    201 void Clipboard::setDragImage(Element*, int, int)
     197void DataTransfer::setEffectAllowed(const String&)
     198{
     199}
     200
     201void DataTransfer::setDragImage(Element*, int, int)
    202202{
    203203}
     
    205205#else
    206206
    207 PassRefPtr<Clipboard> Clipboard::createForDragAndDrop()
    208 {
    209     return adoptRef(new Clipboard(ClipboardWritable, Pasteboard::createForDragAndDrop(), DragAndDrop));
    210 }
    211 
    212 PassRefPtr<Clipboard> Clipboard::createForDragAndDrop(ClipboardAccessPolicy policy, const DragData& dragData)
    213 {
    214     return adoptRef(new Clipboard(policy, Pasteboard::createForDragAndDrop(dragData), DragAndDrop, dragData.containsFiles()));
    215 }
    216 
    217 bool Clipboard::canSetDragImage() const
     207PassRefPtr<DataTransfer> DataTransfer::createForDragAndDrop()
     208{
     209    return adoptRef(new DataTransfer(DataTransferAccessPolicy::Writable, Pasteboard::createForDragAndDrop(), DragAndDrop));
     210}
     211
     212PassRefPtr<DataTransfer> DataTransfer::createForDragAndDrop(DataTransferAccessPolicy policy, const DragData& dragData)
     213{
     214    return adoptRef(new DataTransfer(policy, Pasteboard::createForDragAndDrop(dragData), DragAndDrop, dragData.containsFiles()));
     215}
     216
     217bool DataTransfer::canSetDragImage() const
    218218{
    219219    // Note that the spec doesn't actually allow drag image modification outside the dragstart
     
    221221    // supported this in the past. On many ports, attempting to set a drag image outside the
    222222    // dragstart operation is a no-op anyway.
    223     return m_forDrag && (m_policy == ClipboardImageWritable || m_policy == ClipboardWritable);
    224 }
    225 
    226 void Clipboard::setDragImage(Element* element, int x, int y)
     223    return m_forDrag && (m_policy == DataTransferAccessPolicy::ImageWritable || m_policy == DataTransferAccessPolicy::Writable);
     224}
     225
     226void DataTransfer::setDragImage(Element* element, int x, int y)
    227227{
    228228    if (!canSetDragImage())
     
    251251}
    252252
    253 void Clipboard::updateDragImage()
     253void DataTransfer::updateDragImage()
    254254{
    255255    // Don't allow setting the image if we haven't started dragging yet; we'll rely on the dragging code
     
    268268#if !PLATFORM(COCOA)
    269269
    270 DragImageRef Clipboard::createDragImage(IntPoint& location) const
     270DragImageRef DataTransfer::createDragImage(IntPoint& location) const
    271271{
    272272    location = m_dragLocation;
     
    286286#endif
    287287
    288 DragImageLoader::DragImageLoader(Clipboard* clipboard)
    289     : m_clipboard(clipboard)
     288DragImageLoader::DragImageLoader(DataTransfer* dataTransfer)
     289    : m_dataTransfer(dataTransfer)
    290290{
    291291}
     
    304304void DragImageLoader::imageChanged(CachedImage*, const IntRect*)
    305305{
    306     m_clipboard->updateDragImage();
     306    m_dataTransfer->updateDragImage();
    307307}
    308308
     
    351351}
    352352
    353 DragOperation Clipboard::sourceOperation() const
     353DragOperation DataTransfer::sourceOperation() const
    354354{
    355355    DragOperation operation = dragOpFromIEOp(m_effectAllowed);
     
    358358}
    359359
    360 DragOperation Clipboard::destinationOperation() const
     360DragOperation DataTransfer::destinationOperation() const
    361361{
    362362    DragOperation operation = dragOpFromIEOp(m_dropEffect);
     
    365365}
    366366
    367 void Clipboard::setSourceOperation(DragOperation operation)
     367void DataTransfer::setSourceOperation(DragOperation operation)
    368368{
    369369    ASSERT_ARG(operation, operation != DragOperationPrivate);
     
    371371}
    372372
    373 void Clipboard::setDestinationOperation(DragOperation operation)
     373void DataTransfer::setDestinationOperation(DragOperation operation)
    374374{
    375375    ASSERT_ARG(operation, operation == DragOperationCopy || operation == DragOperationNone || operation == DragOperationLink || operation == DragOperationGeneric || operation == DragOperationMove || operation == (DragOperation)(DragOperationGeneric | DragOperationMove));
     
    377377}
    378378
    379 String Clipboard::dropEffect() const
     379String DataTransfer::dropEffect() const
    380380{
    381381    return m_dropEffect == "uninitialized" ? ASCIILiteral("none") : m_dropEffect;
    382382}
    383383
    384 void Clipboard::setDropEffect(const String& effect)
     384void DataTransfer::setDropEffect(const String& effect)
    385385{
    386386    if (!m_forDrag)
     
    398398}
    399399
    400 String Clipboard::effectAllowed() const
     400String DataTransfer::effectAllowed() const
    401401{
    402402    return m_effectAllowed;
    403403}
    404404
    405 void Clipboard::setEffectAllowed(const String& effect)
     405void DataTransfer::setEffectAllowed(const String& effect)
    406406{
    407407    if (!m_forDrag)
  • trunk/Source/WebCore/dom/DataTransfer.h

    r166873 r166965  
    2222 */
    2323
    24 #ifndef Clipboard_h
    25 #define Clipboard_h
     24#ifndef DataTransfer_h
     25#define DataTransfer_h
    2626
    2727#include "CachedResourceHandle.h"
    28 #include "ClipboardAccessPolicy.h"
     28#include "DataTransferAccessPolicy.h"
    2929#include "DragActions.h"
    3030#include "DragImage.h"
     
    4343    class Pasteboard;
    4444
    45     class Clipboard : public RefCounted<Clipboard> {
     45    class DataTransfer : public RefCounted<DataTransfer> {
    4646    public:
    47         static PassRefPtr<Clipboard> createForCopyAndPaste(ClipboardAccessPolicy);
     47        static PassRefPtr<DataTransfer> createForCopyAndPaste(DataTransferAccessPolicy);
    4848
    49         ~Clipboard();
     49        ~DataTransfer();
    5050
    5151        String dropEffect() const;
     
    7272#endif
    7373
    74         void setAccessPolicy(ClipboardAccessPolicy);
     74        void setAccessPolicy(DataTransferAccessPolicy);
    7575        bool canReadTypes() const;
    7676        bool canReadData() const;
     
    8080
    8181#if ENABLE(DRAG_SUPPORT)
    82         static PassRefPtr<Clipboard> createForDragAndDrop();
    83         static PassRefPtr<Clipboard> createForDragAndDrop(ClipboardAccessPolicy, const DragData&);
     82        static PassRefPtr<DataTransfer> createForDragAndDrop();
     83        static PassRefPtr<DataTransfer> createForDragAndDrop(DataTransferAccessPolicy, const DragData&);
    8484
    8585        bool dropEffectIsUninitialized() const { return m_dropEffect == "uninitialized"; }
     
    9696
    9797    private:
    98         enum ClipboardType { CopyAndPaste, DragAndDrop };
    99         Clipboard(ClipboardAccessPolicy, PassOwnPtr<Pasteboard>, ClipboardType = CopyAndPaste, bool forFileDrag = false);
     98        enum Type { CopyAndPaste, DragAndDrop };
     99        DataTransfer(DataTransferAccessPolicy, PassOwnPtr<Pasteboard>, Type = CopyAndPaste, bool forFileDrag = false);
    100100
    101101#if ENABLE(DRAG_SUPPORT)
     
    103103#endif
    104104
    105         ClipboardAccessPolicy m_policy;
     105        DataTransferAccessPolicy m_policy;
    106106        OwnPtr<Pasteboard> m_pasteboard;
    107107
     
    121121} // namespace WebCore
    122122
    123 #endif // Clipboard_h
     123#endif // DataTransfer_h
  • trunk/Source/WebCore/dom/DataTransfer.idl

    r166873 r166965  
    2929[
    3030    SkipVTableValidation,
    31 ] interface Clipboard {
     31] interface DataTransfer {
    3232    attribute DOMString dropEffect;
    3333    attribute DOMString effectAllowed;
  • trunk/Source/WebCore/dom/DataTransferAccessPolicy.h

    r166873 r166965  
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25  
    26 #ifndef ClipboardAccessPolicy_h
    27 #define ClipboardAccessPolicy_h
     25
     26#ifndef DataTransferAccessPolicy_h
     27#define DataTransferAccessPolicy_h
    2828
    2929namespace WebCore {
    3030
    31 enum ClipboardAccessPolicy {
    32     ClipboardNumb, ClipboardImageWritable, ClipboardWritable, ClipboardTypesReadable, ClipboardReadable
     31enum class DataTransferAccessPolicy {
     32    Numb, ImageWritable, Writable, TypesReadable, Readable
    3333};
    3434
  • trunk/Source/WebCore/dom/DataTransferItemList.h

    r105825 r166965  
    4040namespace WebCore {
    4141
    42 class Clipboard;
    4342class File;
    4443
  • trunk/Source/WebCore/dom/DataTransferMac.mm

    r166873 r166965  
    2525
    2626#import "config.h"
    27 #import "Clipboard.h"
     27#import "DataTransfer.h"
    2828
    2929#import "CachedImage.h"
     
    3434
    3535// FIXME: Need to refactor and figure out how to handle the flipping in a more sensible way so we can
    36 // use the default Clipboard::dragImage from Clipboard.cpp. Note also that this handles cases that
    37 // Clipboard::dragImage in Clipboard.cpp does not handle correctly, so must resolve that as well.
    38 DragImageRef Clipboard::createDragImage(IntPoint& location) const
     36// use the default DataTransfer::dragImage from DataTransfer.cpp. Note also that this handles cases that
     37// DataTransfer::dragImage in DataTransfer.cpp does not handle correctly, so must resolve that as well.
     38DragImageRef DataTransfer::createDragImage(IntPoint& location) const
    3939{
    4040    DragImageRef result = nil;
  • trunk/Source/WebCore/dom/Event.h

    r164184 r166965  
    3535namespace WebCore {
    3636
    37 class Clipboard;
     37class DataTransfer;
    3838class EventTarget;
    3939class HTMLIFrameElement;
     
    126126    void setLegacyReturnValue(bool returnValue) { setDefaultPrevented(!returnValue); }
    127127
    128     Clipboard* clipboardData() const { return isClipboardEvent() ? clipboard() : 0; }
     128    DataTransfer* clipboardData() const { return isClipboardEvent() ? internalDataTransfer() : 0; }
    129129
    130130    virtual EventInterface eventInterface() const;
     
    170170    void setUnderlyingEvent(PassRefPtr<Event>);
    171171
    172     virtual Clipboard* clipboard() const { return 0; }
     172    virtual DataTransfer* internalDataTransfer() const { return 0; }
    173173
    174174    bool isBeingDispatched() const { return eventPhase(); }
  • trunk/Source/WebCore/dom/Event.idl

    r163389 r166965  
    7777
    7878#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    79     [Custom] readonly attribute Clipboard        clipboardData;
     79    [Custom] readonly attribute DataTransfer        clipboardData;
    8080#endif
    8181
  • trunk/Source/WebCore/dom/MouseEvent.cpp

    r164184 r166965  
    2424#include "MouseEvent.h"
    2525
    26 #include "Clipboard.h"
     26#include "DataTransfer.h"
    2727#include "EventNames.h"
    2828#include "Frame.h"
     
    9393#endif
    9494    bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
    95     PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard> clipboard, bool isSimulated)
     95    PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer> dataTransfer, bool isSimulated)
    9696{
    9797    return adoptRef(new MouseEvent(type, canBubble, cancelable, timestamp, view,
     
    100100        movementX, movementY,
    101101#endif
    102         ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, clipboard, isSimulated));
     102        ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, dataTransfer, isSimulated));
    103103}
    104104
     
    116116                       bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
    117117                       unsigned short button, PassRefPtr<EventTarget> relatedTarget,
    118                        PassRefPtr<Clipboard> clipboard, bool isSimulated)
     118                       PassRefPtr<DataTransfer> dataTransfer, bool isSimulated)
    119119    : MouseRelatedEvent(eventType, canBubble, cancelable, timestamp, view, detail, IntPoint(screenX, screenY),
    120120                        IntPoint(pageX, pageY),
     
    126126    , m_buttonDown(button != (unsigned short)-1)
    127127    , m_relatedTarget(relatedTarget)
    128     , m_clipboard(clipboard)
     128    , m_dataTransfer(dataTransfer)
    129129{
    130130}
     
    140140    , m_buttonDown(initializer.button != (unsigned short)-1)
    141141    , m_relatedTarget(initializer.relatedTarget)
    142     , m_clipboard(0 /* clipboard */)
     142    , m_dataTransfer(0 /* dataTransfer */)
    143143{
    144144    initCoordinates(IntPoint(initializer.clientX, initializer.clientY));
     
    171171
    172172    // FIXME: m_isSimulated is not set to false here.
    173     // FIXME: m_clipboard is not set to 0 here.
     173    // FIXME: m_dataTransfer is not set to 0 here.
    174174}
    175175
  • trunk/Source/WebCore/dom/MouseEvent.h

    r164184 r166965  
    2929namespace WebCore {
    3030
    31 class Clipboard;
     31class DataTransfer;
    3232class PlatformMouseEvent;
    3333
     
    6868#endif
    6969        bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
    70         PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard>, bool isSimulated = false);
     70        PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer>, bool isSimulated = false);
    7171
    7272    static PassRefPtr<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget);
     
    8888    void setRelatedTarget(PassRefPtr<EventTarget> relatedTarget) { m_relatedTarget = relatedTarget; }
    8989
    90     Clipboard* clipboard() const override { return m_clipboard.get(); }
    9190
    9291    Node* toElement() const;
    9392    Node* fromElement() const;
    9493
    95     Clipboard* dataTransfer() const { return isDragEvent() ? m_clipboard.get() : 0; }
     94    // FIXME: These functions can be merged if m_dataTransfer is only initialized for drag events.
     95    DataTransfer* dataTransfer() const { return isDragEvent() ? m_dataTransfer.get() : 0; }
     96    virtual DataTransfer* internalDataTransfer() const override { return m_dataTransfer.get(); }
    9697
    9798    virtual EventInterface eventInterface() const override;
     
    110111#endif
    111112        bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
    112         PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard>, bool isSimulated);
     113        PassRefPtr<EventTarget> relatedTarget, PassRefPtr<DataTransfer>, bool isSimulated);
    113114
    114115    MouseEvent(const AtomicString& type, const MouseEventInit&);
     
    120121    bool m_buttonDown;
    121122    RefPtr<EventTarget> m_relatedTarget;
    122     RefPtr<Clipboard> m_clipboard;
     123    RefPtr<DataTransfer> m_dataTransfer;
    123124};
    124125
  • trunk/Source/WebCore/dom/MouseEvent.idl

    r159061 r166965  
    6060
    6161#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    62     readonly attribute Clipboard        dataTransfer;
     62    readonly attribute DataTransfer     dataTransfer;
    6363#endif
    6464};
  • trunk/Source/WebCore/dom/WheelEvent.cpp

    r164551 r166965  
    2525#include "WheelEvent.h"
    2626
    27 #include "Clipboard.h"
     27#include "DataTransfer.h"
    2828#include "EventNames.h"
    2929#include <wtf/MathExtras.h>
  • trunk/Source/WebCore/editing/Editor.cpp

    r166818 r166965  
    3434#include "CSSPropertyNames.h"
    3535#include "CachedResourceLoader.h"
    36 #include "Clipboard.h"
    3736#include "ClipboardEvent.h"
    3837#include "CompositionEvent.h"
    3938#include "CreateLinkCommand.h"
     39#include "DataTransfer.h"
    4040#include "DeleteSelectionCommand.h"
    4141#include "DictationAlternative.h"
     
    303303bool Editor::canDHTMLCut()
    304304{
    305     return !m_frame.selection().selection().isInPasswordField() && !dispatchCPPEvent(eventNames().beforecutEvent, ClipboardNumb);
     305    return !m_frame.selection().selection().isInPasswordField() && !dispatchCPPEvent(eventNames().beforecutEvent, DataTransferAccessPolicy::Numb);
    306306}
    307307
    308308bool Editor::canDHTMLCopy()
    309309{
    310     return !m_frame.selection().selection().isInPasswordField() && !dispatchCPPEvent(eventNames().beforecopyEvent, ClipboardNumb);
     310    return !m_frame.selection().selection().isInPasswordField() && !dispatchCPPEvent(eventNames().beforecopyEvent, DataTransferAccessPolicy::Numb);
    311311}
    312312
    313313bool Editor::canDHTMLPaste()
    314314{
    315     return !dispatchCPPEvent(eventNames().beforepasteEvent, ClipboardNumb);
     315    return !dispatchCPPEvent(eventNames().beforepasteEvent, DataTransferAccessPolicy::Numb);
    316316}
    317317
     
    735735        return false;
    736736
    737     return !dispatchCPPEvent(eventNames().copyEvent, ClipboardWritable);
     737    return !dispatchCPPEvent(eventNames().copyEvent, DataTransferAccessPolicy::Writable);
    738738}
    739739
     
    743743        return false;
    744744   
    745     return !dispatchCPPEvent(eventNames().cutEvent, ClipboardWritable);
     745    return !dispatchCPPEvent(eventNames().cutEvent, DataTransferAccessPolicy::Writable);
    746746}
    747747
    748748bool Editor::tryDHTMLPaste()
    749749{
    750     return !dispatchCPPEvent(eventNames().pasteEvent, ClipboardReadable);
     750    return !dispatchCPPEvent(eventNames().pasteEvent, DataTransferAccessPolicy::Readable);
    751751}
    752752
     
    916916// Returns whether caller should continue with "the default processing", which is the same as
    917917// the event handler NOT setting the return value to false
    918 bool Editor::dispatchCPPEvent(const AtomicString& eventType, ClipboardAccessPolicy policy)
     918bool Editor::dispatchCPPEvent(const AtomicString& eventType, DataTransferAccessPolicy policy)
    919919{
    920920    Node* target = findEventTargetFromSelection();
     
    922922        return true;
    923923
    924     RefPtr<Clipboard> clipboard = Clipboard::createForCopyAndPaste(policy);
    925 
    926     RefPtr<Event> event = ClipboardEvent::create(eventType, true, true, clipboard);
     924    RefPtr<DataTransfer> dataTransfer = DataTransfer::createForCopyAndPaste(policy);
     925
     926    RefPtr<Event> event = ClipboardEvent::create(eventType, true, true, dataTransfer);
    927927    target->dispatchEvent(event, IGNORE_EXCEPTION);
    928928    bool noDefaultProcessing = event->defaultPrevented();
    929     if (noDefaultProcessing && policy == ClipboardWritable) {
     929    if (noDefaultProcessing && policy == DataTransferAccessPolicy::Writable) {
    930930        OwnPtr<Pasteboard> pasteboard = Pasteboard::createForCopyAndPaste();
    931931        pasteboard->clear();
    932         pasteboard->writePasteboard(clipboard->pasteboard());
    933     }
    934 
    935     // invalidate clipboard here for security
    936     clipboard->setAccessPolicy(ClipboardNumb);
     932        pasteboard->writePasteboard(dataTransfer->pasteboard());
     933    }
     934
     935    // invalidate dataTransfer here for security
     936    dataTransfer->setAccessPolicy(DataTransferAccessPolicy::Numb);
    937937   
    938938    return !noDefaultProcessing;
     
    13141314
    13151315    if (enclosingTextFormControl(m_frame.selection().selection().start()))
    1316         Pasteboard::createForCopyAndPaste()->writePlainText(selectedTextForClipboard(), canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace : Pasteboard::CannotSmartReplace);
     1316        Pasteboard::createForCopyAndPaste()->writePlainText(selectedTextForDataTransfer(), canSmartCopyOrDelete() ? Pasteboard::CanSmartReplace : Pasteboard::CannotSmartReplace);
    13171317    else {
    13181318        HTMLImageElement* imageElement = nullptr;
     
    13311331#else
    13321332            // FIXME: Convert all other platforms to match Mac and delete this.
    1333             Pasteboard::createForCopyAndPaste()->writeSelection(*selection, canSmartCopyOrDelete(), m_frame, IncludeImageAltTextForClipboard);
     1333            Pasteboard::createForCopyAndPaste()->writeSelection(*selection, canSmartCopyOrDelete(), m_frame, IncludeImageAltTextForDataTransfer);
    13341334#endif
    13351335        }
     
    29582958}
    29592959
    2960 String Editor::selectedTextForClipboard() const
     2960String Editor::selectedTextForDataTransfer() const
    29612961{
    29622962    if (m_frame.settings().selectionIncludesAltImageText())
  • trunk/Source/WebCore/editing/Editor.h

    r166818 r166965  
    2727#define Editor_h
    2828
    29 #include "ClipboardAccessPolicy.h"
    3029#include "Color.h"
     30#include "DataTransferAccessPolicy.h"
    3131#include "DictationAlternative.h"
    3232#include "DocumentMarker.h"
     
    5252class AlternativeTextController;
    5353class ArchiveResource;
    54 class Clipboard;
     54class DataTransfer;
    5555class CompositeEditCommand;
    5656class DeleteButtonController;
     
    176176#endif
    177177   
    178     bool dispatchCPPEvent(const AtomicString&, ClipboardAccessPolicy);
     178    bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy);
    179179   
    180180    void applyStyle(StyleProperties*, EditAction = EditActionUnspecified);
     
    348348
    349349    String selectedText() const;
    350     String selectedTextForClipboard() const;
     350    String selectedTextForDataTransfer() const;
    351351    bool findString(const String&, FindOptions);
    352352
  • trunk/Source/WebCore/editing/ios/EditorIOS.mm

    r166168 r166965  
    2828
    2929#include "CachedImage.h"
    30 #include "Clipboard.h"
    3130#include "CSSComputedStyleDeclaration.h"
    3231#include "CSSPrimitiveValueMappings.h"
    3332#include "DOMRangeInternal.h"
     33#include "DataTransfer.h"
    3434#include "DocumentFragment.h"
    3535#include "DocumentLoader.h"
     
    312312String Editor::stringSelectionForPasteboardWithImageAltText()
    313313{
    314     String text = selectedTextForClipboard();
     314    String text = selectedTextForDataTransfer();
    315315    text.replace(noBreakSpace, ' ');
    316316    return text;
  • trunk/Source/WebCore/editing/mac/EditorMac.mm

    r166145 r166965  
    2828
    2929#import "CachedResourceLoader.h"
    30 #import "Clipboard.h"
    3130#import "ColorMac.h"
    3231#import "DOMRangeInternal.h"
     32#import "DataTransfer.h"
    3333#import "DocumentFragment.h"
    3434#import "DocumentLoader.h"
     
    254254    types.append(String(NSStringPboardType));
    255255    platformStrategies()->pasteboardStrategy()->setTypes(types, NSFindPboard);
    256     platformStrategies()->pasteboardStrategy()->setStringForType(m_frame.displayStringModifiedByEncoding(selectedTextForClipboard()), NSStringPboardType, NSFindPboard);
     256    platformStrategies()->pasteboardStrategy()->setStringForType(m_frame.displayStringModifiedByEncoding(selectedTextForDataTransfer()), NSStringPboardType, NSFindPboard);
    257257}
    258258
     
    266266}
    267267
    268 // FIXME: Makes no sense that selectedTextForClipboard always includes alt text, but stringSelectionForPasteboard does not.
    269 // This was left in a bad state when selectedTextForClipboard was added. Need to look over clients and fix this.
     268// FIXME: Makes no sense that selectedTextForDataTransfer always includes alt text, but stringSelectionForPasteboard does not.
     269// This was left in a bad state when selectedTextForDataTransfer was added. Need to look over clients and fix this.
    270270String Editor::stringSelectionForPasteboard()
    271271{
     
    281281    if (!canCopy())
    282282        return "";
    283     String text = selectedTextForClipboard();
     283    String text = selectedTextForDataTransfer();
    284284    text.replace(noBreakSpace, ' ');
    285285    return text;
  • trunk/Source/WebCore/loader/EmptyClients.h

    r166384 r166965  
    573573    virtual ~EmptyDragClient() {}
    574574    virtual void willPerformDragDestinationAction(DragDestinationAction, DragData&) override { }
    575     virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard&) override { }
     575    virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) override { }
    576576    virtual DragDestinationAction actionMaskForDrag(DragData&) override { return DragDestinationActionNone; }
    577577    virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint&) override { return DragSourceActionNone; }
    578     virtual void startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard&, Frame&, bool) override { }
     578    virtual void startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool) override { }
    579579    virtual void dragControllerDestroyed() override { }
    580580};
  • trunk/Source/WebCore/page/DragClient.h

    r165676 r166965  
    3434namespace WebCore {
    3535   
    36 class Clipboard;
     36class DataTransfer;
    3737class DragData;
    3838class Element;
     
    4545
    4646    virtual void willPerformDragDestinationAction(DragDestinationAction, DragData&) = 0;
    47     virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard&) = 0;
     47    virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) = 0;
    4848    virtual DragDestinationAction actionMaskForDrag(DragData&) = 0;
    4949    virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& rootViewPoint) = 0;
    5050   
    51     virtual void startDrag(DragImageRef, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard&, Frame&, bool linkDrag = false) = 0;
     51    virtual void startDrag(DragImageRef, const IntPoint& dragImageOrigin, const IntPoint& eventPos, DataTransfer&, Frame&, bool linkDrag = false) = 0;
    5252    virtual void dragEnded() { }
    5353
  • trunk/Source/WebCore/page/DragController.cpp

    r165676 r166965  
    3030
    3131#include "CachedImage.h"
    32 #include "Clipboard.h"
    33 #include "ClipboardAccessPolicy.h"
    3432#include "CachedResourceLoader.h"
     33#include "DataTransfer.h"
    3534#include "Document.h"
    3635#include "DocumentFragment.h"
     
    186185{
    187186    if (RefPtr<FrameView> v = m_page.mainFrame().view()) {
    188         ClipboardAccessPolicy policy = (!m_documentUnderMouse || m_documentUnderMouse->securityOrigin()->isLocal()) ? ClipboardReadable : ClipboardTypesReadable;
    189         RefPtr<Clipboard> clipboard = Clipboard::createForDragAndDrop(policy, dragData);
    190         clipboard->setSourceOperation(dragData.draggingSourceOperationMask());
    191         m_page.mainFrame().eventHandler().cancelDragAndDrop(createMouseEvent(dragData), clipboard.get());
    192         clipboard->setAccessPolicy(ClipboardNumb);    // invalidate clipboard here for security
     187        DataTransferAccessPolicy policy = (!m_documentUnderMouse || m_documentUnderMouse->securityOrigin()->isLocal()) ? DataTransferAccessPolicy::Readable : DataTransferAccessPolicy::TypesReadable;
     188        RefPtr<DataTransfer> dataTransfer = DataTransfer::createForDragAndDrop(policy, dragData);
     189        dataTransfer->setSourceOperation(dragData.draggingSourceOperationMask());
     190        m_page.mainFrame().eventHandler().cancelDragAndDrop(createMouseEvent(dragData), dataTransfer.get());
     191        dataTransfer->setAccessPolicy(DataTransferAccessPolicy::Numb); // Invalidate dataTransfer here for security.
    193192    }
    194193    mouseMovedIntoDocument(0);
     
    212211        if (mainFrame->view()) {
    213212            // Sending an event can result in the destruction of the view and part.
    214             RefPtr<Clipboard> clipboard = Clipboard::createForDragAndDrop(ClipboardReadable, dragData);
    215             clipboard->setSourceOperation(dragData.draggingSourceOperationMask());
    216             preventedDefault = mainFrame->eventHandler().performDragAndDrop(createMouseEvent(dragData), clipboard.get());
    217             clipboard->setAccessPolicy(ClipboardNumb); // Invalidate clipboard here for security
     213            RefPtr<DataTransfer> dataTransfer = DataTransfer::createForDragAndDrop(DataTransferAccessPolicy::Readable, dragData);
     214            dataTransfer->setSourceOperation(dragData.draggingSourceOperationMask());
     215            preventedDefault = mainFrame->eventHandler().performDragAndDrop(createMouseEvent(dragData), dataTransfer.get());
     216            dataTransfer->setAccessPolicy(DataTransferAccessPolicy::Numb); // Invalidate dataTransfer here for security.
    218217        }
    219218        if (preventedDefault) {
     
    593592        return false;
    594593
    595     ClipboardAccessPolicy policy = m_documentUnderMouse->securityOrigin()->isLocal() ? ClipboardReadable : ClipboardTypesReadable;
    596     RefPtr<Clipboard> clipboard = Clipboard::createForDragAndDrop(policy, dragData);
     594    DataTransferAccessPolicy policy = m_documentUnderMouse->securityOrigin()->isLocal() ? DataTransferAccessPolicy::Readable : DataTransferAccessPolicy::TypesReadable;
     595    RefPtr<DataTransfer> dataTransfer = DataTransfer::createForDragAndDrop(policy, dragData);
    597596    DragOperation srcOpMask = dragData.draggingSourceOperationMask();
    598     clipboard->setSourceOperation(srcOpMask);
     597    dataTransfer->setSourceOperation(srcOpMask);
    599598
    600599    PlatformMouseEvent event = createMouseEvent(dragData);
    601     if (!mainFrame->eventHandler().updateDragAndDrop(event, clipboard.get())) {
    602         clipboard->setAccessPolicy(ClipboardNumb);    // invalidate clipboard here for security
    603         return false;
    604     }
    605 
    606     operation = clipboard->destinationOperation();
    607     if (clipboard->dropEffectIsUninitialized())
     600    if (!mainFrame->eventHandler().updateDragAndDrop(event, dataTransfer.get())) {
     601        dataTransfer->setAccessPolicy(DataTransferAccessPolicy::Numb); // Invalidate dataTransfer here for security.
     602        return false;
     603    }
     604
     605    operation = dataTransfer->destinationOperation();
     606    if (dataTransfer->dropEffectIsUninitialized())
    608607        operation = defaultOperationForDrag(srcOpMask);
    609608    else if (!(srcOpMask & operation)) {
     
    612611    }
    613612
    614     clipboard->setAccessPolicy(ClipboardNumb);    // invalidate clipboard here for security
     613    dataTransfer->setAccessPolicy(DataTransferAccessPolicy::Numb); // Invalidate dataTransfer here for security.
    615614    return true;
    616615}
     
    734733    IntPoint dragImageOffset(0, 0);
    735734
    736     ASSERT(state.clipboard);
    737 
    738     Clipboard& clipboard = *state.clipboard;
     735    ASSERT(state.dataTransfer);
     736
     737    DataTransfer& dataTransfer = *state.dataTransfer;
    739738    if (state.type == DragSourceActionDHTML)
    740         dragImage = clipboard.createDragImage(dragImageOffset);
     739        dragImage = dataTransfer.createDragImage(dragImageOffset);
    741740    if (state.type == DragSourceActionSelection || !imageURL.isEmpty() || !linkURL.isEmpty())
    742741        // Selection, image, and link drags receive a default set of allowed drag operations that
     
    759758    Image* image = getImage(element);
    760759    if (state.type == DragSourceActionSelection) {
    761         if (!clipboard.pasteboard().hasData()) {
     760        if (!dataTransfer.pasteboard().hasData()) {
    762761            // FIXME: This entire block is almost identical to the code in Editor::copy, and the code should be shared.
    763762
     
    768767
    769768            if (enclosingTextFormControl(src.selection().selection().start()))
    770                 clipboard.pasteboard().writePlainText(src.editor().selectedTextForClipboard(), Pasteboard::CannotSmartReplace);
     769                dataTransfer.pasteboard().writePlainText(src.editor().selectedTextForDataTransfer(), Pasteboard::CannotSmartReplace);
    771770            else {
    772771#if PLATFORM(COCOA) || PLATFORM(EFL)
    773                 src.editor().writeSelectionToPasteboard(clipboard.pasteboard());
     772                src.editor().writeSelectionToPasteboard(dataTransfer.pasteboard());
    774773#else
    775774                // FIXME: Convert all other platforms to match Mac and delete this.
    776                 clipboard.pasteboard().writeSelection(*selectionRange, src.editor().canSmartCopyOrDelete(), src, IncludeImageAltTextForClipboard);
     775                dataTransfer.pasteboard().writeSelection(*selectionRange, src.editor().canSmartCopyOrDelete(), src, IncludeImageAltTextForDataTransfer);
    777776#endif
    778777            }
     
    780779            src.editor().didWriteSelectionToPasteboard();
    781780        }
    782         m_client.willPerformDragSourceAction(DragSourceActionSelection, dragOrigin, clipboard);
     781        m_client.willPerformDragSourceAction(DragSourceActionSelection, dragOrigin, dataTransfer);
    783782        if (!dragImage) {
    784783            dragImage = dissolveDragImageToFraction(createDragImageForSelection(src), DragImageAlpha);
     
    786785            m_dragOffset = IntPoint(dragOrigin.x() - dragLoc.x(), dragOrigin.y() - dragLoc.y());
    787786        }
    788         doSystemDrag(dragImage, dragLoc, dragOrigin, clipboard, src, false);
     787        doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
    789788    } else if (!imageURL.isEmpty() && image && !image->isNull() && (m_dragSourceAction & DragSourceActionImage)) {
    790789        // We shouldn't be starting a drag for an image that can't provide an extension.
    791790        // This is an early detection for problems encountered later upon drop.
    792791        ASSERT(!image->filenameExtension().isEmpty());
    793         if (!clipboard.pasteboard().hasData()) {
     792        if (!dataTransfer.pasteboard().hasData()) {
    794793            m_draggingImageURL = imageURL;
    795794            if (element.isContentRichlyEditable())
    796795                selectElement(element);
    797             declareAndWriteDragImage(clipboard, element, !linkURL.isEmpty() ? linkURL : imageURL, hitTestResult.altDisplayString());
    798         }
    799 
    800         m_client.willPerformDragSourceAction(DragSourceActionImage, dragOrigin, clipboard);
     796            declareAndWriteDragImage(dataTransfer, element, !linkURL.isEmpty() ? linkURL : imageURL, hitTestResult.altDisplayString());
     797        }
     798
     799        m_client.willPerformDragSourceAction(DragSourceActionImage, dragOrigin, dataTransfer);
    801800
    802801        if (!dragImage) {
    803802            IntRect imageRect = hitTestResult.imageRect();
    804803            imageRect.setLocation(m_page.mainFrame().view()->rootViewToContents(src.view()->contentsToRootView(imageRect.location())));
    805             doImageDrag(element, dragOrigin, hitTestResult.imageRect(), clipboard, src, m_dragOffset);
     804            doImageDrag(element, dragOrigin, hitTestResult.imageRect(), dataTransfer, src, m_dragOffset);
    806805        } else {
    807806            // DHTML defined drag image
    808             doSystemDrag(dragImage, dragLoc, dragOrigin, clipboard, src, false);
     807            doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
    809808        }
    810809    } else if (!linkURL.isEmpty() && (m_dragSourceAction & DragSourceActionLink)) {
    811         if (!clipboard.pasteboard().hasData())
    812             // Simplify whitespace so the title put on the clipboard resembles what the user sees
     810        if (!dataTransfer.pasteboard().hasData()) {
     811            // Simplify whitespace so the title put on the dataTransfer resembles what the user sees
    813812            // on the web page. This includes replacing newlines with spaces.
    814             src.editor().copyURL(linkURL, hitTestResult.textContent().simplifyWhiteSpace(), clipboard.pasteboard());
     813            src.editor().copyURL(linkURL, hitTestResult.textContent().simplifyWhiteSpace(), dataTransfer.pasteboard());
     814        }
    815815
    816816        const VisibleSelection& sourceSelection = src.selection().selection();
     
    825825        }
    826826
    827         m_client.willPerformDragSourceAction(DragSourceActionLink, dragOrigin, clipboard);
     827        m_client.willPerformDragSourceAction(DragSourceActionLink, dragOrigin, dataTransfer);
    828828        if (!dragImage) {
    829829            dragImage = createDragImageForLink(linkURL, hitTestResult.textContent(), src.settings().fontRenderingMode());
     
    834834            dragImage = scaleDragImage(dragImage, FloatSize(m_page.deviceScaleFactor(), m_page.deviceScaleFactor()));
    835835        }
    836         doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, clipboard, src, true);
     836        doSystemDrag(dragImage, dragLoc, mouseDraggedPoint, dataTransfer, src, true);
    837837    } else if (state.type == DragSourceActionDHTML) {
    838838        if (dragImage) {
    839839            ASSERT(m_dragSourceAction & DragSourceActionDHTML);
    840             m_client.willPerformDragSourceAction(DragSourceActionDHTML, dragOrigin, clipboard);
    841             doSystemDrag(dragImage, dragLoc, dragOrigin, clipboard, src, false);
     840            m_client.willPerformDragSourceAction(DragSourceActionDHTML, dragOrigin, dataTransfer);
     841            doSystemDrag(dragImage, dragLoc, dragOrigin, dataTransfer, src, false);
    842842        } else
    843843            startedDrag = false;
     
    853853}
    854854
    855 void DragController::doImageDrag(Element& element, const IntPoint& dragOrigin, const IntRect& layoutRect, Clipboard& clipboard, Frame& frame, IntPoint& dragImageOffset)
     855void DragController::doImageDrag(Element& element, const IntPoint& dragOrigin, const IntRect& layoutRect, DataTransfer& dataTransfer, Frame& frame, IntPoint& dragImageOffset)
    856856{
    857857    IntPoint mouseDownPoint = dragOrigin;
     
    896896
    897897    dragImageOffset = mouseDownPoint + scaledOrigin;
    898     doSystemDrag(dragImage, dragImageOffset, dragOrigin, clipboard, frame, false);
     898    doSystemDrag(dragImage, dragImageOffset, dragOrigin, dataTransfer, frame, false);
    899899
    900900    deleteDragImage(dragImage);
    901901}
    902902
    903 void DragController::doSystemDrag(DragImageRef image, const IntPoint& dragLoc, const IntPoint& eventPos, Clipboard& clipboard, Frame& frame, bool forLink)
     903void DragController::doSystemDrag(DragImageRef image, const IntPoint& dragLoc, const IntPoint& eventPos, DataTransfer& dataTransfer, Frame& frame, bool forLink)
    904904{
    905905    m_didInitiateDrag = true;
     
    909909    RefPtr<FrameView> viewProtector = frameProtector->view();
    910910    m_client.startDrag(image, viewProtector->rootViewToContents(frame.view()->contentsToRootView(dragLoc)),
    911         viewProtector->rootViewToContents(frame.view()->contentsToRootView(eventPos)), clipboard, frameProtector.get(), forLink);
     911        viewProtector->rootViewToContents(frame.view()->contentsToRootView(eventPos)), dataTransfer, frameProtector.get(), forLink);
    912912    // DragClient::startDrag can cause our Page to dispear, deallocating |this|.
    913913    if (!frameProtector->page())
  • trunk/Source/WebCore/page/DragController.h

    r165676 r166965  
    3434namespace WebCore {
    3535
    36     class Clipboard;
     36    class DataTransfer;
    3737    class Document;
    3838    class DragClient;
     
    107107        void mouseMovedIntoDocument(Document*);
    108108
    109         void doImageDrag(Element&, const IntPoint&, const IntRect&, Clipboard&, Frame&, IntPoint&);
    110         void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard&, Frame&, bool forLink);
     109        void doImageDrag(Element&, const IntPoint&, const IntRect&, DataTransfer&, Frame&, IntPoint&);
     110        void doSystemDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool forLink);
    111111        void cleanupAfterSystemDrag();
    112         void declareAndWriteDragImage(Clipboard&, Element&, const URL&, const String& label);
     112        void declareAndWriteDragImage(DataTransfer&, Element&, const URL&, const String& label);
    113113
    114114        Page& m_page;
  • trunk/Source/WebCore/page/DragState.h

    r165676 r166965  
    2828#define DragState_h
    2929
    30 #include "Clipboard.h"
     30#include "DataTransfer.h"
    3131#include "DragActions.h"
    3232#include "Element.h"
     
    3838    bool shouldDispatchEvents;
    3939    DragSourceAction type;
    40     RefPtr<Clipboard> clipboard; // Used on only the source side of dragging.
     40    RefPtr<DataTransfer> dataTransfer; // Used on only the source side of dragging.
    4141};
    4242
  • trunk/Source/WebCore/page/EventHandler.cpp

    r166582 r166965  
    20132013#if ENABLE(DRAG_SUPPORT)
    20142014
    2015 bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Element& dragTarget, const PlatformMouseEvent& event, Clipboard* clipboard)
     2015bool EventHandler::dispatchDragEvent(const AtomicString& eventType, Element& dragTarget, const PlatformMouseEvent& event, DataTransfer* dataTransfer)
    20162016{
    20172017    FrameView* view = m_frame.view();
     
    20292029#endif
    20302030        event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
    2031         0, 0, clipboard);
     2031        0, 0, dataTransfer);
    20322032
    20332033    dragTarget.dispatchEvent(me.get(), IGNORE_EXCEPTION);
     
    20732073}
    20742074
    2075 static inline bool hasFileOfType(Clipboard& clipboard, const String& type)
    2076 {
    2077     RefPtr<FileList> fileList = clipboard.files();
     2075static inline bool hasFileOfType(DataTransfer& dataTransfer, const String& type)
     2076{
     2077    RefPtr<FileList> fileList = dataTransfer.files();
    20782078    for (unsigned i = 0; i < fileList->length(); i++) {
    20792079        if (equalIgnoringCase(fileList->item(i)->type(), type))
     
    20832083}
    20842084
    2085 static inline bool hasStringOfType(Clipboard& clipboard, const String& type)
    2086 {
    2087     return !type.isNull() && clipboard.types().contains(type);
    2088 }
    2089 
    2090 static bool hasDropZoneType(Clipboard& clipboard, const String& keyword)
     2085static inline bool hasStringOfType(DataTransfer& dataTransfer, const String& type)
     2086{
     2087    return !type.isNull() && dataTransfer.types().contains(type);
     2088}
     2089
     2090static bool hasDropZoneType(DataTransfer& dataTransfer, const String& keyword)
    20912091{
    20922092    if (keyword.startsWith("file:"))
    2093         return hasFileOfType(clipboard, keyword.substring(5));
     2093        return hasFileOfType(dataTransfer, keyword.substring(5));
    20942094
    20952095    if (keyword.startsWith("string:"))
    2096         return hasStringOfType(clipboard, keyword.substring(7));
     2096        return hasStringOfType(dataTransfer, keyword.substring(7));
    20972097
    20982098    return false;
    20992099}
    21002100
    2101 static bool findDropZone(Node* target, Clipboard* clipboard)
     2101static bool findDropZone(Node* target, DataTransfer* dataTransfer)
    21022102{
    21032103    Element* element = target->isElementNode() ? toElement(target) : target->parentElement();
     
    21222122                    dragOperation = op;
    21232123            } else
    2124                 matched = matched || hasDropZoneType(*clipboard, keywords[i].string());
     2124                matched = matched || hasDropZoneType(*dataTransfer, keywords[i].string());
    21252125
    21262126            if (matched && dragOperation != DragOperationNone)
     
    21282128        }
    21292129        if (matched) {
    2130             clipboard->setDropEffect(convertDragOperationToDropZoneOperation(dragOperation));
     2130            dataTransfer->setDropEffect(convertDragOperationToDropZoneOperation(dragOperation));
    21312131            return true;
    21322132        }
     
    21352135}
    21362136   
    2137 bool EventHandler::updateDragAndDrop(const PlatformMouseEvent& event, Clipboard* clipboard)
     2137bool EventHandler::updateDragAndDrop(const PlatformMouseEvent& event, DataTransfer* dataTransfer)
    21382138{
    21392139    bool accept = false;
     
    21652165        if (targetIsFrame(newTarget.get(), targetFrame)) {
    21662166            if (targetFrame)
    2167                 accept = targetFrame->eventHandler().updateDragAndDrop(event, clipboard);
     2167                accept = targetFrame->eventHandler().updateDragAndDrop(event, dataTransfer);
    21682168        } else if (newTarget) {
    21692169            // As per section 7.9.4 of the HTML 5 spec., we must always fire a drag event before firing a dragenter, dragleave, or dragover event.
     
    21722172                dispatchDragSrcEvent(eventNames().dragEvent, event);
    21732173            }
    2174             accept = dispatchDragEvent(eventNames().dragenterEvent, *newTarget, event, clipboard);
     2174            accept = dispatchDragEvent(eventNames().dragenterEvent, *newTarget, event, dataTransfer);
    21752175            if (!accept)
    2176                 accept = findDropZone(newTarget.get(), clipboard);
     2176                accept = findDropZone(newTarget.get(), dataTransfer);
    21772177        }
    21782178
    21792179        if (targetIsFrame(m_dragTarget.get(), targetFrame)) {
    21802180            if (targetFrame)
    2181                 accept = targetFrame->eventHandler().updateDragAndDrop(event, clipboard);
     2181                accept = targetFrame->eventHandler().updateDragAndDrop(event, dataTransfer);
    21822182        } else if (m_dragTarget)
    2183             dispatchDragEvent(eventNames().dragleaveEvent, *m_dragTarget, event, clipboard);
     2183            dispatchDragEvent(eventNames().dragleaveEvent, *m_dragTarget, event, dataTransfer);
    21842184
    21852185        if (newTarget) {
     
    21922192        if (targetIsFrame(newTarget.get(), targetFrame)) {
    21932193            if (targetFrame)
    2194                 accept = targetFrame->eventHandler().updateDragAndDrop(event, clipboard);
     2194                accept = targetFrame->eventHandler().updateDragAndDrop(event, dataTransfer);
    21952195        } else if (newTarget) {
    21962196            // Note, when dealing with sub-frames, we may need to fire only a dragover event as a drag event may have been fired earlier.
     
    21992199                dispatchDragSrcEvent(eventNames().dragEvent, event);
    22002200            }
    2201             accept = dispatchDragEvent(eventNames().dragoverEvent, *newTarget, event, clipboard);
     2201            accept = dispatchDragEvent(eventNames().dragoverEvent, *newTarget, event, dataTransfer);
    22022202            if (!accept)
    2203                 accept = findDropZone(newTarget.get(), clipboard);
     2203                accept = findDropZone(newTarget.get(), dataTransfer);
    22042204            m_shouldOnlyFireDragOverEvent = false;
    22052205        }
     
    22092209}
    22102210
    2211 void EventHandler::cancelDragAndDrop(const PlatformMouseEvent& event, Clipboard* clipboard)
     2211void EventHandler::cancelDragAndDrop(const PlatformMouseEvent& event, DataTransfer* dataTransfer)
    22122212{
    22132213    Frame* targetFrame;
    22142214    if (targetIsFrame(m_dragTarget.get(), targetFrame)) {
    22152215        if (targetFrame)
    2216             targetFrame->eventHandler().cancelDragAndDrop(event, clipboard);
     2216            targetFrame->eventHandler().cancelDragAndDrop(event, dataTransfer);
    22172217    } else if (m_dragTarget) {
    22182218        if (dragState().source && dragState().shouldDispatchEvents)
    22192219            dispatchDragSrcEvent(eventNames().dragEvent, event);
    2220         dispatchDragEvent(eventNames().dragleaveEvent, *m_dragTarget, event, clipboard);
     2220        dispatchDragEvent(eventNames().dragleaveEvent, *m_dragTarget, event, dataTransfer);
    22212221    }
    22222222    clearDragState();
    22232223}
    22242224
    2225 bool EventHandler::performDragAndDrop(const PlatformMouseEvent& event, Clipboard* clipboard)
     2225bool EventHandler::performDragAndDrop(const PlatformMouseEvent& event, DataTransfer* dataTransfer)
    22262226{
    22272227    Frame* targetFrame;
     
    22292229    if (targetIsFrame(m_dragTarget.get(), targetFrame)) {
    22302230        if (targetFrame)
    2231             preventedDefault = targetFrame->eventHandler().performDragAndDrop(event, clipboard);
     2231            preventedDefault = targetFrame->eventHandler().performDragAndDrop(event, dataTransfer);
    22322232    } else if (m_dragTarget)
    2233         preventedDefault = dispatchDragEvent(eventNames().dropEvent, *m_dragTarget, event, clipboard);
     2233        preventedDefault = dispatchDragEvent(eventNames().dropEvent, *m_dragTarget, event, dataTransfer);
    22342234    clearDragState();
    22352235    return preventedDefault;
     
    31663166}
    31673167   
    3168 void EventHandler::freeClipboard()
    3169 {
    3170     if (!dragState().clipboard)
    3171         return;
    3172     dragState().clipboard->setAccessPolicy(ClipboardNumb);
    3173     dragState().clipboard = 0;
     3168void EventHandler::freeDataTransfer()
     3169{
     3170    if (!dragState().dataTransfer)
     3171        return;
     3172    dragState().dataTransfer->setAccessPolicy(DataTransferAccessPolicy::Numb);
     3173    dragState().dataTransfer = 0;
    31743174}
    31753175
     
    31813181
    31823182    if (dragState().source && dragState().shouldDispatchEvents) {
    3183         dragState().clipboard->setDestinationOperation(operation);
     3183        dragState().dataTransfer->setDestinationOperation(operation);
    31843184        // For now we don't care if event handler cancels default behavior, since there is no default behavior.
    31853185        dispatchDragSrcEvent(eventNames().dragendEvent, event);
    31863186    }
    3187     freeClipboard();
     3187    freeDataTransfer();
    31883188    dragState().source = 0;
    31893189    // In case the drag was ended due to an escape key press we need to ensure
     
    32023202bool EventHandler::dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouseEvent& event)
    32033203{
    3204     return !dispatchDragEvent(eventType, *dragState().source, event, dragState().clipboard.get());
     3204    return !dispatchDragEvent(eventType, *dragState().source, event, dragState().dataTransfer.get());
    32053205}
    32063206   
     
    32913291    DragOperation srcOp = DragOperationNone;     
    32923292   
    3293     // This does work only if we missed a dragEnd. Do it anyway, just to make sure the old clipboard gets numbed.
    3294     freeClipboard();
    3295 
    3296     dragState().clipboard = createDraggingClipboard();
     3293    // This does work only if we missed a dragEnd. Do it anyway, just to make sure the old dataTransfer gets numbed.
     3294    freeDataTransfer();
     3295
     3296    dragState().dataTransfer = createDraggingDataTransfer();
    32973297   
    32983298    if (dragState().shouldDispatchEvents) {
     
    33033303                FloatPoint absPos = renderer->localToAbsolute();
    33043304                IntSize delta = m_mouseDownPos - roundedIntPoint(absPos);
    3305                 dragState().clipboard->setDragImage(dragState().source.get(), delta.width(), delta.height());
     3305                dragState().dataTransfer->setDragImage(dragState().source.get(), delta.width(), delta.height());
    33063306            } else {
    33073307                // The renderer has disappeared, this can happen if the onStartDrag handler has hidden
     
    33153315            && !m_frame.selection().selection().isInPasswordField();
    33163316       
    3317         // Invalidate clipboard here against anymore pasteboard writing for security. The drag
     3317        // Invalidate dataTransfer here against anymore pasteboard writing for security. The drag
    33183318        // image can still be changed as we drag, but not the pasteboard data.
    3319         dragState().clipboard->setAccessPolicy(ClipboardImageWritable);
     3319        dragState().dataTransfer->setAccessPolicy(DataTransferAccessPolicy::ImageWritable);
    33203320       
    33213321        if (m_mouseDownMayStartDrag) {
    33223322            // Gather values from DHTML element, if it set any.
    3323             srcOp = dragState().clipboard->sourceOperation();
     3323            srcOp = dragState().dataTransfer->sourceOperation();
    33243324           
    33253325            // Yuck, a draggedImage:moveTo: message can be fired as a result of kicking off the
    33263326            // drag with dragImage! Because of that dumb reentrancy, we may think we've not
    33273327            // started the drag when that happens. So we have to assume it's started before we kick it off.
    3328             dragState().clipboard->setDragHasStarted();
     3328            dragState().dataTransfer->setDragHasStarted();
    33293329        }
    33303330    }
     
    33493349    if (!m_mouseDownMayStartDrag) {
    33503350        // Something failed to start the drag, clean up.
    3351         freeClipboard();
     3351        freeDataTransfer();
    33523352        dragState().source = 0;
    33533353    }
  • trunk/Source/WebCore/page/EventHandler.h

    r165676 r166965  
    6969
    7070class AutoscrollController;
    71 class Clipboard;
    7271class ContainerNode;
     72class DataTransfer;
    7373class Document;
    7474class Element;
     
    160160
    161161#if ENABLE(DRAG_SUPPORT)
    162     bool updateDragAndDrop(const PlatformMouseEvent&, Clipboard*);
    163     void cancelDragAndDrop(const PlatformMouseEvent&, Clipboard*);
    164     bool performDragAndDrop(const PlatformMouseEvent&, Clipboard*);
     162    bool updateDragAndDrop(const PlatformMouseEvent&, DataTransfer*);
     163    void cancelDragAndDrop(const PlatformMouseEvent&, DataTransfer*);
     164    bool performDragAndDrop(const PlatformMouseEvent&, DataTransfer*);
    165165    void updateDragStateAfterEditDragIfNeeded(Element* rootEditableElement);
    166166#endif
     
    306306    static const double TextDragDelay;
    307307   
    308     PassRefPtr<Clipboard> createDraggingClipboard() const;
     308    PassRefPtr<DataTransfer> createDraggingDataTransfer() const;
    309309#endif // ENABLE(DRAG_SUPPORT)
    310310
     
    366366    bool dispatchMouseEvent(const AtomicString& eventType, Node* target, bool cancelable, int clickCount, const PlatformMouseEvent&, bool setUnder);
    367367#if ENABLE(DRAG_SUPPORT)
    368     bool dispatchDragEvent(const AtomicString& eventType, Element& target, const PlatformMouseEvent&, Clipboard*);
    369 
    370     void freeClipboard();
     368    bool dispatchDragEvent(const AtomicString& eventType, Element& target, const PlatformMouseEvent&, DataTransfer*);
     369
     370    void freeDataTransfer();
    371371
    372372    bool handleDrag(const MouseEventWithHitTestResults&, CheckDragHysteresis);
  • trunk/Source/WebCore/page/efl/EventHandlerEfl.cpp

    r165676 r166965  
    3030#include "EventHandler.h"
    3131
    32 #include "Clipboard.h"
     32#include "DataTransfer.h"
    3333#include "EventNames.h"
    3434#include "FloatPoint.h"
     
    9898
    9999#if ENABLE(DRAG_SUPPORT)
    100 PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
     100PassRefPtr<DataTransfer> EventHandler::createDraggingDataTransfer() const
    101101{
    102     return Clipboard::createForDragAndDrop();
     102    return DataTransfer::createForDragAndDrop();
    103103}
    104104#endif
  • trunk/Source/WebCore/page/gtk/DragControllerGtk.cpp

    r165676 r166965  
    2727#include "DragController.h"
    2828
    29 #include "Clipboard.h"
     29#include "DataTransfer.h"
    3030#include "DragData.h"
    3131#include "Element.h"
     
    7070}
    7171
    72 void DragController::declareAndWriteDragImage(Clipboard& clipboard, Element& element, const URL& url, const String& label)
     72void DragController::declareAndWriteDragImage(DataTransfer& dataTransfer, Element& element, const URL& url, const String& label)
    7373{
    74     clipboard.pasteboard().writeImage(element, url, label);
     74    dataTransfer.pasteboard().writeImage(element, url, label);
    7575}
    7676
  • trunk/Source/WebCore/page/gtk/EventHandlerGtk.cpp

    r165688 r166965  
    2727#include "EventHandler.h"
    2828
    29 #include "Clipboard.h"
     29#include "DataTransfer.h"
    3030#include "FloatPoint.h"
    3131#include "FocusController.h"
     
    9898
    9999#if ENABLE(DRAG_SUPPORT)
    100 PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
     100PassRefPtr<DataTransfer> EventHandler::createDraggingDataTransfer() const
    101101{
    102     return Clipboard::createForDragAndDrop();
     102    return DataTransfer::createForDragAndDrop();
    103103}
    104104#endif
  • trunk/Source/WebCore/page/mac/DragControllerMac.mm

    r165676 r166965  
    2929#if ENABLE(DRAG_SUPPORT)
    3030
    31 #import "Clipboard.h"
     31#import "DataTransfer.h"
    3232#import "DragClient.h"
    3333#import "DragData.h"
     
    8383}
    8484
    85 void DragController::declareAndWriteDragImage(Clipboard& clipboard, Element& element, const URL& url, const String& label)
     85void DragController::declareAndWriteDragImage(DataTransfer& dataTransfer, Element& element, const URL& url, const String& label)
    8686{
    87     m_client.declareAndWriteDragImage(clipboard.pasteboard().name(), element, url, label, element.document().frame());
     87    m_client.declareAndWriteDragImage(dataTransfer.pasteboard().name(), element, url, label, element.document().frame());
    8888}
    8989
  • trunk/Source/WebCore/page/mac/EventHandlerMac.mm

    r165676 r166965  
    3131#include "Chrome.h"
    3232#include "ChromeClient.h"
    33 #include "Clipboard.h"
     33#include "DataTransfer.h"
    3434#include "DragController.h"
    3535#include "EventNames.h"
     
    681681#if ENABLE(DRAG_SUPPORT)
    682682
    683 PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
     683PassRefPtr<DataTransfer> EventHandler::createDraggingDataTransfer() const
    684684{
    685685    // Must be done before ondragstart adds types and data to the pboard,
     
    687687    OwnPtr<Pasteboard> pasteboard = Pasteboard::create(NSDragPboard);
    688688    pasteboard->clear();
    689     return Clipboard::createForDragAndDrop();
     689    return DataTransfer::createForDragAndDrop();
    690690}
    691691
  • trunk/Source/WebCore/page/win/DragControllerWin.cpp

    r165676 r166965  
    2727#include "DragController.h"
    2828
    29 #include "Clipboard.h"
     29#include "DataTransfer.h"
    3030#include "DragData.h"
    3131#include "Element.h"
     
    7070}
    7171
    72 void DragController::declareAndWriteDragImage(Clipboard& clipboard, Element& element, const URL& url, const String& label)
     72void DragController::declareAndWriteDragImage(DataTransfer& dataTransfer, Element& element, const URL& url, const String& label)
    7373{
    74     Pasteboard& pasteboard = clipboard.pasteboard();
     74    Pasteboard& pasteboard = dataTransfer.pasteboard();
    7575
    7676    // FIXME: Do we really need this check?
  • trunk/Source/WebCore/page/win/EventHandlerWin.cpp

    r165676 r166965  
    2929
    3030#include "COMPtr.h"
    31 #include "Clipboard.h"
    3231#include "Cursor.h"
     32#include "DataTransfer.h"
    3333#include "FloatPoint.h"
    3434#include "FocusController.h"
     
    9393
    9494#if ENABLE(DRAG_SUPPORT)
    95 PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
     95PassRefPtr<DataTransfer> EventHandler::createDraggingDataTransfer() const
    9696{
    9797#if OS(WINCE)
    9898    return 0;
    9999#else
    100     return Clipboard::createForDragAndDrop();
     100    return DataTransfer::createForDragAndDrop();
    101101#endif
    102102}
  • trunk/Source/WebCore/platform/Pasteboard.h

    r165676 r166965  
    6363class SharedBuffer;
    6464
    65 enum ShouldSerializeSelectedTextForClipboard { DefaultSelectedTextType, IncludeImageAltTextForClipboard };
     65enum ShouldSerializeSelectedTextForDataTransfer { DefaultSelectedTextType, IncludeImageAltTextForDataTransfer };
    6666
    6767// For writing to the pasteboard. Generally sorted with the richest formats on top.
     
    166166    PassRefPtr<DocumentFragment> documentFragment(Frame&, Range&, bool allowPlainText, bool& chosePlainText); // FIXME: Layering violation.
    167167    void writeImage(Element&, const URL&, const String& title); // FIXME: Layering violation.
    168     void writeSelection(Range&, bool canSmartCopyOrDelete, Frame&, ShouldSerializeSelectedTextForClipboard = DefaultSelectedTextType); // FIXME: Layering violation.
     168    void writeSelection(Range&, bool canSmartCopyOrDelete, Frame&, ShouldSerializeSelectedTextForDataTransfer = DefaultSelectedTextType); // FIXME: Layering violation.
    169169#endif
    170170
  • trunk/Source/WebCore/platform/gtk/PasteboardGtk.cpp

    r165699 r166965  
    159159}
    160160
    161 void Pasteboard::writeSelection(Range& selectedRange, bool canSmartCopyOrDelete, Frame& frame, ShouldSerializeSelectedTextForClipboard shouldSerializeSelectedTextForClipboard)
     161void Pasteboard::writeSelection(Range& selectedRange, bool canSmartCopyOrDelete, Frame& frame, ShouldSerializeSelectedTextForDataTransfer shouldSerializeSelectedTextForDataTransfer)
    162162{
    163163    m_dataObject->clearAll();
    164     m_dataObject->setText(shouldSerializeSelectedTextForClipboard == IncludeImageAltTextForClipboard ? frame.editor().selectedTextForClipboard() : frame.editor().selectedText());
     164    m_dataObject->setText(shouldSerializeSelectedTextForDataTransfer == IncludeImageAltTextForDataTransfer ? frame.editor().selectedTextForDataTransfer() : frame.editor().selectedText());
    165165    m_dataObject->setMarkup(createMarkup(selectedRange, 0, AnnotateForInterchange, false, ResolveNonLocalURLs));
    166166
  • trunk/Source/WebCore/platform/mac/PasteboardMac.mm

    r166145 r166965  
    2828
    2929#import "CachedImage.h"
    30 #import "Clipboard.h"
    3130#import "DOMRangeInternal.h"
    3231#import "Document.h"
  • trunk/Source/WebCore/platform/win/PasteboardWin.cpp

    r166582 r166965  
    439439        ::GlobalFree(medium.hGlobal);
    440440
    441     String str = frame.editor().selectedTextForClipboard();
     441    String str = frame.editor().selectedTextForDataTransfer();
    442442    replaceNewlinesWithWindowsStyleNewlines(str);
    443443    replaceNBSPWithSpace(str);
     
    451451}
    452452
    453 void Pasteboard::writeSelection(Range& selectedRange, bool canSmartCopyOrDelete, Frame& frame, ShouldSerializeSelectedTextForClipboard shouldSerializeSelectedTextForClipboard)
     453void Pasteboard::writeSelection(Range& selectedRange, bool canSmartCopyOrDelete, Frame& frame, ShouldSerializeSelectedTextForDataTransfer shouldSerializeSelectedTextForDataTransfer)
    454454{
    455455    clear();
     
    467467   
    468468    // Put plain string on the pasteboard. CF_UNICODETEXT covers CF_TEXT as well
    469     String str = shouldSerializeSelectedTextForClipboard == IncludeImageAltTextForClipboard ? frame.editor().selectedTextForClipboard() : frame.editor().selectedText();
     469    String str = shouldSerializeSelectedTextForDataTransfer == IncludeImageAltTextForDataTransfer ? frame.editor().selectedTextForDataTransfer() : frame.editor().selectedText();
    470470    replaceNewlinesWithWindowsStyleNewlines(str);
    471471    replaceNBSPWithSpace(str);
  • trunk/Source/WebKit/ios/ChangeLog

    r166691 r166965  
     12014-04-08  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Rename Clipboard to DataTransfer
     4        https://bugs.webkit.org/show_bug.cgi?id=131371
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebView/WebPDFViewPlaceholder.mm:
     9
    1102014-04-02  Benjamin Poulain  <bpoulain@apple.com>
    211
  • trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm

    r166688 r166965  
    3434#import <JavaScriptCore/JSStringRefCF.h>
    3535#import <UIKit/UIKit.h>
    36 #import <WebCore/Clipboard.h>
     36#import <WebCore/DataTransfer.h>
    3737#import <WebCore/EventHandler.h>
    3838#import <WebCore/EventNames.h>
  • trunk/Source/WebKit/mac/ChangeLog

    r166933 r166965  
     12014-04-08  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Rename Clipboard to DataTransfer
     4        https://bugs.webkit.org/show_bug.cgi?id=131371
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebCoreSupport/WebDragClient.h:
     9        * WebCoreSupport/WebDragClient.mm:
     10        (WebDragClient::willPerformDragSourceAction):
     11        (WebDragClient::startDrag):
     12        * WebView/WebPDFView.mm:
     13
    1142014-04-08  Dan Bernstein  <mitz@apple.com>
    215
  • trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h

    r165676 r166965  
    3434    WebDragClient(WebView*);
    3535    virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData&) override;
    36     virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard&) override;
     36    virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&) override;
    3737    virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData&) override;
    3838    virtual void dragControllerDestroyed() override;
    3939    virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override;
    40     virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragPos, const WebCore::IntPoint& eventPos, WebCore::Clipboard&, WebCore::Frame&, bool linkDrag) override;
     40    virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragPos, const WebCore::IntPoint& eventPos, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag) override;
    4141    virtual void declareAndWriteDragImage(const String& pasteboardName, WebCore::Element&, const WebCore::URL&, const String&, WebCore::Frame*) override;
    4242private:
  • trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm

    r165676 r166965  
    4343#import "WebUIDelegatePrivate.h"
    4444#import "WebViewInternal.h"
    45 #import <WebCore/Clipboard.h>
     45#import <WebCore/DataTransfer.h>
    4646#import <WebCore/DragData.h>
    4747#import <WebCore/Editor.h>
     
    8585}
    8686
    87 void WebDragClient::willPerformDragSourceAction(WebCore::DragSourceAction action, const WebCore::IntPoint& mouseDownPoint, WebCore::Clipboard& clipboard)
     87void WebDragClient::willPerformDragSourceAction(WebCore::DragSourceAction action, const WebCore::IntPoint& mouseDownPoint, WebCore::DataTransfer& dataTransfer)
    8888{
    89     [[m_webView _UIDelegateForwarder] webView:m_webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:mouseDownPoint withPasteboard:[NSPasteboard pasteboardWithName:clipboard.pasteboard().name()]];
     89    [[m_webView _UIDelegateForwarder] webView:m_webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:mouseDownPoint withPasteboard:[NSPasteboard pasteboardWithName:dataTransfer.pasteboard().name()]];
    9090}
    9191
    92 void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& at, const IntPoint& eventPos, Clipboard& clipboard, Frame& frame, bool linkDrag)
     92void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& at, const IntPoint& eventPos, DataTransfer& dataTransfer, Frame& frame, bool linkDrag)
    9393{
    9494    RetainPtr<WebHTMLView> htmlView = (WebHTMLView*)[[kit(&frame) frameView] documentView];
     
    101101   
    102102    [topHTMLView _stopAutoscrollTimer];
    103     NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:clipboard.pasteboard().name()];
     103    NSPasteboard *pasteboard = [NSPasteboard pasteboardWithName:dataTransfer.pasteboard().name()];
    104104
    105105    NSImage *dragNSImage = dragImage.get();
  • trunk/Source/WebKit/mac/WebView/WebPDFView.mm

    r166684 r166965  
    5151#import "WebViewInternal.h"
    5252#import <PDFKit/PDFKit.h>
    53 #import <WebCore/Clipboard.h>
     53#import <WebCore/DataTransfer.h>
    5454#import <WebCore/EventNames.h>
    5555#import <WebCore/FormState.h>
  • trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp

    r165676 r166965  
    3030#include "WebKitGraphics.h"
    3131#include "WebView.h"
    32 #include <WebCore/Clipboard.h>
     32#include <WebCore/DataTransfer.h>
    3333#include <WebCore/DragController.h>
    3434#include <WebCore/DragData.h>
     
    9797}
    9898
    99 void WebDragClient::willPerformDragSourceAction(DragSourceAction action, const IntPoint& intPoint, Clipboard& clipboard)
     99void WebDragClient::willPerformDragSourceAction(DragSourceAction action, const IntPoint& intPoint, DataTransfer& dataTransfer)
    100100{
    101101    COMPtr<IWebUIDelegate> uiDelegate;
     
    104104
    105105    POINT point = intPoint;
    106     COMPtr<IDataObject> dataObject = clipboard.pasteboard().dataObject();
     106    COMPtr<IDataObject> dataObject = dataTransfer.pasteboard().dataObject();
    107107
    108108    COMPtr<IDataObject> newDataObject;
    109109    HRESULT result = uiDelegate->willPerformDragSourceAction(m_webView, static_cast<WebDragSourceAction>(action), &point, dataObject.get(), &newDataObject);
    110110    if (result == S_OK && newDataObject != dataObject)
    111         const_cast<Pasteboard&>(clipboard.pasteboard()).setExternalDataObject(newDataObject.get());
     111        const_cast<Pasteboard&>(dataTransfer.pasteboard()).setExternalDataObject(newDataObject.get());
    112112}
    113113
    114 void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, const IntPoint& dragPoint, Clipboard& clipboard, Frame& frame, bool isLink)
     114void WebDragClient::startDrag(DragImageRef image, const IntPoint& imageOrigin, const IntPoint& dragPoint, DataTransfer& dataTransfer, Frame& frame, bool isLink)
    115115{
    116116    //FIXME: Allow UIDelegate to override behaviour <rdar://problem/5015953>
     
    125125        return;
    126126
    127     dataObject = clipboard.pasteboard().dataObject();
     127    dataObject = dataTransfer.pasteboard().dataObject();
    128128    if (source && (image || dataObject)) {
    129129        if (image) {
  • trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h

    r165676 r166965  
    3939    virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&);
    4040    virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData&);
    41     virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard&);
    42     virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, WebCore::Clipboard&, WebCore::Frame&, bool);
     41    virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&);
     42    virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, WebCore::DataTransfer&, WebCore::Frame&, bool);
    4343
    4444private:
  • trunk/Source/WebKit2/ChangeLog

    r166963 r166965  
    4545            tile controller visible rect updates always happens via compositing flush (we assert
    4646            for this in TileController::setVisibleRect).
     47
     482014-04-08  Alexey Proskuryakov  <ap@apple.com>
     49
     50        Rename Clipboard to DataTransfer
     51        https://bugs.webkit.org/show_bug.cgi?id=131371
     52
     53        Reviewed by Anders Carlsson.
     54
     55        * WebProcess/WebCoreSupport/WebDragClient.cpp:
     56        (WebKit::WebDragClient::willPerformDragSourceAction):
     57        (WebKit::WebDragClient::startDrag):
     58        * WebProcess/WebCoreSupport/WebDragClient.h:
     59        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
     60        (WebKit::WebDragClient::startDrag):
    4761
    48622014-04-08  Alexey Proskuryakov  <ap@apple.com>
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp

    r164192 r166965  
    4343}
    4444
    45 void WebDragClient::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard&)
     45void WebDragClient::willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&)
    4646{
    4747}
     
    5858
    5959#if !PLATFORM(COCOA) && !PLATFORM(GTK)
    60 void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard&, Frame&, bool)
     60void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool)
    6161{
    6262}
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h

    r164192 r166965  
    4444private:
    4545    virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData&) override;
    46     virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard&) override;
     46    virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&) override;
    4747    virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData&) override;
    4848    virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override;
    4949
    50     virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::Clipboard&, WebCore::Frame&, bool linkDrag = false) override;
     50    virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, WebCore::DataTransfer&, WebCore::Frame&, bool linkDrag = false) override;
    5151
    5252#if PLATFORM(COCOA)
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm

    r165218 r166965  
    7373}
    7474
    75 void WebDragClient::startDrag(RetainPtr<NSImage> image, const IntPoint& point, const IntPoint&, Clipboard&, Frame& frame, bool linkDrag)
     75void WebDragClient::startDrag(RetainPtr<NSImage> image, const IntPoint& point, const IntPoint&, DataTransfer&, Frame& frame, bool linkDrag)
    7676{
    7777    IntSize bitmapSize([image size]);
Note: See TracChangeset for help on using the changeset viewer.