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

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

Issue 2432383002: Get rid of flat tree version of createVisibleSelection() taking two PositionInFlatTree (Closed)
Patch Set: 2016-10-20T15:59:37 Created 4 years, 1 month 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 TextAffinity = SelDefaultAffinity, 227 TextAffinity = SelDefaultAffinity,
228 bool isDirectional = false); 228 bool isDirectional = false);
229 CORE_EXPORT VisibleSelection createVisibleSelection(const VisiblePosition&, 229 CORE_EXPORT VisibleSelection createVisibleSelection(const VisiblePosition&,
230 const VisiblePosition&, 230 const VisiblePosition&,
231 bool isDirectional = false); 231 bool isDirectional = false);
232 CORE_EXPORT VisibleSelection createVisibleSelection(const PositionWithAffinity&, 232 CORE_EXPORT VisibleSelection createVisibleSelection(const PositionWithAffinity&,
233 bool isDirectional = false); 233 bool isDirectional = false);
234 234
235 CORE_EXPORT VisibleSelectionInFlatTree 235 CORE_EXPORT VisibleSelectionInFlatTree
236 createVisibleSelection(const SelectionInFlatTree&); 236 createVisibleSelection(const SelectionInFlatTree&);
237 CORE_EXPORT VisibleSelectionInFlatTree
238 createVisibleSelection(const PositionInFlatTree& base,
239 const PositionInFlatTree& extent,
240 TextAffinity = SelDefaultAffinity,
241 bool isDirectional = false);
242 237
243 // We don't yet support multi-range selections, so we only ever have one range 238 // We don't yet support multi-range selections, so we only ever have one range
244 // to return. 239 // to return.
245 CORE_EXPORT EphemeralRange firstEphemeralRangeOf(const VisibleSelection&); 240 CORE_EXPORT EphemeralRange firstEphemeralRangeOf(const VisibleSelection&);
246 241
247 // TODO(sof): move more firstRangeOf() uses to be over EphemeralRange instead. 242 // TODO(sof): move more firstRangeOf() uses to be over EphemeralRange instead.
248 CORE_EXPORT Range* firstRangeOf(const VisibleSelection&); 243 CORE_EXPORT Range* firstRangeOf(const VisibleSelection&);
249 244
250 CORE_EXPORT std::ostream& operator<<(std::ostream&, const VisibleSelection&); 245 CORE_EXPORT std::ostream& operator<<(std::ostream&, const VisibleSelection&);
251 CORE_EXPORT std::ostream& operator<<(std::ostream&, 246 CORE_EXPORT std::ostream& operator<<(std::ostream&,
252 const VisibleSelectionInFlatTree&); 247 const VisibleSelectionInFlatTree&);
253 248
254 } // namespace blink 249 } // namespace blink
255 250
256 #ifndef NDEBUG 251 #ifndef NDEBUG
257 // Outside the WebCore namespace for ease of invocation from gdb. 252 // Outside the WebCore namespace for ease of invocation from gdb.
258 void showTree(const blink::VisibleSelection&); 253 void showTree(const blink::VisibleSelection&);
259 void showTree(const blink::VisibleSelection*); 254 void showTree(const blink::VisibleSelection*);
260 void showTree(const blink::VisibleSelectionInFlatTree&); 255 void showTree(const blink::VisibleSelectionInFlatTree&);
261 void showTree(const blink::VisibleSelectionInFlatTree*); 256 void showTree(const blink::VisibleSelectionInFlatTree*);
262 #endif 257 #endif
263 258
264 #endif // VisibleSelection_h 259 #endif // VisibleSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698