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

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

Issue 2957833004: Make VisiblePosition::LastPositionInNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-27T15:28:02 Created 3 years, 5 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, 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 PositionWithAffinityTemplate<Strategy> ToPositionWithAffinity() const { 102 PositionWithAffinityTemplate<Strategy> ToPositionWithAffinity() const {
103 return position_with_affinity_; 103 return position_with_affinity_;
104 } 104 }
105 TextAffinity Affinity() const { return position_with_affinity_.Affinity(); } 105 TextAffinity Affinity() const { return position_with_affinity_.Affinity(); }
106 106
107 static VisiblePositionTemplate<Strategy> AfterNode(const Node&); 107 static VisiblePositionTemplate<Strategy> AfterNode(const Node&);
108 static VisiblePositionTemplate<Strategy> BeforeNode(const Node&); 108 static VisiblePositionTemplate<Strategy> BeforeNode(const Node&);
109 static VisiblePositionTemplate<Strategy> FirstPositionInNode(const Node&); 109 static VisiblePositionTemplate<Strategy> FirstPositionInNode(const Node&);
110 static VisiblePositionTemplate<Strategy> InParentAfterNode(const Node&); 110 static VisiblePositionTemplate<Strategy> InParentAfterNode(const Node&);
111 static VisiblePositionTemplate<Strategy> InParentBeforeNode(const Node&); 111 static VisiblePositionTemplate<Strategy> InParentBeforeNode(const Node&);
112 static VisiblePositionTemplate<Strategy> LastPositionInNode(Node*); 112 static VisiblePositionTemplate<Strategy> LastPositionInNode(const Node&);
113 113
114 DECLARE_TRACE(); 114 DECLARE_TRACE();
115 115
116 #ifndef NDEBUG 116 #ifndef NDEBUG
117 void ShowTreeForThis() const; 117 void ShowTreeForThis() const;
118 #endif 118 #endif
119 119
120 private: 120 private:
121 explicit VisiblePositionTemplate( 121 explicit VisiblePositionTemplate(
122 const PositionWithAffinityTemplate<Strategy>&); 122 const PositionWithAffinityTemplate<Strategy>&);
(...skipping 30 matching lines...) Expand all
153 153
154 } // namespace blink 154 } // namespace blink
155 155
156 #ifndef NDEBUG 156 #ifndef NDEBUG
157 // Outside the WebCore namespace for ease of invocation from gdb. 157 // Outside the WebCore namespace for ease of invocation from gdb.
158 void showTree(const blink::VisiblePosition*); 158 void showTree(const blink::VisiblePosition*);
159 void showTree(const blink::VisiblePosition&); 159 void showTree(const blink::VisiblePosition&);
160 #endif 160 #endif
161 161
162 #endif // VisiblePosition_h 162 #endif // VisiblePosition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698