| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 void PositionIterator::decrement() | 73 void PositionIterator::decrement() |
| 74 { | 74 { |
| 75 if (!m_anchorNode) | 75 if (!m_anchorNode) |
| 76 return; | 76 return; |
| 77 | 77 |
| 78 if (m_nodeAfterPositionInAnchor) { | 78 if (m_nodeAfterPositionInAnchor) { |
| 79 m_anchorNode = m_nodeAfterPositionInAnchor->previousSibling(); | 79 m_anchorNode = m_nodeAfterPositionInAnchor->previousSibling(); |
| 80 if (m_anchorNode) { | 80 if (m_anchorNode) { |
| 81 m_nodeAfterPositionInAnchor = 0; | 81 m_nodeAfterPositionInAnchor = nullptr; |
| 82 m_offsetInAnchor = m_anchorNode->hasChildren() ? 0 : lastOffsetForEd
iting(m_anchorNode); | 82 m_offsetInAnchor = m_anchorNode->hasChildren() ? 0 : lastOffsetForEd
iting(m_anchorNode); |
| 83 } else { | 83 } else { |
| 84 m_nodeAfterPositionInAnchor = m_nodeAfterPositionInAnchor->parentNod
e(); | 84 m_nodeAfterPositionInAnchor = m_nodeAfterPositionInAnchor->parentNod
e(); |
| 85 m_anchorNode = m_nodeAfterPositionInAnchor->parentNode(); | 85 m_anchorNode = m_nodeAfterPositionInAnchor->parentNode(); |
| 86 m_offsetInAnchor = 0; | 86 m_offsetInAnchor = 0; |
| 87 } | 87 } |
| 88 return; | 88 return; |
| 89 } | 89 } |
| 90 | 90 |
| 91 if (m_anchorNode->hasChildren()) { | 91 if (m_anchorNode->hasChildren()) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer
)) | 173 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer
)) |
| 174 return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anch
orNode); | 174 return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anch
orNode); |
| 175 return m_anchorNode->rendererIsEditable() && !Position::nodeIsUserSe
lectNone(m_anchorNode) && Position(*this).atEditingBoundary(); | 175 return m_anchorNode->rendererIsEditable() && !Position::nodeIsUserSe
lectNone(m_anchorNode) && Position(*this).atEditingBoundary(); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 return false; | 179 return false; |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace WebCore | 182 } // namespace WebCore |
| OLD | NEW |