| Index: third_party/WebKit/Source/core/editing/SelectionTemplate.h
|
| diff --git a/third_party/WebKit/Source/core/editing/SelectionTemplate.h b/third_party/WebKit/Source/core/editing/SelectionTemplate.h
|
| index ae04d0d868cca37eca1b86650335516d362bb355..df95f023341674d580e0edd10c93b9741fb81084 100644
|
| --- a/third_party/WebKit/Source/core/editing/SelectionTemplate.h
|
| +++ b/third_party/WebKit/Source/core/editing/SelectionTemplate.h
|
| @@ -5,15 +5,16 @@
|
| #ifndef SelectionTemplate_h
|
| #define SelectionTemplate_h
|
|
|
| +#include <iosfwd>
|
| #include "base/macros.h"
|
| #include "core/CoreExport.h"
|
| #include "core/editing/EphemeralRange.h"
|
| #include "core/editing/Position.h"
|
| #include "core/editing/PositionWithAffinity.h"
|
| +#include "core/editing/SelectionType.h"
|
| #include "core/editing/TextAffinity.h"
|
| #include "core/editing/TextGranularity.h"
|
| #include "wtf/Allocator.h"
|
| -#include <iosfwd>
|
|
|
| namespace blink {
|
|
|
| @@ -87,15 +88,21 @@ class CORE_EXPORT SelectionTemplate final {
|
| TextAffinity affinity() const { return m_affinity; }
|
| TextGranularity granularity() const { return m_granularity; }
|
| bool hasTrailingWhitespace() const { return m_hasTrailingWhitespace; }
|
| + bool isCaret() const { return m_base.isNotNull() && m_base == m_extent; }
|
| bool isDirectional() const { return m_isDirectional; }
|
| bool isHandleVisible() const { return m_isHandleVisible; }
|
| bool isNone() const { return m_base.isNull(); }
|
| + bool isRange() const { return m_base != m_extent; }
|
|
|
| // Returns true if |this| selection holds valid values otherwise it causes
|
| // assertion failure.
|
| bool assertValid() const;
|
| bool assertValidFor(const Document&) const;
|
|
|
| + const PositionTemplate<Strategy>& computeEndPosition() const;
|
| + const PositionTemplate<Strategy>& computeStartPosition() const;
|
| + SelectionType computeSelectionTypeConsideringGranularity() const;
|
| +
|
| DECLARE_TRACE();
|
|
|
| void printTo(std::ostream*, const char* type) const;
|
|
|