OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004 Apple Computer, 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 bool isCaret() const { return selectionType() == CaretSelection; } | 82 bool isCaret() const { return selectionType() == CaretSelection; } |
83 bool isRange() const { return selectionType() == RangeSelection; } | 83 bool isRange() const { return selectionType() == RangeSelection; } |
84 bool isCaretOrRange() const { return selectionType() != NoSelection; } | 84 bool isCaretOrRange() const { return selectionType() != NoSelection; } |
85 bool isNonOrphanedRange() const { return isRange() && !start().isOrphan() &&
!end().isOrphan(); } | 85 bool isNonOrphanedRange() const { return isRange() && !start().isOrphan() &&
!end().isOrphan(); } |
86 bool isNonOrphanedCaretOrRange() const { return isCaretOrRange() && !start()
.isOrphan() && !end().isOrphan(); } | 86 bool isNonOrphanedCaretOrRange() const { return isCaretOrRange() && !start()
.isOrphan() && !end().isOrphan(); } |
87 | 87 |
88 bool isBaseFirst() const { return m_baseIsFirst; } | 88 bool isBaseFirst() const { return m_baseIsFirst; } |
89 bool isDirectional() const { return m_isDirectional; } | 89 bool isDirectional() const { return m_isDirectional; } |
90 void setIsDirectional(bool isDirectional) { m_isDirectional = isDirectional;
} | 90 void setIsDirectional(bool isDirectional) { m_isDirectional = isDirectional;
} |
91 | 91 |
92 void appendTrailingWhitespace(); | |
93 | |
94 bool expandUsingGranularity(TextGranularity granularity); | 92 bool expandUsingGranularity(TextGranularity granularity); |
95 | 93 |
96 // We don't yet support multi-range selections, so we only ever have one ran
ge to return. | 94 // We don't yet support multi-range selections, so we only ever have one ran
ge to return. |
97 PassRefPtr<Range> firstRange() const; | 95 PassRefPtr<Range> firstRange() const; |
98 | 96 |
99 // FIXME: Most callers probably don't want this function, but are using it | 97 // FIXME: Most callers probably don't want this function, but are using it |
100 // for historical reasons. toNormalizedRange contracts the range around | 98 // for historical reasons. toNormalizedRange contracts the range around |
101 // text, and moves the caret upstream before returning the range. | 99 // text, and moves the caret upstream before returning the range. |
102 PassRefPtr<Range> toNormalizedRange() const; | 100 PassRefPtr<Range> toNormalizedRange() const; |
103 | 101 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 180 |
183 } // namespace blink | 181 } // namespace blink |
184 | 182 |
185 #ifndef NDEBUG | 183 #ifndef NDEBUG |
186 // Outside the WebCore namespace for ease of invocation from gdb. | 184 // Outside the WebCore namespace for ease of invocation from gdb. |
187 void showTree(const blink::VisibleSelection&); | 185 void showTree(const blink::VisibleSelection&); |
188 void showTree(const blink::VisibleSelection*); | 186 void showTree(const blink::VisibleSelection*); |
189 #endif | 187 #endif |
190 | 188 |
191 #endif // SKY_ENGINE_CORE_EDITING_VISIBLESELECTION_H_ | 189 #endif // SKY_ENGINE_CORE_EDITING_VISIBLESELECTION_H_ |
OLD | NEW |