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

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

Issue 1299323006: [Editing][CodeHealth] Move Position::up/downstream implementation to VisibleUnit.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « no previous file | Source/core/editing/Position.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, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // These can be either inside or just before/after the node, depending on 179 // These can be either inside or just before/after the node, depending on
180 // if the node is ignored by editing or not. 180 // if the node is ignored by editing or not.
181 // FIXME: These should go away. They only make sense for legacy positions. 181 // FIXME: These should go away. They only make sense for legacy positions.
182 bool atFirstEditingPositionForNode() const; 182 bool atFirstEditingPositionForNode() const;
183 bool atLastEditingPositionForNode() const; 183 bool atLastEditingPositionForNode() const;
184 184
185 bool atStartOfTree() const; 185 bool atStartOfTree() const;
186 bool atEndOfTree() const; 186 bool atEndOfTree() const;
187 187
188 // These return useful visually equivalent positions. 188 // These return useful visually equivalent positions.
189 // FIXME: We should use mostForwardCaretPosition and mostBackwardPosition.
189 PositionAlgorithm<Strategy> upstream(EditingBoundaryCrossingRule = CannotCro ssEditingBoundary) const; 190 PositionAlgorithm<Strategy> upstream(EditingBoundaryCrossingRule = CannotCro ssEditingBoundary) const;
190 PositionAlgorithm<Strategy> downstream(EditingBoundaryCrossingRule = CannotC rossEditingBoundary) const; 191 PositionAlgorithm<Strategy> downstream(EditingBoundaryCrossingRule = CannotC rossEditingBoundary) const;
191 192
192 bool isCandidate() const; 193 bool isCandidate() const;
193 bool inRenderedText() const; 194 bool inRenderedText() const;
194 195
195 InlineBoxPosition computeInlineBoxPosition(TextAffinity) const; 196 InlineBoxPosition computeInlineBoxPosition(TextAffinity) const;
196 InlineBoxPosition computeInlineBoxPosition(TextAffinity, TextDirection prima ryDirection) const; 197 InlineBoxPosition computeInlineBoxPosition(TextAffinity, TextDirection prima ryDirection) const;
197 198
198 static bool nodeIsUserSelectAll(const Node*); 199 static bool nodeIsUserSelectAll(const Node*);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 451
451 } // namespace blink 452 } // namespace blink
452 453
453 #ifndef NDEBUG 454 #ifndef NDEBUG
454 // Outside the WebCore namespace for ease of invocation from gdb. 455 // Outside the WebCore namespace for ease of invocation from gdb.
455 void showTree(const blink::Position&); 456 void showTree(const blink::Position&);
456 void showTree(const blink::Position*); 457 void showTree(const blink::Position*);
457 #endif 458 #endif
458 459
459 #endif // Position_h 460 #endif // Position_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698