Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Unified Diff: Source/core/editing/TextIterator.cpp

Issue 342483002: The length of a TextIterator containing replaced element is at least 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix dummy whitespace issue. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/TextIterator.cpp
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp
index 45a5f213b3a52a91642d61b585c07bc17b29ca7a..71fcac5ff3469082ba707fc24a97b6f094ce5be2 100644
--- a/Source/core/editing/TextIterator.cpp
+++ b/Source/core/editing/TextIterator.cpp
@@ -356,6 +356,16 @@ TextIterator::~TextIterator()
{
}
+bool TextIterator::isInsideReplacedElement() const
+{
+ ASSERT(!atEnd());
yosin_UTC9 2014/06/26 08:49:11 We should return false rather than ASSERT. For pre
+ ASSERT(length() == 1);
yosin_UTC9 2014/06/26 08:49:11 As same as L361.
+ if (!m_node)
+ return false;
+ RenderObject* renderer = m_node->renderer();
+ return renderer && renderer->isReplaced();
+}
+
void TextIterator::advance()
{
if (m_shouldStop)

Powered by Google App Engine
This is Rietveld 408576698