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

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

Issue 2958483003: Make VisiblePosition::BeforeNode() to take const Node& instead of Node* (Closed)
Patch Set: 017-06-23T18:57:25 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisiblePosition.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, 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 PositionTemplate<Strategy> ToParentAnchoredPosition() const { 99 PositionTemplate<Strategy> ToParentAnchoredPosition() const {
100 return DeepEquivalent().ParentAnchoredEquivalent(); 100 return DeepEquivalent().ParentAnchoredEquivalent();
101 } 101 }
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(Node*); 108 static VisiblePositionTemplate<Strategy> BeforeNode(const Node&);
109 static VisiblePositionTemplate<Strategy> FirstPositionInNode(Node*); 109 static VisiblePositionTemplate<Strategy> FirstPositionInNode(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(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
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698