| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 newSelection.setIsDirectional(isDirectional); | 673 newSelection.setIsDirectional(isDirectional); |
| 674 const bool isHandleVisible = handleVisibility == HandleVisibility::Visible; | 674 const bool isHandleVisible = handleVisibility == HandleVisibility::Visible; |
| 675 if (selection().visibleSelection<EditingInFlatTreeStrategy>() == | 675 if (selection().visibleSelection<EditingInFlatTreeStrategy>() == |
| 676 newSelection && | 676 newSelection && |
| 677 selection().isHandleVisible() == isHandleVisible) | 677 selection().isHandleVisible() == isHandleVisible) |
| 678 return; | 678 return; |
| 679 | 679 |
| 680 const FrameSelection::SetSelectionOptions options = | 680 const FrameSelection::SetSelectionOptions options = |
| 681 isHandleVisible | 681 isHandleVisible |
| 682 ? FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | | 682 ? FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | |
| 683 FrameSelection::HandleVisible | 683 FrameSelection::ShowHandle |
| 684 : FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle; | 684 : FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle; |
| 685 | 685 |
| 686 selection().setSelection(newSelection, options, CursorAlignOnScroll::IfNeeded, | 686 selection().setSelection(newSelection, options, CursorAlignOnScroll::IfNeeded, |
| 687 granularity); | 687 granularity); |
| 688 } | 688 } |
| 689 | 689 |
| 690 void SelectionController::setCaretAtHitTestResult( | 690 void SelectionController::setCaretAtHitTestResult( |
| 691 const HitTestResult& hitTestResult) { | 691 const HitTestResult& hitTestResult) { |
| 692 Node* innerNode = hitTestResult.innerNode(); | 692 Node* innerNode = hitTestResult.innerNode(); |
| 693 const VisiblePositionInFlatTree& visibleHitPos = | 693 const VisiblePositionInFlatTree& visibleHitPos = |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 return event.event().altKey() && event.isOverLink(); | 1060 return event.event().altKey() && event.isOverLink(); |
| 1061 } | 1061 } |
| 1062 | 1062 |
| 1063 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { | 1063 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { |
| 1064 bool isMouseDownOnLinkOrImage = | 1064 bool isMouseDownOnLinkOrImage = |
| 1065 event.isOverLink() || event.hitTestResult().image(); | 1065 event.isOverLink() || event.hitTestResult().image(); |
| 1066 return event.event().shiftKey() && !isMouseDownOnLinkOrImage; | 1066 return event.event().shiftKey() && !isMouseDownOnLinkOrImage; |
| 1067 } | 1067 } |
| 1068 | 1068 |
| 1069 } // namespace blink | 1069 } // namespace blink |
| OLD | NEW |