| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 if (haveRenderer) | 454 if (haveRenderer) |
| 455 exitNode(); | 455 exitNode(); |
| 456 if (m_positionNode) { | 456 if (m_positionNode) { |
| 457 m_iterationProgress = HandledChildren; | 457 m_iterationProgress = HandledChildren; |
| 458 return; | 458 return; |
| 459 } | 459 } |
| 460 next = m_node->nextSibling(); | 460 next = m_node->nextSibling(); |
| 461 } | 461 } |
| 462 | 462 |
| 463 if (!next && !parentNode && m_shadowDepth > 0) { | 463 if (!next && !parentNode && m_shadowDepth > 0) { |
| 464 // 4. Reached the top of a shadow root. If it's created by a
uthor, then try to visit the next | 464 // 4. Reached the top of a shadow root. |
| 465 // sibling shadow root, if any. | |
| 466 ShadowRoot* shadowRoot = toShadowRoot(m_node); | 465 ShadowRoot* shadowRoot = toShadowRoot(m_node); |
| 467 ShadowRoot* nextShadowRoot = shadowRoot->olderShadowRoot(); | 466 m_node = shadowRoot->host(); |
| 468 if (nextShadowRoot) { | 467 m_iterationProgress = HandledAuthorShadowRoots; |
| 469 m_fullyClippedStack.pop(); | 468 --m_shadowDepth; |
| 470 m_node = nextShadowRoot; | 469 m_fullyClippedStack.pop(); |
| 471 m_iterationProgress = HandledNone; | |
| 472 // m_shadowDepth is unchanged since we exit from a shado
w root and enter another. | |
| 473 pushFullyClippedState(m_fullyClippedStack, m_node); | |
| 474 } else { | |
| 475 // We are the last shadow root; exit from here and go ba
ck to where we were. | |
| 476 m_node = shadowRoot->host(); | |
| 477 m_iterationProgress = HandledAuthorShadowRoots; | |
| 478 --m_shadowDepth; | |
| 479 m_fullyClippedStack.pop(); | |
| 480 } | |
| 481 continue; | 470 continue; |
| 482 } | 471 } |
| 483 } | 472 } |
| 484 m_fullyClippedStack.pop(); | 473 m_fullyClippedStack.pop(); |
| 485 } | 474 } |
| 486 | 475 |
| 487 // set the new current node | 476 // set the new current node |
| 488 m_node = next; | 477 m_node = next; |
| 489 if (m_node) | 478 if (m_node) |
| 490 pushFullyClippedState(m_fullyClippedStack, m_node); | 479 pushFullyClippedState(m_fullyClippedStack, m_node); |
| (...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 resultEnd = collapseTo; | 1882 resultEnd = collapseTo; |
| 1894 return; | 1883 return; |
| 1895 } | 1884 } |
| 1896 } | 1885 } |
| 1897 | 1886 |
| 1898 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo
rFindPlainText); | 1887 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo
rFindPlainText); |
| 1899 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re
sultStart, resultEnd); | 1888 calculateCharacterSubrange(computeRangeIterator, matchStart, matchLength, re
sultStart, resultEnd); |
| 1900 } | 1889 } |
| 1901 | 1890 |
| 1902 } | 1891 } |
| OLD | NEW |