| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 } // namespace | 120 } // namespace |
| 121 | 121 |
| 122 SelectionController::~SelectionController() = default; | 122 SelectionController::~SelectionController() = default; |
| 123 | 123 |
| 124 Document& SelectionController::document() const { | 124 Document& SelectionController::document() const { |
| 125 DCHECK(m_frame->document()); | 125 DCHECK(m_frame->document()); |
| 126 return *m_frame->document(); | 126 return *m_frame->document(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void SelectionController::contextDestroyed() { | 129 void SelectionController::contextDestroyed(Document*) { |
| 130 m_originalBaseInFlatTree = VisiblePositionInFlatTree(); | 130 m_originalBaseInFlatTree = VisiblePositionInFlatTree(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 static PositionInFlatTree adjustPositionRespectUserSelectAll( | 133 static PositionInFlatTree adjustPositionRespectUserSelectAll( |
| 134 Node* innerNode, | 134 Node* innerNode, |
| 135 const PositionInFlatTree& selectionStart, | 135 const PositionInFlatTree& selectionStart, |
| 136 const PositionInFlatTree& selectionEnd, | 136 const PositionInFlatTree& selectionEnd, |
| 137 const PositionInFlatTree& position) { | 137 const PositionInFlatTree& position) { |
| 138 const VisibleSelectionInFlatTree& selectionInUserSelectAll = | 138 const VisibleSelectionInFlatTree& selectionInUserSelectAll = |
| 139 expandSelectionToRespectUserSelectAll( | 139 expandSelectionToRespectUserSelectAll( |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 return event.event().altKey() && event.isOverLink(); | 1018 return event.event().altKey() && event.isOverLink(); |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { | 1021 bool isExtendingSelection(const MouseEventWithHitTestResults& event) { |
| 1022 bool isMouseDownOnLinkOrImage = | 1022 bool isMouseDownOnLinkOrImage = |
| 1023 event.isOverLink() || event.hitTestResult().image(); | 1023 event.isOverLink() || event.hitTestResult().image(); |
| 1024 return event.event().shiftKey() && !isMouseDownOnLinkOrImage; | 1024 return event.event().shiftKey() && !isMouseDownOnLinkOrImage; |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 } // namespace blink | 1027 } // namespace blink |
| OLD | NEW |