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

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

Issue 2953683004: Make Position::AfterNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-22T12:37:16 Created 3 years, 6 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
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // These can be either inside or just before/after the node, depending on 182 // These can be either inside or just before/after the node, depending on
183 // if the node is ignored by editing or not. 183 // if the node is ignored by editing or not.
184 // FIXME: These should go away. They only make sense for legacy positions. 184 // FIXME: These should go away. They only make sense for legacy positions.
185 bool AtFirstEditingPositionForNode() const; 185 bool AtFirstEditingPositionForNode() const;
186 bool AtLastEditingPositionForNode() const; 186 bool AtLastEditingPositionForNode() const;
187 187
188 bool AtStartOfTree() const; 188 bool AtStartOfTree() const;
189 bool AtEndOfTree() const; 189 bool AtEndOfTree() const;
190 190
191 static PositionTemplate<Strategy> BeforeNode(const Node& anchor_node); 191 static PositionTemplate<Strategy> BeforeNode(const Node& anchor_node);
192 static PositionTemplate<Strategy> AfterNode(Node* anchor_node); 192 static PositionTemplate<Strategy> AfterNode(const Node& anchor_node);
193 static PositionTemplate<Strategy> InParentBeforeNode(const Node& anchor_node); 193 static PositionTemplate<Strategy> InParentBeforeNode(const Node& anchor_node);
194 static PositionTemplate<Strategy> InParentAfterNode(const Node& anchor_node); 194 static PositionTemplate<Strategy> InParentAfterNode(const Node& anchor_node);
195 static int LastOffsetInNode(Node* anchor_node); 195 static int LastOffsetInNode(Node* anchor_node);
196 static PositionTemplate<Strategy> FirstPositionInNode(Node* anchor_node); 196 static PositionTemplate<Strategy> FirstPositionInNode(Node* anchor_node);
197 static PositionTemplate<Strategy> LastPositionInNode(Node* anchor_node); 197 static PositionTemplate<Strategy> LastPositionInNode(Node* anchor_node);
198 static PositionTemplate<Strategy> FirstPositionInOrBeforeNode( 198 static PositionTemplate<Strategy> FirstPositionInOrBeforeNode(
199 Node* anchor_node); 199 Node* anchor_node);
200 static PositionTemplate<Strategy> LastPositionInOrAfterNode( 200 static PositionTemplate<Strategy> LastPositionInOrAfterNode(
201 Node* anchor_node); 201 Node* anchor_node);
202 202
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 } // namespace blink 284 } // namespace blink
285 285
286 #ifndef NDEBUG 286 #ifndef NDEBUG
287 // Outside the WebCore namespace for ease of invocation from gdb. 287 // Outside the WebCore namespace for ease of invocation from gdb.
288 void showTree(const blink::Position&); 288 void showTree(const blink::Position&);
289 void showTree(const blink::Position*); 289 void showTree(const blink::Position*);
290 #endif 290 #endif
291 291
292 #endif // Position_h 292 #endif // Position_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp ('k') | third_party/WebKit/Source/core/editing/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698