Commit cbc6be87 authored by tanvir.rizvi's avatar tanvir.rizvi Committed by Commit Bot

Use FrameSelection::IsDirectional() in TextControlElement

Use FrameSelection::IsDirectional() in TextControlElement
This is done as a preparation of moving member variable is_directional_ of
class SelectionTemplate to class FrameSelection for code health.
BUG=740804

Change-Id: I287ed4b01ffe531c38c09a79f4f90dd5a5abc896
Reviewed-on: https://chromium-review.googlesource.com/589092
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490747}
parent c09c78ef
...@@ -590,7 +590,7 @@ TextFieldSelectionDirection TextControlElement::ComputeSelectionDirection() ...@@ -590,7 +590,7 @@ TextFieldSelectionDirection TextControlElement::ComputeSelectionDirection()
const SelectionInDOMTree& selection = const SelectionInDOMTree& selection =
frame->Selection().GetSelectionInDOMTree(); frame->Selection().GetSelectionInDOMTree();
const Position& start = selection.ComputeStartPosition(); const Position& start = selection.ComputeStartPosition();
return selection.IsDirectional() return frame->Selection().IsDirectional()
? (selection.Base() == start ? kSelectionHasForwardDirection ? (selection.Base() == start ? kSelectionHasForwardDirection
: kSelectionHasBackwardDirection) : kSelectionHasBackwardDirection)
: kSelectionHasNoDirection; : kSelectionHasNoDirection;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment