| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * Copyright (C) 2015 Google Inc. All rights reserved. | 5 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 | 814 |
| 815 FrameSelection& SelectionController::selection() const { | 815 FrameSelection& SelectionController::selection() const { |
| 816 return m_frame->selection(); | 816 return m_frame->selection(); |
| 817 } | 817 } |
| 818 | 818 |
| 819 bool isLinkSelection(const MouseEventWithHitTestResults& event) { | 819 bool isLinkSelection(const MouseEventWithHitTestResults& event) { |
| 820 return event.event().altKey() && event.isOverLink(); | 820 return event.event().altKey() && event.isOverLink(); |
| 821 } | 821 } |
| 822 | 822 |
| 823 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { | 823 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { |
| 824 bool isDraggable = false; |
| 825 Node* innerNode = event.innerNode(); |
| 826 if (LayoutObject* layoutObject = innerNode->layoutObject()) { |
| 827 const ComputedStyle& style = layoutObject->styleRef(); |
| 828 if (style.userDrag() == DRAG_ELEMENT) |
| 829 isDraggable = true; |
| 830 } |
| 831 |
| 824 bool isMouseDownOnLinkOrImage = | 832 bool isMouseDownOnLinkOrImage = |
| 825 event.isOverLink() || event.hitTestResult().image(); | 833 event.isOverLink() || event.hitTestResult().image(); |
| 826 return event.event().shiftKey() && !isMouseDownOnLinkOrImage; | 834 return event.event().shiftKey() && !isMouseDownOnLinkOrImage && !isDraggable; |
| 827 } | 835 } |
| 828 | 836 |
| 829 } // namespace blink | 837 } // namespace blink |
| OLD | NEW |