DragData should not depend on Clipboard, DocumentFragment, and Document
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Sep 2014 06:27:46 +0000 (06:27 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Sep 2014 06:27:46 +0000 (06:27 +0000)
commit3042d302804113a6809777584dec59e2d0a9ffc5
tree762c6c91c03e1405507a345de6d47a8c6dadc77a
parentf1f81f0214462f17425365011e01f62061d16d69
DragData should not depend on Clipboard, DocumentFragment, and Document
https://bugs.webkit.org/show_bug.cgi?id=21358

Reviewed by Darin Adler.

Source/WebCore:

Refactor DragData to not depend on Frame, DocumentFragment,
Document and Range. DragData::asFragment() has been moved to
DragController and implemented in the platform specific file.
DragData methods using Frame has been reworked in Mac to not use
Frame, since all other ports were ignoreing the frame parameter.

* page/DragController.cpp:
(WebCore::DragController::documentFragmentFromDragData): Make it
a static member to be able to use createFragmentFromDragData().
(WebCore::DragController::performDragOperation): Update to
DragData API changes.
(WebCore::DragController::dispatchTextInputEventFor): Ditto.
(WebCore::DragController::concludeEditDrag): Ditto.
(WebCore::documentFragmentFromDragData): Deleted.
* page/DragController.h:
* page/efl/DragControllerEfl.cpp:
(WebCore::DragController::createFragmentFromDragData): Move
DragData::asFragment() implementation here.
* page/gtk/DragControllerGtk.cpp:
(WebCore::DragController::dragOperation):
(WebCore::DragController::createFragmentFromDragData): Ditto.
* page/mac/DragControllerMac.mm:
(WebCore::DragController::dragOperation):
(WebCore::DragController::createFragmentFromDragData): Ditto.
* page/win/DragControllerWin.cpp:
(WebCore::DragController::createFragmentFromDragData): Ditto.
* platform/DragData.h:
* platform/efl/DragDataEfl.cpp:
(WebCore::DragData::asPlainText): Remove Frame parameter.
(WebCore::DragData::containsURL): Ditto.
(WebCore::DragData::asURL): Ditto.
(WebCore::DragData::asFragment): Deleted.
* platform/gtk/DragDataGtk.cpp:
(WebCore::DragData::asPlainText): Remove Frame parameter.
(WebCore::DragData::containsCompatibleContent):
(WebCore::DragData::containsURL): Ditto.
(WebCore::DragData::asURL): Ditto.
(WebCore::DragData::asFragment): Deleted.
* platform/mac/DragDataMac.mm:
(WebCore::DragData::asPlainText): Same implementation as the
Editor.
(WebCore::DragData::containsURL): Remove Frame parameter.
(WebCore::DragData::asURL): Use URLByCanonicalizingURL() instead
of using the Editor client.
(WebCore::DragData::asFragment): Deleted.
* platform/win/DragDataWin.cpp:
(WebCore::DragData::containsURL): Remove Frame parameter.
(WebCore::DragData::asURL): Ditto.
(WebCore::DragData::asPlainText): Ditto.
(WebCore::DragData::containsCompatibleContent):
(WebCore::DragData::asFragment): Deleted.

Source/WebKit2:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragControllerAction): Update to API
change in DragData::asURL().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/DragController.cpp
Source/WebCore/page/DragController.h
Source/WebCore/page/efl/DragControllerEfl.cpp
Source/WebCore/page/gtk/DragControllerGtk.cpp
Source/WebCore/page/mac/DragControllerMac.mm
Source/WebCore/page/win/DragControllerWin.cpp
Source/WebCore/platform/DragData.h
Source/WebCore/platform/efl/DragDataEfl.cpp
Source/WebCore/platform/gtk/DragDataGtk.cpp
Source/WebCore/platform/mac/DragDataMac.mm
Source/WebCore/platform/win/ClipboardUtilitiesWin.h
Source/WebCore/platform/win/DragDataWin.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp