Index: Source/core/editing/TextIterator.cpp |
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp |
index 275111a0e8165a537aab30f248f970a5070f8c69..7ba6820dcf07f17620e1cc2b45b37a857dd237f9 100644 |
--- a/Source/core/editing/TextIterator.cpp |
+++ b/Source/core/editing/TextIterator.cpp |
@@ -861,7 +861,7 @@ static int maxOffsetIncludingCollapsedSpaces(Node* node) |
// Whether or not we should emit a character as we enter m_node (if it's a container) or as we hit it (if it's atomic). |
bool TextIterator::shouldRepresentNodeOffsetZero() |
{ |
- if (m_emitsCharactersBetweenAllVisiblePositions && m_node->renderer() && m_node->renderer()->isTable()) |
+ if (m_emitsCharactersBetweenAllVisiblePositions && isRenderedTable(m_node)) |
return true; |
// Leave element positioned flush with start of a paragraph |
@@ -917,7 +917,7 @@ bool TextIterator::shouldRepresentNodeOffsetZero() |
bool TextIterator::shouldEmitSpaceBeforeAndAfterNode(Node* node) |
{ |
- return node->renderer() && node->renderer()->isTable() && (node->renderer()->isInline() || m_emitsCharactersBetweenAllVisiblePositions); |
+ return isRenderedTable(node) && (node->renderer()->isInline() || m_emitsCharactersBetweenAllVisiblePositions); |
} |
void TextIterator::representNodeOffsetZero() |