| Index: third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp b/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
|
| index 36ef7ba5f453f83aaa81dd24b6dd88b566c9aaa0..8e8cca40eb4820c79402ad81789f37c851db2b41 100644
|
| --- a/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
|
| @@ -133,6 +133,32 @@ void SelectionTemplate<Strategy>::showTreeForThis() const {
|
| #endif
|
|
|
| template <typename Strategy>
|
| +const PositionTemplate<Strategy>&
|
| +SelectionTemplate<Strategy>::computeEndPosition() const {
|
| + if (m_base == m_extent)
|
| + return m_base;
|
| + return m_base < m_extent ? m_extent : m_base;
|
| +}
|
| +
|
| +template <typename Strategy>
|
| +const PositionTemplate<Strategy>&
|
| +SelectionTemplate<Strategy>::computeStartPosition() const {
|
| + if (m_base == m_extent)
|
| + return m_base;
|
| + return m_base < m_extent ? m_base : m_extent;
|
| +}
|
| +
|
| +template <typename Strategy>
|
| +SelectionType SelectionTemplate<
|
| + Strategy>::computeSelectionTypeConsideringGranularity() const {
|
| + if (m_base.isNull())
|
| + return NoSelection;
|
| + if (m_base == m_extent && m_granularity == CharacterGranularity)
|
| + return CaretSelection;
|
| + return RangeSelection;
|
| +}
|
| +
|
| +template <typename Strategy>
|
| void SelectionTemplate<Strategy>::printTo(std::ostream* ostream,
|
| const char* type) const {
|
| if (isNone()) {
|
|
|