Changeset 198163 in webkit
- Timestamp:
- Mar 14, 2016, 3:08:32 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r198162 r198163 1 2016-03-10 Antonio Gomes <tonikitoo@webkit.org> 2 3 Selecting with shift+drag results in unexpected drag-n-drop 4 https://bugs.webkit.org/show_bug.cgi?id=155314 5 6 Reviewed by Darin Adler. 7 8 Tests that ensure that WebKit: 9 10 1) does not enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed, 11 off of a #text node. 12 2) does enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed, 13 off of a link. 14 3) does enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed, 15 off of an image. 16 17 Note that (1) is a behavior changed by this patch, whereas (2) and (3) represent existing 18 behavior that is kept. 19 Tests are also skip for iOS similarly to other drag-n-drop related tests. 20 21 * fast/events/shift-drag-selection-no-drag-n-drop-expected.txt: Added. 22 * fast/events/shift-drag-selection-no-drag-n-drop.html: Added. 23 * fast/events/shift-drag-selection-on-link-triggers-drag-n-drop-expected.txt: Added. 24 * fast/events/shift-drag-selection-on-link-triggers-drag-n-drop.html: Added. 25 * fast/events/shift-drag-selection-on-image-triggers-drag-n-drop-expected.txt: Added. 26 * fast/events/shift-drag-selection-on-image-triggers-drag-n-drop.html: Added. 27 1 28 2016-03-14 Ryan Haddad <ryanhaddad@apple.com> 2 29 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r198069 r198163 1655 1655 fast/events/selectstart-by-drag.html [ Failure ] 1656 1656 fast/events/selectstart-by-single-click-with-shift.html [ Failure ] 1657 fast/events/shift-drag-selection-no-drag-n-drop.html [ Failure ] 1658 fast/events/shift-drag-selection-on-link-triggers-drag-n-drop.html [ Failure ] 1659 fast/events/shift-drag-selection-on-image-triggers-drag-n-drop.html [ Failure ] 1657 1660 fast/events/selectstart-prevent-selection-on-right-click.html [ Failure ] 1658 1661 fast/events/shadow-event-path.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r198160 r198163 1 2016-03-10 Antonio Gomes <tonikitoo@webkit.org> 2 3 Selecting with shift+drag results in unexpected drag-n-drop 4 https://bugs.webkit.org/show_bug.cgi?id=155314 5 6 Reviewed by Darin Adler. 7 8 Test: editing/selection/shift-drag-selection-no-drag-n-drop.html 9 10 Whenever user tries to extend an existing text selection by dragging the mouse 11 (left button hold) with shift key pressed, WebKit enters drag-n-drop mode. 12 This behavior does not match common editing behavior out there, including other 13 browsers' (Firefox, Opera/Presto and IE). 14 15 Patch changes WebKit so that whenever one extends a selection with mouse 16 and shift key pressed off of a #text node, it does not enter drag-n-drop mode. 17 18 Additionally, patch also adds some further tests to ensure that when 19 selection is extended off of either a link or an image, drag-n-drop does 20 get triggered, no matter if shift key is pressed. 21 22 * page/EventHandler.cpp: 23 (WebCore::EventHandler::handleMousePressEvent): 24 1 25 2016-03-14 Brent Fulgham <bfulgham@apple.com> 2 26 -
trunk/Source/WebCore/page/EventHandler.cpp
r198152 r198163 761 761 #if ENABLE(DRAG_SUPPORT) 762 762 // Careful that the drag starting logic stays in sync with eventMayStartDrag() 763 m_mouseDownMayStartDrag = singleClick; 763 // FIXME: eventMayStartDrag() does not check for shift key press, link or image event targets. 764 // Bug: https://bugs.webkit.org/show_bug.cgi?id=155390 765 766 // Single mouse down on links or images can always trigger drag-n-drop. 767 bool isMouseDownOnLinkOrImage = event.isOverLink() || event.hitTestResult().image(); 768 m_mouseDownMayStartDrag = singleClick && (!event.event().shiftKey() || isMouseDownOnLinkOrImage); 764 769 #endif 765 770
Note:
See TracChangeset
for help on using the changeset viewer.