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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 bool shouldRepresentNodeOffsetZero(); | 135 bool shouldRepresentNodeOffsetZero(); |
136 bool shouldEmitSpaceBeforeAndAfterNode(Node*); | 136 bool shouldEmitSpaceBeforeAndAfterNode(Node*); |
137 void representNodeOffsetZero(); | 137 void representNodeOffsetZero(); |
138 bool handleTextNode(); | 138 bool handleTextNode(); |
139 bool handleReplacedElement(); | 139 bool handleReplacedElement(); |
140 bool handleNonTextNode(); | 140 bool handleNonTextNode(); |
141 void handleTextBox(); | 141 void handleTextBox(); |
142 void handleTextNodeFirstLetter(RenderTextFragment*); | 142 void handleTextNodeFirstLetter(RenderTextFragment*); |
143 bool hasVisibleTextNode(RenderText*); | 143 bool hasVisibleTextNode(RenderText*); |
144 void emitCharacter(UChar, Node* textNode, Node* offsetBaseNode, int textStar
tOffset, int textEndOffset); | 144 void emitCharacter(UChar, Node* textNode, Node* offsetBaseNode, int textStar
tOffset, int textEndOffset); |
145 void emitText(Node* textNode, RenderObject* renderObject, int textStartOffse
t, int textEndOffset); | 145 void emitText(Node* textNode, RenderText* renderer, int textStartOffset, int
textEndOffset); |
146 void emitText(Node* textNode, int textStartOffset, int textEndOffset); | |
147 | 146 |
148 // Current position, not necessarily of the text being returned, but positio
n | 147 // Current position, not necessarily of the text being returned, but positio
n |
149 // as we walk through the DOM tree. | 148 // as we walk through the DOM tree. |
150 RawPtrWillBeMember<Node> m_node; | 149 RawPtrWillBeMember<Node> m_node; |
151 int m_offset; | 150 int m_offset; |
152 IterationProgress m_iterationProgress; | 151 IterationProgress m_iterationProgress; |
153 BitStack m_fullyClippedStack; | 152 BitStack m_fullyClippedStack; |
154 int m_shadowDepth; | 153 int m_shadowDepth; |
155 | 154 |
156 // The range. | 155 // The range. |
(...skipping 15 matching lines...) Expand all Loading... |
172 // are false and 0, we go back to normal iterating. | 171 // are false and 0, we go back to normal iterating. |
173 bool m_needsAnotherNewline; | 172 bool m_needsAnotherNewline; |
174 InlineTextBox* m_textBox; | 173 InlineTextBox* m_textBox; |
175 // Used when iteration over :first-letter text to save pointer to | 174 // Used when iteration over :first-letter text to save pointer to |
176 // remaining text box. | 175 // remaining text box. |
177 InlineTextBox* m_remainingTextBox; | 176 InlineTextBox* m_remainingTextBox; |
178 // Used to point to RenderText object for :first-letter. | 177 // Used to point to RenderText object for :first-letter. |
179 RenderText *m_firstLetterText; | 178 RenderText *m_firstLetterText; |
180 | 179 |
181 // Used to do the whitespace collapsing logic. | 180 // Used to do the whitespace collapsing logic. |
182 RawPtrWillBeMember<Node> m_lastTextNode; | 181 RawPtrWillBeMember<Text> m_lastTextNode; |
183 bool m_lastTextNodeEndedWithCollapsedSpace; | 182 bool m_lastTextNodeEndedWithCollapsedSpace; |
184 UChar m_lastCharacter; | 183 UChar m_lastCharacter; |
185 | 184 |
186 // Used for whitespace characters that aren't in the DOM, so we can point at
them. | 185 // Used for whitespace characters that aren't in the DOM, so we can point at
them. |
187 // If non-zero, overrides m_text. | 186 // If non-zero, overrides m_text. |
188 UChar m_singleCharacterBuffer; | 187 UChar m_singleCharacterBuffer; |
189 | 188 |
190 // Used when text boxes are out of order (Hebrew/Arabic w/ embeded LTR text) | 189 // Used when text boxes are out of order (Hebrew/Arabic w/ embeded LTR text) |
191 Vector<InlineTextBox*> m_sortedTextBoxes; | 190 Vector<InlineTextBox*> m_sortedTextBoxes; |
192 size_t m_sortedTextBoxesPosition; | 191 size_t m_sortedTextBoxesPosition; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // The current text and its position, in the form to be returned from the it
erator. | 273 // The current text and its position, in the form to be returned from the it
erator. |
275 RawPtrWillBeMember<Node> m_positionNode; | 274 RawPtrWillBeMember<Node> m_positionNode; |
276 int m_positionStartOffset; | 275 int m_positionStartOffset; |
277 int m_positionEndOffset; | 276 int m_positionEndOffset; |
278 | 277 |
279 String m_textContainer; // We're interested in the range [m_textOffset, m_te
xtOffset + m_textLength) of m_textContainer. | 278 String m_textContainer; // We're interested in the range [m_textOffset, m_te
xtOffset + m_textLength) of m_textContainer. |
280 int m_textOffset; | 279 int m_textOffset; |
281 int m_textLength; | 280 int m_textLength; |
282 | 281 |
283 // Used to do the whitespace logic. | 282 // Used to do the whitespace logic. |
284 RawPtrWillBeMember<Node> m_lastTextNode; | 283 RawPtrWillBeMember<Text> m_lastTextNode; |
285 UChar m_lastCharacter; | 284 UChar m_lastCharacter; |
286 | 285 |
287 // Used for whitespace characters that aren't in the DOM, so we can point at
them. | 286 // Used for whitespace characters that aren't in the DOM, so we can point at
them. |
288 UChar m_singleCharacterBuffer; | 287 UChar m_singleCharacterBuffer; |
289 | 288 |
290 // Whether m_node has advanced beyond the iteration range (i.e. m_startNode)
. | 289 // Whether m_node has advanced beyond the iteration range (i.e. m_startNode)
. |
291 bool m_havePassedStartNode; | 290 bool m_havePassedStartNode; |
292 | 291 |
293 // Should handle first-letter renderer in the next call to handleTextNode. | 292 // Should handle first-letter renderer in the next call to handleTextNode. |
294 bool m_shouldHandleFirstLetter; | 293 bool m_shouldHandleFirstLetter; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 Vector<UChar> m_buffer; | 372 Vector<UChar> m_buffer; |
374 // Did we have to look ahead in the textIterator to confirm the current chun
k? | 373 // Did we have to look ahead in the textIterator to confirm the current chun
k? |
375 bool m_didLookAhead; | 374 bool m_didLookAhead; |
376 RefPtrWillBeMember<Range> m_range; | 375 RefPtrWillBeMember<Range> m_range; |
377 TextIterator m_textIterator; | 376 TextIterator m_textIterator; |
378 }; | 377 }; |
379 | 378 |
380 } | 379 } |
381 | 380 |
382 #endif | 381 #endif |
OLD | NEW |