| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |