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

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

Issue 1300823002: Introduce PositionAlgorithm<Strategy>::editingPositionOf() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-18T17:38:11 Created 5 years, 4 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 | Source/core/editing/Position.h » ('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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (m_offsetInContainer >= 0) 102 if (m_offsetInContainer >= 0)
103 return; 103 return;
104 104
105 ASSERT(m_childBeforeBoundary); 105 ASSERT(m_childBeforeBoundary);
106 m_offsetInContainer = m_childBeforeBoundary->nodeIndex() + 1; 106 m_offsetInContainer = m_childBeforeBoundary->nodeIndex() + 1;
107 } 107 }
108 108
109 inline const Position RangeBoundaryPoint::toPosition() const 109 inline const Position RangeBoundaryPoint::toPosition() const
110 { 110 {
111 ensureOffsetIsValid(); 111 ensureOffsetIsValid();
112 return createLegacyEditingPosition(m_containerNode.get(), m_offsetInContaine r); 112 return Position::editingPositionOf(m_containerNode.get(), m_offsetInContaine r);
113 } 113 }
114 114
115 inline int RangeBoundaryPoint::offset() const 115 inline int RangeBoundaryPoint::offset() const
116 { 116 {
117 ensureOffsetIsValid(); 117 ensureOffsetIsValid();
118 return m_offsetInContainer; 118 return m_offsetInContainer;
119 } 119 }
120 120
121 inline void RangeBoundaryPoint::clear() 121 inline void RangeBoundaryPoint::clear()
122 { 122 {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } else { 196 } else {
197 if (a.offset() != b.offset()) 197 if (a.offset() != b.offset())
198 return false; 198 return false;
199 } 199 }
200 return true; 200 return true;
201 } 201 }
202 202
203 } 203 }
204 204
205 #endif 205 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/Position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698