Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EphemeralRange_h | 5 #ifndef EphemeralRange_h |
| 6 #define EphemeralRange_h | 6 #define EphemeralRange_h |
| 7 | 7 |
| 8 #include "core/editing/Position.h" | 8 #include "core/editing/Position.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 EphemeralRangeTemplate<Strategy>& operator=( | 98 EphemeralRangeTemplate<Strategy>& operator=( |
| 99 const EphemeralRangeTemplate<Strategy>& other); | 99 const EphemeralRangeTemplate<Strategy>& other); |
| 100 | 100 |
| 101 bool operator==(const EphemeralRangeTemplate<Strategy>& other) const; | 101 bool operator==(const EphemeralRangeTemplate<Strategy>& other) const; |
| 102 bool operator!=(const EphemeralRangeTemplate<Strategy>& other) const; | 102 bool operator!=(const EphemeralRangeTemplate<Strategy>& other) const; |
| 103 | 103 |
| 104 Document& document() const; | 104 Document& document() const; |
| 105 PositionTemplate<Strategy> startPosition() const; | 105 PositionTemplate<Strategy> startPosition() const; |
| 106 PositionTemplate<Strategy> endPosition() const; | 106 PositionTemplate<Strategy> endPosition() const; |
| 107 | 107 |
| 108 void textRects(Vector<IntRect>&, bool useSelectionHeight = false) const; | |
|
Xiaocheng
2017/03/29 19:51:07
This function is just implementation detail and sh
| |
| 109 IntRect boundingBox() const; | |
|
Xiaocheng
2017/03/29 19:51:07
According to the discussion in https://codereview.
| |
| 110 | |
| 108 Node* commonAncestorContainer() const; | 111 Node* commonAncestorContainer() const; |
| 109 | 112 |
| 110 // Returns true if |m_startPositoin| == |m_endPosition| or |isNull()|. | 113 // Returns true if |m_startPositoin| == |m_endPosition| or |isNull()|. |
| 111 bool isCollapsed() const; | 114 bool isCollapsed() const; |
| 112 bool isNull() const { | 115 bool isNull() const { |
| 113 DCHECK(isValid()); | 116 DCHECK(isValid()); |
| 114 return m_startPosition.isNull(); | 117 return m_startPosition.isNull(); |
| 115 } | 118 } |
| 116 bool isNotNull() const { return !isNull(); } | 119 bool isNotNull() const { return !isNull(); } |
| 117 | 120 |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 141 using EphemeralRangeInFlatTree = | 144 using EphemeralRangeInFlatTree = |
| 142 EphemeralRangeTemplate<EditingInFlatTreeStrategy>; | 145 EphemeralRangeTemplate<EditingInFlatTreeStrategy>; |
| 143 | 146 |
| 144 // Returns a newly created |Range| object from |range| or |nullptr| if | 147 // Returns a newly created |Range| object from |range| or |nullptr| if |
| 145 // |range.isNull()| returns true. | 148 // |range.isNull()| returns true. |
| 146 CORE_EXPORT Range* createRange(const EphemeralRange& /* range */); | 149 CORE_EXPORT Range* createRange(const EphemeralRange& /* range */); |
| 147 | 150 |
| 148 } // namespace blink | 151 } // namespace blink |
| 149 | 152 |
| 150 #endif | 153 #endif |
| OLD | NEW |