OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
3 * Copyright (C) 2005 Alexey Proskuryakov. | 3 * Copyright (C) 2005 Alexey Proskuryakov. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 m_pastEndNode = nextInPreOrderCrossingShadowBoundaries(endContainer, endOffs
et); | 349 m_pastEndNode = nextInPreOrderCrossingShadowBoundaries(endContainer, endOffs
et); |
350 | 350 |
351 // Identify the first run. | 351 // Identify the first run. |
352 advance(); | 352 advance(); |
353 } | 353 } |
354 | 354 |
355 TextIterator::~TextIterator() | 355 TextIterator::~TextIterator() |
356 { | 356 { |
357 } | 357 } |
358 | 358 |
| 359 bool TextIterator::isInsideReplacedElement() |
| 360 { |
| 361 ASSERT(!atEnd()); |
| 362 ASSERT(length() == 1); |
| 363 if (!m_node) |
| 364 return false; |
| 365 RenderObject* renderer = m_node->renderer(); |
| 366 return renderer && renderer->isReplaced(); |
| 367 } |
| 368 |
359 void TextIterator::advance() | 369 void TextIterator::advance() |
360 { | 370 { |
361 if (m_shouldStop) | 371 if (m_shouldStop) |
362 return; | 372 return; |
363 | 373 |
364 // reset the run information | 374 // reset the run information |
365 m_positionNode = nullptr; | 375 m_positionNode = nullptr; |
366 m_textLength = 0; | 376 m_textLength = 0; |
367 | 377 |
368 // handle remembered node that needed a newline after the text node's newlin
e | 378 // handle remembered node that needed a newline after the text node's newlin
e |
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2201 resultEnd = collapseTo; | 2211 resultEnd = collapseTo; |
2202 return; | 2212 return; |
2203 } | 2213 } |
2204 } | 2214 } |
2205 | 2215 |
2206 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo
rFindPlainText); | 2216 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo
rFindPlainText); |
2207 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re
sultStart, resultEnd); | 2217 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re
sultStart, resultEnd); |
2208 } | 2218 } |
2209 | 2219 |
2210 } | 2220 } |
OLD | NEW |