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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 EAffinity affinity() const { ASSERT(m_affinity == UPSTREAM || m_affinity ==
DOWNSTREAM); return m_affinity; } | 66 EAffinity affinity() const { ASSERT(m_affinity == UPSTREAM || m_affinity ==
DOWNSTREAM); return m_affinity; } |
67 void setAffinity(EAffinity affinity) { m_affinity = affinity; } | 67 void setAffinity(EAffinity affinity) { m_affinity = affinity; } |
68 | 68 |
69 // FIXME: Change the following functions' parameter from a boolean to StayIn
EditableContent. | 69 // FIXME: Change the following functions' parameter from a boolean to StayIn
EditableContent. |
70 | 70 |
71 // next() and previous() will increment/decrement by a character cluster. | 71 // next() and previous() will increment/decrement by a character cluster. |
72 VisiblePosition next(EditingBoundaryCrossingRule = CanCrossEditingBoundary)
const; | 72 VisiblePosition next(EditingBoundaryCrossingRule = CanCrossEditingBoundary)
const; |
73 VisiblePosition previous(EditingBoundaryCrossingRule = CanCrossEditingBounda
ry) const; | 73 VisiblePosition previous(EditingBoundaryCrossingRule = CanCrossEditingBounda
ry) const; |
74 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&) const
; | 74 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&) const
; |
75 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&) const; | 75 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&) const; |
| 76 VisiblePosition skipToStartOfEditingBoundary(const VisiblePosition&) const; |
| 77 VisiblePosition skipToEndOfEditingBoundary(const VisiblePosition&) const; |
76 | 78 |
77 VisiblePosition left(bool stayInEditableContent = false) const; | 79 VisiblePosition left(bool stayInEditableContent = false) const; |
78 VisiblePosition right(bool stayInEditableContent = false) const; | 80 VisiblePosition right(bool stayInEditableContent = false) const; |
79 | 81 |
80 UChar32 characterAfter() const; | 82 UChar32 characterAfter() const; |
81 UChar32 characterBefore() const { return previous().characterAfter(); } | 83 UChar32 characterBefore() const { return previous().characterAfter(); } |
82 | 84 |
83 // FIXME: This does not handle [table, 0] correctly. | 85 // FIXME: This does not handle [table, 0] correctly. |
84 Element* rootEditableElement() const { return m_deepPosition.isNotNull() ? m
_deepPosition.deprecatedNode()->rootEditableElement() : 0; } | 86 Element* rootEditableElement() const { return m_deepPosition.isNotNull() ? m
_deepPosition.deprecatedNode()->rootEditableElement() : 0; } |
85 | 87 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 144 |
143 } // namespace WebCore | 145 } // namespace WebCore |
144 | 146 |
145 #ifndef NDEBUG | 147 #ifndef NDEBUG |
146 // Outside the WebCore namespace for ease of invocation from gdb. | 148 // Outside the WebCore namespace for ease of invocation from gdb. |
147 void showTree(const WebCore::VisiblePosition*); | 149 void showTree(const WebCore::VisiblePosition*); |
148 void showTree(const WebCore::VisiblePosition&); | 150 void showTree(const WebCore::VisiblePosition&); |
149 #endif | 151 #endif |
150 | 152 |
151 #endif // VisiblePosition_h | 153 #endif // VisiblePosition_h |
OLD | NEW |