| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |