Index: Source/core/editing/SelectionController.cpp |
diff --git a/Source/core/editing/SelectionController.cpp b/Source/core/editing/SelectionController.cpp |
index 537e809b2414b2b0777f4e30a9eb21f3a858e83b..b000f175d4c699892e1ccb42205d836e6ccab4db 100644 |
--- a/Source/core/editing/SelectionController.cpp |
+++ b/Source/core/editing/SelectionController.cpp |
@@ -193,7 +193,7 @@ bool SelectionController::handleMousePressEventSingleClickAlgorithm(const MouseE |
granularity = selection().granularity(); |
expandSelectionUsingGranularity(newSelection, selection().granularity()); |
} |
- } else { |
+ } else if (m_selectionState != SelectionState::ExtendedSelection) { |
newSelection = expandSelectionToRespectUserSelectAll(innerNode, VisibleSelection(visiblePos)); |
} |
@@ -618,6 +618,16 @@ bool SelectionController::mouseDownWasSingleClickInSelection() const |
return m_mouseDownWasSingleClickInSelection; |
} |
+void SelectionController::notifySelectionChanged() |
+{ |
+ if (selection().selectionType() == SelectionType::RangeSelection) |
+ m_selectionState = SelectionState::ExtendedSelection; |
+ else if (selection().selectionType() == SelectionType::CaretSelection) |
+ m_selectionState = SelectionState::PlacedCaret; |
+ else |
+ m_selectionState = SelectionState::HaveNotStartedSelection; |
+} |
+ |
FrameSelection& SelectionController::selection() const |
{ |
return m_frame->selection(); |