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

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

Issue 1202153004: Enable selection for the composed tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename the flag Created 5 years, 6 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
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/VisibleSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SelectionController.cpp
diff --git a/Source/core/editing/SelectionController.cpp b/Source/core/editing/SelectionController.cpp
index e2e23fa98eaa2470f062459a17169f3075752271..ad5bd933f2a9c51d8fe9ffc7f37b38a2c3978eff 100644
--- a/Source/core/editing/SelectionController.cpp
+++ b/Source/core/editing/SelectionController.cpp
@@ -96,11 +96,15 @@ VisibleSelection expandSelectionToRespectUserSelectAllAlgorithm(Node* targetNode
static VisibleSelection expandSelectionToRespectUserSelectAll(Node* targetNode, const VisibleSelection& selection)
{
+ if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
+ return expandSelectionToRespectUserSelectAllAlgorithm<VisibleSelection::InComposedTree>(targetNode, selection);
return expandSelectionToRespectUserSelectAllAlgorithm<VisibleSelection::InDOMTree>(targetNode, selection);
}
static bool expandSelectionUsingGranularity(VisibleSelection& selection, TextGranularity granularity)
{
+ if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
+ return selection.expandUsingGranularityInComposedTree(granularity);
return selection.expandUsingGranularity(granularity);
}
@@ -251,6 +255,8 @@ static int textDistance(const PositionType& start, const PositionType& end)
bool SelectionController::handleMousePressEventSingleClick(const MouseEventWithHitTestResults& event)
{
+ if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
+ return handleMousePressEventSingleClickAlgorithm<VisibleSelection::InComposedTree>(event);
return handleMousePressEventSingleClickAlgorithm<VisibleSelection::InDOMTree>(event);
}
@@ -374,6 +380,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<VisibleSelection::InComposedTree>(hitTestResult, mousePressNode, dragStartPos, lastKnownMousePosition);
updateSelectionForMouseDragAlgorithm<VisibleSelection::InDOMTree>(hitTestResult, mousePressNode, dragStartPos, lastKnownMousePosition);
}
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/VisibleSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698