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

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

Issue 1324873002: Move absoluteCaretBoundsOf() for VisiblePosition to VisibleUnits.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-01T16:18:49 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 |absoluteCaretBoundsOf()| to "VisibleUnits.cpp".
116 // Bounds of (possibly transformed) caret in absolute coords
117 CORE_EXPORT IntRect absoluteCaretBoundsOf(const VisiblePosition&);
118
119 // TODO(yosin) We should move |leftPositionOf()| and |rightPositionOf()| to 115 // TODO(yosin) We should move |leftPositionOf()| and |rightPositionOf()| to
120 // "VisibleUnits.cpp". 116 // "VisibleUnits.cpp".
121 VisiblePosition leftPositionOf(const VisiblePosition&); 117 VisiblePosition leftPositionOf(const VisiblePosition&);
122 VisiblePosition rightPositionOf(const VisiblePosition&); 118 VisiblePosition rightPositionOf(const VisiblePosition&);
123 119
124 // TODO(yosin) We should move |honorEditingBoundaryAtOr{Before,After} to 120 // TODO(yosin) We should move |honorEditingBoundaryAtOr{Before,After} to
125 // "VisibleUnits.cpp" as static function. 121 // "VisibleUnits.cpp" as static function.
126 // next() and previous() will increment/decrement by a character cluster. 122 // next() and previous() will increment/decrement by a character cluster.
127 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&, const Pos ition& anchor); 123 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&, const Pos ition& anchor);
128 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity &, const Position& anchor); 124 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity &, const Position& anchor);
129 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor); 125 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor);
130 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&, const Posi tion& anchor); 126 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&, const Posi tion& anchor);
131 127
132 CORE_EXPORT VisiblePosition visiblePositionOf(const Position&, TextAffinity = VP _DEFAULT_AFFINITY); 128 CORE_EXPORT VisiblePosition visiblePositionOf(const Position&, TextAffinity = VP _DEFAULT_AFFINITY);
133 CORE_EXPORT VisiblePosition visiblePositionOf(const PositionWithAffinity&); 129 CORE_EXPORT VisiblePosition visiblePositionOf(const PositionWithAffinity&);
134 CORE_EXPORT VisiblePosition visiblePositionOf(const PositionInComposedTree&, Tex tAffinity = VP_DEFAULT_AFFINITY); 130 CORE_EXPORT VisiblePosition visiblePositionOf(const PositionInComposedTree&, Tex tAffinity = VP_DEFAULT_AFFINITY);
135 131
136 } // namespace blink 132 } // namespace blink
137 133
138 #ifndef NDEBUG 134 #ifndef NDEBUG
139 // Outside the WebCore namespace for ease of invocation from gdb. 135 // Outside the WebCore namespace for ease of invocation from gdb.
140 void showTree(const blink::VisiblePosition*); 136 void showTree(const blink::VisiblePosition*);
141 void showTree(const blink::VisiblePosition&); 137 void showTree(const blink::VisiblePosition&);
142 #endif 138 #endif
143 139
144 #endif // VisiblePosition_h 140 #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