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

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

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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved. 4 * Portions Copyright (c) 2011 Motorola Mobility, Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 template <typename Strategy> 103 template <typename Strategy>
104 VisiblePositionTemplate<Strategy> VisiblePositionTemplate<Strategy>::AfterNode( 104 VisiblePositionTemplate<Strategy> VisiblePositionTemplate<Strategy>::AfterNode(
105 const Node& node) { 105 const Node& node) {
106 return Create(PositionWithAffinityTemplate<Strategy>( 106 return Create(PositionWithAffinityTemplate<Strategy>(
107 PositionTemplate<Strategy>::AfterNode(node))); 107 PositionTemplate<Strategy>::AfterNode(node)));
108 } 108 }
109 109
110 template <typename Strategy> 110 template <typename Strategy>
111 VisiblePositionTemplate<Strategy> VisiblePositionTemplate<Strategy>::BeforeNode( 111 VisiblePositionTemplate<Strategy> VisiblePositionTemplate<Strategy>::BeforeNode(
112 Node* node) { 112 const Node& node) {
113 return Create(PositionWithAffinityTemplate<Strategy>( 113 return Create(PositionWithAffinityTemplate<Strategy>(
114 PositionTemplate<Strategy>::BeforeNode(*node))); 114 PositionTemplate<Strategy>::BeforeNode(node)));
115 } 115 }
116 116
117 template <typename Strategy> 117 template <typename Strategy>
118 VisiblePositionTemplate<Strategy> 118 VisiblePositionTemplate<Strategy>
119 VisiblePositionTemplate<Strategy>::FirstPositionInNode(Node* node) { 119 VisiblePositionTemplate<Strategy>::FirstPositionInNode(Node* node) {
120 return Create(PositionWithAffinityTemplate<Strategy>( 120 return Create(PositionWithAffinityTemplate<Strategy>(
121 PositionTemplate<Strategy>::FirstPositionInNode(*node))); 121 PositionTemplate<Strategy>::FirstPositionInNode(*node)));
122 } 122 }
123 123
124 template <typename Strategy> 124 template <typename Strategy>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 return; 211 return;
212 } 212 }
213 DVLOG(0) << "Cannot showTree for (nil) VisiblePosition."; 213 DVLOG(0) << "Cannot showTree for (nil) VisiblePosition.";
214 } 214 }
215 215
216 void showTree(const blink::VisiblePosition& vpos) { 216 void showTree(const blink::VisiblePosition& vpos) {
217 vpos.ShowTreeForThis(); 217 vpos.ShowTreeForThis();
218 } 218 }
219 219
220 #endif 220 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698