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

Side by Side Diff: Source/core/editing/VisiblePosition.h

Issue 1326313002: Introduce composed tree version of leftPositionOf() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-09T12:49:11 Add a comment about DOM version of leftPositoin() for composed tree Created 5 years, 3 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
« no previous file with comments | « no previous file | Source/core/editing/VisiblePosition.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 /* 1 /*
2 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2008 Apple 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 extern template class CORE_EXTERN_TEMPLATE_EXPORT VisiblePositionTemplate<Editin gStrategy>; 113 extern template class CORE_EXTERN_TEMPLATE_EXPORT VisiblePositionTemplate<Editin gStrategy>;
114 extern template class CORE_EXTERN_TEMPLATE_EXPORT VisiblePositionTemplate<Editin gInComposedTreeStrategy>; 114 extern template class CORE_EXTERN_TEMPLATE_EXPORT VisiblePositionTemplate<Editin gInComposedTreeStrategy>;
115 115
116 using VisiblePosition = VisiblePositionTemplate<EditingStrategy>; 116 using VisiblePosition = VisiblePositionTemplate<EditingStrategy>;
117 using VisiblePositionInComposedTree = VisiblePositionTemplate<EditingInComposedT reeStrategy>; 117 using VisiblePositionInComposedTree = VisiblePositionTemplate<EditingInComposedT reeStrategy>;
118 118
119 CORE_EXPORT VisiblePosition createVisiblePosition(const Position&, TextAffinity = VP_DEFAULT_AFFINITY); 119 CORE_EXPORT VisiblePosition createVisiblePosition(const Position&, TextAffinity = VP_DEFAULT_AFFINITY);
120 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionWithAffinity&); 120 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionWithAffinity&);
121 CORE_EXPORT VisiblePositionInComposedTree createVisiblePosition(const PositionIn ComposedTree&, TextAffinity = VP_DEFAULT_AFFINITY); 121 CORE_EXPORT VisiblePositionInComposedTree createVisiblePosition(const PositionIn ComposedTree&, TextAffinity = VP_DEFAULT_AFFINITY);
122 CORE_EXPORT VisiblePositionInComposedTree createVisiblePosition(const PositionIn ComposedTreeWithAffinity&);
122 123
123 // TODO(yosin) Once we have composed tree version of VisibleUnits, we should not 124 // TODO(yosin) Once we have composed tree version of VisibleUnits, we should not
124 // use |createVisiblePositionInDOMTree()|. 125 // use |createVisiblePositionInDOMTree()|.
125 VisiblePosition createVisiblePositionInDOMTree(const Position&, TextAffinity = V P_DEFAULT_AFFINITY); 126 VisiblePosition createVisiblePositionInDOMTree(const Position&, TextAffinity = V P_DEFAULT_AFFINITY);
126 VisiblePosition createVisiblePositionInDOMTree(const PositionInComposedTree&, Te xtAffinity = VP_DEFAULT_AFFINITY); 127 VisiblePosition createVisiblePositionInDOMTree(const PositionInComposedTree&, Te xtAffinity = VP_DEFAULT_AFFINITY);
127 128
128 } // namespace blink 129 } // namespace blink
129 130
130 #ifndef NDEBUG 131 #ifndef NDEBUG
131 // Outside the WebCore namespace for ease of invocation from gdb. 132 // Outside the WebCore namespace for ease of invocation from gdb.
132 void showTree(const blink::VisiblePosition*); 133 void showTree(const blink::VisiblePosition*);
133 void showTree(const blink::VisiblePosition&); 134 void showTree(const blink::VisiblePosition&);
134 #endif 135 #endif
135 136
136 #endif // VisiblePosition_h 137 #endif // VisiblePosition_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698