Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: third_party/WebKit/Source/core/editing/EphemeralRange.h

Issue 1878473002: ASSERT -> DCHECK in core/editing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Output info for some DCHECKs, add TODOs. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 bool operator!=(const EphemeralRangeTemplate<Strategy>& other) const; 53 bool operator!=(const EphemeralRangeTemplate<Strategy>& other) const;
54 54
55 Document& document() const; 55 Document& document() const;
56 PositionTemplate<Strategy> startPosition() const; 56 PositionTemplate<Strategy> startPosition() const;
57 PositionTemplate<Strategy> endPosition() const; 57 PositionTemplate<Strategy> endPosition() const;
58 58
59 // Returns true if |m_startPositoin| == |m_endPosition| or |isNull()|. 59 // Returns true if |m_startPositoin| == |m_endPosition| or |isNull()|.
60 bool isCollapsed() const; 60 bool isCollapsed() const;
61 bool isNull() const 61 bool isNull() const
62 { 62 {
63 ASSERT(isValid()); 63 DCHECK(isValid());
64 return m_startPosition.isNull(); 64 return m_startPosition.isNull();
65 } 65 }
66 bool isNotNull() const { return !isNull(); } 66 bool isNotNull() const { return !isNull(); }
67 67
68 DEFINE_INLINE_TRACE() 68 DEFINE_INLINE_TRACE()
69 { 69 {
70 visitor->trace(m_startPosition); 70 visitor->trace(m_startPosition);
71 visitor->trace(m_endPosition); 71 visitor->trace(m_endPosition);
72 } 72 }
73 73
(...skipping 17 matching lines...) Expand all
91 extern template class CORE_EXTERN_TEMPLATE_EXPORT EphemeralRangeTemplate<Editing InFlatTreeStrategy>; 91 extern template class CORE_EXTERN_TEMPLATE_EXPORT EphemeralRangeTemplate<Editing InFlatTreeStrategy>;
92 using EphemeralRangeInFlatTree = EphemeralRangeTemplate<EditingInFlatTreeStrateg y>; 92 using EphemeralRangeInFlatTree = EphemeralRangeTemplate<EditingInFlatTreeStrateg y>;
93 93
94 // Returns a newly created |Range| object from |range| or |nullptr| if 94 // Returns a newly created |Range| object from |range| or |nullptr| if
95 // |range.isNull()| returns true. 95 // |range.isNull()| returns true.
96 CORE_EXPORT Range* createRange(const EphemeralRange& /* range */); 96 CORE_EXPORT Range* createRange(const EphemeralRange& /* range */);
97 97
98 } // namespace blink 98 } // namespace blink
99 99
100 #endif 100 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698