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: Source/core/editing/VisiblePosition.h

Issue 1310953005: Move {left,right}PositionOf() for VisiblePosition to VisibleUnits.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-01T21:47:52 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void showTreeForThis() const; 105 void showTreeForThis() const;
106 #endif 106 #endif
107 107
108 private: 108 private:
109 // TODO(yosin) We should use |PositionWithAffinity| to make 109 // TODO(yosin) We should use |PositionWithAffinity| to make
110 // |toPositionWithAffinity()| simpler. 110 // |toPositionWithAffinity()| simpler.
111 Position m_deepPosition; 111 Position m_deepPosition;
112 TextAffinity m_affinity; 112 TextAffinity m_affinity;
113 }; 113 };
114 114
115 // TODO(yosin) We should move |leftPositionOf()| and |rightPositionOf()| to
116 // "VisibleUnits.cpp".
117 VisiblePosition leftPositionOf(const VisiblePosition&);
118 VisiblePosition rightPositionOf(const VisiblePosition&);
119
120 // TODO(yosin) We should move |honorEditingBoundaryAtOr{Before,After} to 115 // TODO(yosin) We should move |honorEditingBoundaryAtOr{Before,After} to
121 // "VisibleUnits.cpp" as static function. 116 // "VisibleUnits.cpp" as static function.
122 // next() and previous() will increment/decrement by a character cluster. 117 // next() and previous() will increment/decrement by a character cluster.
123 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&, const Pos ition& anchor); 118 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&, const Pos ition& anchor);
124 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity &, const Position& anchor); 119 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity &, const Position& anchor);
125 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor); 120 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor);
126 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&, const Posi tion& anchor); 121 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&, const Posi tion& anchor);
127 122
128 CORE_EXPORT VisiblePosition createVisiblePosition(const Position&, TextAffinity = VP_DEFAULT_AFFINITY); 123 CORE_EXPORT VisiblePosition createVisiblePosition(const Position&, TextAffinity = VP_DEFAULT_AFFINITY);
129 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionWithAffinity&); 124 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionWithAffinity&);
130 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionInComposedTree&, TextAffinity = VP_DEFAULT_AFFINITY); 125 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionInComposedTree&, TextAffinity = VP_DEFAULT_AFFINITY);
131 126
132 } // namespace blink 127 } // namespace blink
133 128
134 #ifndef NDEBUG 129 #ifndef NDEBUG
135 // Outside the WebCore namespace for ease of invocation from gdb. 130 // Outside the WebCore namespace for ease of invocation from gdb.
136 void showTree(const blink::VisiblePosition*); 131 void showTree(const blink::VisiblePosition*);
137 void showTree(const blink::VisiblePosition&); 132 void showTree(const blink::VisiblePosition&);
138 #endif 133 #endif
139 134
140 #endif // VisiblePosition_h 135 #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