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

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

Issue 1756763002: 2016-03-02T18:53:01 LayoutPosition Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-04-25T19:02:18 Created 4 years, 7 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 17 matching lines...) Expand all
28 28
29 #include "core/CoreExport.h" 29 #include "core/CoreExport.h"
30 #include "core/editing/EditingStrategy.h" 30 #include "core/editing/EditingStrategy.h"
31 #include "core/editing/EphemeralRange.h" 31 #include "core/editing/EphemeralRange.h"
32 #include "core/editing/SelectionType.h" 32 #include "core/editing/SelectionType.h"
33 #include "core/editing/TextAffinity.h" 33 #include "core/editing/TextAffinity.h"
34 #include "core/editing/TextGranularity.h" 34 #include "core/editing/TextGranularity.h"
35 #include "core/editing/VisiblePosition.h" 35 #include "core/editing/VisiblePosition.h"
36 #include "core/editing/VisibleUnits.h" 36 #include "core/editing/VisibleUnits.h"
37 #include "wtf/Allocator.h" 37 #include "wtf/Allocator.h"
38 #include <iosfwd>
38 39
39 namespace blink { 40 namespace blink {
40 41
41 class LayoutPoint; 42 class LayoutPoint;
42 class SelectionAdjuster; 43 class SelectionAdjuster;
43 44
44 const TextAffinity SelDefaultAffinity = TextAffinity::Downstream; 45 const TextAffinity SelDefaultAffinity = TextAffinity::Downstream;
45 enum SelectionDirection { DirectionForward, DirectionBackward, DirectionRight, D irectionLeft }; 46 enum SelectionDirection { DirectionForward, DirectionBackward, DirectionRight, D irectionLeft };
46 47
47 // Listener of |VisibleSelection| modification. |didChangeVisibleSelection()| 48 // Listener of |VisibleSelection| modification. |didChangeVisibleSelection()|
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // |equalSelectionsInDOMTree()|. 216 // |equalSelectionsInDOMTree()|.
216 bool equalSelectionsInDOMTree(const VisibleSelection&, const VisibleSelection&); 217 bool equalSelectionsInDOMTree(const VisibleSelection&, const VisibleSelection&);
217 218
218 // We don't yet support multi-range selections, so we only ever have one range 219 // We don't yet support multi-range selections, so we only ever have one range
219 // to return. 220 // to return.
220 CORE_EXPORT EphemeralRange firstEphemeralRangeOf(const VisibleSelection&); 221 CORE_EXPORT EphemeralRange firstEphemeralRangeOf(const VisibleSelection&);
221 222
222 // TODO(sof): move more firstRangeOf() uses to be over EphemeralRange instead. 223 // TODO(sof): move more firstRangeOf() uses to be over EphemeralRange instead.
223 CORE_EXPORT Range* firstRangeOf(const VisibleSelection&); 224 CORE_EXPORT Range* firstRangeOf(const VisibleSelection&);
224 225
226 CORE_EXPORT std::ostream& operator<<(std::ostream&, const VisibleSelection&);
227 CORE_EXPORT std::ostream& operator<<(std::ostream&, const VisibleSelectionInFlat Tree&);
228
225 } // namespace blink 229 } // namespace blink
226 230
227 #ifndef NDEBUG 231 #ifndef NDEBUG
228 // Outside the WebCore namespace for ease of invocation from gdb. 232 // Outside the WebCore namespace for ease of invocation from gdb.
229 void showTree(const blink::VisibleSelection&); 233 void showTree(const blink::VisibleSelection&);
230 void showTree(const blink::VisibleSelection*); 234 void showTree(const blink::VisibleSelection*);
231 void showTree(const blink::VisibleSelectionInFlatTree&); 235 void showTree(const blink::VisibleSelectionInFlatTree&);
232 void showTree(const blink::VisibleSelectionInFlatTree*); 236 void showTree(const blink::VisibleSelectionInFlatTree*);
233 #endif 237 #endif
234 238
235 #endif // VisibleSelection_h 239 #endif // VisibleSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698