Changeset 217103 in webkit
- Timestamp:
- May 19, 2017 1:04:16 AM (7 years ago)
- Location:
- branches/safari-604.1.21-branch
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-604.1.21-branch/Source/WebCore/ChangeLog
r217035 r217103 1 2017-05-18 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r217074. rdar://problem/32282945 4 5 2017-05-18 Wenson Hsieh <wenson_hsieh@apple.com> 6 7 Selection around attachment elements should not persist when beginning a drag 8 https://bugs.webkit.org/show_bug.cgi?id=172319 9 <rdar://problem/32283008> 10 11 Reviewed by Tim Horton. 12 13 When beginning to drag an attachment element, save and restore the visible selection when calling out to the 14 injected bundle for additional data, and when creating the drag image. 15 16 Augmented an existing API test: DataInteractionTests.AttachmentElementItemProviders. 17 18 * page/DragController.cpp: 19 (WebCore::DragController::startDrag): 20 1 21 2017-05-17 Jason Marcell <jmarcell@apple.com> 2 22 -
branches/safari-604.1.21-branch/Source/WebCore/page/DragController.cpp
r216002 r217103 1061 1061 #if ENABLE(ATTACHMENT_ELEMENT) 1062 1062 if (is<HTMLAttachmentElement>(element) && m_dragSourceAction & DragSourceActionAttachment) { 1063 src.editor().setIgnoreSelectionChanges(true); 1064 auto previousSelection = src.selection().selection(); 1063 1065 if (!dataTransfer.pasteboard().hasData()) { 1064 1066 selectElement(element); … … 1089 1091 } 1090 1092 doSystemDrag(WTFMove(dragImage), dragLoc, dragOrigin, { }, dataTransfer, src, DragSourceActionAttachment); 1093 src.selection().setSelection(previousSelection); 1094 src.editor().setIgnoreSelectionChanges(false); 1091 1095 return true; 1092 1096 } -
branches/safari-604.1.21-branch/Tools/ChangeLog
r217040 r217103 1 2017-05-18 Jason Marcell <jmarcell@apple.com> 2 3 Cherry-pick r217074. rdar://problem/32282945 4 5 2017-05-18 Wenson Hsieh <wenson_hsieh@apple.com> 6 7 Selection around attachment elements should not persist when beginning a drag 8 https://bugs.webkit.org/show_bug.cgi?id=172319 9 <rdar://problem/32283008> 10 11 Reviewed by Tim Horton. 12 13 Tests that temporary selection around an attachment does not persist longer than it needs to. 14 15 * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: 16 (TestWebKitAPI::TEST): 17 1 18 2017-05-17 Jason Marcell <jmarcell@apple.com> 2 19 -
branches/safari-604.1.21-branch/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm
r217102 r217103 589 589 590 590 EXPECT_WK_STREQ("hello", [injectedString UTF8String]); 591 EXPECT_TRUE([webView stringByEvaluatingJavaScript:@"getSelection().isCollapsed"].boolValue); 591 592 } 592 593
Note: See TracChangeset
for help on using the changeset viewer.