OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
6 * Copyright (C) 2015 Google Inc. All rights reserved. | 6 * Copyright (C) 2015 Google Inc. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 m_mouseDownWasSingleClickInSelection = false; | 788 m_mouseDownWasSingleClickInSelection = false; |
789 if (!selection().isAvailable()) { | 789 if (!selection().isAvailable()) { |
790 // "gesture-tap-frame-removed.html" reaches here. | 790 // "gesture-tap-frame-removed.html" reaches here. |
791 m_mouseDownAllowsMultiClick = !event.event().fromTouch(); | 791 m_mouseDownAllowsMultiClick = !event.event().fromTouch(); |
792 return; | 792 return; |
793 } | 793 } |
794 | 794 |
795 // Avoid double-tap touch gesture confusion by restricting multi-click side | 795 // Avoid double-tap touch gesture confusion by restricting multi-click side |
796 // effects, e.g., word selection, to editable regions. | 796 // effects, e.g., word selection, to editable regions. |
797 m_mouseDownAllowsMultiClick = | 797 m_mouseDownAllowsMultiClick = |
798 !event.event().fromTouch() || selection().hasEditableStyle(); | 798 !event.event().fromTouch() || |
| 799 selection() |
| 800 .computeVisibleSelectionInDOMTreeDeprecated() |
| 801 .hasEditableStyle(); |
799 } | 802 } |
800 | 803 |
801 void SelectionController::handleMouseDraggedEvent( | 804 void SelectionController::handleMouseDraggedEvent( |
802 const MouseEventWithHitTestResults& event, | 805 const MouseEventWithHitTestResults& event, |
803 const IntPoint& mouseDownPos, | 806 const IntPoint& mouseDownPos, |
804 const LayoutPoint& dragStartPos, | 807 const LayoutPoint& dragStartPos, |
805 Node* mousePressNode, | 808 Node* mousePressNode, |
806 const IntPoint& lastKnownMousePosition) { | 809 const IntPoint& lastKnownMousePosition) { |
807 if (!selection().isAvailable()) | 810 if (!selection().isAvailable()) |
808 return; | 811 return; |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 | 1084 |
1082 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { | 1085 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { |
1083 bool isMouseDownOnLinkOrImage = | 1086 bool isMouseDownOnLinkOrImage = |
1084 event.isOverLink() || event.hitTestResult().image(); | 1087 event.isOverLink() || event.hitTestResult().image(); |
1085 return (event.event().modifiers() & WebInputEvent::Modifiers::ShiftKey) != | 1088 return (event.event().modifiers() & WebInputEvent::Modifiers::ShiftKey) != |
1086 0 && | 1089 0 && |
1087 !isMouseDownOnLinkOrImage; | 1090 !isMouseDownOnLinkOrImage; |
1088 } | 1091 } |
1089 | 1092 |
1090 } // namespace blink | 1093 } // namespace blink |
OLD | NEW |