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

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

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