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

Side by Side Diff: Source/core/dom/RangeBoundaryPoint.h

Issue 171773008: Rename childNodeCount() / childNode() methods for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Further renaming for consistency Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Range.cpp ('k') | Source/core/dom/shadow/ComposedTreeWalker.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 { 114 {
115 m_containerNode.clear(); 115 m_containerNode.clear();
116 m_offsetInContainer = 0; 116 m_offsetInContainer = 0;
117 m_childBeforeBoundary = 0; 117 m_childBeforeBoundary = 0;
118 } 118 }
119 119
120 inline void RangeBoundaryPoint::set(PassRefPtr<Node> container, int offset, Node * childBefore) 120 inline void RangeBoundaryPoint::set(PassRefPtr<Node> container, int offset, Node * childBefore)
121 { 121 {
122 ASSERT(container); 122 ASSERT(container);
123 ASSERT(offset >= 0); 123 ASSERT(offset >= 0);
124 ASSERT(childBefore == (offset ? container->childNode(offset - 1) : 0)); 124 ASSERT(childBefore == (offset ? container->traverseToChildAt(offset - 1) : 0 ));
125 m_containerNode = container; 125 m_containerNode = container;
126 m_offsetInContainer = offset; 126 m_offsetInContainer = offset;
127 m_childBeforeBoundary = childBefore; 127 m_childBeforeBoundary = childBefore;
128 } 128 }
129 129
130 inline void RangeBoundaryPoint::setOffset(int offset) 130 inline void RangeBoundaryPoint::setOffset(int offset)
131 { 131 {
132 ASSERT(m_containerNode); 132 ASSERT(m_containerNode);
133 ASSERT(m_containerNode->offsetInCharacters()); 133 ASSERT(m_containerNode->offsetInCharacters());
134 ASSERT(m_offsetInContainer >= 0); 134 ASSERT(m_offsetInContainer >= 0);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } else { 190 } else {
191 if (a.offset() != b.offset()) 191 if (a.offset() != b.offset())
192 return false; 192 return false;
193 } 193 }
194 return true; 194 return true;
195 } 195 }
196 196
197 } 197 }
198 198
199 #endif 199 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Range.cpp ('k') | Source/core/dom/shadow/ComposedTreeWalker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698