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

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

Issue 2966433002: Get rid of VisibleSelectionTemplate::has_trailing_whitespace_ (Closed)
Patch Set: 2017-07-04T18:31:35 Created 3 years, 5 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 /* 1 /*
2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 TextAffinity affinity_; // the upstream/downstream affinity of the caret 171 TextAffinity affinity_; // the upstream/downstream affinity of the caret
172 172
173 // these are cached, can be recalculated by validate() 173 // these are cached, can be recalculated by validate()
174 SelectionType selection_type_; // None, Caret, Range 174 SelectionType selection_type_; // None, Caret, Range
175 bool base_is_first_ : 1; // True if base is before the extent 175 bool base_is_first_ : 1; // True if base is before the extent
176 // Non-directional ignores m_baseIsFirst and selection always extends on shift 176 // Non-directional ignores m_baseIsFirst and selection always extends on shift
177 // + arrow key. 177 // + arrow key.
178 bool is_directional_ : 1; 178 bool is_directional_ : 1;
179 179
180 TextGranularity granularity_; 180 TextGranularity granularity_;
181 // |updateIfNeeded()| uses |m_hasTrailingWhitespace| for word granularity.
182 // |m_hasTrailingWhitespace| is set by |appendTrailingWhitespace()|.
183 // TODO(yosin): Once we unify start/end and base/extent, we should get rid
184 // of |m_hasTrailingWhitespace|.
185 bool has_trailing_whitespace_ : 1;
186 }; 181 };
187 182
188 extern template class CORE_EXTERN_TEMPLATE_EXPORT 183 extern template class CORE_EXTERN_TEMPLATE_EXPORT
189 VisibleSelectionTemplate<EditingStrategy>; 184 VisibleSelectionTemplate<EditingStrategy>;
190 extern template class CORE_EXTERN_TEMPLATE_EXPORT 185 extern template class CORE_EXTERN_TEMPLATE_EXPORT
191 VisibleSelectionTemplate<EditingInFlatTreeStrategy>; 186 VisibleSelectionTemplate<EditingInFlatTreeStrategy>;
192 187
193 using VisibleSelection = VisibleSelectionTemplate<EditingStrategy>; 188 using VisibleSelection = VisibleSelectionTemplate<EditingStrategy>;
194 using VisibleSelectionInFlatTree = 189 using VisibleSelectionInFlatTree =
195 VisibleSelectionTemplate<EditingInFlatTreeStrategy>; 190 VisibleSelectionTemplate<EditingInFlatTreeStrategy>;
(...skipping 14 matching lines...) Expand all
210 205
211 #ifndef NDEBUG 206 #ifndef NDEBUG
212 // Outside the WebCore namespace for ease of invocation from gdb. 207 // Outside the WebCore namespace for ease of invocation from gdb.
213 void showTree(const blink::VisibleSelection&); 208 void showTree(const blink::VisibleSelection&);
214 void showTree(const blink::VisibleSelection*); 209 void showTree(const blink::VisibleSelection*);
215 void showTree(const blink::VisibleSelectionInFlatTree&); 210 void showTree(const blink::VisibleSelectionInFlatTree&);
216 void showTree(const blink::VisibleSelectionInFlatTree*); 211 void showTree(const blink::VisibleSelectionInFlatTree*);
217 #endif 212 #endif
218 213
219 #endif // VisibleSelection_h 214 #endif // VisibleSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698