Chromium Code Reviews| Index: Source/core/editing/TextIterator.cpp |
| diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp |
| index 45a5f213b3a52a91642d61b585c07bc17b29ca7a..37cc34d8a62de4fe0a80502cf862a92e2beef9b1 100644 |
| --- a/Source/core/editing/TextIterator.cpp |
| +++ b/Source/core/editing/TextIterator.cpp |
| @@ -356,6 +356,21 @@ TextIterator::~TextIterator() |
| { |
| } |
| +bool TextIterator::isInsideReplacedElement() const |
| +{ |
| + if (atEnd()) |
|
yosin_UTC9
2014/06/27 01:06:41
nit: You can combine following multiple if-stateme
|
| + return false; |
| + |
| + if (length() != 1) |
| + return false; |
| + |
| + if (!m_node) |
| + return false; |
| + |
| + RenderObject* renderer = m_node->renderer(); |
| + return renderer && renderer->isReplaced(); |
| +} |
| + |
| void TextIterator::advance() |
| { |
| if (m_shouldStop) |