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

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

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

Powered by Google App Engine
This is Rietveld 408576698