Selection around attachment elements should not persist when beginning a drag
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 May 2017 23:20:34 +0000 (23:20 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 May 2017 23:20:34 +0000 (23:20 +0000)
commit9ad4297db3547663ecd1268f2d8b32089501f8a1
tree7dc47302ecdf547dd4fb9c0c861fa4d47f4b66e1
parent886ecbd8295ebb10360ae98acf4bda8a05f0ee3f
Selection around attachment elements should not persist when beginning a drag
https://bugs.webkit.org/show_bug.cgi?id=172319
<rdar://problem/32283008>

Reviewed by Tim Horton.

Source/WebCore:

When beginning to drag an attachment element, save and restore the visible selection when calling out to the
injected bundle for additional data, and when creating the drag image.

Augmented an existing API test: DataInteractionTests.AttachmentElementItemProviders.

* page/DragController.cpp:
(WebCore::DragController::startDrag):

Tools:

Tests that temporary selection around an attachment does not persist longer than it needs to.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/DragController.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm