| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 explicit VisiblePosition(const Position&, EAffinity = VP_DEFAULT_AFFINITY); | 59 explicit VisiblePosition(const Position&, EAffinity = VP_DEFAULT_AFFINITY); |
| 60 explicit VisiblePosition(const PositionWithAffinity&); | 60 explicit VisiblePosition(const PositionWithAffinity&); |
| 61 | 61 |
| 62 void clear() { m_deepPosition.clear(); } | 62 void clear() { m_deepPosition.clear(); } |
| 63 | 63 |
| 64 bool isNull() const { return m_deepPosition.isNull(); } | 64 bool isNull() const { return m_deepPosition.isNull(); } |
| 65 bool isNotNull() const { return m_deepPosition.isNotNull(); } | 65 bool isNotNull() const { return m_deepPosition.isNotNull(); } |
| 66 bool isOrphan() const { return m_deepPosition.isOrphan(); } | 66 bool isOrphan() const { return m_deepPosition.isOrphan(); } |
| 67 | 67 |
| 68 Position deepEquivalent() const { return m_deepPosition; } | 68 Position deepEquivalent() const { return m_deepPosition; } |
| 69 Position toParentAnchoredPosition() const { return deepEquivalent().parentAn
choredEquivalent(); } |
| 69 EAffinity affinity() const { ASSERT(m_affinity == UPSTREAM || m_affinity ==
DOWNSTREAM); return m_affinity; } | 70 EAffinity affinity() const { ASSERT(m_affinity == UPSTREAM || m_affinity ==
DOWNSTREAM); return m_affinity; } |
| 70 void setAffinity(EAffinity affinity) { m_affinity = affinity; } | 71 void setAffinity(EAffinity affinity) { m_affinity = affinity; } |
| 71 | 72 |
| 72 // FIXME: Change the following functions' parameter from a boolean to StayIn
EditableContent. | 73 // FIXME: Change the following functions' parameter from a boolean to StayIn
EditableContent. |
| 73 | 74 |
| 74 // next() and previous() will increment/decrement by a character cluster. | 75 // next() and previous() will increment/decrement by a character cluster. |
| 75 VisiblePosition next(EditingBoundaryCrossingRule = CanCrossEditingBoundary)
const; | 76 VisiblePosition next(EditingBoundaryCrossingRule = CanCrossEditingBoundary)
const; |
| 76 VisiblePosition previous(EditingBoundaryCrossingRule = CanCrossEditingBounda
ry) const; | 77 VisiblePosition previous(EditingBoundaryCrossingRule = CanCrossEditingBounda
ry) const; |
| 77 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&) const
; | 78 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&) const
; |
| 78 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&) const; | 79 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&) const; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 144 |
| 144 } // namespace blink | 145 } // namespace blink |
| 145 | 146 |
| 146 #ifndef NDEBUG | 147 #ifndef NDEBUG |
| 147 // Outside the WebCore namespace for ease of invocation from gdb. | 148 // Outside the WebCore namespace for ease of invocation from gdb. |
| 148 void showTree(const blink::VisiblePosition*); | 149 void showTree(const blink::VisiblePosition*); |
| 149 void showTree(const blink::VisiblePosition&); | 150 void showTree(const blink::VisiblePosition&); |
| 150 #endif | 151 #endif |
| 151 | 152 |
| 152 #endif // VisiblePosition_h | 153 #endif // VisiblePosition_h |
| OLD | NEW |