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

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

Issue 2952983002: Make Position::FirstPositionInNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-23T10:37:43 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(const 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(
197 const Node& anchor_node);
197 static PositionTemplate<Strategy> LastPositionInNode(Node* anchor_node); 198 static PositionTemplate<Strategy> LastPositionInNode(Node* anchor_node);
198 static PositionTemplate<Strategy> FirstPositionInOrBeforeNode( 199 static PositionTemplate<Strategy> FirstPositionInOrBeforeNode(
199 Node* anchor_node); 200 Node* anchor_node);
200 static PositionTemplate<Strategy> LastPositionInOrAfterNode( 201 static PositionTemplate<Strategy> LastPositionInOrAfterNode(
201 Node* anchor_node); 202 Node* anchor_node);
202 203
203 String ToAnchorTypeAndOffsetString() const; 204 String ToAnchorTypeAndOffsetString() const;
204 #ifndef NDEBUG 205 #ifndef NDEBUG
205 void ShowTreeForThis() const; 206 void ShowTreeForThis() const;
206 void ShowTreeForThisInFlatTree() const; 207 void ShowTreeForThisInFlatTree() const;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 284
284 } // namespace blink 285 } // namespace blink
285 286
286 #ifndef NDEBUG 287 #ifndef NDEBUG
287 // Outside the WebCore namespace for ease of invocation from gdb. 288 // Outside the WebCore namespace for ease of invocation from gdb.
288 void showTree(const blink::Position&); 289 void showTree(const blink::Position&);
289 void showTree(const blink::Position*); 290 void showTree(const blink::Position*);
290 #endif 291 #endif
291 292
292 #endif // Position_h 293 #endif // Position_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.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