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

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

Issue 2533693002: [Editing] Add SelectionTemplate::showTreeForThis() (Closed)
Patch Set: update Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SelectionTemplate.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SelectionTemplate_h 5 #ifndef SelectionTemplate_h
6 #define SelectionTemplate_h 6 #define SelectionTemplate_h
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/editing/EphemeralRange.h" 10 #include "core/editing/EphemeralRange.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // assertion failure. 93 // assertion failure.
94 bool assertValid() const; 94 bool assertValid() const;
95 bool assertValidFor(const Document&) const; 95 bool assertValidFor(const Document&) const;
96 96
97 DEFINE_INLINE_TRACE() { 97 DEFINE_INLINE_TRACE() {
98 visitor->trace(m_base); 98 visitor->trace(m_base);
99 visitor->trace(m_extent); 99 visitor->trace(m_extent);
100 } 100 }
101 101
102 void printTo(std::ostream*, const char* type) const; 102 void printTo(std::ostream*, const char* type) const;
103 #ifndef NDEBUG
104 void showTreeForThis() const;
105 #endif
103 106
104 private: 107 private:
105 friend class SelectionEditor; 108 friend class SelectionEditor;
106 109
107 Document* document() const; 110 Document* document() const;
108 111
109 PositionTemplate<Strategy> m_base; 112 PositionTemplate<Strategy> m_base;
110 PositionTemplate<Strategy> m_extent; 113 PositionTemplate<Strategy> m_extent;
111 TextAffinity m_affinity = TextAffinity::Downstream; 114 TextAffinity m_affinity = TextAffinity::Downstream;
112 TextGranularity m_granularity = CharacterGranularity; 115 TextGranularity m_granularity = CharacterGranularity;
(...skipping 11 matching lines...) Expand all
124 127
125 using SelectionInDOMTree = SelectionTemplate<EditingStrategy>; 128 using SelectionInDOMTree = SelectionTemplate<EditingStrategy>;
126 using SelectionInFlatTree = SelectionTemplate<EditingInFlatTreeStrategy>; 129 using SelectionInFlatTree = SelectionTemplate<EditingInFlatTreeStrategy>;
127 130
128 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionInDOMTree&); 131 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionInDOMTree&);
129 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionInFlatTree&); 132 CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionInFlatTree&);
130 133
131 } // namespace blink 134 } // namespace blink
132 135
133 #endif // SelectionTemplate_h 136 #endif // SelectionTemplate_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/SelectionTemplate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698