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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // contracts the range around text, and moves the caret most backward | 118 // contracts the range around text, and moves the caret most backward |
119 // visually equivalent position before returning the range/positions. | 119 // visually equivalent position before returning the range/positions. |
120 EphemeralRangeTemplate<Strategy> ToNormalizedEphemeralRange() const; | 120 EphemeralRangeTemplate<Strategy> ToNormalizedEphemeralRange() const; |
121 | 121 |
122 Element* RootEditableElement() const; | 122 Element* RootEditableElement() const; |
123 bool IsContentEditable() const; | 123 bool IsContentEditable() const; |
124 bool HasEditableStyle() const; | 124 bool HasEditableStyle() const; |
125 bool IsContentRichlyEditable() const; | 125 bool IsContentRichlyEditable() const; |
126 | 126 |
127 bool IsValidFor(const Document&) const; | 127 bool IsValidFor(const Document&) const; |
128 void SetWithoutValidation(const PositionTemplate<Strategy>&, | 128 |
129 const PositionTemplate<Strategy>&); | 129 // TODO(editing-dev): |CreateWithoutValidationDeprecated()| is allowed |
| 130 // only to use in |TypingCommand| to remove part of grapheme cluster. |
| 131 // Note: |base| and |extent| can be disconnect position. |
| 132 static VisibleSelectionTemplate<Strategy> CreateWithoutValidationDeprecated( |
| 133 const PositionTemplate<Strategy>& base, |
| 134 const PositionTemplate<Strategy>& extent, |
| 135 TextAffinity); |
130 | 136 |
131 DECLARE_TRACE(); | 137 DECLARE_TRACE(); |
132 | 138 |
133 #ifndef NDEBUG | 139 #ifndef NDEBUG |
134 void ShowTreeForThis() const; | 140 void ShowTreeForThis() const; |
135 #endif | 141 #endif |
136 static void PrintTo(const VisibleSelectionTemplate&, std::ostream*); | 142 static void PrintTo(const VisibleSelectionTemplate&, std::ostream*); |
137 | 143 |
138 private: | 144 private: |
139 friend class SelectionAdjuster; | 145 friend class SelectionAdjuster; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 210 |
205 #ifndef NDEBUG | 211 #ifndef NDEBUG |
206 // Outside the WebCore namespace for ease of invocation from gdb. | 212 // Outside the WebCore namespace for ease of invocation from gdb. |
207 void showTree(const blink::VisibleSelection&); | 213 void showTree(const blink::VisibleSelection&); |
208 void showTree(const blink::VisibleSelection*); | 214 void showTree(const blink::VisibleSelection*); |
209 void showTree(const blink::VisibleSelectionInFlatTree&); | 215 void showTree(const blink::VisibleSelectionInFlatTree&); |
210 void showTree(const blink::VisibleSelectionInFlatTree*); | 216 void showTree(const blink::VisibleSelectionInFlatTree*); |
211 #endif | 217 #endif |
212 | 218 |
213 #endif // VisibleSelection_h | 219 #endif // VisibleSelection_h |
OLD | NEW |