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

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

Issue 1303173002: Move computeInlineBoxPosition() to VisibleUnits.{cpp,h} from Position.{cpp,h} and VisiblePosition.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-21T13:45:14 Created 5 years, 4 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 | « Source/core/editing/RenderedPosition.cpp ('k') | Source/core/editing/VisibleUnits.h » ('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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 template<typename Strategy> 131 template<typename Strategy>
132 void init(const PositionAlgorithm<Strategy>&, TextAffinity); 132 void init(const PositionAlgorithm<Strategy>&, TextAffinity);
133 133
134 Position leftVisuallyDistinctCandidate() const; 134 Position leftVisuallyDistinctCandidate() const;
135 Position rightVisuallyDistinctCandidate() const; 135 Position rightVisuallyDistinctCandidate() const;
136 136
137 Position m_deepPosition; 137 Position m_deepPosition;
138 TextAffinity m_affinity; 138 TextAffinity m_affinity;
139 }; 139 };
140 140
141 // TODO(yosin) We should move |computeInlineBoxPosition()| to "VisibleUnits.h"
142 // with |Position| version.
143 inline InlineBoxPosition computeInlineBoxPosition(const VisiblePosition& positio n)
144 {
145 return computeInlineBoxPosition(position.deepEquivalent(), position.affinity ());
146 }
147
148 EphemeralRange makeRange(const VisiblePosition&, const VisiblePosition&); 141 EphemeralRange makeRange(const VisiblePosition&, const VisiblePosition&);
149 142
150 CORE_EXPORT Position canonicalPositionOf(const Position&); 143 CORE_EXPORT Position canonicalPositionOf(const Position&);
151 CORE_EXPORT PositionInComposedTree canonicalPositionOf(const PositionInComposedT ree&); 144 CORE_EXPORT PositionInComposedTree canonicalPositionOf(const PositionInComposedT ree&);
152 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity &, const Position& anchor); 145 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity &, const Position& anchor);
153 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor); 146 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor);
154 147
155 } // namespace blink 148 } // namespace blink
156 149
157 #ifndef NDEBUG 150 #ifndef NDEBUG
158 // Outside the WebCore namespace for ease of invocation from gdb. 151 // Outside the WebCore namespace for ease of invocation from gdb.
159 void showTree(const blink::VisiblePosition*); 152 void showTree(const blink::VisiblePosition*);
160 void showTree(const blink::VisiblePosition&); 153 void showTree(const blink::VisiblePosition&);
161 #endif 154 #endif
162 155
163 #endif // VisiblePosition_h 156 #endif // VisiblePosition_h
OLDNEW
« no previous file with comments | « Source/core/editing/RenderedPosition.cpp ('k') | Source/core/editing/VisibleUnits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698