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