| Index: Source/core/editing/TextIterator.cpp
|
| diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp
|
| index 60dc3cb6d24ddcf2b0778fa03d1f8b8ab3e65d53..c28aa909829d2264b0bd689ca5b76781ba415c5b 100644
|
| --- a/Source/core/editing/TextIterator.cpp
|
| +++ b/Source/core/editing/TextIterator.cpp
|
| @@ -265,6 +265,7 @@ TextIterator::TextIterator(const Range* range, TextIteratorBehaviorFlags behavio
|
| , m_shouldStop(false)
|
| , m_emitsImageAltText(behavior & TextIteratorEmitsImageAltText)
|
| , m_entersAuthorShadowRoots(behavior & TextIteratorEntersAuthorShadowRoots)
|
| + , m_emitsObjectReplacementCharacter(behavior & TextIteratorEmitsObjectReplacementCharacter)
|
| {
|
| if (range)
|
| initialize(range->startPosition(), range->endPosition());
|
| @@ -295,6 +296,7 @@ TextIterator::TextIterator(const Position& start, const Position& end, TextItera
|
| , m_shouldStop(false)
|
| , m_emitsImageAltText(behavior & TextIteratorEmitsImageAltText)
|
| , m_entersAuthorShadowRoots(behavior & TextIteratorEntersAuthorShadowRoots)
|
| + , m_emitsObjectReplacementCharacter(behavior & TextIteratorEmitsObjectReplacementCharacter)
|
| {
|
| initialize(start, end);
|
| }
|
| @@ -782,6 +784,11 @@ bool TextIterator::handleReplacedElement()
|
| if (renderer->style()->visibility() != VISIBLE && !m_ignoresStyleVisibility)
|
| return false;
|
|
|
| + if (m_emitsObjectReplacementCharacter) {
|
| + emitCharacter(objectReplacementCharacter, m_node->parentNode(), m_node, 0, 1);
|
| + return true;
|
| + }
|
| +
|
| if (m_lastTextNodeEndedWithCollapsedSpace) {
|
| emitCharacter(' ', m_lastTextNode->parentNode(), m_lastTextNode, 1, 1);
|
| return false;
|
|
|