| Index: third_party/WebKit/Source/core/editing/SelectionController.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
|
| index 7eeea394417a0db25b8da7aae9d5ca7b5a0147a5..efc589afedf9480cd968b3952e2176261f073003 100644
|
| --- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
|
| @@ -151,7 +151,7 @@ bool SelectionController::handleMousePressEventSingleClick(const MouseEventWithH
|
| TextGranularity granularity = CharacterGranularity;
|
|
|
| if (extendSelection && !newSelection.isNone()) {
|
| - const VisibleSelectionInFlatTree selectionInUserSelectAll(expandSelectionToRespectUserSelectAll(innerNode, VisibleSelectionInFlatTree(createVisiblePosition(pos))));
|
| + const VisibleSelectionInFlatTree selectionInUserSelectAll(expandSelectionToRespectUserSelectAll(innerNode, createVisibleSelectionDeprecated(createVisiblePosition(pos))));
|
| if (selectionInUserSelectAll.isRange()) {
|
| if (selectionInUserSelectAll.start().compareTo(newSelection.start()) < 0)
|
| pos = selectionInUserSelectAll.start();
|
| @@ -168,9 +168,9 @@ bool SelectionController::handleMousePressEventSingleClick(const MouseEventWithH
|
| int distanceToStart = textDistance(start, pos);
|
| int distanceToEnd = textDistance(pos, end);
|
| if (distanceToStart <= distanceToEnd)
|
| - newSelection = VisibleSelectionInFlatTree(end, pos);
|
| + newSelection = createVisibleSelectionDeprecated(end, pos);
|
| else
|
| - newSelection = VisibleSelectionInFlatTree(start, pos);
|
| + newSelection = createVisibleSelectionDeprecated(start, pos);
|
| }
|
| } else {
|
| newSelection.setExtent(pos);
|
| @@ -181,7 +181,7 @@ bool SelectionController::handleMousePressEventSingleClick(const MouseEventWithH
|
| newSelection.expandUsingGranularity(selection().granularity());
|
| }
|
| } else if (m_selectionState != SelectionState::ExtendedSelection) {
|
| - newSelection = expandSelectionToRespectUserSelectAll(innerNode, VisibleSelectionInFlatTree(visiblePos));
|
| + newSelection = expandSelectionToRespectUserSelectAll(innerNode, createVisibleSelectionDeprecated(visiblePos));
|
| }
|
|
|
| // Updating the selection is considered side-effect of the event and so it doesn't impact the handled state.
|
| @@ -233,7 +233,7 @@ void SelectionController::updateSelectionForMouseDrag(const HitTestResult& hitTe
|
| if (m_selectionState != SelectionState::ExtendedSelection) {
|
| // Always extend selection here because it's caused by a mouse drag
|
| m_selectionState = SelectionState::ExtendedSelection;
|
| - newSelection = VisibleSelectionInFlatTree(targetPosition);
|
| + newSelection = createVisibleSelectionDeprecated(targetPosition);
|
| }
|
|
|
| if (RuntimeEnabledFeatures::userSelectAllEnabled()) {
|
| @@ -315,7 +315,7 @@ void SelectionController::selectClosestWordFromHitTestResult(const HitTestResult
|
|
|
| const VisiblePositionInFlatTree& pos = visiblePositionOfHitTestResult(adjustedHitTestResult);
|
| if (pos.isNotNull()) {
|
| - newSelection = VisibleSelectionInFlatTree(pos);
|
| + newSelection = createVisibleSelectionDeprecated(pos);
|
| newSelection.expandUsingGranularity(WordGranularity);
|
| }
|
|
|
| @@ -353,7 +353,7 @@ void SelectionController::selectClosestMisspellingFromHitTestResult(const HitTes
|
| Node* containerNode = markerPosition.computeContainerNode();
|
| const PositionInFlatTree start(containerNode, markers[0]->startOffset());
|
| const PositionInFlatTree end(containerNode, markers[0]->endOffset());
|
| - newSelection = VisibleSelectionInFlatTree(start, end);
|
| + newSelection = createVisibleSelectionDeprecated(start, end);
|
| }
|
| }
|
|
|
| @@ -452,7 +452,7 @@ bool SelectionController::handleMousePressEventTripleClick(const MouseEventWithH
|
| VisibleSelectionInFlatTree newSelection;
|
| const VisiblePositionInFlatTree& pos = visiblePositionOfHitTestResult(event.hitTestResult());
|
| if (pos.isNotNull()) {
|
| - newSelection = VisibleSelectionInFlatTree(pos);
|
| + newSelection = createVisibleSelectionDeprecated(pos);
|
| newSelection.expandUsingGranularity(ParagraphGranularity);
|
| }
|
|
|
| @@ -530,7 +530,7 @@ bool SelectionController::handleMouseReleaseEvent(const MouseEventWithHitTestRes
|
| bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
|
| if (node && node->layoutObject() && (caretBrowsing || hasEditableStyle(*node))) {
|
| const VisiblePositionInFlatTree pos = visiblePositionOfHitTestResult(event.hitTestResult());
|
| - newSelection = VisibleSelectionInFlatTree(pos);
|
| + newSelection = createVisibleSelectionDeprecated(pos);
|
| }
|
|
|
| setSelectionIfNeeded(selection(), newSelection);
|
| @@ -654,7 +654,7 @@ void SelectionController::passMousePressEventToSubframe(const MouseEventWithHitT
|
| m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| const VisiblePositionInFlatTree& visiblePos = visiblePositionOfHitTestResult(mev.hitTestResult());
|
| - VisibleSelectionInFlatTree newSelection(visiblePos);
|
| + VisibleSelectionInFlatTree newSelection = createVisibleSelectionDeprecated(visiblePos);
|
| selection().setSelection(newSelection);
|
| }
|
|
|
|
|