OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2009 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 void ExitNode(); | 133 void ExitNode(); |
134 bool ShouldRepresentNodeOffsetZero(); | 134 bool ShouldRepresentNodeOffsetZero(); |
135 bool ShouldEmitSpaceBeforeAndAfterNode(Node*); | 135 bool ShouldEmitSpaceBeforeAndAfterNode(Node*); |
136 void RepresentNodeOffsetZero(); | 136 void RepresentNodeOffsetZero(); |
137 bool HandleTextNode(); | 137 bool HandleTextNode(); |
138 bool HandleReplacedElement(); | 138 bool HandleReplacedElement(); |
139 bool HandleNonTextNode(); | 139 bool HandleNonTextNode(); |
140 void HandleTextBox(); | 140 void HandleTextBox(); |
141 void HandleTextNodeFirstLetter(LayoutTextFragment*); | 141 void HandleTextNodeFirstLetter(LayoutTextFragment*); |
| 142 bool ShouldHandleFirstLetter(const LayoutText&) const; |
| 143 bool ShouldProceedToRemainingText() const; |
| 144 void ProceedToRemainingText(); |
142 // Helper function during initialization. Returns true if the start position | 145 // Helper function during initialization. Returns true if the start position |
143 // is in a text node with first-letter, in which case it also sets up related | 146 // is in a text node with first-letter, in which case it also sets up related |
144 // parameters. Returns false otherwise. | 147 // parameters. Returns false otherwise. |
145 bool PrepareForFirstLetterInitialization(); | 148 bool PrepareForFirstLetterInitialization(); |
146 bool HasNotAdvancedToStartPosition(); | 149 bool HasNotAdvancedToStartPosition(); |
147 int AdjustedStartForFirstLetter(const Node&, const LayoutText&, int, int); | 150 int AdjustedStartForFirstLetter(const Node&, const LayoutText&, int, int); |
148 int AdjustedStartForRemainingText(const Node&, const LayoutText&, int, int); | 151 int AdjustedStartForRemainingText(const Node&, const LayoutText&, int, int); |
149 void SpliceBuffer(UChar, | 152 void SpliceBuffer(UChar, |
150 Node* text_node, | 153 Node* text_node, |
151 Node* offset_base_node, | 154 Node* offset_base_node, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 TextIteratorAlgorithm<EditingStrategy>; | 272 TextIteratorAlgorithm<EditingStrategy>; |
270 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 273 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
271 TextIteratorAlgorithm<EditingInFlatTreeStrategy>; | 274 TextIteratorAlgorithm<EditingInFlatTreeStrategy>; |
272 | 275 |
273 using TextIterator = TextIteratorAlgorithm<EditingStrategy>; | 276 using TextIterator = TextIteratorAlgorithm<EditingStrategy>; |
274 using TextIteratorInFlatTree = TextIteratorAlgorithm<EditingInFlatTreeStrategy>; | 277 using TextIteratorInFlatTree = TextIteratorAlgorithm<EditingInFlatTreeStrategy>; |
275 | 278 |
276 } // namespace blink | 279 } // namespace blink |
277 | 280 |
278 #endif // TextIterator_h | 281 #endif // TextIterator_h |
OLD | NEW |