Changeset 217074 in webkit
- Timestamp:
- May 18, 2017 4:20:34 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r217071 r217074 1 2017-05-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Selection around attachment elements should not persist when beginning a drag 4 https://bugs.webkit.org/show_bug.cgi?id=172319 5 <rdar://problem/32283008> 6 7 Reviewed by Tim Horton. 8 9 When beginning to drag an attachment element, save and restore the visible selection when calling out to the 10 injected bundle for additional data, and when creating the drag image. 11 12 Augmented an existing API test: DataInteractionTests.AttachmentElementItemProviders. 13 14 * page/DragController.cpp: 15 (WebCore::DragController::startDrag): 16 1 17 2017-05-18 Daniel Bates <dabates@apple.com> 2 18 -
trunk/Source/WebCore/page/DragController.cpp
r216351 r217074 1057 1057 #if ENABLE(ATTACHMENT_ELEMENT) 1058 1058 if (is<HTMLAttachmentElement>(element) && m_dragSourceAction & DragSourceActionAttachment) { 1059 src.editor().setIgnoreSelectionChanges(true); 1060 auto previousSelection = src.selection().selection(); 1059 1061 if (!dataTransfer.pasteboard().hasData()) { 1060 1062 selectElement(element); … … 1085 1087 } 1086 1088 doSystemDrag(WTFMove(dragImage), dragLoc, dragOrigin, { }, dataTransfer, src, DragSourceActionAttachment); 1089 src.selection().setSelection(previousSelection); 1090 src.editor().setIgnoreSelectionChanges(false); 1087 1091 return true; 1088 1092 } -
trunk/Tools/ChangeLog
r217068 r217074 1 2017-05-18 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Selection around attachment elements should not persist when beginning a drag 4 https://bugs.webkit.org/show_bug.cgi?id=172319 5 <rdar://problem/32283008> 6 7 Reviewed by Tim Horton. 8 9 Tests that temporary selection around an attachment does not persist longer than it needs to. 10 11 * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: 12 (TestWebKitAPI::TEST): 13 1 14 2017-05-18 John Wilander <wilander@apple.com> 2 15 -
trunk/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm
r216997 r217074 645 645 646 646 EXPECT_WK_STREQ("hello", [injectedString UTF8String]); 647 EXPECT_TRUE([webView stringByEvaluatingJavaScript:@"getSelection().isCollapsed"].boolValue); 647 648 } 648 649
Note: See TracChangeset
for help on using the changeset viewer.