Commit b8374b5f authored by yosin@chromium.org's avatar yosin@chromium.org

Avoid to use static member function VisibleSelection::selectionType() in PendingSelection class

This patch replaces static member function |VisibleSelection::selectionType()|
by |VisibleSelection::Strategy::selectionType()| in |PendingSelection| class
as preparation of moving |VisibleSelection::selctionType()| out from
|VisibleSelection| as local static function, since it is used only
|PendingSelection| and |VisibleSelection| classes for ease of templatizing
|VisibleSelection| to introduce composed tree version.

This patch is a preparation of making selection to handle granularity for web
component, http://crrev.com/1277863002

BUG=513568
TEST=n/a; no behavior changes

Review URL: https://codereview.chromium.org/1323933003

git-svn-id: svn://svn.chromium.org/blink/trunk@201625 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 08118106
...@@ -82,7 +82,7 @@ VisibleSelection PendingSelection::calcVisibleSelectionAlgorithm() const ...@@ -82,7 +82,7 @@ VisibleSelection PendingSelection::calcVisibleSelectionAlgorithm() const
PositionType start = Strategy::selectionStart(m_selection); PositionType start = Strategy::selectionStart(m_selection);
PositionType end = Strategy::selectionEnd(m_selection); PositionType end = Strategy::selectionEnd(m_selection);
SelectionType selectionType = VisibleSelection::selectionType(start, end); SelectionType selectionType = Strategy::selectionType(m_selection);
TextAffinity affinity = m_selection.affinity(); TextAffinity affinity = m_selection.affinity();
bool paintBlockCursor = m_shouldShowBlockCursor && selectionType == SelectionType::CaretSelection && !isLogicalEndOfLine(createVisiblePosition(end, affinity)); bool paintBlockCursor = m_shouldShowBlockCursor && selectionType == SelectionType::CaretSelection && !isLogicalEndOfLine(createVisiblePosition(end, affinity));
......
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