Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1312)

Unified Diff: third_party/WebKit/Source/core/editing/SelectionController.cpp

Issue 1675163002: Rename ComposedTree to FlatTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 b23baba13f134eeb606b6acb01eb0f7bc5a99b71..db0ebebf000fec16ab1b4b3ea4345e94b530d82d 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -352,8 +352,8 @@ void SelectionController::selectClosestWordFromMouseEvent(const MouseEventWithHi
AppendTrailingWhitespace appendTrailingWhitespace = (result.event().clickCount() == 2 && m_frame->editor().isSelectTrailingWhitespaceEnabled()) ? AppendTrailingWhitespace::ShouldAppend : AppendTrailingWhitespace::DontAppend;
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return selectClosestWordFromHitTestResult<EditingInComposedTreeStrategy>(result.hitTestResult(), appendTrailingWhitespace);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return selectClosestWordFromHitTestResult<EditingInFlatTreeStrategy>(result.hitTestResult(), appendTrailingWhitespace);
selectClosestWordFromHitTestResult<EditingStrategy>(result.hitTestResult(), appendTrailingWhitespace);
}
@@ -438,15 +438,15 @@ bool SelectionController::handleMousePressEventTripleClickAlgorithm(const MouseE
bool SelectionController::handleMousePressEventTripleClick(const MouseEventWithHitTestResults& event)
{
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return handleMousePressEventTripleClickAlgorithm<EditingInComposedTreeStrategy>(event);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return handleMousePressEventTripleClickAlgorithm<EditingInFlatTreeStrategy>(event);
return handleMousePressEventTripleClickAlgorithm<EditingStrategy>(event);
}
bool SelectionController::handleMousePressEventSingleClick(const MouseEventWithHitTestResults& event)
{
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return handleMousePressEventSingleClickAlgorithm<EditingInComposedTreeStrategy>(event);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return handleMousePressEventSingleClickAlgorithm<EditingInFlatTreeStrategy>(event);
return handleMousePressEventSingleClickAlgorithm<EditingStrategy>(event);
}
@@ -490,8 +490,8 @@ void SelectionController::updateSelectionForMouseDrag(Node* mousePressNode, cons
void SelectionController::updateSelectionForMouseDrag(const HitTestResult& hitTestResult, Node* mousePressNode, const LayoutPoint& dragStartPos, const IntPoint& lastKnownMousePosition)
{
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return updateSelectionForMouseDragAlgorithm<EditingInComposedTreeStrategy>(hitTestResult, mousePressNode, dragStartPos, lastKnownMousePosition);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return updateSelectionForMouseDragAlgorithm<EditingInFlatTreeStrategy>(hitTestResult, mousePressNode, dragStartPos, lastKnownMousePosition);
updateSelectionForMouseDragAlgorithm<EditingStrategy>(hitTestResult, mousePressNode, dragStartPos, lastKnownMousePosition);
}
@@ -535,8 +535,8 @@ bool SelectionController::handleMouseReleaseEventAlgorithm(const MouseEventWithH
bool SelectionController::handleMouseReleaseEvent(const MouseEventWithHitTestResults& event, const LayoutPoint& dragStartPos)
{
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return handleMouseReleaseEventAlgorithm<EditingInComposedTreeStrategy>(event, dragStartPos);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return handleMouseReleaseEventAlgorithm<EditingInFlatTreeStrategy>(event, dragStartPos);
return handleMouseReleaseEventAlgorithm<EditingStrategy>(event, dragStartPos);
}
@@ -592,8 +592,8 @@ bool SelectionController::handleGestureLongPressAlgorithm(const PlatformGestureE
bool SelectionController::handleGestureLongPress(const PlatformGestureEvent& gestureEvent, const HitTestResult& hitTestResult)
{
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return handleGestureLongPressAlgorithm<EditingInComposedTreeStrategy>(gestureEvent, hitTestResult);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return handleGestureLongPressAlgorithm<EditingInFlatTreeStrategy>(gestureEvent, hitTestResult);
return handleGestureLongPressAlgorithm<EditingStrategy>(gestureEvent, hitTestResult);
}
@@ -610,16 +610,16 @@ void SelectionController::sendContextMenuEvent(const MouseEventWithHitTestResult
m_mouseDownMayStartSelect = true; // context menu events are always allowed to perform a selection
if (mev.hitTestResult().isMisspelled()) {
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return selectClosestMisspellingFromMouseEvent<EditingInComposedTreeStrategy>(mev);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return selectClosestMisspellingFromMouseEvent<EditingInFlatTreeStrategy>(mev);
return selectClosestMisspellingFromMouseEvent<EditingStrategy>(mev);
}
if (!m_frame->editor().behavior().shouldSelectOnContextualMenuClick())
return;
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return selectClosestWordOrLinkFromMouseEvent<EditingInComposedTreeStrategy>(mev);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return selectClosestWordOrLinkFromMouseEvent<EditingInFlatTreeStrategy>(mev);
selectClosestWordOrLinkFromMouseEvent<EditingStrategy>(mev);
}
@@ -642,8 +642,8 @@ void SelectionController::passMousePressEventToSubframeAlgorithm(const MouseEven
void SelectionController::passMousePressEventToSubframe(const MouseEventWithHitTestResults& mev)
{
- if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
- return passMousePressEventToSubframeAlgorithm<EditingInComposedTreeStrategy>(mev);
+ if (RuntimeEnabledFeatures::selectionForFlatTreeEnabled())
+ return passMousePressEventToSubframeAlgorithm<EditingInFlatTreeStrategy>(mev);
passMousePressEventToSubframeAlgorithm<EditingStrategy>(mev);
}

Powered by Google App Engine
This is Rietveld 408576698